Skip to content

Commit 3a038aa

Browse files
rahaugyyx990803
authored andcommitted
Vue School Black Friday Banner (#2403)
* refactor: make banner stand out * refactor: change banner style
1 parent 2d6c272 commit 3a038aa

File tree

4 files changed

+75
-96
lines changed

4 files changed

+75
-96
lines changed

themes/vue/layout/partials/vueschool_banner.ejs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<img class="vueschool-banner--logo" src="/images/vueschool_logo.svg" alt="Vue School Logo">
44
<div class="vueschool-banner--wrapper">
55
<p>Black Friday 40% OFF at Vue School<span>Learn Vue.js through video courses.</span></p>
6+
<button>Get 40% Off</button>
67
</div>
78
<div id="vs-close" class="vueschool-banner--close"></div>
89
</a>

themes/vue/source/css/_vueschool.styl

+43-43
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,21 @@
44

55
.vueschool-banner
66
display none
7-
background #4fc08d
8-
background-image linear-gradient(to right, #35495E, #35495E 50%, #4fc08d 50%)
7+
background #0d0751
98
overflow hidden
109
position relative
11-
12-
&:before
13-
content ''
14-
background #35495E
15-
background-image linear-gradient(to right, #4fc08d, #4fc08d 80%, #35495E 100%)
16-
position absolute
17-
top 0
18-
bottom 0
19-
left 0
20-
width 0
21-
transition width .15s ease-out .1s
10+
background-image: url(/images/vueschool_banner_background.jpg);
11+
background-size: cover;
12+
background-repeat: no-repeat;
13+
background-position: center;
2214

2315
&:hover
2416
&:before
2517
transition width .15s ease-in
2618
width 50%
2719
p
2820
transition-delay 0
29-
color #fff
3021

31-
.vueschool-banner--wrapper::before
32-
width 100vw
33-
transition width .15s ease-in .10s
3422

3523
a
3624
display flex
@@ -41,37 +29,27 @@
4129
display none
4230

4331
.vueschool-banner--wrapper
32+
color: #FFF
4433
display flex
4534
height 100%
4635
align-items center
47-
background #4fc08d
36+
background #0d0751
4837
margin-left -50px
4938
padding-left 50px
5039
position relative
5140

52-
&:before
53-
content ''
54-
pointer-events none
55-
background #35495E
56-
background-image linear-gradient(to right, #35495E, #35495E 80%, #4fc08d 100%)
57-
position absolute
58-
top 0
59-
bottom 0
60-
left 0
61-
width 0
62-
transition width .15s ease-out
6341

6442
&:hover
6543
+ .vueschool-banner--close
6644
&:before,
6745
&:after
6846
transform-origin 100%
47+
background #fff
6948

7049
p
7150
margin -3px 50px 0 20px
7251
font-size 1.17rem
7352
font-weight 600
74-
color #2c3e50
7553
position relative
7654
transition-delay .15s
7755

@@ -80,10 +58,23 @@
8058
display block
8159
color #fff
8260

61+
button
62+
cursor pointer
63+
font-weight 600
64+
text-transform uppercase
65+
padding 16px 32px
66+
border-radius 32px
67+
background #ff49c6
68+
border none
69+
color #FFF
70+
font-size 16px
71+
margin: 0 auto
72+
73+
&:hover
74+
color white
75+
76+
8377
.vueschool-banner--logo
84-
height 102%
85-
margin-top: -1px
86-
margin-left 125px
8778
position relative
8879
z-index 2
8980

@@ -141,24 +132,32 @@
141132
#main.fix-sidebar .sidebar .sidebar-inner
142133
padding-top 110px
143134

135+
#sidebar-sponsors-platinum-right
136+
position absolute
137+
top: 170px;
138+
144139
@media screen and (min-width: 415px) and (max-width: 900px)
145140
.vueschool-weekend-promo.docs:not(.vueschool-menu-fixed)
146-
#main.fix-sidebar .sidebar .sidebar-inner
147-
padding-top 140px
141+
#main.fix-sidebar .sidebar .sidebar-inner
142+
padding-top 140px
148143

149-
#sidebar-sponsors-platinum-right
150-
position absolute
151-
top: 170px;
144+
#sidebar-sponsors-platinum-right
145+
position absolute
146+
top: 170px;
152147

153-
&.vueschool-menu-fixed.docs
154-
.vueschool-banner
155-
margin-bottom 0
148+
&.vueschool-menu-fixed.docs
149+
.vueschool-banner
150+
margin-bottom 0
151+
152+
.vueschool-banner
153+
button
154+
display none
156155

157156
@media screen and (max-width: 414px)
158157
// Docs menu
159158
.vueschool-weekend-promo.docs:not(.vueschool-menu-fixed)
160159
#main.fix-sidebar .sidebar .sidebar-inner
161-
padding-top 100px
160+
padding-top 100px
162161

163162
.vueschool-banner
164163
.vueschool-banner--logo
@@ -182,7 +181,6 @@
182181

183182
p, span
184183
font-size .8rem
185-
color #fff
186184

187185
.vueschool-banner--close
188186
top 0px
@@ -201,6 +199,8 @@
201199
max-width 200px
202200
span
203201
display none
202+
button
203+
display none
204204

205205
@media screen and (max-width 286px)
206206
.vueschool-banner p
Loading
+31-53
Loading

0 commit comments

Comments
 (0)