From ac8085609f68c09d297b7f83f0217b7644d35052 Mon Sep 17 00:00:00 2001 From: sheychen Date: Mon, 10 Jun 2019 22:01:30 +0200 Subject: [PATCH] Sections --- README.md | 16 ++-------------- assets/style.sass | 3 +-- layouts/_default/list.html | 6 ++++++ layouts/index.html | 6 ++++++ layouts/partials/sections.html | 14 ++++++++++++++ 5 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 layouts/partials/sections.html diff --git a/README.md b/README.md index 8183076..bd94b4e 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ It pairs a prominent sidebar with uncomplicated content. - [Hydden](#hydden) - [Contents](#contents) - [Installation](#installation) - - [Quick Start](#quick-start) - - [Standard Installation](#standard-installation) - [Options](#options) - [Sidebar menu](#sidebar-menu) - [Sticky sidebar content](#sticky-sidebar-content) @@ -25,20 +23,10 @@ It pairs a prominent sidebar with uncomplicated content. ## Installation -### Quick Start - -To give you a running start this installation puts a fully configured [starter repo](https://github.com/forestryio/hyde-hugo-starter) into your Git account and sets it up in a content manager / CMS. - -_[Forestry](https://forestry.io) Starter-Kit:_ - -[![Import this project into Forestry](https://assets.forestry.io/import-to-forestry.svg)](https://app.forestry.io/quick-start?repo=forestryio/hyde-hugo-starter&provider=github&engine=hugo&version=0.49) - -### Standard Installation - -To install Hyde as your default theme, first install this repository in the `themes/` directory: +To install Hydden as your default theme, first install this repository in the `themes/` directory: $ cd themes/ - $ git clone https://github.com/spf13/hyde.git + $ git clone Second, specify `hydden` as your default theme in the `config.toml` file. Just add the line diff --git a/assets/style.sass b/assets/style.sass index 2948a45..aa3b095 100644 --- a/assets/style.sass +++ b/assets/style.sass @@ -231,8 +231,7 @@ tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th margin: .2em /* Table of contents */ -// TODO: float -.toc +.toc, .sections font-size: $smaller a color: $color-grey diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5fdc6ad..96b6a10 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -11,3 +11,9 @@ {{- end }} {{- end }} + +{{ define "note" -}} + +{{- end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 59f4c6b..2576756 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -38,3 +38,9 @@ {{ partial "pagination.html" . }} {{- end }} + +{{ define "note" -}} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/sections.html b/layouts/partials/sections.html new file mode 100644 index 0000000..730cf41 --- /dev/null +++ b/layouts/partials/sections.html @@ -0,0 +1,14 @@ +{{ template "sectionsnav" . }} +{{ define "sectionsnav" }} +{{ $sec := where .Sections ".Params.unlisted" "!=" "true" }} +{{ if gt (len $sec) 0 }} + +{{ end }} +{{ end }} \ No newline at end of file