Skip to content

Commit 7f7a3b7

Browse files
author
ZhangRui
committed
新版首页稍微改了一点点
1 parent 176ae69 commit 7f7a3b7

5 files changed

Lines changed: 90 additions & 36 deletions

File tree

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
www.yncoder.com

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
markdown: kramdown
22
permalink: /:categories/:title
33

4-
host: yncoder.github.io
4+
host: localhost

_layouts/page.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
</head>
1414
<body class="page-{{ page.type }}">
1515

16-
<nav class="container">
17-
<a href="/" class="logo"><img src="/assets/img/logo-160.png" /><strong>Yncoder</strong></a>
18-
<ul>
19-
<li><a href="/about">关于</a></li>
20-
<li><a href="/bloggers">Bloggers</a></li>
21-
<li><iframe src="https://ghbtns.com/github-btn.html?user=yncoder&amp;repo=yncoder.github.io&amp;type=watch&amp;count=true&amp;v=2" frameborder="0" scrolling="0" width="100" height="20"></iframe></li>
22-
</ul>
16+
<nav>
17+
<div class="container">
18+
<a href="/" class="logo"><strong>&lt;yn/&gt;</strong></a>
19+
<ul>
20+
<li><a href="/about">关于</a></li>
21+
<li><a href="/bloggers">Bloggers</a></li>
22+
<li><iframe src="https://ghbtns.com/github-btn.html?user=yncoder&amp;repo=yncoder.github.io&amp;type=watch&amp;count=true&amp;v=2" frameborder="0" scrolling="0" width="100" height="20"></iframe></li>
23+
</ul>
24+
</div>
2325
</nav>
2426

2527
{{ content }}

assets/css/common.css

Lines changed: 68 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,17 @@ a:hover{
5353

5454
nav{
5555
height: 60px;
56+
border-bottom: 1px solid #eee;
57+
background-color: rgba(63, 147, 192, 1);
58+
background: linear-gradient( 160deg, rgba(63, 147, 192, 1), rgba(63, 147, 192, 0.7));
5659
}
5760
nav .logo{
5861
display: block;
5962
float: left;
6063
height: 60px;
6164
text-decoration: none;
6265
font: normal 2em/60px Consolas;
63-
color: #000;
64-
}
65-
nav .logo img{
66-
float: left;
67-
height: 100%;
68-
margin-right: .5em;
66+
color: #fff;
6967
}
7068
nav ul{
7169
position: absolute;
@@ -81,6 +79,9 @@ nav li{
8179
vertical-align: middle;
8280
margin-left: 20px;
8381
}
82+
nav li a{
83+
color: #fff;
84+
}
8485

8586
footer{
8687
padding: 20px 0;
@@ -153,32 +154,79 @@ article blockquote{line-height:1.6em; margin:1em 0 1em 1.5em; border-left:2px so
153154
.page-list #issue-list li{
154155
list-style: none;
155156
position: relative;
156-
padding: 10px 10px 10px 70px;
157+
height: 70px;
158+
padding: 11px;
159+
border-top: 1px solid #f3f3f3;
160+
}
161+
.page-list #issue-list li.label-活动 {
162+
border-left: 3px solid #CE2C7C
163+
}
164+
.page-list #issue-list li.label-招聘 {
165+
border-left: 3px solid #FCCB00
166+
}
167+
.page-list #issue-list li.label-技术 {
168+
border-left: 3px solid #82B5ED
169+
}
170+
.page-list #issue-list li.label-求职 {
171+
border-left: 3px solid #BEE6BE
172+
}
173+
.page-list #issue-list li.label-组织发展 {
174+
border-left: 3px solid #000;
157175
}
158176
.page-list #issue-list figure{
159-
position: absolute;
160-
left: 10px;
161-
top: 10px;
162177
width: 48px;
163178
height: 48px;
179+
display: inline-block;
180+
border-radius: 50%;
181+
position: absolute;
182+
top: 11px;
183+
left: 11px;
184+
overflow: hidden;
164185
}
165186
.page-list #issue-list figure img{
166187
max-width: 100%;
167188
}
168-
.page-list #issue-list h4,
189+
.page-list #issue-list .title {
190+
padding-left: 70px;
191+
}
192+
.page-list #issue-list h4 {
193+
margin: 0;
194+
line-height: 24px;
195+
font-size: 18px;
196+
font-weight: bolder;
197+
}
169198
.page-list #issue-list p{
170199
margin: 0;
171200
line-height: 24px;
172-
font-size: 100%;
173201
}
174-
.page-list #issue-list li>i{
175-
position: absolute;
176-
right: 10px;
177-
top: 10px;
178-
background: #d7d7d7;
179-
padding: 5px;
180-
border-radius: 5px;
181-
color: #fff;
202+
.page-list #issue-list p > * {
203+
height: 16px;
204+
background-color: #eee;
205+
color: #999;
206+
margin-right: .5em;
207+
padding: 0 1em;
208+
border-radius: 8px;
209+
font-size: 13px;
210+
}
211+
212+
aside {
213+
height: 70px;
214+
padding: 11px;
215+
vertical-align: middle;
216+
}
217+
aside * {
218+
color: #999;
219+
}
220+
aside span {
221+
display: inline-block;
222+
height: 48px;
223+
width: 48px;
224+
margin-right: 22px;
225+
background-color: #eee;
226+
font-size: 48px;
227+
text-align: center;
228+
vertical-align: middle;
229+
border-radius: 50%;
182230
}
183231

184232
@media (max-width: 640px) {

index.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
---
55

66
<div class="container">
7+
<aside>
8+
<a href="https://github.com/yncoder/yncoder.github.io/issues/new" target="yncoder_new_issue">
9+
<span>+</span>发布新消息
10+
</a>
11+
</aside>
712
<main>
813
<ul id="label-list"></ul>
914
<ul id="issue-list"></ul>
1015
</main>
11-
<aside>
12-
13-
</aside>
1416
</div>
1517

1618
<script>
@@ -33,6 +35,8 @@
3335

3436
if (this.status >= 200 && this.status < 300) {
3537
callback(this.response);
38+
} else if(this.status == 403) {
39+
doucment.queryAllSelector('.page-list .container main').innerHTML = "<h1 class='alert-error'>别刷了,快去干活</h1>";
3640
}
3741
};
3842

@@ -59,9 +63,8 @@
5963
}, function (data) {
6064
var template = '<li class="{labelClasses} {statusClass}">' +
6165
'<figure><img src="{authorAvatarUrl}" /></figure>' +
62-
'<h4><a href="{link}">{title}</h4>' +
63-
'<p>{labelElements} <a href="{authorLink}" target="_blank">{authorName}</a></p>' +
64-
'<i>{comments}</i>';
66+
'<div class="title"><h4><a href="{link}">{title}</h4>' +
67+
'<p>{labelElements} <a class="author" href="{authorLink}" target="_blank">{authorName}</a><i>{comments} 条评论</i></p></div>';
6568

6669
var labelTemplate = '<a href="{url}" class="label" style="backbround-color: #{color}">{name}</a>';
6770

@@ -89,8 +92,8 @@
8992
document.getElementById('issue-list').innerHTML = html;
9093
});
9194

92-
ajax('//api.github.com/repos/yncoder/yncoder.github.io/labels', null, function (data) {
95+
// ajax('//api.github.com/repos/yncoder/yncoder.github.io/labels', null, function (data) {
9396

94-
});
97+
// });
9598
})();
9699
</script>

0 commit comments

Comments
 (0)