willamette 0.5.2 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70dabc6d637c2925f92800243df7ddf61659a2dcd76a56abc350a564705c6ba9
4
- data.tar.gz: 68724ee1e54f1a5b7a55b157d3ddcacadc77dba0db023dcf51a978f9e26225c5
3
+ metadata.gz: 0a347cd4bb2385bc2c70bfdbb8dc4270b378d164851437f5d008b4123d8b9a07
4
+ data.tar.gz: d592ffaa65fe70480784d891d62ad0e29944793bd0c49d21a7219ade4c28e982
5
5
  SHA512:
6
- metadata.gz: 74f80b3ea5b37176bc237019a6bed6f3b17b0f7eb85f9fd0d9125c57527c60fb9d1caed86a711dd7f40173aa4db450ad10f5ec811be148d6f044175df9dfd093
7
- data.tar.gz: 5881dfeb6397329e0434a61a56333a4fd4ad48e8c28c1fdc9d4f5629e6333fec88b42bb028b794da8835ae7dccd7b48d2efd990ac9a16b4afd16b7016365c63a
6
+ metadata.gz: 56504a7d4ca1f088234086a96f71d6058927f10a14c297dd8f6d4000cda3b24440583c0b3c7613c775761a1757feffa8d970c6d1682a023171660c56dfc9c8d7
7
+ data.tar.gz: 157a632cff03b3c824f99442d2eff259aa8bf42ba89a35e3403623033ec2ca0f34e4d808093b2d65e7232821b2cc6abafcfa46093b4db3d573b6ad642e190ff6
data/CHANGELOG.md CHANGED
@@ -9,7 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - ...
11
11
 
12
- ## [0.5.1] - 2026-04-03
12
+ ## [0.6.1] - 2026-04-27
13
+
14
+ - Fill out content in the Style Guide, provide a bypass config option
15
+
16
+ ## [0.6.0] - 2026-04-23
17
+
18
+ - Clean up layout settings, improve blockquotes and image bleeds
19
+ - Add post metadata component, icons, improved styles
20
+
21
+ ## [0.5.2] - 2026-04-03
13
22
 
14
23
  - Add `author_name` resource extension method
15
24
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- willamette (0.5.2)
4
+ willamette (0.6.1)
5
5
  bridgetown (>= 2.1, < 3.0)
6
6
  nokolexbor (>= 0.6)
7
7
 
@@ -70,7 +70,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
70
70
 
71
71
  <% if strategy.explore? %>
72
72
  <details open>
73
- <summary><h2><wa-icon class="show-for-mobile" name="bars"></wa-icon>
73
+ <summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon>
74
74
  <%= t "documentation.explore" %>
75
75
  </h2></summary>
76
76
 
@@ -82,7 +82,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
82
82
 
83
83
  <% if strategy.follow? %>
84
84
  <details open>
85
- <summary><h2><wa-icon class="show-for-mobile" name="bars"></wa-icon> <%= t "marketing.follow" %></h2></summary>
85
+ <summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon> <%= t "marketing.follow" %></h2></summary>
86
86
 
87
87
  <nav>
88
88
  <%= strategy.follow_links %>
@@ -40,22 +40,17 @@ create_file "src/_layouts/post.erb" do <<~ERB
40
40
  image_alt = data.image.is_a?(String) ? t("content.featured_post_image") : data.image.alt
41
41
  image_caption = data.image.is_a?(String) ? nil : data.image.caption
42
42
  %>
43
- <figure class="full-main-<%= data.image_bleed ? "bleed" : "size" %>">
43
+ <figure class="<%= data.image_bleed ? "inline-bleed" : "" %>">
44
44
  <img src="<%= image_path %>" alt="" />
45
45
  <% if image_caption %>
46
46
  <figcaption><%= markdownify image_caption %></figcaption>
47
47
  <% end %>
48
48
  </figure>
49
49
  <% end %>
50
-
50
+
51
51
  <%= yield %>
52
-
53
- <hr />
54
-
55
- <wa-icon class="article-metadata" name="newspaper"></wa-icon>
56
- <p class="article-metadata"><article-author>by So and So</article-author></p>
57
- <p class="article-metadata"><time><%= pipe(resource.date) { to_date | l(format: :long) } %></time></p>
58
- <p class="article-metadata"><article-tags>#foo #BarBaz</article-tags></p>
52
+
53
+ <%= render Willamette::PostMetadata.new(post: resource) %>
59
54
 
60
55
  </article>
61
56
  ERB
