feat: add 'more' section in left menu

This commit is contained in:
matcornic 2017-08-02 23:39:49 +02:00
parent 389b9858a4
commit eb60debba2
4 changed files with 69 additions and 11 deletions

View file

@ -1,7 +1,10 @@
- récriture doc -> TODO - récriture doc -> TODO
- créer une section Showcase - 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 childs -> OK
- ajouter les attachments -> OK - ajouter les attachments -> OK
- refaire la possibilité d'overrider le style/script/etc -> OK - refaire la possibilité d'overrider le style/script/etc -> OK

View file

@ -16,18 +16,42 @@ defaultContentLanguageInSubdir= true
disableAssetBusting = false # default to false disableAssetBusting = false # default to false
ordersectionsby = "weight" # ordersectionsby = "title" ordersectionsby = "weight" # ordersectionsby = "title"
disableInlineCopyToClipBoard = true # default to false disableInlineCopyToClipBoard = true # default to false
showVisitedLinks = true
[outputs] [outputs]
home = [ "HTML", "RSS", "JSON"] home = [ "HTML", "RSS", "JSON"]
#[Languages] [Languages]
#[Languages.en] [Languages.en]
#title = "Documentation for Hugo Learn Theme" title = "Documentation for Hugo Learn Theme"
#weight = 1 weight = 1
#languageName = "English" languageName = "English"
#
#[Languages.fr] [Languages.fr]
#title = "Documentation du thème Hugo Learn" title = "Documentation du thème Hugo Learn"
#weight = 2 weight = 2
#languageName = "Français" languageName = "Français"
[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-github'></i> Github repo"
identifier = "ds"
url = "https://github.com/vjeantet/hugo-theme-docdock"
weight = 10
[[menu.shortcuts]]
name = "<i class='fa fa-camera'></i> Showcases"
url = "/showcase"
weight = 11
[[menu.shortcuts]]
name = "<i class='fa fa-bookmark'></i> Hugo Documentation"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20
[[menu.shortcuts]]
name = "<i class='fa fa-bullhorn'></i> Credits"
url = "/credits"
weight = 30

View file

@ -24,6 +24,19 @@
{{end}} {{end}}
{{end}} {{end}}
</ul> </ul>
{{with .Site.Menus.shortcuts}}
<section id="shortcuts">
<ul>
{{ range sort . "Weight"}}
<li class="" role="">
<a class="padding" href="{{.URL}}">{{.Pre}}{{safeHTML .Name}}{{.Post}}</a>
</li>
{{end}}
</ul>
</section>
{{end}}
{{ if or .Site.IsMultiLingual $showvisitedlinks }} {{ if or .Site.IsMultiLingual $showvisitedlinks }}
<section id="prefooter"> <section id="prefooter">
<hr/> <hr/>

View file

@ -1090,6 +1090,18 @@ pre .copy-to-clipboard:hover {
#sidebar ul.topics > li > a .read-icon { #sidebar ul.topics > li > a .read-icon {
margin-top: 9px; 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 { #sidebar ul li .read-icon {
display: none; display: none;
float: right; float: right;
@ -1103,6 +1115,12 @@ pre .copy-to-clipboard:hover {
display: inline; display: inline;
} }
#sidebar #shortcuts h3 {
font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
color: white ;
margin-top:1rem;
}
#searchResults { #searchResults {
text-align: left; text-align: left;
} }