oinam-jekyll 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,85 @@
1
+ :root {
2
+ --toggle-width: 60px;
3
+ --toggle-height: 34px;
4
+ --toggle-button-size: 26px;
5
+ --toggle-transition-duration: var(--transition-duration);
6
+ }
7
+
8
+ .theme-switch-wrapper {
9
+ display: flex;
10
+ align-items: center;
11
+ }
12
+
13
+ .theme-switch {
14
+ display: inline-block;
15
+ position: relative;
16
+ height: var(--toggle-height);
17
+ width: var(--toggle-width);
18
+ }
19
+
20
+ .theme-switch input {
21
+ display: none;
22
+ }
23
+
24
+ .slider {
25
+ background: var(--background-color-highlight);
26
+ position: absolute;
27
+ bottom: 0;
28
+ left: 0;
29
+ right: 0;
30
+ top: 0;
31
+ cursor: pointer;
32
+ border-radius: var(--toggle-height);
33
+ transition: 0.4s;
34
+ }
35
+
36
+ .slider:before {
37
+ content: "";
38
+ position: absolute;
39
+ left: 4px;
40
+ bottom: 4px;
41
+ background: var(--background-color);
42
+ width: var(--toggle-button-size);;
43
+ height: var(--toggle-button-size);
44
+ transition: var(--toggle-transition-duration);
45
+ border-radius: var(--border-radius-round);
46
+ }
47
+
48
+ input:checked + .slider {
49
+ background: var(--background-color-highlight);
50
+ }
51
+
52
+ input:checked + .slider:before {
53
+ transform: translateX(calc(1* var(--toggle-button-size)));
54
+ }
55
+
56
+ .slider svg {
57
+ color: var(--text-color);
58
+ position: absolute;
59
+ transition: opacity 0.2s ease 0s, transform 0.35s ease 0s;
60
+ pointer-events: none;
61
+ }
62
+
63
+ .feather-moon {
64
+ opacity: 0;
65
+ left: 9px;
66
+ bottom: 9px;
67
+ transform: translateX(4px);
68
+ }
69
+
70
+ .feather-sun {
71
+ opacity: 1;
72
+ right: 10px;
73
+ bottom: 9px;
74
+ transform: translateX(0px);
75
+ }
76
+
77
+ input:checked + .slider .feather-moon {
78
+ opacity: 1;
79
+ transform: translateX(0);
80
+ }
81
+
82
+ input:checked + .slider .feather-sun {
83
+ opacity: 0;
84
+ transform: translateX(-4px);
85
+ }
@@ -0,0 +1 @@
1
+ {% comment %}<!-- Additional custom footer content -->{% endcomment %}
@@ -1,12 +1,20 @@
1
- <hr>
2
-
3
- <footer>
4
- <nav>
5
- <a href="/">Home</a>
6
- <a href="/about/">About</a>
7
- </nav>
8
- <p>
9
- <small {{ "now" | date: "%Y" }} {{ site.title }}.</small>
10
- <small>Jekyll Theme by <a href="https://oinam.com">Oinam</a>.</small>
11
- </p>
12
- </footer>
1
+ <footer class="footer">
2
+ {% include nav.html %}
3
+ <div class="footer__credit">
4
+ <div>
5
+ <p>
6
+ {% if site.footer.custom != false %}
7
+ <small>{{ site.footer_custom }}</small>
8
+ {% else %}
9
+ <small>Copyright © {{ "now" | date: "%Y" }} {{ site.title }}.</small>
10
+ {% endif %}
11
+ {% if site.footer.credit != false %}
12
+ <small><a href="https://oinam.github.io/oinam-jekyll/" target="_blank">Oinam Jekyll</a>.</small>
13
+ {% endif %}
14
+ </p>
15
+ </div>
16
+ {% if site.layout.theme_switch != false %}
17
+ {% include appearance.html %}
18
+ {% endif %}
19
+ </div>
20
+ </footer>
File without changes
@@ -0,0 +1,2 @@
1
+ <meta name="msapplication-TileColor" content="#da532c">
2
+ <meta name="theme-color" content="#fafafa">
@@ -1,8 +1,5 @@
1
- <header>
2
- <h1><a href="{{ site.baseurl }}/" title="{{ site.title }}">{{ site.title }}</a></h1>
3
- <nav>
4
- <a href="/about/">About</a>
5
- </nav>
6
- </header>
7
-
8
- <hr>
1
+ <header class="header">
2
+ <h1><a href="{{ site.baseurl | prepend: site.url }}/" title="{{ site.title }}">{{ site.title }}</a></h1>
3
+ {% if site.description %}<h2>{{ site.description | escape }}</h2>{% endif %}
4
+ {% include nav.html %}
5
+ </header>
@@ -0,0 +1,32 @@
1
+ // Get the theme toggle input
2
+ const themeToggle = document.querySelector(
3
+ '.theme-switch input[type="checkbox"]'
4
+ );
5
+
6
+ // Get the current theme from local storage
7
+ const currentTheme = localStorage.getItem("theme");
8
+
9
+ // If the current local storage item can be found
10
+ if (currentTheme) {
11
+ // Set the body data-theme attribute to match the local storage item
12
+ document.documentElement.setAttribute("data-theme", currentTheme);
13
+
14
+ // If the current theme is dark, check the theme toggle
15
+ if (currentTheme === "dark") {
16
+ themeToggle.checked = true;
17
+ }
18
+ }
19
+
20
+ // Function that will switch the theme based on the if the theme toggle is checked or not
21
+ function switchTheme(e) {
22
+ if (e.target.checked) {
23
+ document.documentElement.setAttribute("data-theme", "dark");
24
+ localStorage.setItem("theme", "dark");
25
+ } else {
26
+ document.documentElement.setAttribute("data-theme", "light");
27
+ localStorage.setItem("theme", "light");
28
+ }
29
+ }
30
+
31
+ // Add an event listener to the theme toggle, which will switch the theme
32
+ themeToggle.addEventListener("change", switchTheme, false);
@@ -0,0 +1,11 @@
1
+ function externalLinks() {
2
+ for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
3
+ var b = c[a];
4
+ b.getAttribute("href")
5
+ && b.hostname !== location.hostname
6
+ && (b.target = "_blank")
7
+ && (b.rel = "noopener")
8
+ }
9
+ }
10
+ ;
11
+ externalLinks();
@@ -0,0 +1,7 @@
1
+ {% if site.data.nav %}
2
+ <nav>
3
+ {% for menu in site.data.nav -%}
4
+ <a href="{{ site.baseurl | prepend: site.url }}{{ menu.url }}">{{ menu.title }}</a>
5
+ {% endfor -%}
6
+ </nav>
7
+ {% endif %}
data/_includes/photos ADDED
@@ -0,0 +1,12 @@
1
+ {% comment %}<!--
2
+ USAGE
3
+ {% include photos folder="folder_path_without_trailing_slashes" %}
4
+ -->{% endcomment %}
5
+
6
+ {% capture photo_folder %}{{ include.folder }}{% endcapture %}
7
+
8
+ {%- for image in site.static_files -%}
9
+ {%- if image.path contains photo_folder -%}
10
+ <a href="{{ site.baseurl }}{{ image.path }}" target="_blank"><img src="{{ site.baseurl }}{{ image.path }}"></a>
11
+ {% endif -%}
12
+ {%- endfor -%}
@@ -0,0 +1,8 @@
1
+ <ul>
2
+ {%- for post in site.posts limit: site.layout.home_posts_no -%}
3
+ <li>
4
+ <a href="{{ site.baseurl | prepend: site.url }}{{ post.url }}">{{ post.title }}</a>
5
+ <time datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ post.date | date: '%b %-d, %Y' }}</time>
6
+ </li>
7
+ {%- endfor -%}
8
+ </ul>
@@ -0,0 +1,3 @@
1
+ {% if site.layout.link_new_tab != false %} {% include js/link-ext.js %} {% endif %}
2
+
3
+ {% if site.layout.theme_switch != false %} {% include js/appearance.js %} {% endif %}
@@ -0,0 +1,28 @@
1
+ <style type="text/css">
2
+ {%- capture include_to_scssify -%}
3
+
4
+ {% include css/settings.css %}
5
+
6
+ {% include css/color-theme-{{ site.layout.theme | default: 'default' }}.css %}
7
+
8
+ {% include css/styles.css %}
9
+
10
+ {% if site.styles.forms != false %} {% include css/forms.css %} {% endif %}
11
+
12
+ {% include css/styles-extended.css %}
13
+
14
+ {% if site.layout.theme_switch != false %} {% include css/theme-toggle.css %} {% endif %}
15
+
16
+ {% if site.styles.syntax_highlighter != false %}
17
+ {% if page.type == posts %}
18
+ {% include css/styles-code.css %}
19
+ {% endif %}
20
+ {% endif %}
21
+
22
+ {% if jekyll.environment == "development" %}
23
+ {% include css/debug.css %}
24
+ {% endif %}
25
+
26
+ {%- endcapture -%}
27
+ {{- include_to_scssify | scssify | strip_newlines -}}
28
+ </style>
data/_includes/video ADDED
@@ -0,0 +1,25 @@
1
+ {% comment %}
2
+ USAGE
3
+ {% include video source="youtube" id="dQw4w9WgXcQ" %}
4
+ {% endcomment %}
5
+
6
+ {% capture video_id %}{{ include.id }}{% endcapture %}
7
+ {% capture video_source %}{{ include.source }}{% endcapture %}
8
+
9
+ {% capture video_src %}
10
+ {% case video_source %}
11
+ {% when "vimeo" %}
12
+ https://player.vimeo.com/video/{{ video_id }}?dnt=true
13
+ {% when "youtube" %}
14
+ https://www.youtube-nocookie.com/embed/{{ video_id }}
15
+ {% when "google-drive" %}
16
+ https://drive.google.com/file/d/{{ video_id }}/preview
17
+ {% endcase %}
18
+ {% endcapture %}
19
+
20
+ {% assign video_src = video_src | strip %}
21
+ {% unless video_src == "" %}
22
+ <div class="video-wrap">
23
+ <iframe src="{{ video_src }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe>
24
+ </div>
25
+ {% endunless %}
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
6
+
7
+ <div class="items-list">
8
+ {%- for post in site.posts -%}
9
+ {%- assign currentdate = post.date | date: "%Y" -%}
10
+
11
+ {%- if currentdate != date -%}
12
+ {%- unless forloop.first -%}</ul>{% endunless %}
13
+ <h2 id="year-{{post.date | date: "%Y"}}">{{ currentdate }}</h2>
14
+ <ul>
15
+ {% assign date = currentdate %}
16
+ {%- endif -%}
17
+ <li class="one-liner">
18
+ <time datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ post.date | date: '%b %d' }}</time>
19
+ <a href="{{ site.baseurl | prepend: site.url }}{{ post.url }}">{{ post.title }}</a>
20
+ </li>
21
+ {%- if forloop.last -%}</ul>{% endif %}
22
+ {% endfor %}
23
+ </div>
@@ -1,3 +1,5 @@
1
+ ---
2
+ ---
1
3
  <!doctype html>
2
4
  <html lang="en">
3
5
  <head>
@@ -15,27 +17,21 @@
15
17
  <meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
16
18
  <meta name="robots" content="index,follow">
17
19
 
18
- <style type="text/css">
19
- {%- capture include_to_scssify -%}
20
- {% include css/settings.css %}
21
- {% include css/styles.css %}
22
- {% include css/styles-extended.css %}
23
- {% if page.type == posts %}
24
- {% include css/styles-code.css %}
25
- {% endif %}
26
- {%- endcapture -%}
27
- {{- include_to_scssify | scssify | strip_newlines -}}
28
- </style>
29
- <link rel="stylesheet" media="print" href="/print.css">
20
+ {% include styles.html %}
21
+ {% include head-custom.html %}
30
22
 
31
23
  </head>
32
24
  <body>
33
25
 
34
- <main>
35
- {% include header.html %}
36
- {{ content }}
37
- {% include footer.html %}
38
- </main>
26
+ {% include header.html %}
27
+
28
+ <main>{{ content }}</main>
29
+
30
+ {% include footer.html %}
31
+
32
+ <script type="text/javascript">{% include scripts.html %}</script>
33
+
34
+ {% include footer-ext.html %}
39
35
 
40
36
  </body>
41
37
  </html>
data/_layouts/home.html CHANGED
@@ -4,19 +4,15 @@ layout: default
4
4
 
5
5
  {{ content }}
6
6
 
7
+ <section class="home_posts">
8
+ <h3 class="home_posts__title">
9
+ {{ site.layout.home_postheader_title }}
10
+ {% if site.layout.posts_home %}
11
+ <a class="home_posts__meta" href="{{ site.baseurl | prepend: site.url }}{{ site.layout.posts_home }}">{{ site.layout.home_postmeta_title }}</a>
12
+ {% endif %}
13
+ </h3>
14
+ </section>
7
15
 
8
- {%- for post in site.posts -%}
9
- {%- assign currentdate = post.date | date: "%Y" -%}
10
-
11
- {%- if currentdate != date -%}
12
- {%- unless forloop.first -%}</ul>{% endunless %}
13
- <h2 id="year-{{post.date | date: "%Y"}}">{{ currentdate }}</h2>
14
- <ul class="blog-articles__list">
15
- {% assign date = currentdate %}
16
- {%- endif -%}
17
- <li class="one-liner">
18
- <time datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ post.date | date: '%b %d' }}</time>
19
- <a href="{{ post.url }}">{{ post.title }}</a>
20
- </li>
21
- {%- if forloop.last -%}</ul>{% endif %}
22
- {% endfor %}
16
+ <div class="items-list content-medium">
17
+ {% include posts-items.html %}
18
+ </div>
data/_layouts/page.html CHANGED
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+
4
5
  <article>
5
6
  <h1>{{ page.title | escape }}</h1>
6
7
  {{ content }}
data/_layouts/post.html CHANGED
@@ -3,7 +3,7 @@ layout: default
3
3
  ---
4
4
 
5
5
  <div class="post-meta">
6
- <time datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ page.date | date: '%Y %b %-d %a' }}</time>
6
+ <time datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ page.date | date: '%a, %b %-d, %Y' }}</time>
7
7
  <span>{%- include read-time.html -%}</span>
8
8
  </div>
9
9
 
@@ -13,10 +13,14 @@ layout: default
13
13
  </article>
14
14
 
15
15
  <div class="post-nav">
16
- {%- if page.previous.url -%}
17
- <a href="{{ page.previous.url | prepend: site.baseurl }}" class="post-nav__prev" title="{{ page.previous.title }}">← Prev</a>
18
- {%- endif -%}
19
- {%- if page.next.url -%}
20
- <a href="{{ page.next.url | prepend: site.baseurl }}" class="post-nav__next" title="{{ page.next.title }}">Next →</a>
21
- {%- endif -%}
16
+ <span>
17
+ {%- if page.previous.url -%}
18
+ <a href="{{ page.previous.url | prepend: site.baseurl | prepend: site.url }}" class="post-nav__prev" title="{{ page.previous.title }}">← Prev</a>
19
+ {%- endif -%}
20
+ </span>
21
+ <span>
22
+ {%- if page.next.url -%}
23
+ <a href="{{ page.next.url | prepend: site.baseurl | prepend: site.url }}" class="post-nav__next" title="{{ page.next.title }}">Next →</a>
24
+ {%- endif -%}
25
+ </span>
22
26
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oinam-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oinam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-21 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.5'
19
+ version: 3.9.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '5.0'
@@ -26,24 +26,52 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '3.5'
29
+ version: 3.9.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: jekyll-feed
34
+ name: kramdown-parser-gfm
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.9'
39
+ version: 1.1.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.9'
46
+ version: 1.1.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: jekyll-optional-front-matter
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 0.3.2
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: 0.3.2
61
+ - !ruby/object:Gem::Dependency
62
+ name: jekyll-titles-from-headings
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.5.3
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.5.3
47
75
  - !ruby/object:Gem::Dependency
48
76
  name: bundler
49
77
  requirement: !ruby/object:Gem::Requirement
@@ -59,22 +87,40 @@ dependencies:
59
87
  - !ruby/object:Gem::Version
60
88
  version: '0'
61
89
  description:
62
- email:
63
- - hi@oinam.com
90
+ email:
64
91
  executables: []
65
92
  extensions: []
66
93
  extra_rdoc_files: []
67
94
  files:
68
- - LICENSE.txt
95
+ - LICENSE
69
96
  - README.md
97
+ - _data/nav.yml
98
+ - _includes/appearance.html
99
+ - _includes/css/color-theme-default.css
100
+ - _includes/css/color-theme-nord.css
101
+ - _includes/css/color-theme-vintage.css
102
+ - _includes/css/debug.css
103
+ - _includes/css/forms.css
70
104
  - _includes/css/settings.css
71
105
  - _includes/css/styles-code.css
72
106
  - _includes/css/styles-extended.css
73
107
  - _includes/css/styles.css
108
+ - _includes/css/theme-toggle.css
109
+ - _includes/footer-ext.html
74
110
  - _includes/footer.html
111
+ - _includes/gallery.html
112
+ - _includes/head-custom.html
75
113
  - _includes/header.html
114
+ - _includes/js/appearance.js
115
+ - _includes/js/link-ext.js
116
+ - _includes/nav.html
117
+ - _includes/photos
118
+ - _includes/posts-items.html
76
119
  - _includes/read-time.html
77
- - _includes/video.html
120
+ - _includes/scripts.html
121
+ - _includes/styles.html
122
+ - _includes/video
123
+ - _layouts/blog.html
78
124
  - _layouts/default.html
79
125
  - _layouts/home.html
80
126
  - _layouts/page.html
@@ -99,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
145
  - !ruby/object:Gem::Version
100
146
  version: '0'
101
147
  requirements: []
102
- rubygems_version: 3.2.25
148
+ rubygems_version: 3.2.26
103
149
  signing_key:
104
150
  specification_version: 4
105
151
  summary: A simple, clean, and minimal Jekyll Theme.