From eb60debba2121fb82c79306e56b0b2435f17df49 Mon Sep 17 00:00:00 2001 From: matcornic Date: Wed, 2 Aug 2017 23:39:49 +0200 Subject: [PATCH] feat: add 'more' section in left menu --- exampleSite/README.md | 5 ++++- exampleSite/config.toml | 44 +++++++++++++++++++++++++++++--------- layouts/partials/menu.html | 13 +++++++++++ static/css/theme.css | 18 ++++++++++++++++ 4 files changed, 69 insertions(+), 11 deletions(-) diff --git a/exampleSite/README.md b/exampleSite/README.md index 9b7e8c6f21..c7263bfaa6 100644 --- a/exampleSite/README.md +++ b/exampleSite/README.md @@ -1,7 +1,10 @@ - récriture doc -> TODO - créer une section Showcase -- créer des jolis thèmes de base (avec des noms) -> TODO +- créer des jolis thèmes de base (avec des noms ou au moins de meilleures couleurs) -> TODO +- Menus déroulants icone -> TODO +- Bug bizarre en prod sur un des menus. +- Section "MORE" -> OK - ajouter les childs -> OK - ajouter les attachments -> OK - refaire la possibilité d'overrider le style/script/etc -> OK diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f3502509b9..6d73b96d7a 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,18 +16,42 @@ defaultContentLanguageInSubdir= true disableAssetBusting = false # default to false ordersectionsby = "weight" # ordersectionsby = "title" disableInlineCopyToClipBoard = true # default to false + showVisitedLinks = true [outputs] home = [ "HTML", "RSS", "JSON"] -#[Languages] -#[Languages.en] -#title = "Documentation for Hugo Learn Theme" -#weight = 1 -#languageName = "English" -# -#[Languages.fr] -#title = "Documentation du thème Hugo Learn" -#weight = 2 -#languageName = "Français" \ No newline at end of file +[Languages] +[Languages.en] +title = "Documentation for Hugo Learn Theme" +weight = 1 +languageName = "English" + +[Languages.fr] +title = "Documentation du thème Hugo Learn" +weight = 2 +languageName = "Français" + +[[menu.shortcuts]] +pre = "

More

" +name = " Github repo" +identifier = "ds" +url = "https://github.com/vjeantet/hugo-theme-docdock" +weight = 10 + +[[menu.shortcuts]] +name = " Showcases" +url = "/showcase" +weight = 11 + +[[menu.shortcuts]] +name = " Hugo Documentation" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[menu.shortcuts]] +name = " Credits" +url = "/credits" +weight = 30 \ No newline at end of file diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index c9ff53eceb..646594be00 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -24,6 +24,19 @@ {{end}} {{end}} + + {{with .Site.Menus.shortcuts}} +
+ +
+ {{end}} + {{ if or .Site.IsMultiLingual $showvisitedlinks }}

diff --git a/static/css/theme.css b/static/css/theme.css index 31dccf4ff7..d0a23677b0 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1090,6 +1090,18 @@ pre .copy-to-clipboard:hover { #sidebar ul.topics > li > a .read-icon { margin-top: 9px; } + +#sidebar ul { + list-style: none; + padding: 0; + margin: 0; +} + +#sidebar #shortcuts li { + padding: 2px 0; + list-style: none; +} + #sidebar ul li .read-icon { display: none; float: right; @@ -1103,6 +1115,12 @@ pre .copy-to-clipboard:hover { display: inline; } +#sidebar #shortcuts h3 { + font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + color: white ; + margin-top:1rem; +} + #searchResults { text-align: left; }