Skip to content

Commit

Permalink
fix: treeview icons and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgazeau committed Feb 20, 2022
1 parent 623532a commit 15a0cbb
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 27 deletions.
10 changes: 4 additions & 6 deletions data/themeParams.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,15 @@
[shortcodes]
[shortcodes.treeview]
[shortcodes.treeview.kinds]
default = "fa-solid fa-circle-exclamation"
defaultDir = "fa-solid fa-folder"
defaultFile = "fa-solid fa-file"
default = "fa-solid fa-circle-question"
dir = "fa-solid fa-folder"
file = "fa-solid fa-file"
home = "fa-solid fa-house-chimney"
page = "fa-solid fa-file-lines"
section = "fa-solid fa-folder-tree"
taxonomy = "fa-solid fa-tags"
term = "fa-solid fa-tag"
dir = "fa-solid fa-folder"
archive = "fa-solid fa-file-zipper"
file = "fa-solid fa-file"
image = "fa-solid fa-file-image"
video = "fa-solid fa-file-video"
script = "fa-solid fa-file-code"
Expand All @@ -141,4 +139,4 @@
powerpoint = "fa-solid fa-file-powerpoint"
excel = "fa-solid fa-file-excel"
csv = "fa-solid fa-file-csv"
word = "fa-solid fa-file-word"
word = "fa-solid fa-file-word"
52 changes: 50 additions & 2 deletions exampleSite/content/english/shortcodes/treeview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,33 @@ Possible values:
"kind": "file",
"label": "***Flat file** in a directory*"
}]
},{
"kind": "default",
"label": "***Default***"
},{
"kind": "dir",
"label": "***Directory***"
},{
"kind": "file",
"label": "***Flat file***"
"label": "***File***"
},{
"kind": "home",
"label": "***Home***"
},{
"kind": "page",
"label": "***Page***"
},{
"kind": "section",
"label": "***Section***"
},{
"kind": "taxonomy",
"label": "***Taxonomy***"
},{
"kind": "term",
"label": "***Taxonomy's term***"
},{
"kind": "archive",
"label": "***Archive***"
},{
"kind": "image",
"label": "***Image file***"
Expand Down Expand Up @@ -174,9 +198,33 @@ Possible values:
"kind": "file",
"label": "***Flat file** in a directory*"
}]
},{
"kind": "default",
"label": "***Default***"
},{
"kind": "dir",
"label": "***Directory***"
},{
"kind": "file",
"label": "***Flat file***"
"label": "***File***"
},{
"kind": "home",
"label": "***Home***"
},{
"kind": "page",
"label": "***Page***"
},{
"kind": "section",
"label": "***Section***"
},{
"kind": "taxonomy",
"label": "***Taxonomy***"
},{
"kind": "term",
"label": "***Taxonomy's term***"
},{
"kind": "archive",
"label": "***Archive***"
},{
"kind": "image",
"label": "***Image file***"
Expand Down
52 changes: 50 additions & 2 deletions exampleSite/content/french/shortcodes/treeview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,33 @@ Valeurs possibles:
"kind": "file",
"label": "***Fichier plat** dans un répertoire*"
}]
},{
"kind": "default",
"label": "***Par défaut***"
},{
"kind": "dir",
"label": "***Répertoire***"
},{
"kind": "file",
"label": "***Fichier plat***"
"label": "***Fichier***"
},{
"kind": "home",
"label": "***Accueil***"
},{
"kind": "page",
"label": "***Page***"
},{
"kind": "section",
"label": "***Section***"
},{
"kind": "taxonomy",
"label": "***Taxonomie***"
},{
"kind": "term",
"label": "***Terme de taxonomie***"
},{
"kind": "archive",
"label": "***Archive***"
},{
"kind": "image",
"label": "***Fichier image***"
Expand Down Expand Up @@ -174,9 +198,33 @@ Valeurs possibles:
"kind": "file",
"label": "***Fichier plat** dans un répertoire*"
}]
},{
"kind": "default",
"label": "***Par défaut***"
},{
"kind": "dir",
"label": "***Répertoire***"
},{
"kind": "file",
"label": "***Fichier plat***"
"label": "***Fichier***"
},{
"kind": "home",
"label": "***Accueil***"
},{
"kind": "page",
"label": "***Page***"
},{
"kind": "section",
"label": "***Section***"
},{
"kind": "taxonomy",
"label": "***Taxonomie***"
},{
"kind": "term",
"label": "***Terme de taxonomie***"
},{
"kind": "archive",
"label": "***Archive***"
},{
"kind": "image",
"label": "***Fichier image***"
Expand Down
10 changes: 4 additions & 6 deletions exampleSite/templates/configuration/themeParams.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,15 @@
[shortcodes]
[shortcodes.treeview]
[shortcodes.treeview.kinds]
default = "fa-solid fa-circle-exclamation"
defaultDir = "fa-solid fa-folder"
defaultFile = "fa-solid fa-file"
default = "fa-solid fa-circle-question"
dir = "fa-solid fa-folder"
file = "fa-solid fa-file"
home = "fa-solid fa-house-chimney"
page = "fa-solid fa-file-lines"
section = "fa-solid fa-folder-tree"
taxonomy = "fa-solid fa-tags"
term = "fa-solid fa-tag"
dir = "fa-solid fa-folder"
archive = "fa-solid fa-file-zipper"
file = "fa-solid fa-file"
image = "fa-solid fa-file-image"
video = "fa-solid fa-file-video"
script = "fa-solid fa-file-code"
Expand All @@ -140,4 +138,4 @@
powerpoint = "fa-solid fa-file-powerpoint"
excel = "fa-solid fa-file-excel"
csv = "fa-solid fa-file-csv"
word = "fa-solid fa-file-word"
word = "fa-solid fa-file-word"
10 changes: 4 additions & 6 deletions exampleSite/templates/configuration/themeParams.fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,15 @@
[shortcodes]
[shortcodes.treeview]
[shortcodes.treeview.kinds]
default = "fa-solid fa-circle-exclamation"
defaultDir = "fa-solid fa-folder"
defaultFile = "fa-solid fa-file"
default = "fa-solid fa-circle-question"
dir = "fa-solid fa-folder"
file = "fa-solid fa-file"
home = "fa-solid fa-house-chimney"
page = "fa-solid fa-file-lines"
section = "fa-solid fa-folder-tree"
taxonomy = "fa-solid fa-tags"
term = "fa-solid fa-tag"
dir = "fa-solid fa-folder"
archive = "fa-solid fa-file-zipper"
file = "fa-solid fa-file"
image = "fa-solid fa-file-image"
video = "fa-solid fa-file-video"
script = "fa-solid fa-file-code"
Expand All @@ -140,4 +138,4 @@
powerpoint = "fa-solid fa-file-powerpoint"
excel = "fa-solid fa-file-excel"
csv = "fa-solid fa-file-csv"
word = "fa-solid fa-file-word"
word = "fa-solid fa-file-word"
6 changes: 3 additions & 3 deletions layouts/partials/theme/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ <h6 class='toc-title is-marginless'>{{i18n "toc_title"}}</h6>
{{if in (string .TableOfContents) "<ul>"}}
{{.TableOfContents}}
{{else}}
<nav id="TableOfContents">
<p><strong>{{i18n "no_data"}}</strong></p>
</nav>
<nav id="TableOfContents">
<p><strong>{{i18n "no_data"}}</strong></p>
</nav>
{{end}}
</div>
<div id='taxonomies'>
Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/treeview.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
{{end}}
{{else}}
{{with .content}}
{{$scratch.Set "kind" $.context.Site.Data.themeParams.shortcodes.treeview.kinds.defaultDir}}
{{$scratch.Set "kind" $.context.Site.Data.themeParams.shortcodes.treeview.kinds.dir}}
{{else}}
{{$scratch.Set "kind" $.context.Site.Data.themeParams.shortcodes.treeview.kinds.defaultFile}}
{{$scratch.Set "kind" $.context.Site.Data.themeParams.shortcodes.treeview.kinds.file}}
{{end}}
{{end}}
{{with $element.label}}
Expand Down

0 comments on commit 15a0cbb

Please sign in to comment.