From 93e06af3d1e2792da908d4728338023fa27ea72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Berka?= <433498@mail.muni.cz> Date: Wed, 9 Jun 2021 08:12:35 +0000 Subject: [PATCH] Fix/menu toc --- .gitlab-ci.yml | 11 +++++++++++ config-dev.toml | 2 +- content/_index.md | 1 + content/cloud/advanced-features/index.md | 1 + content/cloud/news/index.md | 1 + content/cloud/tools/index.md | 1 + content/cloud/windows/index.md | 1 + layouts/partials/content.html | 12 ++++++++++++ layouts/partials/menu.html | 2 +- static/custom.css | 6 ++++++ 10 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/content.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cbf3a9..14a9984 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,17 @@ image: registry.gitlab.com/pages/hugo:latest variables: GIT_SUBMODULE_STRATEGY: recursive + +build-test: + before_script: + - apk update + - apk add git + - apk add python3 + - apk add py3-pip + - apk add py3-yaml + script: + - hugo --config config.toml -D --destination=./public + pages: before_script: - apk update diff --git a/config-dev.toml b/config-dev.toml index 27bea87..4e4466c 100644 --- a/config-dev.toml +++ b/config-dev.toml @@ -1,4 +1,4 @@ -baseURL = "http://localhost:1313" +baseURL = "http://localhost:1313/documentation" languageCode = "en-us" title = "cloud.muni.cz documentation" theme = "hugo-geekdoc" diff --git a/content/_index.md b/content/_index.md index a3e3f71..4e5c6fa 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,6 +2,7 @@ title: "Introduction" date: 2021-05-18T11:22:35+02:00 draft: false +disableToc: true --- diff --git a/content/cloud/advanced-features/index.md b/content/cloud/advanced-features/index.md index 32e413c..7867517 100644 --- a/content/cloud/advanced-features/index.md +++ b/content/cloud/advanced-features/index.md @@ -2,6 +2,7 @@ title: "Advanced Features" date: 2021-05-18T11:22:35+02:00 draft: false +toc: true --- diff --git a/content/cloud/news/index.md b/content/cloud/news/index.md index fd1323b..b6b725a 100644 --- a/content/cloud/news/index.md +++ b/content/cloud/news/index.md @@ -2,6 +2,7 @@ title: "News" date: 2021-05-18T11:22:35+02:00 draft: false +disableToc: true --- diff --git a/content/cloud/tools/index.md b/content/cloud/tools/index.md index 8183176..276e7c3 100644 --- a/content/cloud/tools/index.md +++ b/content/cloud/tools/index.md @@ -3,6 +3,7 @@ title: "Cloud Tools" date: 2021-05-18T11:22:35+02:00 draft: false weight: 100 +disableToc: true --- On this address [https://gitlab.ics.muni.cz/cloud/cloud-tools](https://gitlab.ics.muni.cz/cloud/cloud-tools) you can find a docker container with all modules required for cloud management, if you are interested in managing your cloud platform via CLI. If so, you can check our guide how to use CLI cloud interface [here](/documentation/cloud/cli/). \ No newline at end of file diff --git a/content/cloud/windows/index.md b/content/cloud/windows/index.md index 7218f34..4ba9d79 100644 --- a/content/cloud/windows/index.md +++ b/content/cloud/windows/index.md @@ -2,6 +2,7 @@ title: "Accessing Windows instance" date: 2021-05-18T11:22:35+02:00 draft: false +disableToc: true --- diff --git a/layouts/partials/content.html b/layouts/partials/content.html new file mode 100644 index 0000000..88ddeaa --- /dev/null +++ b/layouts/partials/content.html @@ -0,0 +1,12 @@ +{{ if not (.Params.disableToc) }} + + +<div class="custom-toc-1"> + <i style="position: relative; left: 3px"> <h3>Table of Contents</h3></i> + {{ .TableOfContents }} +</div> + + + +{{ end}} +{{ .Content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML }} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index a8ca673..8050b58 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -6,7 +6,7 @@ <h2>Navigation</h2> <ul class="gdoc-nav__list"> <li><span class="flex"><strong>Information</strong></span> - <ul><span class="flex"><a class="gdoc-nav__entry " href="https://cloud.gitlab-pages.ics.muni.cz/documentation/cloud/news/">News</a></span></ul> + <ul><span class="flex"><a class="gdoc-nav__entry " href="/documentation/cloud/news/">News</a></span></ul> </li> </ul> </section> diff --git a/static/custom.css b/static/custom.css index c801292..6f78052 100644 --- a/static/custom.css +++ b/static/custom.css @@ -8,3 +8,9 @@ table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sor } +.custom-toc-1 { + border-left-color:#f2f2f2; + background-color:#f2f2f2; + color:#f2f2f2 + border: 3px solid; +} \ No newline at end of file -- GitLab