monoholic 1.0.2 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e11f908295905935c8e78e4fad697493dcabf9d619b40bc6dc985ed773716de1
4
- data.tar.gz: 753565fa695f495b4fb4c1a759c2e79f288bd1c1e59d748e9b5ce399874f2b3e
3
+ metadata.gz: 82d9f14b72e9e12fbd2938a1e085e139cd3a8b1de2415914ee8aede7be2363b2
4
+ data.tar.gz: d440773f3a4ace2da0bc9906ef8ee4a847d557eee3e4967392d0d660f8b29e2f
5
5
  SHA512:
6
- metadata.gz: f2668eede554cd8a6acc2388ae0ac02a31d63cd0ad87ac181c551f17763de8550ecd90b304374bc7da1acdf9d3a149e14f12fb439f1fcb548131dde297d27ae3
7
- data.tar.gz: 52dffd2dd75633cbc1b8e0226bd702ca11ac3deeb766a5ec19ade6a9f0959a6a143d782aea8c63f8db0d46be308a4d659b16057b873ac983ca4da8bd3fef7760
6
+ metadata.gz: 97ed2791cf9e2ec59c07724bfb7804565a0b71a02ca625f41f5b5fcfacf042def622fdec81d74245790907d2eb0b9932523819decd1589a8137d0e582ab6694c
7
+ data.tar.gz: 4773401bdc07a85bf3a819edeef94c9d20354c60c9d806db2a66c604f51c59f637f2e40e34cf753fe2d364415102a4953b845190d4c9b675e483cbb73f682cb8
data/README.md CHANGED
@@ -142,16 +142,16 @@ Monoholic ships with a default favicon. To use your own, replace the following f
142
142
 
143
143
  ### Stylesheet
144
144
 
145
- Monoholic's stylesheet is written in SCSS and compiled at build time. The source lives in `_sass/` and is imported from `assets/css/style.scss`. Compilation is handled by `jekyll-sass-converter`, which is declared as a runtime dependency in the theme's `gemspec` — so no extra setup is required when you add `gem "monoholic"` to your `Gemfile`.
145
+ Monoholic's stylesheet is written in SCSS and compiled at build time. The source lives in `_sass/` and is loaded from `assets/css/style.scss`. Compilation is handled by `jekyll-sass-converter`, which is declared as a runtime dependency in the theme's `gemspec` — so no extra setup is required when you add `gem "monoholic"` to your `Gemfile`.
146
146
 
147
- If you want to override or extend the styles, the recommended approach is to add your own partials in your site's `_sass/` directory and import them **after** the theme's entry point:
147
+ If you want to override or extend the styles, the recommended approach is to add your own partials in your site's `_sass/` directory and load them **after** the theme's entry point:
148
148
 
149
149
  ```scss
150
150
  ---
151
151
  ---
152
152
 
153
- @import "monoholic";
154
- @import "your-overrides";
153
+ @use "monoholic";
154
+ @use "your-overrides";
155
155
  ```
156
156
 
157
157
  To override CSS custom properties (colors, spacing, fonts) without touching SCSS, redeclare the variables in your own stylesheet — they are exposed under `:root` in `_sass/_variables.scss`.
@@ -1,10 +1,11 @@
1
1
  <footer class="site-footer h-card">
2
- <data class="u-url" href="{{ "/" | relative_url }}"></data>
3
2
  <div class="wrapper">
4
3
  <div class="footer-col">
5
4
  <p>
6
5
  &copy; {{ 'now' | date: '%Y' }}
7
- {{ site.title | upcase }}
6
+ <a class="u-url" href="{{ '/' | relative_url }}">
7
+ {{- site.title | upcase | escape -}}
8
+ </a>
8
9
  </p>
9
10
  </div>
10
11
  </div>
data/_includes/head.html CHANGED
@@ -4,7 +4,10 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
5
 
6
6
  {%- if site.fediverse_creator -%}
7
- <meta name="fediverse:creator" content="{{ site.fediverse_creator }}">
7
+ <meta
8
+ name="fediverse:creator"
9
+ content="{{ site.fediverse_creator | escape }}"
10
+ >
8
11
  {%- endif -%}
9
12
 
10
13
  {%- seo -%}
@@ -1,5 +1,15 @@
1
- <header class="site-header" role="banner">
2
- <a class="site-title" rel="author" href="{{ "/" | relative_url }}">
3
- {{ site.title | escape }}
4
- </a>
1
+ <header class="site-header">
2
+ {%- if page.layout == "home" -%}
3
+ <h1 class="site-title">
4
+ <a rel="author" href="{{ "/" | relative_url }}">
5
+ {{ site.title | escape }}
6
+ </a>
7
+ </h1>
8
+ {%- else -%}
9
+ <p class="site-title">
10
+ <a rel="author" href="{{ "/" | relative_url }}">
11
+ {{ site.title | escape }}
12
+ </a>
13
+ </p>
14
+ {%- endif -%}
5
15
  </header>
data/_includes/menu.html CHANGED
@@ -1,6 +1,69 @@
1
+ {%- assign _level = include.level | default: 2 | plus: 0 -%}
2
+ {%- if _level < 2 -%}
3
+ {%- assign _level = 2 -%}
4
+ {%- elsif _level > 6 -%}
5
+ {%- assign _level = 6 -%}
6
+ {%- endif -%}
7
+ {%- assign _next_level = _level | plus: 1 -%}
8
+ {%- if _next_level > 6 -%}
9
+ {%- assign _next_level = 6 -%}
10
+ {%- endif -%}
1
11
  {%- for item in include.collection -%}
2
- <section>
3
- <h2 class="section-title">## {{ item.title }}</h2>
12
+ {%- assign _title_stripped = item.title | strip -%}
13
+ {%- assign _has_title = true -%}
14
+ {%- if item.title == nil or _title_stripped == empty -%}
15
+ {%- assign _has_title = false -%}
16
+ {%- endif -%}
17
+ {%- assign _title_slug = item.title | slugify -%}
18
+ {%- if _title_slug == empty or _title_slug == nil -%}
19
+ {%- assign _title_slug = 'section' -%}
20
+ {%- endif -%}
21
+ {%- if include.parent_id -%}
22
+ {%- assign _heading_id = include.parent_id
23
+ | append: '-'
24
+ | append: _title_slug
25
+ | append: '-'
26
+ | append: forloop.index
27
+ -%}
28
+ {%- elsif include.id_prefix -%}
29
+ {%- assign _heading_id = include.id_prefix
30
+ | append: '-'
31
+ | append: _title_slug
32
+ | append: '-'
33
+ | append: forloop.index
34
+ -%}
35
+ {%- else -%}
36
+ {%- assign _heading_id = _title_slug
37
+ | append: '-'
38
+ | append: forloop.index
39
+ -%}
40
+ {%- endif -%}
41
+ {%- if _has_title -%}
42
+ <section aria-labelledby="{{ _heading_id }}">
43
+ {%- if _level == 3 -%}
44
+ <h3 class="section-title" id="{{ _heading_id }}">
45
+ {{ item.title | escape }}
46
+ </h3>
47
+ {%- elsif _level == 4 -%}
48
+ <h4 class="section-title" id="{{ _heading_id }}">
49
+ {{ item.title | escape }}
50
+ </h4>
51
+ {%- elsif _level == 5 -%}
52
+ <h5 class="section-title" id="{{ _heading_id }}">
53
+ {{ item.title | escape }}
54
+ </h5>
55
+ {%- elsif _level >= 6 -%}
56
+ <h6 class="section-title" id="{{ _heading_id }}">
57
+ {{ item.title | escape }}
58
+ </h6>
59
+ {%- else -%}
60
+ <h2 class="section-title" id="{{ _heading_id }}">
61
+ {{ item.title | escape }}
62
+ </h2>
63
+ {%- endif -%}
64
+ {%- else -%}
65
+ <section>
66
+ {%- endif -%}
4
67
  {%- if item.content_file -%}
5
68
  {%- assign _menu_page = site.pages
6
69
  | where: 'path', item.content_file
@@ -13,8 +76,12 @@
13
76
  {{ item.content }}
14
77
  {%- endif -%}
15
78
  {%- if item.post_list -%}{%- include post_list.html -%}{%- endif -%}
79
+ {%- if item.entries -%}
80
+ {%- include menu.html
81
+ collection=item.entries
82
+ level=_next_level
83
+ parent_id=_heading_id
84
+ -%}
85
+ {%- endif -%}
16
86
  </section>
17
- {%- if item.entries -%}
18
- {%- include menu.html collection = item.entries -%}
19
- {%- endif -%}
20
87
  {%- endfor -%}
@@ -1,12 +1,15 @@
1
1
  <ul class="post-list">
2
2
  {%- for post in site.posts -%}
3
3
  <li>
4
- <span class="post-meta">
4
+ <time
5
+ class="post-meta dt-published"
6
+ datetime="{{ post.date | date_to_xmlschema }}"
7
+ >
5
8
  {% assign _date_fmt = site.theme_config.date_format
6
9
  | default: '%Y-%m-%d'
7
10
  %}
8
11
  * {{ post.date | date: _date_fmt }}
9
- </span>
12
+ </time>
10
13
  <a href="{{ post.url | relative_url }}">
11
14
  {{ post.title | escape }}
12
15
  </a>
@@ -2,11 +2,13 @@
2
2
  <html lang="{{ page.lang | default: "en" }}">
3
3
  {%- include head.html -%}
4
4
  <body class="{% if site.theme_config.monochrome_images != false %}images-monochrome{% endif %}">
5
- <main class="page-content" aria-label="Content">
6
- <div class="wrapper">
5
+ <a class="skip-link" href="#main">Skip to content</a>
6
+ <div class="wrapper">
7
+ {%- include header.html -%}
8
+ <main id="main" class="page-content">
7
9
  {{ content }}
8
- </div>
9
- </main>
10
+ </main>
11
+ </div>
10
12
 
11
13
  {%- unless site.theme_config.footer == false -%}
12
14
  {%- include footer.html -%}
data/_layouts/home.html CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- {%- include header.html -%}
5
- {%- include menu.html collection=site.data.menu.entries -%}
4
+ <nav aria-label="Site sections">
5
+ {%- include menu.html collection=site.data.menu.entries level=2 -%}
6
+ </nav>
data/_layouts/post.html CHANGED
@@ -4,16 +4,19 @@ layout: default
4
4
  <article>
5
5
  <div class="post-header">
6
6
  <a href="{{ '/' | relative_url }}">
7
- {{ site.theme_config.back | default: 'Back' }}
7
+ {{ site.theme_config.back | default: 'Back' | escape }}
8
8
  </a>
9
- <span class="post-meta">
9
+ <time
10
+ class="post-meta dt-published"
11
+ datetime="{{ page.date | date_to_xmlschema }}"
12
+ >
10
13
  {% assign _date_fmt = site.theme_config.date_format
11
14
  | default: '%Y-%m-%d'
12
15
  %}
13
16
  {{ page.date | date: _date_fmt }}
14
- </span>
17
+ </time>
15
18
  </div>
16
- <h1>{{ page.title }}</h1>
19
+ <h1>{{ page.title | escape }}</h1>
17
20
 
18
21
  {{ content }}
19
22
  </article>
data/_sass/_base.scss CHANGED
@@ -33,8 +33,30 @@ a {
33
33
  text-decoration: underline;
34
34
  }
35
35
 
36
+ :focus-visible {
37
+ outline: 2px solid var(--text-color);
38
+ outline-offset: 2px;
39
+ }
40
+
41
+ .skip-link {
42
+ position: absolute;
43
+ top: -1000px;
44
+ left: var(--space-md);
45
+ z-index: 100;
46
+ background-color: var(--text-color);
47
+ color: var(--bg-color);
48
+ padding: var(--space-sm) var(--space-md);
49
+ text-decoration: none;
50
+ }
51
+
52
+ .skip-link:focus,
53
+ .skip-link:focus-visible {
54
+ top: var(--space-sm);
55
+ }
56
+
36
57
  img {
37
58
  max-width: 100%;
59
+ height: auto;
38
60
  display: block;
39
61
  margin: 0 auto;
40
62
  }
@@ -42,3 +64,13 @@ img {
42
64
  .images-monochrome img {
43
65
  filter: grayscale(1);
44
66
  }
67
+
68
+ @media (prefers-reduced-motion: reduce) {
69
+ *,
70
+ *::before,
71
+ *::after {
72
+ animation-duration: 0.01ms !important;
73
+ transition-duration: 0.01ms !important;
74
+ scroll-behavior: auto !important;
75
+ }
76
+ }
@@ -59,6 +59,10 @@
59
59
  font-size: var(--font-size-sm);
60
60
  color: var(--meta-color);
61
61
 
62
+ a {
63
+ color: inherit;
64
+ }
65
+
62
66
  .footer-col {
63
67
  display: flex;
64
68
  justify-content: space-between;
data/_sass/_content.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  .highlighter-rouge,
2
- highlight {
2
+ .highlight {
3
3
  background-color: var(--text-color);
4
4
  color: var(--bg-color);
5
5
  }
data/_sass/_layout.scss CHANGED
@@ -11,6 +11,18 @@
11
11
  font-size: var(--font-size-site-title);
12
12
  font-weight: 700;
13
13
  letter-spacing: 0.5px;
14
+ margin: 0;
15
+
16
+ a {
17
+ color: inherit;
18
+ text-decoration: none;
19
+ }
20
+
21
+ a:hover,
22
+ a:focus-visible {
23
+ text-decoration: underline;
24
+ text-underline-offset: 3px;
25
+ }
14
26
  }
15
27
  }
16
28
 
@@ -18,8 +30,17 @@
18
30
  font-size: var(--font-size-section);
19
31
  font-weight: 700;
20
32
  margin-bottom: var(--space-lg);
33
+
34
+ &::before {
35
+ content: "## ";
36
+ color: var(--meta-color);
37
+ }
21
38
  }
22
39
 
23
40
  section {
24
41
  margin-bottom: var(--space-xl);
25
42
  }
43
+
44
+ section section:last-child {
45
+ margin-bottom: 0;
46
+ }
@@ -3,7 +3,7 @@
3
3
  --bg-color: #030303;
4
4
  --text-color: #e0e0e0;
5
5
  --meta-color: #888888;
6
- --border-color: #222222;
6
+ --border-color: #666666;
7
7
 
8
8
  // Typography
9
9
  --font-family: "JetBrains Mono", monospace;
data/_sass/monoholic.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  // monoholic.scss
2
- @import "variables";
3
- @import "base";
4
- @import "content";
5
- @import "layout";
6
- @import "components";
2
+ @use "variables";
3
+ @use "base";
4
+ @use "content";
5
+ @use "layout";
6
+ @use "components";
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  ---
3
3
 
4
- @import "monoholic";
4
+ @use "monoholic";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monoholic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agil Mammadov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-30 00:00:00.000000000 Z
11
+ date: 2026-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll