benjeto-jekyll-theme 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +132 -0
  4. data/_data/texts.yml +100 -0
  5. data/_includes/appbox.html +7 -0
  6. data/_includes/audio.html +26 -0
  7. data/_includes/category.html +9 -0
  8. data/_includes/custom_head.html +0 -0
  9. data/_includes/exlink.html +5 -0
  10. data/_includes/footer.html +21 -0
  11. data/_includes/head.html +104 -0
  12. data/_includes/image.html +16 -0
  13. data/_includes/lang-select.html +19 -0
  14. data/_includes/menu.html +97 -0
  15. data/_includes/miniprof.html +29 -0
  16. data/_includes/nicovideo.html +8 -0
  17. data/_includes/postbox-custom.html +18 -0
  18. data/_includes/postbox-feed.html +31 -0
  19. data/_includes/tags.html +8 -0
  20. data/_includes/video.html +23 -0
  21. data/_includes/youtube.html +8 -0
  22. data/_layouts/base.html +34 -0
  23. data/_layouts/default.html +13 -0
  24. data/_layouts/home.html +133 -0
  25. data/_layouts/post.html +50 -0
  26. data/_sass/benjeto/base.scss +639 -0
  27. data/_sass/benjeto/css/app-box.scss +33 -0
  28. data/_sass/benjeto/css/figure.scss +57 -0
  29. data/_sass/benjeto/css/highlight.scss +62 -0
  30. data/_sass/benjeto/css/home-tab.scss +54 -0
  31. data/_sass/benjeto/css/menu.scss +64 -0
  32. data/_sass/benjeto/css/paginate.scss +35 -0
  33. data/_sass/benjeto/css/section-box.scss +36 -0
  34. data/_sass/benjeto/custom.scss +0 -0
  35. data/_sass/benjeto/dark.scss +45 -0
  36. data/_sass/benjeto/light.scss +26 -0
  37. data/assets/icon/clip.svg +1 -0
  38. data/assets/icon/close.svg +1 -0
  39. data/assets/icon/love.svg +2 -0
  40. data/assets/icon/message.svg +2 -0
  41. data/assets/icon/share.svg +1 -0
  42. data/assets/icon.png +0 -0
  43. data/assets/js/lang-redirect.js +16 -0
  44. data/assets/js/menu.js +61 -0
  45. data/assets/js/share.js +92 -0
  46. data/assets/style.scss +46 -0
  47. metadata +158 -0
