|
| 1 | +<template> |
| 2 | + <a id="vs" href="https://vueschool.io/sales/summer-vue?friend=vuejs" target="_blank" rel="noreferrer"> |
| 3 | + <div class="vs-iso"> |
| 4 | + <img src="/images/vueschool/vs-iso.svg"> |
| 5 | + </div> |
| 6 | + <div class="vs-logo"> |
| 7 | + <img src="/images/vueschool/vs-logo.svg"> |
| 8 | + </div> |
| 9 | + <div class="vs-core"> |
| 10 | + <div class="vs-backpack"> |
| 11 | + <img src="/images/vueschool/vs-backpack.png" alt="Backpack"> |
| 12 | + </div> |
| 13 | + <div class="vs-slogan"> |
| 14 | + 3-months Vue School for only $49 <span style="text-decoration: line-through">$75</span>! |
| 15 | + <span class="vs-slogan-light"> |
| 16 | + Limited Time Offer |
| 17 | + </span> |
| 18 | + </div> |
| 19 | + <div class="vs-button"> |
| 20 | + GET ACCESS |
| 21 | + </div> |
| 22 | + </div> |
| 23 | + <div |
| 24 | + id="vs-close" |
| 25 | + class="vs-close" |
| 26 | + @click.stop.prevent="$emit('close')"> |
| 27 | + <img src="/images/vueschool/close.svg" alt="Close"> |
| 28 | + </div> |
| 29 | + </a> |
| 30 | +</template> |
| 31 | + |
| 32 | +<style lang="stylus"> |
| 33 | +@require '../styles/config' |
| 34 | +$topBannerHeight ?= 5rem |
| 35 | +$topBannerHeightMobile ?= 3.125rem |
| 36 | +
|
| 37 | +// Banner |
| 38 | +#vs |
| 39 | + align-items: center |
| 40 | + background-color: #202A5A |
| 41 | + box-sizing: border-box |
| 42 | + color: #fff |
| 43 | + display: none |
| 44 | + font-family 'Inter', Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif |
| 45 | + justify-content: center |
| 46 | + position: fixed |
| 47 | + padding: 0 10px |
| 48 | + left: 0 |
| 49 | + right: 0 |
| 50 | + top: 0 |
| 51 | + z-index: 100 |
| 52 | + height: $topBannerHeightMobile |
| 53 | + @media (min-width: 680px) |
| 54 | + height: $topBannerHeight |
| 55 | + &:hover |
| 56 | + .vs-core |
| 57 | + .vs-button |
| 58 | + background: #f22606 |
| 59 | +
|
| 60 | + .vs-iso |
| 61 | + display: none |
| 62 | + position: absolute |
| 63 | + left: 20px |
| 64 | + height: 26px |
| 65 | + img |
| 66 | + height: 26px |
| 67 | + @media (min-width: 680px) |
| 68 | + display: inline-block |
| 69 | + height: 40px |
| 70 | + img |
| 71 | + height: 40px |
| 72 | + @media (min-width: 900px) |
| 73 | + display: none |
| 74 | +
|
| 75 | + .vs-logo |
| 76 | + position: absolute |
| 77 | + display: none |
| 78 | + left: 40px |
| 79 | + @media (min-width: 900px) |
| 80 | + display: block |
| 81 | +
|
| 82 | + .vs-core |
| 83 | + display: flex |
| 84 | + align-items: center |
| 85 | +
|
| 86 | + .vs-backpack |
| 87 | + margin-right: 6px |
| 88 | + @media (min-width: 680px) |
| 89 | + margin-right: 14px |
| 90 | + img |
| 91 | + height: 50px |
| 92 | + @media (min-width: 680px) |
| 93 | + height: 74px |
| 94 | +
|
| 95 | + .vs-slogan |
| 96 | + color: #FFF |
| 97 | + font-weight: bold |
| 98 | + font-size: 14px |
| 99 | + margin-right: 26px |
| 100 | + @media (min-width: 680px) |
| 101 | + margin-right: 0 |
| 102 | + font-size: 18px |
| 103 | + > .vs-slogan-light |
| 104 | + color: #ff5338 |
| 105 | + display: block |
| 106 | + text-align: left |
| 107 | + @media (min-width: 900px) |
| 108 | + text-align: center |
| 109 | + display: inline |
| 110 | +
|
| 111 | + .vs-button |
| 112 | + margin-left: 43px |
| 113 | + color: #FFF |
| 114 | + padding: 13px 24px |
| 115 | + border-radius: 40px |
| 116 | + display: none |
| 117 | + background: #ff5338 |
| 118 | + font-weight: bold |
| 119 | + @media (min-width: 680px) |
| 120 | + display: inline-block |
| 121 | +
|
| 122 | + .vs-close |
| 123 | + right: 10px |
| 124 | + position: absolute |
| 125 | + padding: 10px |
| 126 | + @media (min-width: 680px) |
| 127 | + right: 20px |
| 128 | + &:hover |
| 129 | + color: #56D8FF |
| 130 | +
|
| 131 | +/************************************/ |
| 132 | +
|
| 133 | +// Show banner only if the container has class "has-top-banner" |
| 134 | +.theme-container.has-top-banner |
| 135 | + #vs |
| 136 | + display: flex |
| 137 | +
|
| 138 | +// Add margin top to body, navbar and sidebar |
| 139 | +.theme-container.has-top-banner |
| 140 | + margin-top: $topBannerHeightMobile |
| 141 | + .navbar |
| 142 | + margin-top: $topBannerHeightMobile |
| 143 | + .sidebar |
| 144 | + margin-top: $topBannerHeightMobile |
| 145 | +@media (min-width: 680px) |
| 146 | + .theme-container.has-top-banner |
| 147 | + margin-top: $topBannerHeight |
| 148 | + .navbar |
| 149 | + margin-top: $topBannerHeight |
| 150 | + .sidebar |
| 151 | + margin-top: $topBannerHeight |
| 152 | +
|
| 153 | +// Adjust titles margin and padding for anchor links |
| 154 | +.theme-container.has-top-banner |
| 155 | + {$contentClass}:not(.custom) |
| 156 | + h1, h2, h3, h4, h5, h6 |
| 157 | + margin-top (0.5rem - $topBannerHeight - $navbarHeight) |
| 158 | + padding-top ($navbarHeight + $topBannerHeight + 1rem) |
| 159 | +@media (min-width: 680px) |
| 160 | + .theme-container.has-top-banner |
| 161 | + {$contentClass}:not(.custom) |
| 162 | + h1, h2, h3, h4, h5, h6 |
| 163 | + margin-top (0.5rem - $topBannerHeightMobile - $navbarHeight) |
| 164 | + padding-top ($navbarHeight + $topBannerHeightMobile + 1rem) |
| 165 | +</style> |
0 commit comments