arsxy-theme 1.0.0.pre.rc
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +166 -0
- data/_config.yml +131 -0
- data/_includes/footer.html +45 -0
- data/_includes/header.html +68 -0
- data/_includes/image.html +8 -0
- data/_includes/related-posts.html +83 -0
- data/_includes/search.html +32 -0
- data/_includes/social-sharing.html +86 -0
- data/_includes/toc.html +83 -0
- data/_layouts/default.html +76 -0
- data/_layouts/docs.html +90 -0
- data/_layouts/home.html +172 -0
- data/_layouts/post.html +114 -0
- data/_sass/_base.scss +264 -0
- data/_sass/_dark-mode.scss +749 -0
- data/_sass/_layout.scss +118 -0
- data/_sass/_responsive.scss +157 -0
- data/_sass/_syntax-highlighting.scss +147 -0
- data/_sass/_typography.scss +226 -0
- data/_sass/_utilities.scss +138 -0
- data/_sass/_variables.scss +63 -0
- data/_sass/components/_code.scss +245 -0
- data/_sass/components/_docs.scss +263 -0
- data/_sass/components/_footer.scss +170 -0
- data/_sass/components/_header.scss +313 -0
- data/_sass/components/_homepage.scss +597 -0
- data/_sass/components/_image.scss +22 -0
- data/_sass/components/_pagination.scss +146 -0
- data/_sass/components/_post.scss +1039 -0
- data/_sass/components/_related-posts.scss +70 -0
- data/_sass/components/_search.scss +276 -0
- data/_sass/components/_social-sharing.scss +95 -0
- data/_sass/components/_toc.scss +193 -0
- data/assets/css/main.scss +24 -0
- data/assets/images/favicon/android-chrome-192x192.png +0 -0
- data/assets/images/favicon/android-chrome-512x512.png +0 -0
- data/assets/images/favicon/apple-touch-icon.png +0 -0
- data/assets/images/favicon/favicon-16x16.png +0 -0
- data/assets/images/favicon/favicon-32x32.png +0 -0
- data/assets/images/favicon/favicon.ico +0 -0
- data/assets/images/favicon/site.webmanifest +19 -0
- data/assets/images/new-features-update.svg +58 -0
- data/assets/images/related-posts-example.svg +37 -0
- data/assets/images/seo-optimization.png +0 -0
- data/assets/images/social-sharing-sample.png +0 -0
- data/assets/images/ss-arsxy-theme.png +0 -0
- data/assets/images/table-of-content-thumbnail.png +0 -0
- data/assets/images/theme-demo-2.jpeg +0 -0
- data/assets/images/theme-demo.jpeg +0 -0
- data/assets/images/welcome-to-arsxy-theme.png +0 -0
- data/assets/js/main.js +369 -0
- data/assets/js/search-index.json +31 -0
- data/assets/js/search.js +207 -0
- metadata +226 -0
data/_includes/toc.html
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
{% comment %}
|
2
|
+
Table of Contents generator for Jekyll with nested headers
|
3
|
+
This implementation creates a hierarchical TOC based on header levels
|
4
|
+
{% endcomment %}
|
5
|
+
|
6
|
+
{% assign headings = include.html | split: '<h' %}
|
7
|
+
{% assign min_header = include.h_min | default: 2 %}
|
8
|
+
{% assign max_header = include.h_max | default: 3 %}
|
9
|
+
{% assign previous_level = 0 %}
|
10
|
+
{% assign toc_output = "" %}
|
11
|
+
|
12
|
+
{% comment %} Start the TOC {% endcomment %}
|
13
|
+
{% capture toc_output %}{{ toc_output }}<ul class="toc">{% endcapture %}
|
14
|
+
|
15
|
+
{% comment %} Process each heading {% endcomment %}
|
16
|
+
{% for heading in headings %}
|
17
|
+
{% if heading contains '</h' %}
|
18
|
+
{% assign level = heading | slice: 0, 1 | plus: 0 %}
|
19
|
+
|
20
|
+
{% if level >= min_header and level <= max_header %}
|
21
|
+
{% if heading contains 'id="' %}
|
22
|
+
{% assign id_parts = heading | split: 'id="' %}
|
23
|
+
{% assign id_part = id_parts[1] | split: '"' %}
|
24
|
+
{% assign header_id = id_part[0] %}
|
25
|
+
|
26
|
+
{% assign text_parts = heading | split: '>' %}
|
27
|
+
{% assign text_part = text_parts[1] | split: '<' %}
|
28
|
+
{% assign header_text = text_part[0] | strip_html | strip %}
|
29
|
+
|
30
|
+
{% comment %} Handle nesting based on header level {% endcomment %}
|
31
|
+
{% if previous_level == 0 %}
|
32
|
+
{% comment %} First heading - just open the list item {% endcomment %}
|
33
|
+
{% capture toc_output %}{{ toc_output }}<li class="toc-entry toc-level-{{ level }}">
|
34
|
+
<a href="#{{ header_id }}">{{ header_text }}</a>{% endcapture %}
|
35
|
+
{% elsif level > previous_level %}
|
36
|
+
{% comment %} Open a new nested list {% endcomment %}
|
37
|
+
{% capture toc_output %}{{ toc_output }}
|
38
|
+
<ul>
|
39
|
+
<li class="toc-entry toc-level-{{ level }}">
|
40
|
+
<a href="#{{ header_id }}">{{ header_text }}</a>{% endcapture %}
|
41
|
+
{% elsif level < previous_level %}
|
42
|
+
{% comment %} Close the previous list items and start a new one {% endcomment %}
|
43
|
+
{% assign level_diff = previous_level | minus: level %}
|
44
|
+
|
45
|
+
{% comment %} Close the appropriate number of lists based on level difference {% endcomment %}
|
46
|
+
{% for i in (1..level_diff) %}
|
47
|
+
{% capture toc_output %}{{ toc_output }}</li>
|
48
|
+
</ul>{% endcapture %}
|
49
|
+
{% endfor %}
|
50
|
+
|
51
|
+
{% comment %} Start a new list item at the current level {% endcomment %}
|
52
|
+
{% capture toc_output %}{{ toc_output }}</li>
|
53
|
+
<li class="toc-entry toc-level-{{ level }}">
|
54
|
+
<a href="#{{ header_id }}">{{ header_text }}</a>{% endcapture %}
|
55
|
+
{% else %}
|
56
|
+
{% comment %} Same level - close previous item and start a new one {% endcomment %}
|
57
|
+
{% capture toc_output %}{{ toc_output }}</li>
|
58
|
+
<li class="toc-entry toc-level-{{ level }}">
|
59
|
+
<a href="#{{ header_id }}">{{ header_text }}</a>{% endcapture %}
|
60
|
+
{% endif %}
|
61
|
+
|
62
|
+
{% assign previous_level = level %}
|
63
|
+
{% endif %}
|
64
|
+
{% endif %}
|
65
|
+
{% endif %}
|
66
|
+
{% endfor %}
|
67
|
+
|
68
|
+
{% comment %} Close any remaining open lists {% endcomment %}
|
69
|
+
{% for i in (1..previous_level) %}
|
70
|
+
{% if forloop.last %}
|
71
|
+
{% capture toc_output %}{{ toc_output }}</li>
|
72
|
+
</ul>{% endcapture %}
|
73
|
+
{% else %}
|
74
|
+
{% capture toc_output %}{{ toc_output }}</li>
|
75
|
+
</ul>{% endcapture %}
|
76
|
+
{% endif %}
|
77
|
+
{% endfor %}
|
78
|
+
|
79
|
+
{% if toc_output contains "<li" %}
|
80
|
+
{{ toc_output }}
|
81
|
+
{% else %}
|
82
|
+
<p class="toc-empty">No table of contents entries found</p>
|
83
|
+
{% endif %}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ page.lang | default: site.lang | default: "en" }}"
|
3
|
+
{% if site.dark_mode.enabled == false %}data-dark-mode-enabled="false"{% else %}data-dark-mode-enabled="true"{% endif %}
|
4
|
+
{% if site.dark_mode.default %}data-dark-mode-default="true"{% else %}data-dark-mode-default="false"{% endif %}>
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8">
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
<meta name="baseurl" content="{{ site.baseurl }}">
|
10
|
+
|
11
|
+
{%- seo -%}
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
|
14
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
15
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
16
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
17
|
+
|
18
|
+
{%- feed_meta -%}
|
19
|
+
|
20
|
+
<!-- Favicon -->
|
21
|
+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/images/favicon/apple-touch-icon.png" | relative_url }}">
|
22
|
+
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/assets/images/favicon/favicon-32x32.png" | relative_url }}">
|
23
|
+
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/assets/images/favicon/favicon-16x16.png" | relative_url }}">
|
24
|
+
<link rel="manifest" href="{{ "/assets/images/favicon/site.webmanifest" | relative_url }}">
|
25
|
+
|
26
|
+
<!-- Preload critical assets -->
|
27
|
+
<link rel="preload" href="{{ "/assets/css/main.css" | relative_url }}" as="style">
|
28
|
+
<link rel="preload" href="{{ "/assets/js/main.js" | relative_url }}" as="script">
|
29
|
+
|
30
|
+
<!-- Dark mode detection -->
|
31
|
+
<script>
|
32
|
+
// Get configuration from data attributes
|
33
|
+
const html = document.documentElement;
|
34
|
+
const darkModeEnabled = html.getAttribute('data-dark-mode-enabled') === 'true';
|
35
|
+
|
36
|
+
if (!darkModeEnabled) {
|
37
|
+
// If dark mode is disabled in config, force light mode
|
38
|
+
// This will override any user preference or OS setting
|
39
|
+
html.classList.remove('dark-mode');
|
40
|
+
localStorage.setItem('theme', 'light');
|
41
|
+
} else {
|
42
|
+
// Dark mode is enabled in config, check other preferences
|
43
|
+
const siteDefaultDark = html.getAttribute('data-dark-mode-default') === 'true';
|
44
|
+
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
45
|
+
const storedTheme = localStorage.getItem('theme');
|
46
|
+
|
47
|
+
if (storedTheme === 'dark' || (!storedTheme && siteDefaultDark)) {
|
48
|
+
// Apply dark mode if:
|
49
|
+
// 1. User explicitly chose dark mode in the past OR
|
50
|
+
// 2. No stored preference AND site default is dark
|
51
|
+
html.classList.add('dark-mode');
|
52
|
+
} else if (storedTheme === 'light' || (!storedTheme && !siteDefaultDark)) {
|
53
|
+
// Apply light mode if:
|
54
|
+
// 1. User explicitly chose light mode in the past OR
|
55
|
+
// 2. No stored preference AND site default is light
|
56
|
+
html.classList.remove('dark-mode');
|
57
|
+
}
|
58
|
+
}
|
59
|
+
</script>
|
60
|
+
</head>
|
61
|
+
|
62
|
+
<body class="{% if page.layout %}layout-{{ page.layout }}{% endif %}">
|
63
|
+
{%- include header.html -%}
|
64
|
+
|
65
|
+
<main class="page-content" aria-label="Content">
|
66
|
+
<div class="wrapper">
|
67
|
+
{{ content }}
|
68
|
+
</div>
|
69
|
+
</main>
|
70
|
+
|
71
|
+
{%- include footer.html -%}
|
72
|
+
|
73
|
+
<script src="{{ "/assets/js/main.js" | relative_url }}" defer></script>
|
74
|
+
<script src="{{ "/assets/js/search.js" | relative_url }}" defer></script>
|
75
|
+
</body>
|
76
|
+
</html>
|
data/_layouts/docs.html
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="docs-container">
|
6
|
+
<div class="docs-content">
|
7
|
+
<article class="docs-article">
|
8
|
+
<header class="docs-header">
|
9
|
+
<h1 class="docs-title">{{ page.title }}</h1>
|
10
|
+
{% if page.description %}
|
11
|
+
<p class="docs-description">{{ page.description }}</p>
|
12
|
+
{% endif %}
|
13
|
+
</header>
|
14
|
+
|
15
|
+
<div class="docs-body">
|
16
|
+
{{ content }}
|
17
|
+
</div>
|
18
|
+
</article>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<aside class="docs-sidebar">
|
22
|
+
<div class="docs-nav">
|
23
|
+
<h2 class="docs-nav-title">Documentation</h2>
|
24
|
+
|
25
|
+
<nav class="docs-nav-menu">
|
26
|
+
<ul class="docs-nav-list">
|
27
|
+
<li><a href="{{ '/docs/' | relative_url }}" {% if page.url == "/docs/" %}class="active"{% endif %}>Introduction</a></li>
|
28
|
+
|
29
|
+
<li class="docs-section">
|
30
|
+
<span class="docs-section-title">Getting Started</span>
|
31
|
+
<ul class="docs-section-items">
|
32
|
+
<li><a href="{{ '/docs/installation/' | relative_url }}" {% if page.url == "/docs/installation/" %}class="active"{% endif %}>Installation Guide</a></li>
|
33
|
+
<li><a href="{{ '/docs/quick-start/' | relative_url }}" {% if page.url == "/docs/quick-start/" %}class="active"{% endif %}>Quick Start</a></li>
|
34
|
+
<li><a href="{{ '/docs/configuration/' | relative_url }}" {% if page.url == "/docs/configuration/" %}class="active"{% endif %}>Configuration</a></li>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
|
38
|
+
<li class="docs-section">
|
39
|
+
<span class="docs-section-title">Core Features</span>
|
40
|
+
<ul class="docs-section-items">
|
41
|
+
<li><a href="{{ '/docs/layouts/' | relative_url }}" {% if page.url == "/docs/layouts/" %}class="active"{% endif %}>Layout Options</a></li>
|
42
|
+
<li><a href="{{ '/docs/dark-mode/' | relative_url }}" {% if page.url == "/docs/dark-mode/" %}class="active"{% endif %}>Dark Mode</a></li>
|
43
|
+
<li><a href="{{ '/docs/seo/' | relative_url }}" {% if page.url == "/docs/seo/" %}class="active"{% endif %}>SEO Optimization</a></li>
|
44
|
+
<li><a href="{{ '/docs/responsive-design/' | relative_url }}" {% if page.url == "/docs/responsive-design/" %}class="active"{% endif %}>Responsive Design</a></li>
|
45
|
+
<li><a href="{{ '/docs/typography/' | relative_url }}" {% if page.url == "/docs/typography/" %}class="active"{% endif %}>Typography</a></li>
|
46
|
+
</ul>
|
47
|
+
</li>
|
48
|
+
|
49
|
+
<li class="docs-section">
|
50
|
+
<span class="docs-section-title">Components</span>
|
51
|
+
<ul class="docs-section-items">
|
52
|
+
<li><a href="{{ '/docs/components/navigation/' | relative_url }}" {% if page.url == "/docs/components/navigation/" %}class="active"{% endif %}>Navigation</a></li>
|
53
|
+
<li><a href="{{ '/docs/components/toc/' | relative_url }}" {% if page.url == "/docs/components/toc/" %}class="active"{% endif %}>Table of Contents</a></li>
|
54
|
+
<li><a href="{{ '/docs/components/code-highlighting/' | relative_url }}" {% if page.url == "/docs/components/code-highlighting/" %}class="active"{% endif %}>Code Highlighting</a></li>
|
55
|
+
<li><a href="{{ '/docs/components/featured-images/' | relative_url }}" {% if page.url == "/docs/components/featured-images/" %}class="active"{% endif %}>Featured Images</a></li>
|
56
|
+
<li><a href="{{ '/docs/components/social-sharing/' | relative_url }}" {% if page.url == "/docs/components/social-sharing/" %}class="active"{% endif %}>Social Sharing</a></li>
|
57
|
+
<li><a href="{{ '/docs/components/search/' | relative_url }}" {% if page.url == "/docs/components/search/" %}class="active"{% endif %}>Search</a></li>
|
58
|
+
</ul>
|
59
|
+
</li>
|
60
|
+
|
61
|
+
<li class="docs-section">
|
62
|
+
<span class="docs-section-title">Customization</span>
|
63
|
+
<ul class="docs-section-items">
|
64
|
+
<li><a href="{{ '/docs/customization/' | relative_url }}" {% if page.url == "/docs/customization/" %}class="active"{% endif %}>Theme Customization</a></li>
|
65
|
+
<li><a href="{{ '/docs/css-variables/' | relative_url }}" {% if page.url == "/docs/css-variables/" %}class="active"{% endif %}>CSS Variables</a></li>
|
66
|
+
<li><a href="{{ '/docs/custom-layouts/' | relative_url }}" {% if page.url == "/docs/custom-layouts/" %}class="active"{% endif %}>Custom Layouts</a></li>
|
67
|
+
</ul>
|
68
|
+
</li>
|
69
|
+
|
70
|
+
<li class="docs-section">
|
71
|
+
<span class="docs-section-title">Advanced</span>
|
72
|
+
<ul class="docs-section-items">
|
73
|
+
<li><a href="{{ '/docs/performance/' | relative_url }}" {% if page.url == "/docs/performance/" %}class="active"{% endif %}>Performance</a></li>
|
74
|
+
<li><a href="{{ '/docs/contributing/' | relative_url }}" {% if page.url == "/docs/contributing/" %}class="active"{% endif %}>Contributing</a></li>
|
75
|
+
<li><a href="{{ '/docs/troubleshooting/' | relative_url }}" {% if page.url == "/docs/troubleshooting/" %}class="active"{% endif %}>Troubleshooting</a></li>
|
76
|
+
</ul>
|
77
|
+
</li>
|
78
|
+
|
79
|
+
<li class="docs-section">
|
80
|
+
<span class="docs-section-title">Release</span>
|
81
|
+
<ul class="docs-section-items">
|
82
|
+
<li><a href="{{ '/docs/version-history/' | relative_url }}" {% if page.url == "/docs/version-history/" %}class="active"{% endif %}>Version History</a></li>
|
83
|
+
<li><a href="{{ '/docs/roadmap/' | relative_url }}" {% if page.url == "/docs/roadmap/" %}class="active"{% endif %}>Roadmap</a></li>
|
84
|
+
</ul>
|
85
|
+
</li>
|
86
|
+
</ul>
|
87
|
+
</nav>
|
88
|
+
</div>
|
89
|
+
</aside>
|
90
|
+
</div>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="home">
|
6
|
+
<!-- Hero Section -->
|
7
|
+
{% if site.homepage.hero.enabled %}
|
8
|
+
<section class="hero-section">
|
9
|
+
<div class="hero-content">
|
10
|
+
<h1 class="hero-title">{{ site.homepage.hero.title }}</h1>
|
11
|
+
<p class="hero-subtitle">{{ site.homepage.hero.subtitle }}</p>
|
12
|
+
<div class="hero-buttons">
|
13
|
+
{% for button in site.homepage.hero.buttons %}
|
14
|
+
<a href="{{ button.url | relative_url }}" class="btn {% if button.primary %}btn-primary{% else %}btn-secondary{% endif %}">{{ button.label }}</a>
|
15
|
+
{% endfor %}
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="hero-image">
|
19
|
+
<img src="{{ '/assets/images/' | append: site.homepage.hero.image | relative_url }}" alt="{{ site.homepage.hero.title }}">
|
20
|
+
</div>
|
21
|
+
</section>
|
22
|
+
{% endif %}
|
23
|
+
|
24
|
+
<!-- Main Content Area with Sidebar -->
|
25
|
+
<div class="content-with-sidebar">
|
26
|
+
<!-- Main Content -->
|
27
|
+
<div class="main-content">
|
28
|
+
<!-- Featured Posts Section -->
|
29
|
+
{% if site.homepage.featured_posts.enabled %}
|
30
|
+
<section class="featured-posts">
|
31
|
+
<h2 class="section-heading">{{ site.homepage.featured_posts.title }}</h2>
|
32
|
+
<div class="featured-grid">
|
33
|
+
{% assign featured_posts = site.posts | where: "featured", true %}
|
34
|
+
{% assign limit = site.homepage.featured_posts.limit | default: 3 %}
|
35
|
+
{% for post in featured_posts limit:limit %}
|
36
|
+
<div class="featured-card">
|
37
|
+
{% if post.image %}
|
38
|
+
<div class="card-image">
|
39
|
+
<a href="{{ post.url | relative_url }}">
|
40
|
+
<img src="{{ '/assets/images/' | append: post.image | relative_url }}" alt="{{ post.title }}">
|
41
|
+
</a>
|
42
|
+
</div>
|
43
|
+
{% endif %}
|
44
|
+
<div class="card-content">
|
45
|
+
<span class="card-meta">{{ post.date | date: site.date_format | default: "%b %-d, %Y" }}</span>
|
46
|
+
<h3 class="card-title"><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h3>
|
47
|
+
<p class="card-excerpt">{{ post.excerpt | strip_html | truncatewords: 20 }}</p>
|
48
|
+
<a href="{{ post.url | relative_url }}" class="read-more" aria-label="Read more">Read more →</a>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
{% endfor %}
|
52
|
+
</div>
|
53
|
+
</section>
|
54
|
+
{% endif %}
|
55
|
+
|
56
|
+
<!-- Latest Articles -->
|
57
|
+
{% if site.homepage.latest_articles.enabled %}
|
58
|
+
<section class="latest-articles">
|
59
|
+
<h2 class="section-heading">{{ site.homepage.latest_articles.title }}</h2>
|
60
|
+
<ul class="post-list">
|
61
|
+
{% for post in paginator.posts %}
|
62
|
+
{% unless post.featured %}
|
63
|
+
<li class="post-item">
|
64
|
+
<div class="post-preview {% unless post.image %}no-image{% endunless %}">
|
65
|
+
<div class="post-preview-content">
|
66
|
+
<span class="post-meta">
|
67
|
+
{{ post.date | date: site.date_format | default: "%b %-d, %Y" }}
|
68
|
+
{% if post.categories.size > 0 %}
|
69
|
+
<span class="post-categories">
|
70
|
+
{% for category in post.categories %}
|
71
|
+
<a href="{{ '/categories/' | append: category | relative_url }}">{{ category }}</a>
|
72
|
+
{% endfor %}
|
73
|
+
</span>
|
74
|
+
{% endif %}
|
75
|
+
</span>
|
76
|
+
|
77
|
+
<h3>
|
78
|
+
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
|
79
|
+
</h3>
|
80
|
+
|
81
|
+
<p class="post-excerpt">
|
82
|
+
{% assign excerpt_length = site.homepage.latest_articles.excerpt_length | default: 30 %}
|
83
|
+
{{ post.excerpt | strip_html | truncatewords: excerpt_length }}
|
84
|
+
</p>
|
85
|
+
|
86
|
+
<a href="{{ post.url | relative_url }}" class="read-more" aria-label="Read more about {{ post.title }}">Read more →</a>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
{% if post.image %}
|
90
|
+
<div class="post-preview-image">
|
91
|
+
<a href="{{ post.url | relative_url }}">
|
92
|
+
<img src="{{ '/assets/images/' | append: post.image | relative_url }}" alt="{{ post.title }}" />
|
93
|
+
</a>
|
94
|
+
</div>
|
95
|
+
{% endif %}
|
96
|
+
</div>
|
97
|
+
</li>
|
98
|
+
{% endunless %}
|
99
|
+
{% endfor %}
|
100
|
+
</ul>
|
101
|
+
|
102
|
+
<!-- Pagination -->
|
103
|
+
{% if paginator.total_pages > 1 %}
|
104
|
+
<div class="pagination">
|
105
|
+
{% if paginator.previous_page %}
|
106
|
+
<a href="{{ paginator.previous_page_path | relative_url }}" class="pagination-previous">« Previous</a>
|
107
|
+
{% else %}
|
108
|
+
<span class="pagination-previous disabled">« Previous</span>
|
109
|
+
{% endif %}
|
110
|
+
|
111
|
+
<div class="pagination-pages">
|
112
|
+
{% for page in (1..paginator.total_pages) %}
|
113
|
+
{% if page == paginator.page %}
|
114
|
+
<span class="pagination-current">{{ page }}</span>
|
115
|
+
{% elsif page == 1 %}
|
116
|
+
<a href="{{ '/' | relative_url }}" class="pagination-link">{{ page }}</a>
|
117
|
+
{% else %}
|
118
|
+
<a href="{{ site.paginate_path | relative_url | replace: ':num', page }}" class="pagination-link">{{ page }}</a>
|
119
|
+
{% endif %}
|
120
|
+
{% endfor %}
|
121
|
+
</div>
|
122
|
+
|
123
|
+
{% if paginator.next_page %}
|
124
|
+
<a href="{{ paginator.next_page_path | relative_url }}" class="pagination-next">Next »</a>
|
125
|
+
{% else %}
|
126
|
+
<span class="pagination-next disabled">Next »</span>
|
127
|
+
{% endif %}
|
128
|
+
</div>
|
129
|
+
{% endif %}
|
130
|
+
</section>
|
131
|
+
{% endif %}
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<!-- Sidebar -->
|
135
|
+
<aside class="sidebar">
|
136
|
+
<!-- About Widget -->
|
137
|
+
{% if site.homepage.about_widget.enabled %}
|
138
|
+
<div class="sidebar-widget about-widget">
|
139
|
+
<h3 class="widget-title">{{ site.homepage.about_widget.title }}</h3>
|
140
|
+
<p>{{ site.homepage.about_widget.content }}</p>
|
141
|
+
<a href="{{ site.homepage.about_widget.link_url | relative_url }}" class="sidebar-link">{{ site.homepage.about_widget.link_text }}</a>
|
142
|
+
</div>
|
143
|
+
{% endif %}
|
144
|
+
|
145
|
+
<!-- Categories Widget -->
|
146
|
+
<div class="sidebar-widget categories-widget">
|
147
|
+
<h3 class="widget-title">Categories</h3>
|
148
|
+
<ul class="category-list">
|
149
|
+
{% assign categories = site.categories | sort %}
|
150
|
+
{% for category in categories %}
|
151
|
+
<li><a href="{{ '/categories/' | append: category[0] | relative_url }}">{{ category[0] }} <span>({{ category[1].size }})</span></a></li>
|
152
|
+
{% endfor %}
|
153
|
+
</ul>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<!-- Popular Posts Widget -->
|
157
|
+
<div class="sidebar-widget popular-posts-widget">
|
158
|
+
<h3 class="widget-title">Popular Posts</h3>
|
159
|
+
<ul class="popular-posts">
|
160
|
+
{% for post in site.posts limit:5 %}
|
161
|
+
<li>
|
162
|
+
<a href="{{ post.url | relative_url }}" class="popular-post-link">
|
163
|
+
<span class="popular-post-title">{{ post.title }}</span>
|
164
|
+
<span class="popular-post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
|
165
|
+
</a>
|
166
|
+
</li>
|
167
|
+
{% endfor %}
|
168
|
+
</ul>
|
169
|
+
</div>
|
170
|
+
</aside>
|
171
|
+
</div>
|
172
|
+
</div>
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
{% assign sidebar_pos = site.toc_position | default: "right" %}
|
5
|
+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
|
6
|
+
|
7
|
+
<header class="post-header">
|
8
|
+
<div class="post-meta">
|
9
|
+
<span class="post-date-author">
|
10
|
+
<time class="dt-published post-date" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
11
|
+
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
|
12
|
+
{{ page.date | date: date_format }}
|
13
|
+
</time>
|
14
|
+
{%- if page.author -%}
|
15
|
+
<span class="separator">|</span>
|
16
|
+
<span class="post-author" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
17
|
+
<span itemprop="name">{{ page.author }}</span>
|
18
|
+
</span>
|
19
|
+
{%- endif -%}
|
20
|
+
</span>
|
21
|
+
|
22
|
+
{%- if page.categories.size > 0 -%}
|
23
|
+
<span class="post-categories">
|
24
|
+
{% for category in page.categories %}
|
25
|
+
<a href="{{ '/categories/' | append: category | relative_url }}">{{ category }}</a>
|
26
|
+
{% endfor %}
|
27
|
+
</span>
|
28
|
+
{%- endif -%}
|
29
|
+
|
30
|
+
<span class="reading-time" title="Estimated read time">
|
31
|
+
{% assign words = content | number_of_words %}
|
32
|
+
{% if words < 360 %}
|
33
|
+
1 min read
|
34
|
+
{% else %}
|
35
|
+
{{ words | divided_by: 180 }} min read
|
36
|
+
{% endif %}
|
37
|
+
</span>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
|
41
|
+
|
42
|
+
{%- if page.description -%}
|
43
|
+
<p class="post-description" itemprop="description">{{ page.description }}</p>
|
44
|
+
{%- endif -%}
|
45
|
+
</header>
|
46
|
+
|
47
|
+
{%- if page.image -%}
|
48
|
+
<div class="post-featured-image">
|
49
|
+
<img src="{{ '/assets/images/' | append: page.image | relative_url }}" alt="{{ page.title }}" />
|
50
|
+
</div>
|
51
|
+
{% else %}
|
52
|
+
<!-- Generate CSS featured image for posts without specified images -->
|
53
|
+
<div class="post-featured-image css-featured-image"
|
54
|
+
data-pattern="{{ page.title | size | modulo: 6 }}"
|
55
|
+
data-title="{{ page.title | slice: 0 | upcase }}">
|
56
|
+
<div class="css-image-title">{{ page.title | slice: 0 | upcase }}</div>
|
57
|
+
</div>
|
58
|
+
{%- endif -%}
|
59
|
+
|
60
|
+
<div class="post-layout {% if sidebar_pos == 'left' %}sidebar-left{% else %}sidebar-right{% endif %}">
|
61
|
+
{% if page.toc != false %}
|
62
|
+
<aside class="post-sidebar">
|
63
|
+
<div class="floating-toc">
|
64
|
+
<h2>Table of Contents</h2>
|
65
|
+
{% include toc.html html=content h_min=2 h_max=3 %}
|
66
|
+
</div>
|
67
|
+
</aside>
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
<div class="post-content-wrapper">
|
71
|
+
<div class="post-content e-content" itemprop="articleBody">
|
72
|
+
{{ content }}
|
73
|
+
</div>
|
74
|
+
|
75
|
+
{%- if page.tags.size > 0 -%}
|
76
|
+
<div class="post-tags">
|
77
|
+
<h3>Tags:</h3>
|
78
|
+
<ul class="tag-list">
|
79
|
+
{%- for tag in page.tags -%}
|
80
|
+
<li><a href="{{ '/tags/' | append: tag | relative_url }}" class="tag">{{ tag }}</a></li>
|
81
|
+
{%- endfor -%}
|
82
|
+
</ul>
|
83
|
+
</div>
|
84
|
+
{%- endif -%}
|
85
|
+
|
86
|
+
<!-- Social sharing buttons -->
|
87
|
+
{% include social-sharing.html %}
|
88
|
+
|
89
|
+
<div class="post-navigation">
|
90
|
+
{% if page.previous.url %}
|
91
|
+
<a class="prev" href="{{ page.previous.url | relative_url }}">
|
92
|
+
<span class="nav-label">Previous Post</span>
|
93
|
+
<span class="post-title">{{page.previous.title}}</span>
|
94
|
+
</a>
|
95
|
+
{% endif %}
|
96
|
+
{% if page.next.url %}
|
97
|
+
<a class="next" href="{{ page.next.url | relative_url }}">
|
98
|
+
<span class="nav-label">Next Post</span>
|
99
|
+
<span class="post-title">{{page.next.title}}</span>
|
100
|
+
</a>
|
101
|
+
{% endif %}
|
102
|
+
</div>
|
103
|
+
|
104
|
+
{%- if site.disqus.shortname -%}
|
105
|
+
{%- include disqus_comments.html -%}
|
106
|
+
{%- endif -%}
|
107
|
+
|
108
|
+
<!-- Related posts section -->
|
109
|
+
{% include related-posts.html %}
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
|
114
|
+
</article>
|