jekyll-theme-persephone 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +52 -0
  4. data/_includes/assets.html +14 -0
  5. data/_includes/comment.html +35 -0
  6. data/_includes/comments.html +18 -0
  7. data/_includes/contact.html +7 -0
  8. data/_includes/footer.html +5 -0
  9. data/_includes/head.html +10 -0
  10. data/_includes/header.html +24 -0
  11. data/_includes/header_nav.html +10 -0
  12. data/_includes/icons.html +42 -0
  13. data/_includes/icons/ellipsis.html +5 -0
  14. data/_includes/icons/facebook.html +2 -0
  15. data/_includes/icons/github.html +3 -0
  16. data/_includes/icons/instagram.html +5 -0
  17. data/_includes/icons/left.html +3 -0
  18. data/_includes/icons/link.html +4 -0
  19. data/_includes/icons/linkedin.html +5 -0
  20. data/_includes/icons/mail.html +4 -0
  21. data/_includes/icons/right.html +3 -0
  22. data/_includes/icons/rss.html +5 -0
  23. data/_includes/icons/smile.html +6 -0
  24. data/_includes/icons/twitter.html +3 -0
  25. data/_includes/icons/user.html +4 -0
  26. data/_includes/icons/weibo.html +3 -0
  27. data/_includes/loading.html +4 -0
  28. data/_includes/new_comment.html +50 -0
  29. data/_includes/pagination.html +29 -0
  30. data/_includes/slides.html +53 -0
  31. data/_includes/smiley.html +12 -0
  32. data/_includes/summary.html +30 -0
  33. data/_includes/title.html +7 -0
  34. data/_layouts/404.html +8 -0
  35. data/_layouts/archive.html +33 -0
  36. data/_layouts/blog.html +29 -0
  37. data/_layouts/book.html +28 -0
  38. data/_layouts/chapter.html +32 -0
  39. data/_layouts/default.html +7 -0
  40. data/_layouts/home.html +6 -0
  41. data/_layouts/list.html +33 -0
  42. data/_layouts/page.html +17 -0
  43. data/_layouts/post.html +42 -0
  44. data/_sass/persephone.scss +29 -0
  45. data/_sass/persephone/_archive.scss +140 -0
  46. data/_sass/persephone/_blog.scss +190 -0
  47. data/_sass/persephone/_book.scss +120 -0
  48. data/_sass/persephone/_chapter.scss +192 -0
  49. data/_sass/persephone/_comments.scss +208 -0
  50. data/_sass/persephone/_common.scss +110 -0
  51. data/_sass/persephone/_content.scss +278 -0
  52. data/_sass/persephone/_error.scss +16 -0
  53. data/_sass/persephone/_header.scss +140 -0
  54. data/_sass/persephone/_keyframes.scss +11 -0
  55. data/_sass/persephone/_list.scss +105 -0
  56. data/_sass/persephone/_minxins.scss +68 -0
  57. data/_sass/persephone/_post.scss +169 -0
  58. data/_sass/persephone/_slides.scss +264 -0
  59. data/_sass/persephone/_summary.scss +101 -0
  60. data/_sass/persephone/_variables.scss +15 -0
  61. data/assets/css/tomorrow.css +72 -0
  62. data/assets/js/highlight.js +2 -0
  63. data/assets/js/main.js +161 -0
  64. data/assets/main.scss +4 -0
  65. metadata +149 -0
