markdowndocs 0.1.4 → 0.1.5

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: 0e48618be653afcca3ebd3a862f568189bb55bfb896959e2e15bc26a54bafe06
4
- data.tar.gz: 1c8e40318098e6e58867aadc6cd776282977e5d93ab014d01927eaa70e00c007
3
+ metadata.gz: 69c8fd903582ca17dbfc07598409a84912cfaa635157ad33c708367b4559d68a
4
+ data.tar.gz: ac6cfdc11754fc58977ff74d2ce8ae4ccabf531b13749fac1866f32850a58c49
5
5
  SHA512:
6
- metadata.gz: 6ce1e7d5b790eb49e526c1a578ee7591151d4e8d4e4a9166fc747a8956e114ba0c10539bb64059bdaa9b71ffbf49c5224c90c04f9e128141d270fe13d43a85c1
7
- data.tar.gz: 62ca15c99720787d125ab3cd165ca2d184cae6b0bbb7f0b9f206263e1342dc42617ba9a35bebe95aba9f8eda5edd03f87a7b001ecdcd26cc7e4380ebf3da811d
6
+ metadata.gz: a76b38e198b256d1a2c0fcf0f5849554c2cecf67cd32f1800c61422cb2833d886ae001766ad175cc9978ec3b8920eabed9b998e8642556b56ad3b0c624e0134f
7
+ data.tar.gz: b42ddd7732937e0d6cb0d05f557e67ac4fc908c1615d0f65b2603f2891813b5d6c6e93a25774831ac7841cba4e22dcf4d60a46c88f9968c14c1a8b9a4874847f
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.5] - 2026-02-20
9
+
10
+ ### Changed
11
+
12
+ - Move mobile navigation dropdown above the main content area (directly under breadcrumbs) so it's accessible without scrolling. Desktop sidebar remains in the right column.
13
+
8
14
  ## [0.1.4] - 2026-02-20
9
15
 
10
16
  ### Added
@@ -47,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
47
53
  - i18n support for all UI strings
48
54
  - Install generator (`rails generate markdowndocs:install`)
49
55
 
56
+ [0.1.5]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.5
50
57
  [0.1.4]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.4
51
58
  [0.1.3]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.3
52
59
  [0.1.2]: https://github.com/dschmura/markdowndocs/releases/tag/v0.1.2
@@ -16,6 +16,51 @@
16
16
  <!-- Breadcrumb -->
17
17
  <%= render "markdowndocs/docs/breadcrumb", category: @doc.category, title: @doc.title %>
18
18
 
19
+ <!-- Mobile navigation (hamburger dropdown, hidden on desktop) -->
20
+ <div class="lg:hidden mb-6">
21
+ <button
22
+ id="sidebar-toggle"
23
+ type="button"
24
+ class="w-full px-4 py-2 bg-white rounded-lg shadow-sm text-gray-700 transition-colors flex items-center justify-between
25
+ hover:bg-gray-50"
26
+ aria-label="<%= t("markdowndocs.navigation_sidebar") %>"
27
+ aria-expanded="false"
28
+ aria-controls="mobile-sidebar"
29
+ onclick="(function(btn) {
30
+ var sidebar = document.getElementById('mobile-sidebar');
31
+ var isOpen = btn.getAttribute('aria-expanded') === 'true';
32
+ btn.setAttribute('aria-expanded', !isOpen);
33
+ btn.querySelector('.icon-open').classList.toggle('hidden', !isOpen);
34
+ btn.querySelector('.icon-close').classList.toggle('hidden', isOpen);
35
+ if (isOpen) {
36
+ sidebar.style.maxHeight = '0px';
37
+ } else {
38
+ sidebar.style.maxHeight = sidebar.scrollHeight + 'px';
39
+ }
40
+ })(this)">
41
+ <span class="font-medium"><%= t("markdowndocs.navigation_sidebar") %></span>
42
+ <!-- Hamburger icon (shown when closed) -->
43
+ <svg class="icon-open w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
44
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
45
+ </svg>
46
+ <!-- X icon (shown when open) -->
47
+ <svg class="icon-close w-5 h-5 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
48
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
49
+ </svg>
50
+ </button>
51
+
52
+ <div id="mobile-sidebar"
53
+ class="overflow-hidden transition-all duration-300 ease-in-out mt-2"
54
+ style="max-height: 0px;">
55
+ <%= render "markdowndocs/docs/navigation",
56
+ rendered_content: @rendered_content,
57
+ related_docs: @related_docs,
58
+ current_mode: @docs_mode,
59
+ available_modes: @available_modes,
60
+ toc_items: @toc_items %>
61
+ </div>
62
+ </div>
63
+
19
64
  <!-- Two-column layout -->
20
65
  <div class="grid grid-cols-1 gap-8
21
66
  lg:grid-cols-12">
@@ -28,46 +73,9 @@
28
73
  </article>
29
74
  </main>
30
75
 
31
- <!-- Sidebar (Desktop: visible, Mobile: hamburger dropdown) -->
32
- <div class="lg:col-span-4">
33
- <!-- Mobile hamburger toggle -->
34
- <button
35
- id="sidebar-toggle"
36
- type="button"
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
38
- hover:bg-gray-50
39
- lg:hidden"
40
- aria-label="<%= t("markdowndocs.navigation_sidebar") %>"
41
- aria-expanded="false"
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)">
55
- <span class="font-medium"><%= t("markdowndocs.navigation_sidebar") %></span>
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" />
63
- </svg>
64
- </button>
65
-
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;">
76
+ <!-- Desktop sidebar (hidden on mobile, shown in grid on desktop) -->
77
+ <div class="hidden lg:block lg:col-span-4">
78
+ <div class="lg:sticky lg:top-8">
71
79
  <%= render "markdowndocs/docs/navigation",
72
80
  rendered_content: @rendered_content,
73
81
  related_docs: @related_docs,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura