steve-for-jekyll 0.2.0 → 1.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.
@@ -1,39 +1,42 @@
1
- {% assign lang = page.lang | default: site.lang %}
2
-
3
- {% assign locale = site.data.locales[lang] %}
4
-
5
- {% include search-form.html class="widget -search" %}
6
-
7
- <aside class="widget -sidebar">
8
- {% if site.data.social %}
9
- <ul class="social-links">
10
- {% for link in site.data.social %}
11
- <li class="link">
12
- <a href="{{ link.url }}" rel="external">
13
- {{ link.icon }}
14
- </a>
15
- </li>
16
- {% endfor %}
17
- </ul>
18
- {% endif %}
19
-
20
- {% if site.data.blogroll %}
21
- {% for blogroll in site.data.blogroll %}
22
- <section class="blogroll">
23
- <h4 class="blogroll-title">{{ blogroll.title }}</h4>
24
-
25
- <ul class="blogroll-list">
26
- {% for link in blogroll.links %}
27
- <li class="link">
28
- <a href="{{ link.url }}" {% if link.external %} rel="external" {% endif %}>
29
- {{ link.title }}
30
- </a>
31
- </li>
32
- {% endfor %}
33
- </ul>
34
- </section>
35
- {% endfor %}
36
- {% endif %}
37
-
38
- {% include blog/custom-widgets.html %}
39
- </aside>
1
+ {% include search-form.html class="widget -search" %}
2
+
3
+ {% capture custom_widgets %}
4
+ {% include blog/custom-widgets.html %}
5
+ {% endcapture %}
6
+
7
+ {% assign custom_widgets = custom_widgets | strip | strip_newlines | normalize_whitespace %}
8
+
9
+ {% if site.data.social or site.data.blogroll or custom_widgets != "" %}
10
+ <aside class="widget -sidebar">
11
+ {% if site.data.social %}
12
+ <ul class="social-links">
13
+ {% for link in site.data.social %}
14
+ <li class="link">
15
+ <a href="{{ link.url }}" rel="external">
16
+ {{ link.icon }}
17
+ </a>
18
+ </li>
19
+ {% endfor %}
20
+ </ul>
21
+ {% endif %}
22
+ {% if site.data.blogroll %}
23
+ {% for blogroll in site.data.blogroll %}
24
+ <section class="blogroll">
25
+ <h4 class="blogroll-title">{{ blogroll.title }}</h4>
26
+
27
+ <ul class="blogroll-list">
28
+ {% for link in blogroll.links %}
29
+ <li class="link">
30
+ <a href="{{ link.url }}" {% if link.external %} rel="external" {% endif %}>
31
+ {{ link.title }}
32
+ </a>
33
+ </li>
34
+ {% endfor %}
35
+ </ul>
36
+ </section>
37
+ {% endfor %}
38
+ {% endif %}
39
+
40
+ {{ custom_widgets }}
41
+ </aside>
42
+ {% endif %}
@@ -1,13 +1,11 @@
1
- <footer class="colophon">
2
- <div class="site-info">
3
- <h5>
4
- <a href="{{ site.url }}">{{ site.title }}</a>
5
- </h5>
6
-
7
- {{ site.description }}
8
-
9
- {% include footer/custom-text.html %}
10
- </div>
11
-
12
- {% include footer/links.html %}
13
- </footer>
1
+ <footer class="colophon">
2
+ <div class="site-info">
3
+ <h5>
4
+ <a href="{{ site.url }}">{{ site.title }}</a>
5
+ </h5>
6
+
7
+ {% include footer/custom-text.html %}
8
+ </div>
9
+
10
+ {% include footer/links.html %}
11
+ </footer>
@@ -1,3 +1,5 @@
1
- {% comment %}
2
- Create a file like this and add your own custom content that should be shown at the bottom of your website.
3
- {% endcomment %}
1
+ {% comment %}
2
+ Create a file like this and add your own custom content that should be shown at the bottom of your website.
3
+ {% endcomment %}
4
+
5
+ {{ site.description }}
@@ -1,17 +1,17 @@
1
- {% capture site_branding %}
2
- <a href="{{ site.url }}">
3
- {% if site.logo %}
4
- <img class="logo" src="{{ site.logo }}" alt="{{ site.title }}" />
5
- {% else %}
6
- {{ site.title }}
7
- {% endif %}
8
- </a>
9
- {% endcapture %}
10
-
11
- <header class="masthead">
12
- {% if page.title %}
13
- <p class="site-title">{{ site_branding }}</p>
14
- {% else %}
15
- <h1 class="site-title">{{ site_branding }}</h1>
16
- {% endif %} {% include header/menu.html %}
17
- </header>
1
+ {% capture site_branding %}
2
+ <a href="{{ "/" | relative_url }}">
3
+ {% if site.logo %}
4
+ <img class="logo" src="{{ site.logo }}" alt="{{ site.title }}" />
5
+ {% else %}
6
+ {{ site.title }}
7
+ {% endif %}
8
+ </a>
9
+ {% endcapture %}
10
+
11
+ <header class="masthead">
12
+ {% if page.title %}
13
+ <p class="site-title">{{ site_branding }}</p>
14
+ {% else %}
15
+ <h1 class="site-title">{{ site_branding }}</h1>
16
+ {% endif %} {% include header/menu.html %}
17
+ </header>
@@ -1,12 +1,12 @@
1
- {% if site.data.menu %}
2
- <nav class="site-menu">
3
- {% for item in site.data.menu %}
4
- <a class="menu-item" href="{{ item.url }}"
5
- {% if item.external %} rel="external" {% endif %}
6
- {% if item.color %} style="background-color: {{ item.color }}" {% endif %}
7
- >
8
- {{ item.title }}
9
- </a>
10
- {% endfor %}
11
- </nav>
12
- {% endif %}
1
+ {% if site.data.menu %}
2
+ <nav class="site-menu">
3
+ {% for item in site.data.menu %}
4
+ <a class="menu-item" href="{{ item.url }}"
5
+ {% if item.external %} rel="external" {% endif %}
6
+ {% if item.color %} style="background-color: {{ item.color }}" {% endif %}
7
+ >
8
+ {{ item.title }}
9
+ </a>
10
+ {% endfor %}
11
+ </nav>
12
+ {% endif %}
@@ -0,0 +1,69 @@
1
+ <form action="{{ site.comments.staticman_endpoint }}" method="post">
2
+ <h3 class="form-title">{{ site.comments.form_title }}</h3>
3
+
4
+ <div class="comments-notice">
5
+ {{ site.comments.notice | markdownify }}
6
+ </div>
7
+
8
+ <div class="comment-message-area">
9
+ <label for="comment_message" class="visually-hidden">
10
+ {{ site.comments.fields.message.label }}
11
+ </label>
12
+
13
+ <textarea
14
+ id="comment_message"
15
+ class="message-area"
16
+ name="fields[message]"
17
+ placeholder="{{ site.comments.fields.message.placeholder }}"
18
+ required
19
+ ></textarea>
20
+ </div>
21
+
22
+ <div class="comment-fields">
23
+ <label for="comment_name" class="visually-hidden">
24
+ {{ site.comments.fields.name.label }}
25
+ </label>
26
+
27
+ <input
28
+ type="text"
29
+ id="comment_name"
30
+ class="comment-field"
31
+ name="fields[name]"
32
+ placeholder="{{ site.comments.fields.name.placeholder }}"
33
+ required
34
+ />
35
+
36
+ <label for="comment_email" class="visually-hidden">
37
+ {{ site.comments.fields.email.label }}
38
+ </label>
39
+ <input
40
+ type="email"
41
+ id="comment_email"
42
+ class="comment-field"
43
+ name="fields[email]"
44
+ placeholder="{{ site.comments.fields.email.placeholder }}"
45
+ required
46
+ />
47
+
48
+ <label for="comment_website" class="visually-hidden">
49
+ {{ site.comments.fields.website.label }}
50
+ </label>
51
+ <input
52
+ type="url"
53
+ id="comment_website"
54
+ class="comment-field"
55
+ name="fields[website]"
56
+ placeholder="{{ site.comments.fields.website.placeholder }}"
57
+ />
58
+ </div>
59
+
60
+ <div class="comment-actions">
61
+ <button class="form-submit" type="submit">
62
+ Submit Comment
63
+ </button>
64
+ </div>
65
+
66
+ <input type="hidden" name="options[redirect]" value="{{ page.url |
67
+ absolute_url }}#comments" />
68
+ <input type="hidden" name="options[slug]" value="{{ page.slug }}" />
69
+ </form>
@@ -0,0 +1,43 @@
1
+ {% if site.data.comments[page.slug] or page.comments != false %}
2
+ <section id="comments" class="content">
3
+ <h2 class="comments-title">
4
+ {{ site.comments.title }}
5
+ </h2>
6
+
7
+ {% if site.data.comments[page.slug] %}
8
+ <ol class="comments-list">
9
+
10
+ {% for comment in site.data.comments[page.slug] %}
11
+ {% assign comment_body = comment | last %}
12
+ <li class="comment-item">
13
+ <section class="comment">
14
+ <header class="comment-meta">
15
+ <img class="author-avatar" src="//www.gravatar.com/avatar/{{ comment_body.email }}?d=monsterid&s=64" alt="" />
16
+ <h5 class="author">
17
+ {% if comment_body.website %}
18
+ <a href="{{ comment_body.website }}" rel="author">
19
+ {{ comment_body.name }}
20
+ </a>
21
+ {% else %}
22
+ {{ comment_body.name }}
23
+ {% endif %}
24
+ </h5>
25
+
26
+ <time class="comment-date">
27
+ {{ comment_body.date | date: site.comments.date_format }}
28
+ </time>
29
+ </header>
30
+
31
+ <div class="comment-body">
32
+ {{ comment_body.message | markdownify }}
33
+ </div>
34
+ </section>
35
+ </li>
36
+ {% endfor %}
37
+
38
+ </ol>
39
+ {% endif %}
40
+
41
+ {% include post/comment-form.html %}
42
+ </section>
43
+ {% endif %}
@@ -1,17 +1,13 @@
1
- {% assign lang = page.lang | default: site.lang %}
2
-
3
- {% assign locale = site.data.locales[lang] %}
4
-
5
- <form action="//duckduckgo.com" method="get" {% if include.class %}class="{{ include.class }}"{% endif %}>
6
- <label for="search_terms">{{ locale.search.label }}</label>
7
-
8
- <div class="search-controls">
9
-
10
- <input id="search_terms" placeholder="{{ locale.search.placeholder }}" type="search" name="q" required />
11
- <input type="hidden" name="sites" value="{{ site.url | remove: 'https://' }}" />
12
- <button type="submit">
13
- {{ locale.search.submit }}
14
- </button>
15
-
16
- </div>
17
- </form>
1
+ <form action="//duckduckgo.com" method="get" {% if include.class %}class="{{ include.class }}"{% endif %}>
2
+ <label for="search_terms">{{ site.steve.search.label }}</label>
3
+
4
+ <div class="search-controls">
5
+
6
+ <input id="search_terms" placeholder="{{ site.steve.search.placeholder }}" type="search" name="q" required />
7
+ <input type="hidden" name="sites" value="{{ site.url | remove: 'https://' }}" />
8
+ <button type="submit">
9
+ {{ site.steve.search.submit }}
10
+ </button>
11
+
12
+ </div>
13
+ </form>
@@ -1,25 +1,21 @@
1
- ---
2
- layout: blog
3
- ---
4
-
5
- {% assign lang = page.lang | default: site.lang %}
6
-
7
- {% assign locale = site.data.locales[lang] %}
8
-
9
- <header class="archive-header">
10
- {% if page.date %}
11
- <h1>
12
- {{ locale.archives.date }}<br />
13
- <strong>{{ page.date | date: locale.date_formats.archives[page.type] }}</strong>
14
- </h1>
15
- {% else %}
16
- <h1>
17
- {{ locale.archives[page.type] }}<br />
18
- <strong>{{ page.title }}</strong>
19
- </h1>
20
- {% endif %}
21
- </header>
22
-
23
- {% for post in page.posts %}
24
- {% include blog/post.html full_post=false %}
25
- {% endfor %}
1
+ ---
2
+ layout: blog
3
+ ---
4
+
5
+ <header class="archive-header">
6
+ {% if page.date %}
7
+ <h1>
8
+ {{ site.steve.archives.date }}<br />
9
+ <strong>{{ page.date | date: site.steve.date_formats.archives[page.type] }}</strong>
10
+ </h1>
11
+ {% else %}
12
+ <h1>
13
+ {{ site.steve.archives[page.type] }}<br />
14
+ <strong>{{ page.title }}</strong>
15
+ </h1>
16
+ {% endif %}
17
+ </header>
18
+
19
+ {% for post in page.posts %}
20
+ {% include blog/post.html full_post=false %}
21
+ {% endfor %}
@@ -1,18 +1,18 @@
1
- <!doctype html>
2
- <html lang="{{ page.lang | default: site.lang }}">
3
- {% include head.html %}
4
-
5
- <body class="{{ page.layout | prepend: 'layout-' }}">
6
- {% include header.html %}
7
-
8
- <main class="container">
9
- {{ content }}
10
- </main>
11
-
12
- {% include footer.html %}
13
-
14
- {% if content contains "iframe" %}
15
- <script src="{% link assets/js/responsive-videos.js %}"></script>
16
- {% endif %}
17
- </body>
18
- </html>
1
+ <!doctype html>
2
+ <html lang="{{ page.lang | default: site.lang }}">
3
+ {% include head.html %}
4
+
5
+ <body class="{{ page.layout | prepend: 'layout-' }}">
6
+ {% include header.html %}
7
+
8
+ <main class="container">
9
+ {{ content }}
10
+ </main>
11
+
12
+ {% include footer.html %}
13
+
14
+ {% if content contains "iframe" %}
15
+ <script src="{% link assets/js/responsive-videos.js %}"></script>
16
+ {% endif %}
17
+ </body>
18
+ </html>
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: blog
3
+ ---
4
+
5
+ {% for post in paginator.posts %}
6
+ {% include blog/post.html %}
7
+ {% endfor %}
8
+
9
+ {% if paginator.total_pages > 1 %}
10
+ <nav class="content-navigation">
11
+ {% if paginator.previous_page %}
12
+ <a class="nav-link prev-link" href="{{ paginator.previous_page_path | relative_url }}" rel="prev">
13
+ {{ site.steve.pagination.next_page }}
14
+ </a>
15
+ {% endif %}
16
+
17
+ {% if paginator.next_page %}
18
+ <a class="nav-link next-link" href="{{ paginator.next_page_path | relative_url }}" rel="next">
19
+ {{ site.steve.pagination.prev_page }}
20
+ </a>
21
+ {% endif %}
22
+ </nav>
23
+ {% endif %}
data/_layouts/page.html CHANGED
@@ -1,15 +1,15 @@
1
- ---
2
- layout: default
3
- ---
4
-
5
- <article class="content page">
6
- <header class="content-header">
7
- <h1 class="content-title">
8
- {{ page.title }}
9
- </h1>
10
- </header>
11
-
12
- <div class="content-body">
13
- {{ content }}
14
- </div>
15
- </article>
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="content page">
6
+ <header class="content-header">
7
+ <h1 class="content-title">
8
+ {{ page.title }}
9
+ </h1>
10
+ </header>
11
+
12
+ <div class="content-body">
13
+ {{ content }}
14
+ </div>
15
+ </article>