diff --git a/CHANGELOG.md b/CHANGELOG.md index 956e06a..db7a1af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.9.0] - Unreleased +### Changed +- Ability to collapse/expande tree nodes [#9] +- Fixed sort menu items [#8] +- Menu appearance: + - Replaced folder icons with carets. + - Menu is sticky on desktop. + - Changed colors and spaces. + ## [0.8.2] - 2024-05-01 ### Changed - Added `language` attribute to `html` element [#6]. @@ -114,7 +123,10 @@ First version [#2]: https://github.com/lumeland/theme-simple-wiki/issues/2 [#4]: https://github.com/lumeland/theme-simple-wiki/issues/4 [#6]: https://github.com/lumeland/theme-simple-wiki/issues/6 +[#8]: https://github.com/lumeland/theme-simple-wiki/issues/8 +[#9]: https://github.com/lumeland/theme-simple-wiki/issues/9 +[0.9.0]: https://github.com/lumeland/theme-simple-wiki/compare/v0.8.2...HEAD [0.8.2]: https://github.com/lumeland/theme-simple-wiki/compare/v0.8.1...v0.8.2 [0.8.1]: https://github.com/lumeland/theme-simple-wiki/compare/v0.8.0...v0.8.1 [0.8.0]: https://github.com/lumeland/theme-simple-wiki/compare/v0.7.1...v0.8.0 diff --git a/deno.json b/deno.json index 3652c81..15cae06 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "imports": { - "lume/": "https://deno.land/x/lume@v2.1.4/", + "lume/": "https://deno.land/x/lume@v2.2.4/", "lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@v0.3.10/" }, "lock": false, diff --git a/plugins.ts b/plugins.ts index 9896f00..0775d26 100644 --- a/plugins.ts +++ b/plugins.ts @@ -28,6 +28,7 @@ export default function () { .use(basePath()) .data("layout", "layout.vto") .data("date", "Git Last Modified") + .data("order", 0) .mergeKey("extra_head", "stringArray") .copy([ ".jpg", diff --git a/src/_includes/css/menu.css b/src/_includes/css/menu.css index 09fc520..bda136c 100644 --- a/src/_includes/css/menu.css +++ b/src/_includes/css/menu.css @@ -49,33 +49,38 @@ list-style: none; margin: 0; padding: 0; - border-left: solid 1px var(--color-line); font: var(--font-small); color: var(--color-dim); - max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; + scrollbar-color: var(--color-dim) var(--color-background); & ul { list-style: none; margin-left: .9em; padding: 0; - border-left: solid 1px var(--color-line); } - & li { - position: relative; - padding-left: .6em; - margin-block: 2px; - &::before { - content: ""; - display: block; - position: absolute; - width: .5em; - border-top: solid 1px var(--color-line); - left: 0; - top: 1em; - } + > li:last-child:has(details) { + border-bottom: solid 1px var(--color-line); + } + + details { + border: none; + padding: .3em 0; + border-top: solid 1px var(--color-line); + } + summary { + --marker-image: url('data:image/svg+xml;charset=utf8,'); + display: flex; + padding-top: 0; + padding-bottom: 0; + align-items: center; + border-radius: .3em; + font-weight: var(--font-bold); + } + details[open] > summary { + --marker-image: url('data:image/svg+xml;charset=utf8,'); } & a, @@ -83,15 +88,16 @@ display: block; border-radius: .3em; text-decoration: none; - padding: .3em; + padding: .8em .5em; } & a { - padding: .3em .5em; text-decoration: none; + color: inherit; - &:hover { - background: var(--color-line); + &:not([aria-current="page"]):hover { + text-decoration: underline; + color: var(--color-base); } @media (max-width: 949px) { @@ -99,8 +105,20 @@ } } - & a[aria-current="page"] { + & li > a[aria-current="page"], + & summary:has(a[aria-current="page"]) { color: var(--color-base); - background: var(--color-line); + background-color: var(--color-line); + } +} + +[data-theme="dark"] { + .menu { + summary { + --marker-image: url('data:image/svg+xml;charset=utf8,'); + } + details[open] > summary { + --marker-image: url('data:image/svg+xml;charset=utf8,'); + } } } \ No newline at end of file diff --git a/src/_includes/templates/breadcrumb.vto b/src/_includes/templates/breadcrumb.vto index 712430c..cd638c3 100644 --- a/src/_includes/templates/breadcrumb.vto +++ b/src/_includes/templates/breadcrumb.vto @@ -2,7 +2,7 @@