From nobody Wed Dec 29 13:38:01 2021 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 14B351917A52 for ; Wed, 29 Dec 2021 13:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JPCCF5kLJz3j7B; Wed, 29 Dec 2021 13:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A60F025D0F; Wed, 29 Dec 2021 13:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BTDc1q5027944; Wed, 29 Dec 2021 13:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTDc1u6027943; Wed, 29 Dec 2021 13:38:01 GMT (envelope-from git) Date: Wed, 29 Dec 2021 13:38:01 GMT Message-Id: <202112291338.1BTDc1u6027943@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: 97c1f5601c - main - Rework book menu List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97c1f5601c51dbd56796c0b82da9ef60f1f81ff1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640785081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8i4KnxP9cKLvRNMlJVlvvZ2FqrNQ6OWCm1yljddON/Y=; b=IaLu2z3hc8yq9xphjItzMmWFbPQKXmRlqbCOXcJ3+DvtLsAqlbrtCW6XnLJFmTupkHuL56 uL9HYS97XkhrMUH4U2Al26pgBRpuICOrnmTFD/58l1+jp5t12RW4+51Wbz5JbRrQPAkI1A HFI5HQZ5Vj7Uw5wET/6FD+MF4vYczVyyhU30r0McBLX2fZ/HcPtSk2+7ZKIjHcUEDbPSjt MRotSbzbNdiKX0lArTfFp2Z81aWpWhcbvTmhvR08eqbykzJjo1rwup3UimUpsWpgpF7An5 x4Lbv5+aF7+9OmWcsGH0zF6roNO6Vf7Pg48XKYvHKwUVwC7ORzvGaByjG6lUUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640785081; a=rsa-sha256; cv=none; b=L0L6unN414mXRBt8BVnGZu9hFb/CuRx0qaVTsymk5zwFCf5a4WYD8ONI9jK8/ZuE/Uc14w Rcsk5CFK/dU5jrjPQJ3s97csIPWehV0A0xfaic+vxwAA8TIh7ZbXeb2fjqmrRNQR3IA0yD mUIfPpCGvsq3kmMPTCaNmkmgbgZpVwVJACsQDMyTlTcOVTwJdDshuRk/GIA8G7x5wpdXXI Loy0qwGe+iZJD2sIv4vP8TNetysvEBRupE6LFuiM8pqgJFA65XbI1lBhEib8bwoA2cxY3V pxYbW7KK2K2nMWmCFVAA+tPI4RD8gIaEYS/n3wwWGyebSnbWBzMf3+FP6HlU4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by carlavilla: URL: https://cgit.FreeBSD.org/doc/commit/?id=97c1f5601c51dbd56796c0b82da9ef60f1f81ff1 commit 97c1f5601c51dbd56796c0b82da9ef60f1f81ff1 Author: Sergio Carlavilla Delgado AuthorDate: 2021-12-29 13:35:36 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2021-12-29 13:35:36 +0000 Rework book menu * Allow to open the chapter by their title * Fix problems with the orientation of the elements in the menu PR: 260464 Submitted by: PauAmma --- .../beastie/assets/styles/documentation.scss | 180 +++++++++++---------- .../themes/beastie/assets/styles/global.scss | 8 +- .../themes/beastie/layouts/books/list.html | 2 +- .../themes/beastie/layouts/books/single.html | 2 +- .../themes/beastie/layouts/partials/menu.html | 9 +- 5 files changed, 104 insertions(+), 97 deletions(-) diff --git a/documentation/themes/beastie/assets/styles/documentation.scss b/documentation/themes/beastie/assets/styles/documentation.scss index 347fd470d6..292589023c 100644 --- a/documentation/themes/beastie/assets/styles/documentation.scss +++ b/documentation/themes/beastie/assets/styles/documentation.scss @@ -156,6 +156,78 @@ display: flex; margin-top: var(--header-height); + .book-menu { + flex: 0 0 16rem; + font-size: .75rem; + background-color: var(--global-background-color); + + .book-menu-content { + width: 16rem; + position: sticky; + top: var(--header-height); + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + background-color: var(--global-background-color); + transition: .2s ease-in-out; + + h3 { + margin: 1rem 0; + border-bottom: none; + padding-left: .5rem; + } + + input.toggle ~ .icon::after { + display: inline-block; + font: 1rem FontAwesome; + text-rendering: auto; + content: "\f105"; + } + + input.toggle:checked ~ .icon::after { + display: inline-block; + font: 1rem FontAwesome; + text-rendering: auto; + content: "\f107"; + } + + input.toggle ~ ul { + display:none + } + + input.toggle:checked ~ ul { + display:block + } + + #MenuContents { + position: sticky; + overflow: auto; + max-height: calc(90vh); + + ul { + margin: 0 0 0 .75rem; + padding: 0; + + li { + list-style: none; + margin: 0; + + label { + position: absolute; + cursor: pointer; + } + + a { + color: var(--global-font-color); + display: block; + padding-left: 1rem; + } + } + } + } + } + } + .book { flex-grow: 1; padding: var(--documentation-padding); @@ -168,6 +240,10 @@ transition-duration: 0.2s; background-color: var(--global-background-color); + h1 { + margin: .8rem 0; + } + .book-menu-mobile { margin-top: 10px; @@ -225,32 +301,35 @@ h3 { border-bottom: none; + margin: 1rem 0; } #TableOfContents { position: sticky; overflow: auto; max-height: calc(90vh); - } - - #TableOfContents, .resources { + ul { - list-style: none; margin: 0; padding: 0; li { margin: 0; + list-style: none; a { color: var(--global-font-color); display: inline-block; padding: .25rem 0 .25rem .5rem; + margin-left: .5rem; text-decoration: none; - border-left: 1px solid var(--lines-color); + + i { + margin-right: .5rem; + } &:hover { - font-weight: bolder; + font-weight: 500; } } @@ -259,98 +338,26 @@ } .resources { - .contents { - i { - margin-right: 5px; - } + h3 { + margin: 1rem 0; } - } - } - } - - .book-menu input.toggle+label+ul { - display:none - } - .book-menu input.toggle:checked+label+ul { - display:block - } - - .book-menu { - flex: 0 0 16rem; - font-size: .75rem; - background-color: var(--global-background-color); - - .book-menu-content { - width: 16rem; - position: sticky; - top: var(--header-height); - bottom: 0; - overflow-x: hidden; - overflow-y: auto; - background-color: var(--global-background-color); - transition: .2s ease-in-out; - - h3 { - border-bottom: none; - padding-left: .5rem; - } - - input.toggle + .icon::after { - display: flex; - align-items: center; - font: 1rem FontAwesome; - text-rendering: auto; - content: "\f105"; - } - - input.toggle:checked + .icon::after { - display: flex; - align-items: center; - font: 1rem FontAwesome; - text-rendering: auto; - content: "\f107"; - } - - #MenuContents { - position: sticky; - overflow: auto; - max-height: calc(90vh); ul { - list-style: none; margin: 0; padding: 0; - padding-right: 10px; li { + list-style: none; margin: 0; - label { - display: flex; - justify-content: space-between; - cursor: pointer; - } - a { color: var(--global-font-color); - display: flex; - width: 90%; + display: inline-block; padding: .25rem 0 .25rem .5rem; - text-decoration: none; - border-left: 1px solid var(--lines-color); - font-weight: bolder; } - ul { - li { - padding-left: 10px; - - a { - font-weight: normal; - border-left: 3px solid var(--lines-color); - } - } - + i { + margin-left: 1rem; } } @@ -423,11 +430,6 @@ input.toggle { z-index: 1; } - #menu-control:focus ~ main label[for="menu-control"] { - outline-style: auto; - outline-color: currentColor; - } - #menu-control:checked ~ main { .book-menu { visibility: initial; diff --git a/documentation/themes/beastie/assets/styles/global.scss b/documentation/themes/beastie/assets/styles/global.scss index 72d1919a12..7446ec9fa6 100644 --- a/documentation/themes/beastie/assets/styles/global.scss +++ b/documentation/themes/beastie/assets/styles/global.scss @@ -38,6 +38,13 @@ html { } } +@supports (scrollbar-width:thin) { + body * { + scrollbar-width: thin; + scrollbar-color: #D9D9D9 transparent; + } +} + html, body { text-rendering: optimizeLegibility; line-height: calc(1ex / 0.32); @@ -53,7 +60,6 @@ body { font-weight: 400; font-style: normal; cursor: auto; - scrollbar-width: thin; background-color: var(--global-background-color); } diff --git a/documentation/themes/beastie/layouts/books/list.html b/documentation/themes/beastie/layouts/books/list.html index 251a7a625e..8694ff66ac 100644 --- a/documentation/themes/beastie/layouts/books/list.html +++ b/documentation/themes/beastie/layouts/books/list.html @@ -85,7 +85,7 @@ diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html index 251a7a625e..8694ff66ac 100644 --- a/documentation/themes/beastie/layouts/books/single.html +++ b/documentation/themes/beastie/layouts/books/single.html @@ -85,7 +85,7 @@ diff --git a/documentation/themes/beastie/layouts/partials/menu.html b/documentation/themes/beastie/layouts/partials/menu.html index 4c4261ef52..1d118e85e4 100644 --- a/documentation/themes/beastie/layouts/partials/menu.html +++ b/documentation/themes/beastie/layouts/partials/menu.html @@ -10,11 +10,10 @@ {{ $toc = replace $toc "" "" }} - + + + {{ .Page.Title }} + {{ $toc = replace $toc "#" $finalPath }} {{ $toc | safeHTML }}