sobekyll 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/_config.yml +0 -1
- data/_includes/footer.html +3 -0
- data/_includes/header.html +32 -0
- data/_includes/post-item.html +6 -11
- data/_includes/slide-panel.html +42 -0
- data/_includes/time.html +23 -0
- data/_layouts/archive.html +11 -0
- data/_layouts/default.html +13 -53
- data/_layouts/home.html +6 -3
- data/_layouts/post.html +9 -14
- data/_sass/_base.scss +12 -12
- data/assets/css/github-markdown.css +1254 -0
- data/assets/css/style.css +79 -15
- data/assets/js/sobekyll.js +4 -0
- data/publish.sh +1 -1
- data/sobekyll.gemspec +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9869e66a065b06d0529f360346697e7ef3f613172b2c7f9d444a7693d109a340
|
4
|
+
data.tar.gz: 63e0f044ffe4d3f42d639dbda9b959573e2573f5fc3341991b2f2d663d842995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 220f60f36ac8b6debe1f3e6f684fa45bd7c3b55127a5c236418067ce8e1e7c4a5e3a7f5e56c8c2f1816261d41e8dcd337f88722819701a6727e786a4fc0bc548
|
7
|
+
data.tar.gz: 4a1f1853997975adaec78310bf84e8c2f370cd653a762403581d74aa9d655e1b7c1b333e0cab4ae6ca33b3e159675c94c1ca4c401d386bda21e573e25b9bc805
|
data/Gemfile
CHANGED
data/_config.yml
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
<s-appbar>
|
2
|
+
<s-icon-button slot="navigation" onclick="document.querySelector('#drawer').toggle()">
|
3
|
+
<s-icon type="menu"></s-icon>
|
4
|
+
</s-icon-button>
|
5
|
+
<!-- onclick="window.open('{{ site.url }}', '_self')" -->
|
6
|
+
<a class="app-bar-title" slot="headline" href="/"> {{ site.title }} </a>
|
7
|
+
|
8
|
+
{% if site.tags and site.tags.size > 0 %}
|
9
|
+
<s-popup-menu slot="action">
|
10
|
+
<s-button type="text" slot="trigger" class="app-bar-action">
|
11
|
+
Tags
|
12
|
+
<s-icon type="arrow_drop_down" slot="end"></s-icon>
|
13
|
+
</s-button>
|
14
|
+
{% for tag in site.tags %}
|
15
|
+
<s-popup-menu-item onclick="selfOpen('/tag/{{ tag[0] | slugify }}')">{{ tag[0] }}</s-popup-menu-item>
|
16
|
+
{% endfor %}
|
17
|
+
</s-popup-menu>
|
18
|
+
{% endif %}
|
19
|
+
|
20
|
+
{% if site.categories and site.categories.size > 0 %}
|
21
|
+
<s-popup-menu slot="action">
|
22
|
+
<s-button type="text" slot="trigger" class="app-bar-action">
|
23
|
+
Categories
|
24
|
+
<s-icon type="arrow_drop_down" slot="end"></s-icon>
|
25
|
+
</s-button>
|
26
|
+
|
27
|
+
{% for category in site.categories %}
|
28
|
+
<s-popup-menu-item onclick="selfOpen('/category/{{ category[0] | slugify }}')">{{ category[0] }}</s-popup-menu-item>
|
29
|
+
{% endfor %}
|
30
|
+
</s-popup-menu>
|
31
|
+
{% endif %}
|
32
|
+
</s-appbar>
|
data/_includes/post-item.html
CHANGED
@@ -1,17 +1,12 @@
|
|
1
1
|
<li class="post-item">
|
2
2
|
<h3><a class="post-item-title" href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
|
3
3
|
<div class="post-excerpt">
|
4
|
-
|
4
|
+
<div class="markdown-body" style="background-color: transparent; min-height: 0px;">
|
5
|
+
{{ post.excerpt }}
|
6
|
+
</div>
|
5
7
|
</div>
|
6
8
|
<p class="post-meta">
|
7
|
-
|
8
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
9
|
-
<path
|
10
|
-
d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z">
|
11
|
-
</path>
|
12
|
-
</svg>
|
13
|
-
</s-icon>
|
14
|
-
<small> {{ post.date | date: "%B %d, %Y" }} </small>
|
9
|
+
{% include time.html date=post.date %}
|
15
10
|
{% if post.tags and post.tags.size > 0 %}
|
16
11
|
<s-icon style="width: 20px; height: 20px; margin-left: 8px;">
|
17
12
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
@@ -21,7 +16,7 @@
|
|
21
16
|
</svg>
|
22
17
|
</s-icon>
|
23
18
|
{% for tag in post.tags %}
|
24
|
-
{{ tag }}
|
19
|
+
<a href="/tag/{{ tag | slugify }}">{{ tag }}</a>
|
25
20
|
{% endfor %}
|
26
21
|
{% endif %}
|
27
22
|
|
@@ -32,7 +27,7 @@
|
|
32
27
|
</svg>
|
33
28
|
</s-icon>
|
34
29
|
{% for category in post.categories %}
|
35
|
-
{{ category }}
|
30
|
+
<a href="/category/{{ category | slugify }}">{{ category }}</a>
|
36
31
|
{% endfor %}
|
37
32
|
{% endif %}
|
38
33
|
</p>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<s-scroll-view slot="start" style="height: 100%;">
|
2
|
+
<div>
|
3
|
+
{% if site.author %}
|
4
|
+
<div class="author">
|
5
|
+
<img class="author-avatar" src="{{ site.author.avatar }}">
|
6
|
+
<span class="author-name">{{ site.author.name }}</span>
|
7
|
+
</div>
|
8
|
+
{% endif %}
|
9
|
+
{% if site.menus %}
|
10
|
+
<s-divider style="padding: 0px; margin: 0px;"></s-divider>
|
11
|
+
{% for menu in site.menus %}
|
12
|
+
<s-menu style="width: 100%;">
|
13
|
+
{% if menu.title %}
|
14
|
+
<div slot="label">{{ menu.title }}</div>
|
15
|
+
{% endif %}
|
16
|
+
{% if menu.items %}
|
17
|
+
{% for item in menu.items %}
|
18
|
+
<s-menu-item onclick="window.open('{{ item.url }}')">
|
19
|
+
{% if item.icon %}
|
20
|
+
<s-icon slot="start">
|
21
|
+
{{ item.icon }}
|
22
|
+
</s-icon>
|
23
|
+
{% elsif item.img %}
|
24
|
+
<img slot="start" src="{{ item.img }}" style="width: 32px; height: 32px; object-fit: cover;">
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{{ item.title }}
|
28
|
+
{% if item.menu %}
|
29
|
+
<s-menu slot="menu">
|
30
|
+
{% for subItem in item.menu %}
|
31
|
+
<s-menu-item> {{ subItem.title }} </s-menu-item>
|
32
|
+
{% endfor %}
|
33
|
+
</s-menu>
|
34
|
+
{% endif %}
|
35
|
+
</s-menu-item>
|
36
|
+
{% endfor %}
|
37
|
+
{% endif %}
|
38
|
+
</s-menu>
|
39
|
+
{% endfor %}
|
40
|
+
{% endif %}
|
41
|
+
</div>
|
42
|
+
</s-scroll-view>
|
data/_includes/time.html
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<s-icon style="width: 20px; height: 20px;">
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
3
|
+
<path
|
4
|
+
d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z">
|
5
|
+
</path>
|
6
|
+
</svg>
|
7
|
+
</s-icon>
|
8
|
+
<small>
|
9
|
+
{% assign today = site.time | date: "%Y-%m-%d" %}
|
10
|
+
{% assign post_date = include.date | date: "%Y-%m-%d" %}
|
11
|
+
|
12
|
+
{% if today == post_date %}
|
13
|
+
Today
|
14
|
+
{% elsif today == post_date | date: "%Y-%m-%d" | minus: 1 %}
|
15
|
+
Yesterday
|
16
|
+
{% else %}
|
17
|
+
{% if include.date | date: "%Y" == site.time | date: "%Y" %}
|
18
|
+
{{ include.date | date: "%B %d" }}
|
19
|
+
{% else %}
|
20
|
+
{{ include.date | date: "%B %d, %Y" }}
|
21
|
+
{% endif %}
|
22
|
+
{% endif %}
|
23
|
+
</small>
|
data/_layouts/default.html
CHANGED
@@ -4,73 +4,33 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
|
7
8
|
<title>{{ page.title | default: site.title }}</title>
|
8
|
-
|
9
|
-
<link rel="
|
9
|
+
{% if site.logo %}
|
10
|
+
<link rel="icon" href="{{ site.logo | absolute_url }}" type="image/*">
|
11
|
+
{% endif %}
|
12
|
+
<link rel="stylesheet" href="{% if site.theme_assets %}{{ site.theme_assets | absolute_url }}/css/style.css{% else %}{{ '/assets/css/style.css' | absolute_url }}{% endif %}">
|
13
|
+
<link rel="stylesheet" href="{% if site.theme_assets %}{{ site.theme_assets | absolute_url }}/css/rouge-github-auto.css{% else %}{{ '/assets/css/rouge-github-auto.css' | relative_url }}{% endif %}">
|
14
|
+
<link rel="stylesheet" href="{% if site.theme_assets %}{{ site.theme_assets | absolute_url }}/css/github-markdown.css{% else %}{{ '/assets/css/github-markdown.css' | relative_url }}{% endif %}">
|
15
|
+
|
10
16
|
<script src="https://unpkg.com/sober@0.6.8/dist/sober.min.js"></script>
|
11
17
|
|
12
|
-
<script src="{{ '/assets/js/sobekyll.js' }}"></script>
|
18
|
+
<script src="{% if site.theme_assets %}{{ site.theme_assets | absolute_url }}/js/sobekyll.js{% else %}{{ '/assets/js/sobekyll.js' | relative_url }}{% endif %}"></script>
|
13
19
|
</head>
|
14
20
|
|
15
21
|
<body>
|
16
22
|
<s-page theme="auto">
|
17
23
|
<s-drawer id="drawer">
|
18
|
-
|
19
|
-
<div style="width: 100%; height: 200px; background-color: aqua;">
|
20
|
-
|
21
|
-
</div>
|
22
|
-
<s-menu style="max-width: 280px">
|
23
|
-
<div slot="label">控制台</div>
|
24
|
-
<s-menu-item checked="true">
|
25
|
-
<s-icon slot="start" type="home"></s-icon>
|
26
|
-
选项1
|
27
|
-
</s-menu-item>
|
28
|
-
<s-menu-item>
|
29
|
-
<s-icon slot="start" type="search"></s-icon>
|
30
|
-
选项2
|
31
|
-
<s-icon slot="end" type="add"></s-icon>
|
32
|
-
</s-menu-item>
|
33
|
-
<s-menu-item>
|
34
|
-
<s-icon slot="start" type="light_mode"></s-icon>
|
35
|
-
选项3
|
36
|
-
</s-menu-item>
|
37
|
-
<s-menu-item>
|
38
|
-
<s-icon slot="start" type="favorite"></s-icon>
|
39
|
-
选项4
|
40
|
-
<s-menu slot="menu">
|
41
|
-
<s-menu-item> 选项1 </s-menu-item>
|
42
|
-
<s-menu-item> 选项2 </s-menu-item>
|
43
|
-
</s-menu>
|
44
|
-
</s-menu-item>
|
45
|
-
<s-menu-item>
|
46
|
-
<s-icon slot="start" type="add"></s-icon>
|
47
|
-
选项5
|
48
|
-
</s-menu-item>
|
49
|
-
</s-menu>
|
50
|
-
<s-menu style="max-width: 280px">
|
51
|
-
<div slot="label">其他</div>
|
52
|
-
<s-menu-item> 选项6 </s-menu-item>
|
53
|
-
<s-menu-item> 选项7 </s-menu-item>
|
54
|
-
</s-menu>
|
55
|
-
</div>
|
24
|
+
{% include slide-panel.html %}
|
56
25
|
<main>
|
57
|
-
|
58
|
-
<s-icon-button slot="navigation" onclick="document.querySelector('#drawer').toggle()">
|
59
|
-
<s-icon type="menu"></s-icon>
|
60
|
-
</s-icon-button>
|
61
|
-
<!-- onclick="window.open('{{ site.url }}', '_self')" -->
|
62
|
-
<a class="app-bar-title" slot="headline" href="{{ site.url }}" > {{ site.title }} </a>
|
63
|
-
</s-appbar>
|
26
|
+
{% include header.html %}
|
64
27
|
<s-scroll-view>
|
65
|
-
<div
|
28
|
+
<div class="contentWrapper">
|
66
29
|
<div class="content">
|
67
30
|
{{ content }}
|
68
31
|
</div>
|
69
|
-
|
70
|
-
<p>© {{ site.author }} - {{ site.time | date: '%Y' }}</p>
|
71
|
-
</footer>
|
32
|
+
{% include footer.html %}
|
72
33
|
</div>
|
73
|
-
|
74
34
|
</s-scroll-view>
|
75
35
|
</main>
|
76
36
|
</s-drawer>
|
data/_layouts/home.html
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
3
|
---
|
4
|
+
|
4
5
|
<ul style="list-style: none; padding: 0; margin: 0; flex: 1;">
|
5
6
|
{% for post in paginator.posts %}
|
6
7
|
{% include post-item.html post=post %}
|
@@ -10,10 +11,11 @@ layout: default
|
|
10
11
|
<div class="pagination">
|
11
12
|
{% if paginator.previous_page %}
|
12
13
|
<s-icon-button>
|
13
|
-
<s-icon type="chevron_left" onclick="
|
14
|
+
<s-icon type="chevron_left" onclick="selfOpen('{{ paginator.previous_page_path }}')"></s-icon>
|
14
15
|
</s-icon-button>
|
15
16
|
{% endif %}
|
16
17
|
|
18
|
+
{% if paginator.total_pages > 3 %}
|
17
19
|
<div class="pagination-indexing">
|
18
20
|
{% for page in (1..paginator.total_pages) %}
|
19
21
|
{% assign page_link = paginator.base_path | append: '/' %}
|
@@ -23,16 +25,17 @@ layout: default
|
|
23
25
|
{% if page == paginator.page %}
|
24
26
|
<span style="margin: 8px; font-weight: bolder;">{{ page }}</span>
|
25
27
|
{% else %}
|
26
|
-
<s-ripple style="border-radius: 4px;" onclick="
|
28
|
+
<s-ripple style="border-radius: 4px;" onclick="selfOpen('{{ page_link }}')">
|
27
29
|
<span style="margin: 8px;">{{ page }}</span>
|
28
30
|
</s-ripple>
|
29
31
|
{% endif %}
|
30
32
|
{% endfor %}
|
31
33
|
</div>
|
34
|
+
{% endif %}
|
32
35
|
|
33
36
|
{% if paginator.next_page %}
|
34
37
|
<s-icon-button>
|
35
|
-
<s-icon type="chevron_right" onclick="
|
38
|
+
<s-icon type="chevron_right" onclick="selfOpen('{{ paginator.next_page_path }}')"></s-icon>
|
36
39
|
</s-icon-button>
|
37
40
|
{% endif %}
|
38
41
|
</div>
|
data/_layouts/post.html
CHANGED
@@ -2,24 +2,19 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
<article>
|
5
|
-
<h1>{{ page.title }}</h1>
|
5
|
+
<h1 style="margin-block-start: 0; margin-block-end: 0;">{{ page.title }}</h1>
|
6
6
|
<p class="post-meta">
|
7
|
-
|
8
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
9
|
-
<path
|
10
|
-
d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z">
|
11
|
-
</path>
|
12
|
-
</svg>
|
13
|
-
</s-icon>
|
14
|
-
<small> {{ page.date | date: "%B %d, %Y" }} </small>
|
7
|
+
{% include time.html date=page.date %}
|
15
8
|
</p>
|
16
9
|
|
17
10
|
<div class="post-content">
|
18
|
-
|
11
|
+
<div class="markdown-body" style="background-color: transparent; min-height: 0px;">
|
12
|
+
{{ content }}
|
13
|
+
</div>
|
19
14
|
</div>
|
20
15
|
|
21
16
|
<p class="post-meta">
|
22
|
-
{% if page.tags and
|
17
|
+
{% if page.tags and page.tags.size > 0 %}
|
23
18
|
<s-icon style="width: 20px; height: 20px;">
|
24
19
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
25
20
|
<path
|
@@ -28,12 +23,12 @@ layout: default
|
|
28
23
|
</svg>
|
29
24
|
</s-icon>
|
30
25
|
{% for tag in page.tags %}
|
31
|
-
{{ tag }}
|
26
|
+
<a href="/tag/{{ tag | slugify }}">{{ tag }}</a>
|
32
27
|
{% endfor %}
|
33
28
|
<space style="margin-right: 8px;"></space>
|
34
29
|
{% endif %}
|
35
30
|
|
36
|
-
{% if page.categories and
|
31
|
+
{% if page.categories and page.categories.size > 0 %}
|
37
32
|
<s-icon style="width: 20px; height: 20px;">
|
38
33
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
|
39
34
|
<path
|
@@ -42,7 +37,7 @@ layout: default
|
|
42
37
|
</svg>
|
43
38
|
</s-icon>
|
44
39
|
{% for category in page.categories %}
|
45
|
-
{{ category }}
|
40
|
+
<a href="/category/{{ category | slugify }}">{{ category }}</a>
|
46
41
|
{% endfor %}
|
47
42
|
{% endif %}
|
48
43
|
</p>
|
data/_sass/_base.scss
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
body {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
font-family: Arial, sans-serif;
|
3
|
+
line-height: 1.6;
|
4
|
+
background-color: #f4f4f9;
|
5
|
+
color: #333;
|
6
|
+
}
|
7
|
+
|
8
|
+
header {
|
9
|
+
background: #444;
|
10
|
+
color: #fff;
|
11
|
+
padding: 10px 0;
|
12
|
+
text-align: center;
|
13
|
+
}
|