From 707f603f683b65154ab7b6b6b623f85a58c0a707 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 26 Apr 2019 11:12:13 -0700 Subject: [PATCH] Branding page link plus aesthetic updates (#34) Signed-off-by: lucperkins --- config.toml | 16 ---------------- layouts/_default/blog/card.html | 4 ++-- layouts/_default/blog/navbar-link.html | 2 +- layouts/partials/blog/hero.html | 2 +- layouts/partials/deep-dive/toc.html | 14 +++++++------- layouts/partials/docs/hero.html | 4 ++-- layouts/partials/docs/section-toc.html | 6 +++--- layouts/partials/footer.html | 4 ++-- layouts/partials/meta.html | 2 +- layouts/partials/navbar.html | 26 +++++++++----------------- package.json | 2 +- yarn.lock | 8 ++++---- 12 files changed, 33 insertions(+), 57 deletions(-) diff --git a/config.toml b/config.toml index 8282142..51eece6 100644 --- a/config.toml +++ b/config.toml @@ -36,22 +36,6 @@ css = ["syntax"] twitter = "tikvproject" github = "https://github.com/tikv/tikv" -[[params.home.buttons]] -text = "Overview" -link = "/docs/concepts/overview" - -[[params.home.buttons]] -text = "Quickstart" -link = "/docs/tasks/quickstart" - -[[params.home.buttons]] -text = "Blog" -link = "/blog" - -[[params.home.buttons]] -text = "Forum" -link = "https://forum.tikv.org" - [outputs] home = ["HTML", "REDIRECTS"] diff --git a/layouts/_default/blog/card.html b/layouts/_default/blog/card.html index 6766a4f..7f1d2b5 100644 --- a/layouts/_default/blog/card.html +++ b/layouts/_default/blog/card.html @@ -4,7 +4,7 @@

- + {{ .Title }}

@@ -39,7 +39,7 @@
- + diff --git a/layouts/_default/blog/navbar-link.html b/layouts/_default/blog/navbar-link.html index ba565ab..ddb78be 100644 --- a/layouts/_default/blog/navbar-link.html +++ b/layouts/_default/blog/navbar-link.html @@ -1,4 +1,4 @@ {{ $date := dateFormat "January 2, 2006" .Date }} - + {{ .Title }} diff --git a/layouts/partials/blog/hero.html b/layouts/partials/blog/hero.html index 51804c7..a42623a 100644 --- a/layouts/partials/blog/hero.html +++ b/layouts/partials/blog/hero.html @@ -13,7 +13,7 @@

{{ end }} - {{ if ne .URL "/blog/" }} + {{ if ne .RelPermalink "/blog/" }}

{{ $date }}

diff --git a/layouts/partials/deep-dive/toc.html b/layouts/partials/deep-dive/toc.html index 72339f1..c380486 100644 --- a/layouts/partials/deep-dive/toc.html +++ b/layouts/partials/deep-dive/toc.html @@ -1,5 +1,5 @@ {{ $deepDive := where site.Sections "Section" "deep-dive" }} -{{ $currentUrl := .URL }} +{{ $currentUrl := .RelPermalink }}

TiKV deep dive @@ -9,20 +9,20 @@

    {{ range $deepDive }} - {{ $isCurrentPage := eq $currentUrl .URL }} + {{ $isCurrentPage := eq $currentUrl .RelPermalink }} {{ .Weight }}. - + {{ .Title }} {{ range .Sections }} - {{ $isCurrentPage := eq $currentUrl .URL }} + {{ $isCurrentPage := eq $currentUrl .RelPermalink }} {{ $sectionWeight := .Weight }} {{ $sectionWeight }}. - + {{ .Title }} @@ -30,10 +30,10 @@
    • {{ range .Pages }} - {{ $isCurrentPage := eq $currentUrl .URL }} + {{ $isCurrentPage := eq $currentUrl .RelPermalink }} {{ $sectionWeight }}.{{ .Weight }}. - + {{ .Title }} diff --git a/layouts/partials/docs/hero.html b/layouts/partials/docs/hero.html index d258dec..a8fd64a 100644 --- a/layouts/partials/docs/hero.html +++ b/layouts/partials/docs/hero.html @@ -1,6 +1,6 @@ {{ $docs := where site.Pages "Section" "docs" }} {{ $description := .Params.description }} -{{ $currentUrl := .URL }} +{{ $currentUrl := .RelPermalink }} {{ $isNew := .Params.new }} {{ $docsSections := where site.Sections "Section" "docs" }} {{ $currentSection := .CurrentSection.Name }} @@ -36,7 +36,7 @@ {{ $mainPage := index (where .Pages "Weight" 1) 0 }} {{ $isCurrentSection := eq .Name $currentSection }} - + {{ .Name }} diff --git a/layouts/partials/docs/section-toc.html b/layouts/partials/docs/section-toc.html index 0deaf03..761b639 100644 --- a/layouts/partials/docs/section-toc.html +++ b/layouts/partials/docs/section-toc.html @@ -1,12 +1,12 @@ {{ $allDocs := where site.RegularPages "Section" "docs" }} {{ $thisSection := .CurrentSection.Name }} -{{ $currentUrl := .URL }} +{{ $currentUrl := .RelPermalink }}
        {{ range where $allDocs "CurrentSection.Name" $thisSection }} - {{ $isCurrentPage := eq .URL $currentUrl }} + {{ $isCurrentPage := eq .RelPermalink $currentUrl }} - + {{ .Title }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3ffb082..9e10837 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -20,7 +20,7 @@
          {{ range $docs }}
        • - + {{ .Title }}
        • @@ -55,7 +55,7 @@
            {{ range first 5 $blogPosts }}
          • - + {{ .Title }}
          • diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index c8a2343..c386202 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -1,6 +1,6 @@ {{ $favicon := site.Params.favicon | relURL }} -{{ .Hugo.Generator }} +{{ hugo.Generator }} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 0160b87..77bad3d 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -47,7 +47,7 @@ @@ -114,7 +117,7 @@ More...
      - +
diff --git a/package.json b/package.json index d80d62f..1882622 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, "devDependencies": { - "bulma": "^0.7.1" + "bulma": "^0.7.4" } } diff --git a/yarn.lock b/yarn.lock index 43afd55..5a06592 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -bulma@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.1.tgz#73c2e3b2930c90cc272029cbd19918b493fca486" - integrity sha512-wRSO2LXB+qI9Pyz2id+uZr4quz5aftSN7Ay1ysr1+krzVp3utD+Ci4CeKuZdrYGc800t65b7heXBL6qw2Wo/lQ== +bulma@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.4.tgz#7e74512e9118d9799021339e67e365ee0ac4f3f9" + integrity sha512-krG2rP6eAX1WE0sf6O0SC/FUVSOBX4m1PBC2+GKLpb2pX0qanaDqcv9U2nu75egFrsHkI0zdWYuk/oGwoszVWg==