Skip to content

Commit 701189b

Browse files
committed
首页:新增 slogan;新增 star 数量及点 star 按钮;优化功能及优势的简介
1 parent 4fbfcf7 commit 701189b

File tree

6 files changed

+213
-192
lines changed

6 files changed

+213
-192
lines changed

.idea/workspace.xml

Lines changed: 127 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/vue/layout/index.ejs

Lines changed: 83 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,37 @@
3030
</div>
3131

3232
<!--<div id="special-sponsor">-->
33-
<!--<h3>特别赞助</h3>-->
34-
<!--<%_ for (const sponsor of theme.platinum_sponsors_china) { _%>-->
35-
<!--<a href="<%- sponsor.url %>" target="_blank">-->
36-
<!--<img src="<%- url_for(`/images/${sponsor.img}`) %>" style="width:200px">-->
37-
<!--</a>-->
38-
<!--<%_ } _%>-->
39-
<!--<%_if (theme.platinum_sponsors_china.length < 2) { _%>-->
40-
<!--<br>-->
41-
<!--<a class="become-backer" href="/support-vuejs/#special-sponsor-china">-->
42-
<!--成为特别赞助商-->
43-
<!--</a>-->
44-
<!--<%_} _%>-->
33+
<!--<h3>特别赞助</h3>-->
34+
<!--<%_ for (const sponsor of theme.platinum_sponsors_china) { _%>-->
35+
<!--<a href="<%- sponsor.url %>" target="_blank">-->
36+
<!--<img src="<%- url_for(`/images/${sponsor.img}`) %>" style="width:200px">-->
37+
<!--</a>-->
38+
<!--<%_ } _%>-->
39+
<!--<%_if (theme.platinum_sponsors_china.length < 2) { _%>-->
40+
<!--<br>-->
41+
<!--<a class="become-backer" href="/support-vuejs/#special-sponsor-china">-->
42+
<!--成为特别赞助商-->
43+
<!--</a>-->
44+
<!--<%_} _%>-->
4545
<!--</div>-->
4646

47+
<div id="special-sponsor">
48+
<p align="center" style="margin-top: 0px">🏆码云最有价值开源项目<br />🚀后端接口和文档自动化,前端(客户端) 定制返回JSON的数据和结构!</p>
49+
<a class="become-backer" style="margin-top: 0px" href="https://github.com/APIJSON/APIJSON">
50+
右上角点 ⭐Star 支持
51+
</a>
52+
</div>
53+
4754
<div id="highlights">
4855
<div class="inner">
4956
<div class="point">
5057
<h2>对于前端</h2>
5158
<p>
52-
不用再向后端同事催接口、求文档<br>
53-
数据和结构完全定制,要啥有啥<br>
54-
支持看请求知结果,所求即所得<br>
55-
可一次获取任何数据、任何结构<br>
56-
能去除重复数据,节省流量提高速度<br>
59+
不用再向后端开发同事催接口、求文档<br>
60+
前端能完全定制数据和结构,要啥有啥<br>
61+
调用接口看请求知结果,所求即所得<br>
62+
可以一次性获取任何数据、任何结构<br>
63+
能够去除重复数据,节省流量提高速度<br>
5764
</p>
5865
</div>
5966

@@ -88,37 +95,37 @@
8895
</div>
8996

9097
<!--<div id="news">-->
91-
<!--<div class="inner">-->
92-
<!--<h3><label for="member_email">订阅我们的周刊 (英文)</label></h3>-->
93-
<!--<form-->
94-
<!--class="newsletter-form"-->
95-
<!--id="revue-form"-->
96-
<!--name="revue-form"-->
97-
<!--target="_blank"-->
98-
<!--action="https://www.getrevue.co/profile/vuenewsletter/add_subscriber"-->
99-
<!--method="post"-->
100-
<!--@submit="subscribe"-->
101-
<!--&gt;-->
102-
<!--<input-->
103-
<!--class="newsletter-input"-->
104-
<!--type="email"-->
105-
<!--name="member[email]"-->
106-
<!--id="member_email"-->
107-
<!--required-->
108-
<!--placeholder="邮件地址"-->
109-
<!--&gt;-->
110-
<!--<input-->
111-
<!--class="button newsletter-button"-->
112-
<!--type="submit"-->
113-
<!--value="订阅"-->
114-
<!--name="member[subscribe]"-->
115-
<!--id="member_submit"-->
116-
<!--&gt;-->
117-
<!--</form>-->
118-
<!--<p>-->
119-
<!--你可以在 <a href="https://news.vuejs.org" target="_blank">news.vuejs.org</a> 翻阅往期的 issue,也可以收听 podcast。-->
120-
<!--</p>-->
121-
<!--</div>-->
98+
<!--<div class="inner">-->
99+
<!--<h3><label for="member_email">订阅我们的周刊 (英文)</label></h3>-->
100+
<!--<form-->
101+
<!--class="newsletter-form"-->
102+
<!--id="revue-form"-->
103+
<!--name="revue-form"-->
104+
<!--target="_blank"-->
105+
<!--action="https://www.getrevue.co/profile/vuenewsletter/add_subscriber"-->
106+
<!--method="post"-->
107+
<!--@submit="subscribe"-->
108+
<!--&gt;-->
109+
<!--<input-->
110+
<!--class="newsletter-input"-->
111+
<!--type="email"-->
112+
<!--name="member[email]"-->
113+
<!--id="member_email"-->
114+
<!--required-->
115+
<!--placeholder="邮件地址"-->
116+
<!--&gt;-->
117+
<!--<input-->
118+
<!--class="button newsletter-button"-->
119+
<!--type="submit"-->
120+
<!--value="订阅"-->
121+
<!--name="member[subscribe]"-->
122+
<!--id="member_submit"-->
123+
<!--&gt;-->
124+
<!--</form>-->
125+
<!--<p>-->
126+
<!--你可以在 <a href="https://news.vuejs.org" target="_blank">news.vuejs.org</a> 翻阅往期的 issue,也可以收听 podcast。-->
127+
<!--</p>-->
128+
<!--</div>-->
122129
<!--</div>-->
123130