@@ -0,0 +1,31 @@
1
+ {%- assign post = include.post -%}
2
+ {%- assign texts = site.texts | default: site.text | default: site.data.texts -%}
3
+ {%- assign settings = site.settings | default: site.data.settings -%}
4
+
5
+ <article class="feed-post pagebox"{% if post.lang %} lang="{{ post.lang }}"{% endif %}>
6
+ <div class="post-excerpt">
7
+ <a href="{{ post.url | relative_url }}" class="post-link post-lighter">
8
+ {%- if post.title != "" %}
9
+ <h2>{{ post.title | escape }}</h2>
10
+ {%- endif %}
11
+ {%- if post.title == "" or settings.home.show_excerpts == true %}
12
+ {{ post.excerpt }}
13
+ {%- endif %}
14
+ </a>
15
+ </div>
16
+ <div class="post-foot">
17
+ <div class="meta">
18
+ <a href="{{ post.url | relative_url }}" class="post-lighter">
19
+ <time datetime="{{ post.date | date_to_xmlschema }}">{{- post.date | date: texts.date_format -}}</time>
20
+ {%- include category.html category=post.category -%}
21
+ {%- include tags.html tags=post.tag -%}
22
+ </a>
23
+ </div>
24
+ {%- if settings.home.share_button == true %}
25
+ <button class="shareBtn" id="shareButton" data-title="{{ post.title | default: post.excerpt | strip_html }}" data-url="{{ post.url | relative_url }}" role="button" title="{{ texts.share }}">
26
+ <span class="shareMsg"></span>
27
+ <img class="icon" src="{{ "/assets/icon/clip.svg" | relative_url }}" alt="{{ texts.copy }}">
28
+ </button>
29
+ {%- endif %}
30
+ </div>
31
+ </article>
@@ -0,0 +1,8 @@
1
+ {%- assign texts = site.data.texts %}
2
+ {%- if include.tags -%}
3
+ <div class="tags">
4
+ {%- for entry in include.tags -%}
5
+ <span class="tag">{{ texts.tags[entry] | default: entry }}</span>
6
+ {%- endfor -%}
7
+ </div>
8
+ {%- endif -%}
@@ -0,0 +1,23 @@
1
+ {%- assign texts = site.data.texts -%}
2
+ <figure class="video">
3
+ <video controls
4
+ {% if include.title %} title="{{ include.title }}" {% endif %}
5
+ {% if include.poster %} poster="{{ include.poster | relative_url }}" {% endif %}
6
+ >
7
+ <source src="{{ include.src | relative_url }}">
8
+ {{ include.track }}
9
+ {{ texts.video_not_support }}
10
+ </video>
11
+ <figcaption>
12
+ {% if include.title %}<b>{{ include.title }}</b><br>{% endif %}
13
+ {{ include.caption }}
14
+ {% if include.license %}
15
+ <br>
16
+ <span class="license">
17
+ {{ texts.video_license }}
18
+ <a href="{{ include.license_url }}" target="_blank">{{ include.license }}</a>
19
+ </span>
20
+ {% endif %}
21
+ </figcaption>
22
+ </figure>
23
+
@@ -0,0 +1,8 @@
1
+ {%- assign id = include.id -%}
2
+ {%- assign title = include.title -%}
3
+ {%- assign aspect = include.aspect | default: "16 / 9" -%}
4
+ {%- if id -%}
5
+ <iframe class="youtube" style="aspect-ratio: {{ aspect }}" src="https://www.youtube-nocookie.com/embed/{{ id }}" title="{{ texts.youtube_title }}" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>
6
+ <a href="https://www.youtube.com/watch?v={{ id }}" target="_blank" rel="noopener noreferrer">{{ title | default: texts.youtube_link }}</a>
7
+ </iframe>
8
+ {%- endif -%}
@@ -0,0 +1,34 @@
1
+ {%- if site.languages.size > 1 and site.plugins contains "jekyll-polyglot" and site.default_lang == "no-default" and site.active_lang == "no-default" -%}
2
+ <script src="{{ "/assets/js/lang-redirect.js" | relative_url }}"></script>
3
+ <meta name="robots" content="noindex">
4
+ <meta name="robots" content="noarchive">
5
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/style.css" | relative_url }}">
6
+ <noscript>
7
+ <meta http-equiv="refresh" content="0;url={{ site.url }}/{{ site.lang | default: site.languages[0] }}{{ page.url | relative_url | replace: 'index.html', '' }}">
8
+ </noscript>
9
+
10
+ {%- else -%}
11
+
12
+ {% assign rtl_languages = "ar,arc,dv,fa,he,ks,nqo,ps,syr,ur,yi" | split: ',' %}
13
+ {%- assign lang = site.active_lang | default: page.lang | default: site.lang %}
14
+ {%- if site.dir == "rtl" -%}
15
+ {%- assign dir = "rtl" %}
16
+ {%- elsif site.dir == "ltr" %}
17
+ {%- assign dir = "ltr" %}
18
+ {%- else %}
19
+ {%- if rtl_languages contains lang %}
20
+ {%- assign dir = "rtl" %}
21
+ {%- else %}
22
+ {%- assign dir = "ltr" %}
23
+ {%- endif %}
24
+ {%- endif -%}
25
+ {%- assign settings = site.data.settings -%}
26
+ <!DOCTYPE html>
27
+ <html{% if lang %} lang="{{ lang }}"{% endif %}{% if dir == "rtl" %} dir="rtl"{% endif %}>
28
+ {% include head.html -%}
29
+ <body{% if settings.allow_image_select == true %} class="allow-image-select"{% endif %}>
30
+ {{ content }}
31
+ {%- include footer.html -%}
32
+ </body>
33
+ </html>
34
+ {%- endif -%}
@@ -0,0 +1,13 @@
1
+ ---
2
+ layout: base
3
+ ---
4
+ <header class="post">
5
+ {%- include miniprof.html type="nav" -%}
6
+ {%- if pagetitle != "" -%}
7
+ <h1>{{ page.title }}</h1>
8
+ {%- endif -%}
9
+ </header>
10
+ <main{%- if page.lang %} lang="{{ page.lang }}"{% endif %}>
11
+
12
+ {{ content }}
13
+ </main>
@@ -0,0 +1,133 @@
1
+ ---
2
+ layout: base
3
+ ---
4
+ {%- assign profile = site.data.profile -%}
5
+ {%- assign texts = site.data.texts -%}
6
+ {%- assign settings = site.data.settings -%}
7
+ {%- if profile.header %}
8
+ <div class="header"><img src="{{ profile.header | relative_url }}" alt aria-hidden></div>
9
+ {%- endif %}
10
+
11
+ <main>
12
+ <header class="home">
13
+ <div class="headline">
14
+ <a class="proficon{% if settings.round_icon == true %} round{% endif %}{% if profile.header == nil %} no-header{% endif %}" href="{{ "/" | relative_url }}">
15
+ {%- if profile.icon %}
16
+ <img src="{{ profile.icon | relative_url }}" alt="{{ profile.name }}">
17
+ {%- else %}
18
+ <div class="dummy"></div>
19
+ {%- endif %}
20
+ </a>
21
+ {%- include menu.html %}
22
+ </div>
23
+ <h1 itemprop="name">{{ profile.name | default: site.title }}</h1>
24
+ {%- if profile.pronouns %}
25
+ <span class="pronouns" itemprop="pronouns">{{ profile.pronouns }}</span>
26
+ {%- endif %}
27
+ {%- if profile.bio %}
28
+ <p class="bio">{{ profile.bio }}</p>
29
+ {%- endif %}
30
+ <ul class="exlink">
31
+ {%- if profile.links -%}
32
+ {%- for entry in profile.links -%}
33
+ {%- include exlink.html item = entry -%}
34
+ {%- endfor -%}
35
+ {%- endif -%}
36
+ </ul>
37
+ </header>
38
+
39
+ {%- if site.paginate == nil and page.pagination.enabled == true -%}
40
+ {%- assign posts = paginator.posts -%}
41
+ {%- else -%}
42
+ {%- if page.pagination.tag %}
43
+ {%- assign posts = site.tags[page.pagination.tag] -%}
44
+ {%- elsif page.pagination.category -%}
45
+ {%- assign posts = site.categories[page.pagination.category] -%}
46
+ {%- else -%}
47
+ {%- assign posts = site.posts -%}
48
+ {%- endif -%}
49
+ {%- if site.paginate == nil or paginator.page == nil %}
50
+ {%- assign max_posts = settings.home.max_posts -%}
51
+ {%- assign posts = posts | slice: 0, max_posts -%}
52
+ {%- endif -%}
53
+ {%- endif -%}
54
+
55
+ {%- if settings.home.tabs %}
56
+ {%- assign tab_found = false %}
57
+ {%- assign paginate_path = site.pagination.permalink | default: site.paginate_path | split: ':num' | first | remove_first: '/' %}
58
+ {%- assign current_url = page.url | relative_url | replace: 'index.html', '' | split: paginate_path | first %}
59
+ <nav class="home-tab">
60
+ <ul role="tablist">
61
+ {%- for tab in settings.home.tabs -%}
62
+ {%- if tab.url and tab.name %}
63
+ {%- assign tab_url = tab.url | relative_url | replace: 'index.html', '' %}
64
+ <li role="tab"
65
+ {%- if tab_url == current_url %}{% assign tab_found = tab %} class="current" aria-selected
66
+ {%- else %} aria-selected="false"{%- endif -%}>
67
+ <a href="{{ tab.url | relative_url }}">{{ tab.name }}</a>
68
+ </li>
69
+ {%- endif %}
70
+ {%- endfor %}
71
+ {%- if tab_found == false %}
72
+ <li class="current" aria-selected><a href="{{ page.url }}">{{ page.title }}</a></li>
73
+ {%- endif %}
74
+ </ul>
75
+ </nav>
76
+ {%- if tab_found != false %}
77
+ {%- if tab_found.description or tab_found.feed %}
78
+ <div class="tab-description">
79
+ {%- if tab_found.description %}
80
+ <p>{{ tab_found.description }}</p>
81
+ {%- endif %}
82
+ {%- if tab_found.feed %}
83
+ <a class="menu-btn subscribe" href="{{ tab_found.feed | relative_url }}" title="{{ texts.subscribe_menu }}">{{ texts.subscribe }}</a>
84
+ {%- endif %}
85
+ </div>
86
+ {%- endif %}
87
+ {%- endif %}
88
+ {%- endif %}
89
+
90
+ {%- if page.custom_home != true %}
91
+ {%- if posts.size > 0 %}
92
+ <section class="post-list" role="tabpanel">
93
+ {%- for post in posts -%}
94
+ {%- if post.hidden != true %}
95
+ {%- include postbox-feed.html post=post %}
96
+ {%- endif %}
97
+ {%- endfor %}
98
+ </section>
99
+
100
+ {%- if site.paginate or site.pagination %}
101
+ {%- if paginator.total_pages > 1 %}
102
+ <section class="paginate">
103
+ {%- if paginator.previous_page %}
104
+ <a href="{{ paginator.previous_page_path | relative_url }}" class="back" role="button">{{ texts.paginate_back | default: "Back" }}</a>
105
+ {%- else %}
106
+ <span class="back" aria-disabled>{{ texts.paginate_back | default: "Back" }}</span>
107
+ {%- endif %}
108
+ <span class="current">{{ paginator.page }} / {{ paginator.total_pages }}</span>
109
+ {%- if paginator.next_page %}
110
+ <a href="{{ paginator.next_page_path | relative_url }}" class="next" role="button">{{ texts.paginate_next | default: "Next" }}</a>
111
+ {%- else %}
112
+ <span class="next" aria-disabled>{{ texts.paginate_next | default: "Next" }}</span>
113
+ {%- endif %}
114
+ </section>
115
+ {%- endif %}
116
+ {%- endif %}
117
+
118
+ {%- if settings.home.share_button == true %}
119
+ <script src="{{ "/assets/js/share.js" | relative_url }}"></script>
120
+ {%- endif -%}
121
+
122
+ {%- else -%}
123
+ <strong class="no-posts">{{ texts.no_posts }}</strong>
124
+ {%- endif -%}
125
+
126
+ {%- else -%}
127
+ <div class="custom-home">
128
+ {{ content }}
129
+ </div>
130
+ {%- endif -%}
131
+
132
+ </main>
133
+
@@ -0,0 +1,50 @@
1
+ ---
2
+ layout: base
3
+ ---
4
+ {%- assign texts = site.data.texts -%}
5
+ {%- assign settings = site.data.settings -%}
6
+ <header class="post">
7
+ {%- include miniprof.html type="nav" -%}
8
+ {%- if page.title != "" -%}
9
+ <h1>{{ page.title }}</h1>
10
+ {%- endif -%}
11
+ <div class="meta">
12
+ {%- include category.html category=page.category %}
13
+ {%- include tags.html tags=page.tag %}
14
+ {%- if page.date or page.update %}
15
+ <div class="time">
16
+ {%- assign date_format = page.date_format | default: texts.date_format | default: "%Y-%m-%d" -%}
17
+ <time datetime="{{ page.date | date_to_xmlschema }}">
18
+ {{ page.date | date: texts.date_format -}}
19
+ </time>
20
+ {%- if page.update %}
21
+ <time datetime="{{ page.update | date_to_xmlschema }}">
22
+ {{- texts.update }} {{ page.update | date: texts.date_format -}}
23
+ </time>
24
+ {%- endif %}
25
+ </div>
26
+ {%- endif %}
27
+ {%- if page.author %}
28
+ <span class="author" itemprop="name">
29
+ {%- for author in page.author -%}
30
+ {{ author }}
31
+ {%- if forloop.last == false %}, {% endif -%}
32
+ {%- endfor -%}
33
+ </span>
34
+ {%- endif %}
35
+ </div>
36
+ </header>
37
+ <article class="post pagebox{% if settings.post.article_serif == true %} serif{% endif %}"
38
+ {%- if page.lang %} lang="{{ page.lang }}"{% endif %}>
39
+
40
+ {{ content }}
41
+ </article>
42
+ {%- if page.license %}
43
+ <span class="license post" itemprop="license">
44
+ {% if page.license.url %}
45
+ {{ texts.post_license }}<a href="{{ page.license.url }}" target="_blank">{{ page.license.name }}</a>
46
+ {% else %}
47
+ {{ texts.post_license }}{{ page.license }}
48
+ {% endif %}
49
+ </span>
50
+ {%- endif %}