Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
feat: toc style
Browse files Browse the repository at this point in the history
  • Loading branch information
ifyour committed Sep 8, 2018
1 parent 11db8a2 commit de36a5b
Show file tree
Hide file tree
Showing 15 changed files with 573 additions and 457 deletions.
2 changes: 1 addition & 1 deletion db.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions themes/hexo-theme-apollo/layout/mixins/post.jade
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ mixin post(item)
h1.post-title
!= item.title
+postInfo(item)
if(is_post())
.sidebar-toc
span
!= __('catalog')
!= toc(page.content, {list_number: false})
.post-content
!= item.content
2 changes: 1 addition & 1 deletion themes/hexo-theme-apollo/source/css/apollo.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
.archive {
max-width: 500px;
margin: 5em auto;
.post-item {
padding: 2px 0 0 50px;
max-width: 500px;
margin: 5em auto;
.post-item {
padding: 2px 0 0 50px;
}
.post-time,
.post-title-link {
font-size: 1rem;
}
.post-title-link {
display: block;
margin-left: 125px;
color: #42b983;
word-break: break-all;
&:hover {
border-bottom: 0;
color: #267b54;
}
.post-time,
.post-title-link {
font-size: 1rem;
}
.post-title-link {
display: block;
margin-left: 125px;
color: #42b983;
word-break: break-all;
&:hover {
border-bottom: 0;
color: #267B54;
}
}
.post-info {
float: left;
width: 125px;
color: #7f8c8d;
}
}
}
.post-info {
float: left;
width: 125px;
color: #7f8c8d;
}
}
93 changes: 48 additions & 45 deletions themes/hexo-theme-apollo/source/scss/_partial/base.scss
Original file line number Diff line number Diff line change
@@ -1,79 +1,82 @@
::selection {
color: #FFFFFF;
background-color: #42b983;
color: #ffffff;
background-color: #42b983;
}

html, body {
width: 100%;
height: 100%;
html,
body {
width: 100%;
height: 100%;
}

body {
margin: 0;
color: #34495e;
font-size: 15px;
line-height: 1.6;
background-color: #fff;
font-family: 'sourcesanspro', 'Helvetica Neue', Arial, sans-serif;
margin: 0;
color: #34495e;
font-size: 15px;
line-height: 1.6;
background-color: #fff;
font-family: 'sourcesanspro', 'Helvetica Neue', Arial, sans-serif;
}

ul.nav,
ul.post-list {
margin: 0;
padding: 0;
list-style-type: none;
margin: 0;
padding: 0;
list-style-type: none;
}

ul {
margin: 1rem 0;
margin: 1rem 0;
}

a, a:active {
color: #2c3e50;
text-decoration: none;
a,
a:active {
color: #2c3e50;
text-decoration: none;
}

a.nav-list-link.active,
a.nav-list-link:hover,
a.post-title-link:hover {
border-bottom: 2px solid #42b983;
border-bottom: 2px solid #42b983;
}

hr {
border: 0;
border: 0;
}

code {
margin: 0 2px;
padding: 3px 5px;
color: #e96900;
border-radius: 2px;
white-space: inherit;
margin: 0 2px;
padding: 3px 5px;
color: #e96900;
border-radius: 2px;
white-space: inherit;
}

iframe, video {
max-width: 100%;
margin: 1rem auto;
display: block;
iframe,
video {
max-width: 100%;
margin: 1rem auto;
display: block;
}

table {
width: 100%;
margin: 1em auto;
thead {
background-color: #eee;
th {
padding: 5px;
min-width: 20px;
}
width: 100%;
margin: 1em auto;
thead {
background-color: #eee;
th {
padding: 5px;
min-width: 20px;
}
}
tbody {
tr:nth-child(2n) {
background-color: #f9f9f9;
}
tbody {
tr:nth-child(2n) {
background-color: #f9f9f9;
}
td {
padding: 5px;
vertical-align: text-top;
}
td {
padding: 5px;
vertical-align: text-top;
}
}
}
41 changes: 21 additions & 20 deletions themes/hexo-theme-apollo/source/scss/_partial/copyright.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
footer {
padding-bottom: 1px;
.copyright {
margin: 4em 0;
border-top: 1px solid #ddd;
text-align: center;
padding-top: 10px;
p, a {
color: #aaa;
font-size: 14px;
font-weight: 100;
margin: 0;
span {
font-size: .8em;
padding-left: .2em;
padding-right: .2em;
}
}
a:hover {
color: #888;
}
padding-bottom: 1px;
.copyright {
margin: 4em 0;
border-top: 1px solid #ddd;
text-align: center;
padding-top: 10px;
p,
a {
color: #aaa;
font-size: 14px;
font-weight: 100;
margin: 0;
span {
font-size: 0.8em;
padding-left: 0.2em;
padding-right: 0.2em;
}
}
a:hover {
color: #888;
}
}
}
33 changes: 17 additions & 16 deletions themes/hexo-theme-apollo/source/scss/_partial/footer.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.paginator {
margin: 4em 0;
text-align: center;
.prev, .next {
display: inline-block;
margin: 0 4px;
padding: 4px 12px;
border-radius: 4px;
border-bottom: 4px solid #3aa373;
font-size: 14px;
color: #fff;
background-color: #4fc08d;
&:hover {
background-color: #22bd77;
}
margin: 4em 0;
text-align: center;
.prev,
.next {
display: inline-block;
margin: 0 4px;
padding: 4px 12px;
border-radius: 4px;
border-bottom: 4px solid #3aa373;
font-size: 14px;
color: #fff;
background-color: #4fc08d;
&:hover {
background-color: #22bd77;
}
}
}

.ds-thread,
#disqus_thread {
margin-bottom: 2em;
}
margin-bottom: 2em;
}
Loading

0 comments on commit de36a5b

Please sign in to comment.