@@ -0,0 +1,15 @@
1
+ <wll-post-metadata>
2
+ <wa-icon class="wll-decoration" name="newspaper"></wa-icon>
3
+ <p><wa-icon name="calendar"></wa-icon> <time><%= pipe(@post.date) { to_date | l(format: :long) } %></time></p>
4
+ <p><wa-icon name="user-pen"></wa-icon> <wll-post-author>by <%= @post.author_name %></wll-post-author></p>
5
+ <% if @post.data.categories.length.positive? %>
6
+ <p><wa-icon name="paperclip"></wa-icon> <% @post.data.categories.each do |category| %>
7
+ <wll-post-category><%= t("categories.#{category}", default: category) %></wll-post-category>
8
+ <% end %></p>
9
+ <% end %>
10
+ <% if @post.data.tags.length.positive? %>
11
+ <p><wa-icon name="tags"></wa-icon> <% @post.data.tags.each do |tag| %>
12
+ <wll-post-tag>#<%= tag %></wll-post-tag>
13
+ <% end %></p>
14
+ <% end %>
15
+ </wll-post-metadata>
@@ -0,0 +1,5 @@
1
+ class Willamette::PostMetadata < Bridgetown::Component
2
+ def initialize(post:)
3
+ @post = post
4
+ end
5
+ end
@@ -1,7 +1,10 @@
1
- ---
2
- layout: page
3
- title: This is the Willamette Theme
4
- ---
1
+ ```ruby
2
+ front_matter do
3
+ layout :page
4
+ title "Willamette Theme Style Guide"
5
+ published -> { !site.config.willamette.bypass_style_guide }
6
+ end
7
+ ```
5
8
 
6
9
  <style>