124131
<div id="footer">
@@ -134,43 +141,43 @@
134141
</a>
135142
</p>
136143
<p>遵循 <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache-2.0 开源协议</a><br>
137-
Copyright &copy; 2016-<%- new Date().getFullYear() %> Tommy Lemon</p>
144+
Copyright &copy; 2016-<%- new Date().getFullYear() %> Tommy Lemon</p>
138145
</div>
139146

140147
<div id="video-modal" class="modal">
141148
<div class="video-space" style="padding: 56.25% 0 0 0; position: relative;"></div>
142149
</div>
143150

144151
<script>
145-
(function () {
146-
var topScrolled = false
147-
var sponsors = document.getElementById('sponsors')
148-
var sponsorTop = sponsors.offsetTop
149-
var sponsorActive = false
152+
(function () {
153+
var topScrolled = false
154+
var sponsors = document.getElementById('sponsors')
155+
var sponsorTop = sponsors.offsetTop
156+
var sponsorActive = false
150157
151-
window.addEventListener('resize', function () {
152-
sponsorTop = sponsors.offsetTop
153-
})
158+
window.addEventListener('resize', function () {
159+
sponsorTop = sponsors.offsetTop
160+
})
154161
155-
window.addEventListener('scroll', function () {
156-
if (window.pageYOffset > 165 && !topScrolled) {
157-
topScrolled = true
158-
document.getElementById('mobile-bar').classList.remove('top')
159-
} else if (window.pageYOffset <= 165 && topScrolled) {
160-
topScrolled = false
161-
document.getElementById('mobile-bar').classList.add('top')
162-
}
163-
if (window.pageYOffset > sponsorTop - 100) {
164-
if (!sponsorActive) {
165-
sponsorActive = true
166-
sponsors.classList.add('active')
162+
window.addEventListener('scroll', function () {
163+
if (window.pageYOffset > 165 && !topScrolled) {
164+
topScrolled = true
165+
document.getElementById('mobile-bar').classList.remove('top')
166+
} else if (window.pageYOffset <= 165 && topScrolled) {
167+
topScrolled = false
168+
document.getElementById('mobile-bar').classList.add('top')
167169
}
168-
} else {
169-
if (sponsorActive) {
170-
sponsorActive = false
171-
sponsors.classList.remove('active')
170+
if (window.pageYOffset > sponsorTop - 100) {
171+
if (!sponsorActive) {
172+
sponsorActive = true
173+
sponsors.classList.add('active')
174+
}
175+
} else {
176+
if (sponsorActive) {
177+
sponsorActive = false
178+
sponsors.classList.remove('active')
179+
}
172180
}
173-
}
174-
})
175-
})()
181+
})
182+
})()
176183
</script>

themes/vue/layout/partials/header.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<img src="<%- url_for("/images/logo.png") %>" alt="vue logo">
44
<span>APIJSON</span>
55
</a>
6+
<iframe style="margin-left: 12px" src="https://ghbtns.com/github-btn.html?user=APIJSON&amp;repo=APIJSON&amp;type=star&amp;count=true&amp;size=small" frameborder="0" scrolling="0" width="160px" height="18px"></iframe>
67
<ul id="nav">
78
<%- partial('partials/main_menu', { context: 'nav' }) %>
89
</ul>

themes/vue/source/css/_sponsors-index.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
display: inline-block
5858
color: $green
5959
font-size: .8em
60-
width: 125px
60+
width: 144px
6161
padding: 4px 0
6262
text-align: center
6363
margin: 20px 0 0

themes/vue/source/css/_sponsors-sidebar.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
display: inline-block
2121
color: $green
2222
font-size: .8em
23-
width: 125px
23+
width: 136px
2424
padding: 4px 0
2525
text-align: center
2626
margin-bottom: 20px

themes/vue/source/css/index.styl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ body
125125
max-width: $width
126126
margin: 0 auto
127127
text-align: center
128-
padding-top: 60px
129-
padding-bottom: 60px
130128
.point
131129
width: 33%
132130
display: inline-block

0 commit comments

Comments
 (0)