Skip to content

Commit 40644a3

Browse files
committed
tweak index
1 parent 6c9d82f commit 40644a3

File tree

3 files changed

+40
-10
lines changed

3 files changed

+40
-10
lines changed

themes/vue/layout/index.ejs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@
2424
<div id="highlights">
2525
<div class="inner">
2626
<div class="point">
27-
<h2>Performant</h2>
28-
<p>
29-
16kb min+gzip Runtime<br>
30-
Blazing Fast Virtual DOM<br>
31-
Minimal Optimization Efforts
32-
</p>
27+
<h2>Approachable</h2>
28+
<p>Already know HTML, CSS and JavaScript? Read the guide and start building things in no time!</p>
3329
</div>
3430

3531
<div class="point">
3632
<h2>Versatile</h2>
37-
<p>Lean, minimal core with a feature-rich, incrementally adoptable ecosystem.</p>
33+
<p>Simple, minimal core with an incrementally adoptable stack that can handle apps of any scale.</p>
3834
</div>
3935

4036
<div class="point">
41-
<h2>Approachable</h2>
42-
<p>Already know HTML, CSS and JavaScript? Read the guide and start building things in no time!</p>
37+
<h2>Performant</h2>
38+
<p>
39+
16kb min+gzip Runtime<br>
40+
Blazing Fast Virtual DOM<br>
41+
Minimal Optimization Efforts
42+
</p>
4343
</div>
4444
</div>
4545
</div>
@@ -60,3 +60,15 @@
6060

6161
<script src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
6262
<script src="/js/common.js"></script>
63+
<script>
64+
var topScrolled = false
65+
window.addEventListener('scroll', function () {
66+
if (window.pageYOffset > 165 && !topScrolled) {
67+
topScrolled = true
68+
document.getElementById('mobile-bar').classList.remove('top')
69+
} else if (window.pageYOffset <= 165 && topScrolled) {
70+
topScrolled = false
71+
document.getElementById('mobile-bar').classList.add('top')
72+
}
73+
})
74+
</script>

themes/vue/layout/layout.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="/js/vue.js"></script>
1919
</head>
2020
<body>
21-
<div id="mobile-bar">
21+
<div id="mobile-bar" <%- isIndex ? 'class="top"' : '' %>>
2222
<a class="menu-button"></a>
2323
<a class="logo" href="/"></a>
2424
</div>

themes/vue/source/css/index.styl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ $space = 50px
99
body
1010
background-color darken($light, 10%)
1111

12+
#logo
13+
span
14+
font-size 1.2em
15+
img
16+
display none
17+
18+
.sidebar
19+
display none
20+
21+
#mobile-bar
22+
&.top
23+
background-color transparent
24+
box-shadow none
25+
.logo
26+
display none
27+
1228
#hero
1329
padding $space 40px
1430
background-color #fff
@@ -116,6 +132,8 @@ body
116132
body
117133
-webkit-text-size-adjust none
118134
font-size 14px
135+
.sidebar
136+
display block
119137
#header
120138
display none
121139
#mobile-bar

0 commit comments

Comments
 (0)