@@ -0,0 +1,12 @@
1
+ <div class="comment__smileys" id="smileyContainer">
2
+ <div class="comment__smileys_box" id="smileyBox">
3
+ {%- for smiley in site.smileys -%}
4
+ <a href="#" data-smiley="{{ smiley[1]['slug'] }}" data-src="{{ smiley[1]['img'] }}" class="comment__smiley">
5
+ <img src="{{ smiley[1]['img'] }}" alt="{{ smiley[0] }}" />
6
+ </a>
7
+ {%- endfor -%}
8
+ </div>
9
+ <div class="comment__smileys_toggler">
10
+ {%- include icons/smile.html -%}
11
+ </div>
12
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="book-summary" id="bookSummary">
2
+ <nav role="navigation">
3
+ <ul class="summary">
4
+ <li class="chapter {% if page.book.index.url == page.url -%}active{% endif -%}">
5
+ <a href="{{ page.book.url | relative_url }}" class="custom-link">{{ page.book.title }}</a>
6
+ </li>
7
+ <li class="divider"></li>
8
+ {%- for part in page.book.parts -%}
9
+ <li class="chapter {% if part.url == page.url -%}active{% endif -%}">
10
+ {%- if part.url -%}
11
+ <a href="{{ part.url | relative_url }}">{{ part.title }}</a>
12
+ {%- else -%}
13
+ <span>{{ part.title }}</span>
14
+ {%- endif -%}
15
+
16
+ {%- if part.parts.size > 0 -%}
17
+ <ul class="articles">
18
+ {%- for part in part.parts -%}
19
+
20
+ <li class="chapter {% if part.url == page.url -%}active{% endif -%}">
21
+ <a href="{{ part.url | relative_url }}">{{ part.title }}</a>
22
+ </li>
23
+ {%- endfor -%}
24
+ </ul>
25
+ {%- endif -%}
26
+ </li>
27
+ {%- endfor -%}
28
+ </ul>
29
+ </nav>
30
+ </div>
@@ -0,0 +1,7 @@
1
+ {%- if page.layout == "chapter" -%}
2
+ <title>{{ page.title }} - {{ page.book.title }} | {{ site.title }}</title>
3
+ {%- elsif page.layout == "home" -%}
4
+ <title>{{ site.title }}</title>
5
+ {%- else -%}
6
+ <title>{{ page.title }} | {{ site.title }}</title>
7
+ {%- endif -%}
data/_layouts/404.html ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="error-container">
5
+ <h1 class="error-title">404</h1>
6
+ <p class="error-hint"><strong>Page not found :(</strong></p>
7
+ <a href="{{ "/" | relative_url }}" class="error-link">Back to {{ site.title }}</a>
8
+ </div>
@@ -0,0 +1,33 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%- include header.html -%}
5
+ <main class="archive">
6
+ <div class="archive__header">
7
+ <h1>
8
+ {%- assign about_page_path = site.theme_setting.about_page | default: "index.md" %}
9
+ {%- assign about_page = site.pages | where: "path", about_page_path | first -%}
10
+ <a href="{{ about_page.url | relative_url }}">{{ site.author | default: site.title }}</a>
11
+ </h1>
12
+ <div class="archive__header_intro">
13
+ {{ site.description | markdownify }}
14
+ </div>
15
+ {%- include icons.html -%}
16
+ </div>
17
+ <div class="archive__content">
18
+ <div class="archive__list">
19
+ <ul>
20
+ {%- assign pages = site[page.pages] | default: site.posts -%}
21
+ {%- for page in pages -%}
22
+ <li class="archive__item">
23
+ <a href="{{ page.url | relative_url }}" class="archive__link clearfix">
24
+ <span class="archive__time">{%- if page.layout == 'book' -%}{{ page.date }}{%- else -%}{{ page.date | date: "%Y-%m-%d" }}{%- endif -%}</span>
25
+ <span class="archive__title">{{ page.title }}</span>
26
+ </a>
27
+ </li>
28
+ {%- endfor -%}
29
+ </ul>
30
+ </div>
31
+ </div>
32
+ {%- include footer.html -%}
33
+ </main>
@@ -0,0 +1,29 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%- include header.html -%}
6
+ <main class="post__archive">
7
+ {%- include header_nav.html -%}
8
+ {%- if paginator -%}
9
+ {%- assign posts=paginator.posts -%}
10
+ {%- else -%}
11
+ {%- assign posts=site.posts -%}
12
+ {%- endif -%}
13
+ {%- for post in posts -%}
14
+ <article class="post__entry">
15
+ <a href="{{ post.url | relative_url }}" class="post__entry__link">
16
+ <h2>{{ post.title }}</h2>
17
+ <div class="post__meta">
18
+ <time>{{ post.date | date: "%Y-%m-%d" }}</time>
19
+ </div>
20
+ <div class="post__excerpt">
21
+ {{ post.excerpt | markdownify | strip_html | truncate: 100 }}
22
+ </div>
23
+ <div class="post__more_arrow"></div>
24
+ </a>
25
+ </article>
26
+ {%- endfor -%}
27
+ {%- include pagination.html -%}
28
+ </main>
29
+ {%- include footer.html -%}
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="book sidebar-right">
5
+ {%- include header.html -%}
6
+ <div class="book__cover">
7
+ <img src="{{ page.img | img_url_prefix }}" class="book__img" alt="{{ page.title }}"/>
8
+ </div>
9
+ <div class="book__content">
10
+ <div class="book__content_inner">
11
+ <h1 class="book__title">{{ page.title }}</h1>
12
+ <div class="book__desc">
13
+ {{ content }}
14
+ </div>
15
+ {%- if page.next -%}
16
+ <a href="{{ page.next.url | relative_url }}" class="book__more">
17
+ <div class="book__icon">
18
+ <svg width="80" height="80">
19
+ <circle class="circle-progress" r="36" cy="40" cx="40" stroke-linejoin="round" stroke-linecap="round" />
20
+ </svg>
21
+ <span class="book__icon_arrow"></span>
22
+ </div>
23
+ </a>
24
+ {%- endif -%}
25
+ </div>
26
+ {%- include footer.html -%}
27
+ </div>
28
+ </div>
@@ -0,0 +1,32 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div class="book__wrapper sidebar-right" id="bookMain">
5
+ {%- include summary.html -%}
6
+ <div class="book__body">
7
+ <div class="body__inner">
8
+ {%- include header.html -%}
9
+ <main class="chapter__wrapper" tabindex="-1" role="main">
10
+ <div class="chapter__inner">
11
+ <article class="chapter__content content">
12
+ {{ content | img_prefix }}
13
+ </article>
14
+ </div>
15
+ {%- include footer.html -%}
16
+ </main>
17
+ </div>
18
+ {%- if page.prev -%}
19
+ <a href="{{ page.prev.url | relative_url }}" class="navigation navigation-prev" aria-label="Previous page: {{ page.prev.title }}">
20
+ {%- include icons/left.html -%}
21
+ </a>
22
+ {%- endif -%}
23
+ {%- if page.next -%}
24
+ <a href="{{ page.next.url | relative_url }}" class="navigation navigation-next" aria-label="Next page: {{ page.next.title }}">
25
+ {%- include icons/right.html -%}
26
+ </a>
27
+ {%- endif -%}
28
+ </div>
29
+ </div>
30
+ {%- if page.code -%}
31
+ <script>hljs.initHighlightingOnLoad();</script>
32
+ {%- endif -%}
@@ -0,0 +1,7 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.locale | default: 'zh' }}">
3
+ {%- include head.html -%}
4
+ <body class="body-{{ page.layout }}">
5
+ {{ content }}
6
+ </body>
7
+ </html>
@@ -0,0 +1,6 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%- include loading.html -%}
5
+ {%- include header.html -%}
6
+ {%- include slides.html -%}
@@ -0,0 +1,33 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include header.html %}
6
+
7
+ <main class="post__archive" id="postArchive">
8
+ {%- include header_nav.html -%}
9
+ <nav class="blog__categories">
10
+ <a href="#all" data-category="all" class="category active nav-link">{{ site.theme_setting.lang.category_all | default: "All" }}</a>
11
+ {%- for category in site.categories %}
12
+ <a href="#{{ category[0] }}" class="category nav-link" data-category="{{ category[0] }}">{{ category[0] }}</a>
13
+ {%- endfor %}
14
+ </nav>
15
+ <div class="post__list archive__list">
16
+ {%- assign years = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
17
+ {%- for year in years %}
18
+ <h3 class="post__list_title">{{ year.name }}</h3>
19
+ {%- assign posts = year.items %}
20
+ <ul>
21
+ {%- for post in posts %}
22
+ <li class="post__list_item" data-category="{{ post.category }}" {% if post.img %}data-img="{{ post.img | img_url_prefix }}"{% endif %}>
23
+ <a href="{{ post.url | relative_url }}">
24
+ <span class="archive__time">{{ post.date | date: "%Y-%m-%d" }}</span>
25
+ <span class="archive__title">{{ post.title }}</span>
26
+ </a>
27
+ </li>
28
+ {%- endfor %}
29
+ </ul>
30
+ {%- endfor %}
31
+ </div>
32
+ </main>
33
+ {%- include footer.html -%}
@@ -0,0 +1,17 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%- include header.html -%}
5
+ <main class="post__wrapper">
6
+ {%- include header_nav.html -%}
7
+ <article class="post">
8
+ <header class="post__header">
9
+ <h1 class="post__title page__title">{{ page.title | escape }}</h1>
10
+ </header>
11
+ <div class="post__content content">
12
+ {{ content | img_prefix }}
13
+ </div>
14
+ </article>
15
+ {%- include contact.html -%}
16
+ </main>
17
+ {%- include footer.html -%}
@@ -0,0 +1,42 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%- include header.html -%}
5
+ <main class="post__wrapper">
6
+ {%- include header_nav.html -%}
7
+ <div class="post__top_navs clearfix">
8
+ <nav class="post__archive_path">
9
+ {%- assign blog_page_path = site.theme_setting.blog_page | default: "index.md" %}
10
+ {%- assign blog_page = site.pages | where: "path", blog_page_path | first -%}
11
+ <a href="{{ blog_page.url | relative_url }}" id="archiveBtn">
12
+ <div class="post__archive_icon">
13
+ <svg width="40" height="40">
14
+ <circle class="circle-progress" r="18" cy="20" cx="20" stroke-linejoin="round" stroke-linecap="round" />
15
+ </svg>
16
+ <span class="post__archive_icon"></span>
17
+ </div>
18
+ {{ site.theme_setting.lang.blog_title | default: site.title }}
19
+ </a>
20
+ </nav>
21
+ </div>
22
+ <article class="post">
23
+ <header class="post__header">
24
+ <h1 class="post__title">{{ page.title | escape }}</h1>
25
+ <div class="post__meta">
26
+ <time>{{ page.date | date: "%Y-%m-%d %H:%M" }}</time>
27
+ </div>
28
+ </header>
29
+ <div class="post__content content">
30
+ {{ content | img_prefix }}
31
+ </div>
32
+ </article>
33
+ {%- if site.comment.enabled -%}
34
+ {% include comments.html -%}
35
+ {%- else -%}
36
+ {% include contact.html -%}
37
+ {%- endif -%}
38
+ </main>
39
+ {%- if page.code -%}
40
+ <script>hljs.initHighlightingOnLoad();</script>
41
+ {%- endif -%}
42
+ {%- include footer.html -%}
@@ -0,0 +1,29 @@
1
+ @charset "utf-8";
2
+
3
+ // common
4
+ @import "persephone/variables";
5
+ @import "persephone/keyframes";
6
+ @import "persephone/minxins";
7
+ @import "persephone/common";
8
+ @import "persephone/header";
9
+ @import "persephone/content";
10
+
11
+ // 404
12
+ @import "persephone/error";
13
+
14
+ // archive
15
+ @import "persephone/archive";
16
+
17
+ // home
18
+ @import "persephone/slides";
19
+
20
+ //book
21
+ @import "persephone/summary";
22
+ @import "persephone/book";
23
+ @import "persephone/chapter";
24
+
25
+ //blog
26
+ @import "persephone/blog";
27
+ @import "persephone/list";
28
+ @import "persephone/post";
29
+ @import "persephone/comments";
@@ -0,0 +1,140 @@
1
+ .body-archive {
2
+ overflow-x: hidden;
3
+ }
4
+ .archive {
5
+ width: 100vw;
6
+ height: 100vh;
7
+ overflow: hidden;
8
+ .site-footer {
9
+ position: fixed;
10
+ width: 35%;
11
+ left: 0;
12
+ bottom: 0;
13
+ z-index: 2;
14
+ }
15
+ }
16
+ .archive__header {
17
+ width: 35%;
18
+ height: 100%;
19
+ border-right: 1px solid var(--lighter);
20
+ text-align: center;
21
+ justify-content: center;
22
+ position: fixed;
23
+ left: 0;
24
+ top: 0;
25
+ z-index: 1;
26
+ @include flex();
27
+ @include flex-middle();
28
+ @include flex-column();
29
+ h1 {
30
+ font-size: 1.5rem;
31
+ margin-bottom: 0.75rem;
32
+ a:hover {
33
+ text-decoration: underline;
34
+ }
35
+ }
36
+ .archive__header_intro {
37
+ width: 70%;
38
+ max-width: 345px;
39
+ margin: 0 0 1.5rem 0;
40
+ color: var(--grayer);
41
+ font-size: 0.875rem;
42
+ }
43
+ }
44
+ .archive__content {
45
+ width: 65%;
46
+ min-height: 100%;
47
+ margin-left: 35%;
48
+ @include flex();
49
+ @include flex-column();
50
+ flex-wrap: nowrap;
51
+ justify-content: center;
52
+ }
53
+ .archive__list {
54
+ width: 100%;
55
+ margin: 1.5rem 0 2.5rem 0;
56
+ flex: 1;
57
+ @include flex();
58
+ @include flex-column();
59
+ justify-content: center;
60
+ }
61
+ .archive__item {
62
+ list-style: none;
63
+ padding: 0.75rem 5.35rem;
64
+ border-top: 1px solid transparent;
65
+ border-bottom: 1px solid transparent;
66
+ width: 100%;
67
+ overflow: hidden;
68
+ &:hover {
69
+ border-color: var(--lighter);
70
+ }
71
+ }
72
+ .archive__link {
73
+ color: var(--dark);
74
+ width: 100%;
75
+ height: 100%;
76
+ font-size: 18px;
77
+ line-height: 1.5rem;
78
+ @include flex()
79
+ }
80
+ .archive__time {
81
+ width: 135px;
82
+ flex-basis: 135px;
83
+ font-size: 0.9rem;
84
+ color: var(--gray);
85
+ flex-shrink: 0;
86
+ }
87
+ .icon__list {
88
+ text-align: center;
89
+ margin: 0 0 1.5rem 0;
90
+ }
91
+ .icon__link svg {
92
+ margin: 0 5px;
93
+ width: 18px;
94
+ height: 18px;
95
+ }
96
+ .icon__fill {
97
+ fill: var(--gray);
98
+ }
99
+ .icon__stroke {
100
+ stroke: var(--gray);
101
+ }
102
+ .icon__list a:hover .icon__fill {
103
+ fill: var(--dark);
104
+ }
105
+ .icon__list a:hover .icon__stroke {
106
+ stroke: var(--dark);
107
+ }
108
+ @media screen and (max-width: 800px) {
109
+ .archive {
110
+ @include flex-column();
111
+ min-height: 100%;
112
+ height: auto;
113
+ .site-footer {
114
+ position: static;
115
+ width: 100%;
116
+ }
117
+ }
118
+ .archive__header, .archive__content {
119
+ width: 100%;
120
+ height: auto;
121
+ margin: 0;
122
+ }
123
+ .archive__header {
124
+ padding: 5rem 0 0 0;
125
+ position: static;
126
+ }
127
+ }
128
+ @media screen and (max-width: 600px) {
129
+ .archive__item {
130
+ padding: 0.75rem 2rem;
131
+ }
132
+ .archive__time {
133
+ width: 100px;
134
+ flex-basis: 100px;
135
+ }
136
+ }
137
+ .page__content {
138
+ max-width: 800px;
139
+ padding: 2rem 3rem!important;
140
+ }