markdowndocs 0.1.3 → 0.1.4

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: a3676879e3360254289b2fb0b936ba79d2f9a0d5fd239f31a2965a1533877009
4
- data.tar.gz: b946557e2429279886c3adfc457419e80c295f093ac851f40d92d77ade4729ba
3
+ metadata.gz: 0e48618be653afcca3ebd3a862f568189bb55bfb896959e2e15bc26a54bafe06
4
+ data.tar.gz: 1c8e40318098e6e58867aadc6cd776282977e5d93ab014d01927eaa70e00c007
5
5
  SHA512:
6
- metadata.gz: 3e2ebee186f301c5773e1bd0b8bfe611b94951c3b00ace072ffc7685a91ff10f7e616e5c47be032ad9b9ddd103fb1041e4ac1577d63eecc3843667b7fc47d2ad
7
- data.tar.gz: 56b9585de9c4a0ee088d6d5618aee160e8deb7ac3cab376245810541fb517206b9d11502e8eb9edb085844c7d7a0d85a46f60609d0773e8cd77e7b913157c691
6
+ metadata.gz: 6ce1e7d5b790eb49e526c1a578ee7591151d4e8d4e4a9166fc747a8956e114ba0c10539bb64059bdaa9b71ffbf49c5224c90c04f9e128141d270fe13d43a85c1
7
+ data.tar.gz: 62ca15c99720787d125ab3cd165ca2d184cae6b0bbb7f0b9f206263e1342dc42617ba9a35bebe95aba9f8eda5edd03f87a7b001ecdcd26cc7e4380ebf3da811d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.4] - 2026-02-20
9
+
10
+ ### Added
11
+
12
+ - Hamburger menu for mobile sidebar navigation — replaces the plain chevron toggle with a hamburger/X icon, smooth slide-down animation, and proper `aria-expanded` state management. Desktop sidebar behavior unchanged.
13
+
8
14
  ## [0.1.3] - 2026-02-20
9
15
 
10
16
  ### Fixed
@@ -41,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
47
  - i18n support for all UI strings
42
48
  - Install generator (`rails generate markdowndocs:install`)
43
49
 
50
+ [0.1.4]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.4
44
51
  [0.1.3]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.3
45
52
  [0.1.2]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.2
46
53
  [0.1.1]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.1
@@ -28,27 +28,46 @@
28
28
  </article>
29
29
  </main>
30
30
 
31
- <!-- Sidebar (Desktop: visible, Mobile: toggleable) -->
31
+ <!-- Sidebar (Desktop: visible, Mobile: hamburger dropdown) -->
32
32
  <div class="lg:col-span-4">
33
- <!-- Mobile toggle button -->
33
+ <!-- Mobile hamburger toggle -->
34
34
  <button
35
+ id="sidebar-toggle"
35
36
  type="button"
36
37
  class="w-full mb-4 px-4 py-2 bg-white rounded-lg shadow-sm text-gray-700 transition-colors flex items-center justify-between
37
38
  hover:bg-gray-50
38
39
  lg:hidden"
39
- onclick="document.getElementById('mobile-sidebar').classList.toggle('hidden')"
40
- aria-label="Toggle navigation"
40
+ aria-label="<%= t("markdowndocs.navigation_sidebar") %>"
41
41
  aria-expanded="false"
42
- aria-controls="mobile-sidebar">
42
+ aria-controls="mobile-sidebar"
43
+ onclick="(function(btn) {
44
+ var sidebar = document.getElementById('mobile-sidebar');
45
+ var isOpen = btn.getAttribute('aria-expanded') === 'true';
46
+ btn.setAttribute('aria-expanded', !isOpen);
47
+ btn.querySelector('.icon-open').classList.toggle('hidden', !isOpen);
48
+ btn.querySelector('.icon-close').classList.toggle('hidden', isOpen);
49
+ if (isOpen) {
50
+ sidebar.style.maxHeight = '0px';
51
+ } else {
52
+ sidebar.style.maxHeight = sidebar.scrollHeight + 'px';
53
+ }
54
+ })(this)">
43
55
  <span class="font-medium"><%= t("markdowndocs.navigation_sidebar") %></span>
44
- <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
45
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
56
+ <!-- Hamburger icon (shown when closed) -->
57
+ <svg class="icon-open w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
58
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
59
+ </svg>
60
+ <!-- X icon (shown when open) -->
61
+ <svg class="icon-close w-5 h-5 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
62
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
46
63
  </svg>
47
64
  </button>
48
65
 
49
- <!-- Sidebar content (sticky on desktop) -->
50
- <div id="mobile-sidebar" class="hidden
51
- lg:block lg:sticky lg:top-8">
66
+ <!-- Sidebar content (sticky on desktop, animated dropdown on mobile) -->
67
+ <div id="mobile-sidebar"
68
+ class="overflow-hidden transition-all duration-300 ease-in-out
69
+ lg:!max-h-none lg:!overflow-visible lg:sticky lg:top-8"
70
+ style="max-height: 0px;">
52
71
  <%= render "markdowndocs/docs/navigation",
53
72
  rendered_content: @rendered_content,
54
73
  related_docs: @related_docs,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdowndocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura