From e5f330aa5cb082767d82e4272f94677afb242958 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Thu, 27 May 2021 11:37:39 +0530 Subject: [PATCH] Templatize menu rendering --- exampleSite/config.toml | 33 +++++++++++++++++++++ themes/gokarna/layouts/partials/header.html | 14 +++++---- themes/gokarna/static/css/main.css | 2 +- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d43eb62..e9def91 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,3 +9,36 @@ paginate = 20 pygmentsStyle = "bw" pygmentsCodeFences = true pygmentsCodeFencesGuessSyntax = true + +[menu] + [[menu.main]] + name = "Home" + url = "/" + weight = 1 + + [[menu.main]] + name = "Posts" + url = "/posts/" + weight = 2 + + [[menu.main]] + name = "Projects" + url = "/projects/" + weight = 3 + + [[menu.main]] + name = "Resume" + url = "/resume/" + weight = 4 + + [[menu.main]] + identifier = "linkedin" + pre = "" + url = "/a/" + weight = 5 + + [[menu.main]] + identifier = "github" + pre = "" + url = "/b/" + weight = 6 diff --git a/themes/gokarna/layouts/partials/header.html b/themes/gokarna/layouts/partials/header.html index f617091..79ba327 100644 --- a/themes/gokarna/layouts/partials/header.html +++ b/themes/gokarna/layouts/partials/header.html @@ -3,7 +3,7 @@ diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index 3294128..7151b96 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -92,7 +92,7 @@ html { .nav-links .nav-link a { display: block; - padding: 0 15px; + padding: 0 10px; } .nav-links .nav-link.icon a {