7
10
  .swatch {
@@ -20,7 +23,7 @@ title: This is the Willamette Theme
20
23
 
21
24
  <hr />
22
25
 
23
- <wa-color-picker label="Chose your brand color:" size="large" oninput='
26
+ <wa-color-picker label="Choose a new brand color:" size="large" oninput='
24
27
  document.documentElement.style.setProperty("--wll-color-brand", event.target.value)
25
28
  this.querySelector("output").textContent = `--wll-color-brand: ${event.target.value};`
26
29
  this.querySelector("wa-copy-button").slot = "hint"
@@ -29,6 +32,15 @@ title: This is the Willamette Theme
29
32
  <wa-copy-button from="color-hint"></wa-copy-button>
30
33
  </wa-color-picker>
31
34
 
35
+ <script type="module">
36
+ import { colordx } from "https://esm.sh/@colordx/core"
37
+ let defaultColor = window.getComputedStyle(document.documentElement).getPropertyValue("--wll-color-brand")
38
+ if (defaultColor.includes("oklch")) {
39
+ defaultColor = colordx(defaultColor).toHex()
40
+ }
41
+ document.querySelector("wa-color-picker").value = defaultColor
42
+ </script>
43
+
32
44
  <hr />
33
45
 
34
46
  ## Brand Color Scale
@@ -90,4 +102,54 @@ title: This is the Willamette Theme
90
102
  </div>
91
103
  <small>05</small>
92
104
  </li>
93
- </ul>
105
+ </ul>
106
+
107
+ ----
108
+
109
+ ## Basic Typography
110
+
111
+ Lorem ipsum dolor sit amet, cillum lorem culpa adipiscing nulla. Nisi sint aliquip aute anim laborum incididunt. Duis duis aliqua consectetur est ex laboris, in consequat enim fugiat aliqua sint est incididunt, dolor esse voluptate aliqua sit ut reprehenderit. **Sit lorem irure aute aliquip veniam pariatur**, anim dolore commodo ea culpa esse quis laborum. _Duis mollit exercitation pariatur._
112
+
113
+ Here are what [links look like](#) as well as `monospaced text`. You can also ==highlight text==.
114
+
115
+ ### Heading Level 3
116
+
117
+ Paragraph text.
118
+
119
+ #### Heading Level 4
120
+
121
+ * Here is a bulleted list.
122
+ * Item 2
123
+ * Item 3
124
+
125
+ And…
126
+
127
+ 1. Here is a numbered list.
128
+ 2. Item 2
129
+ 3. Item 3
130
+
131
+ You can also display blockquotes.
132
+
133
+ > Est est incididunt pariatur, aute laborum non mollit cillum excepteur est incididunt, tempor enim nisi ipsum cillum veniam. Labore lorem nulla occaecat ipsum sed nulla. Non sunt enim exercitation nostrud occaecat deserunt, anim sed esse velit elit eiusmod cupidatat. Laborum nisi aliquip ad.
134
+
135
+ And of course, code snippets.
136
+
137
+ ```ruby
138
+ if ENV["BRIDGETOWN_ENV"] == "production"
139
+ workers ENV.fetch("BRIDGETOWN_CONCURRENCY") { 4 }
140
+ end
141
+
142
+ max_threads_count = ENV.fetch("BRIDGETOWN_MAX_THREADS") { 5 }
143
+ min_threads_count = ENV.fetch("BRIDGETOWN_MIN_THREADS") { max_threads_count }
144
+ threads min_threads_count, max_threads_count
145
+
146
+ pidfile ENV["PIDFILE"] || "tmp/pids/server.pid"
147
+ ```
148
+
149
+ ## Images & Figures
150
+
151
+ ==WIP==
152
+
153
+ ## Tables
154
+
155
+ ==WIP==
@@ -3,14 +3,18 @@
3
3
  <head>
4
4
  <%= render "head", metadata: site.metadata, title: data.title %>
5
5
  </head>
6
- <body class="OFF:wll-grid-lines OFF:wll-code-dark <%= data.layout %> <%= data.page_class %>">
6
+ <body class="<%=
7
+ class_map("wll-grid-lines": site.config.willamette.layout.grid_lines, "wll-code-dark": site.config.willamette.layout.code_dark)
8
+ %> <%= data.layout %> <%= data.page_class %>">
7
9
  <%= dsd do %>
8
10
  <%= render Willamette::HolyGrailLayout.new %>
9
11
  <% end %>
10
12
  <%= render Shared::Navbar.new(metadata: site.metadata, resource:) %>
11
13
 
12
14
  <main slot="content" id="content">
13
- <div hidden class="show-for-tablet" style="position: absolute; right: var(--wa-space-m)"><button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="list"></wa-icon></button></div>
15
+ <div hidden class="show-mid-screen">
16
+ <button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="list"></wa-icon></button>
17
+ </div>
14
18
 
15
19
  <main-contents <%= "data-pagefind-body" unless data.exclude_from_pagefind %>>
16
20
  <%= yield %>
@@ -26,15 +30,16 @@
26
30
  </aside>
27
31
 
28
32
  <aside slot="sidebar-end" hidden>
29
- <!-- TODO: this should be in a shared component -->
30
- <div class="show-for-tablet" style="position: absolute; right: var(--wa-space-m)"><button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="close"></wa-icon></button></div>
33
+ <div class="show-mid-screen">
34
+ <button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="close"></wa-icon></button>
35
+ </div>
31
36
  <h2><%= t "documentation.contents" %></h2>
32
37
 
33
38
  <%= slotted :toc %>
34
39
 
35
40
  <hr />
36
41
 
37
- <!-- TOC will be relocated here -->
42
+ <!-- TOC insertion -->
38
43
  </aside>
39
44
 
40
45
  <%= render "footer", metadata: site.metadata %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Willamette
4
- VERSION = "0.5.2"
4
+ VERSION = "0.6.1"
5
5
  end
data/lib/willamette.rb CHANGED
@@ -29,14 +29,16 @@ Kramdown::Converter::Html.class_eval do
29
29
  end
30
30
 
31
31
  # @param config [Bridgetown::Configuration::ConfigurationDSL]
32
- Bridgetown.initializer :willamette do |config, docs_url_segment: "docs"|
33
- # Add code here which will run when a site includes
34
- # `init :willamette`
35
- # in its configuration
36
-
32
+ Bridgetown.initializer :willamette do |
33
+ config,
34
+ docs_url_segment: "docs",
35
+ layout: {},
36
+ bypass_style_guide: false
37
+ |
37
38
  # Add default configuration data:
38
39
  config.willamette ||= {}
39
- config.willamette.my_setting ||= 123
40
+ config.willamette.layout ||= layout
41
+ config.willamette.bypass_style_guide ||= bypass_style_guide
40
42
 
41
43
  # Register your builders:
42
44
  config.builder Willamette::Builders::AuthorExtension
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willamette",
3
- "version": "0.5.2",
3
+ "version": "0.6.1",
4
4
  "main": "frontend/javascript/index.js",
5
5
  "repository": {
6
6
  "type": "git",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: willamette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-03 00:00:00.000000000 Z
10
+ date: 2026-04-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bridgetown
@@ -101,6 +101,8 @@ files:
101
101
  - components/willamette/pagination.rb
102
102
  - components/willamette/post_item.css
103
103
  - components/willamette/post_item.rb
104
+ - components/willamette/post_metadata.erb
105
+ - components/willamette/post_metadata.rb
104
106
  - components/willamette/previous_next.erb
105
107
  - components/willamette/previous_next.rb
106
108
  - components/willamette/search_dialog.rb