From 8a9955b22863c40e128273fc26792b2164f42641 Mon Sep 17 00:00:00 2001 From: Bady <bady@disroot.org> Date: Wed, 14 Oct 2020 01:31:28 +0530 Subject: [PATCH] Add news page Fix issue #18 --- website/content/news/_index.md | 0 website/layouts/news/list.html | 12 ++++++++++++ website/layouts/news/single.html | 9 +++++++++ website/layouts/partials/nav.html | 1 + website/static/css/style.css | 7 +++---- 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 website/content/news/_index.md create mode 100644 website/layouts/news/list.html create mode 100644 website/layouts/news/single.html diff --git a/website/content/news/_index.md b/website/content/news/_index.md new file mode 100644 index 0000000..e69de29 diff --git a/website/layouts/news/list.html b/website/layouts/news/list.html new file mode 100644 index 0000000..ece0b5c --- /dev/null +++ b/website/layouts/news/list.html @@ -0,0 +1,12 @@ +{{define "main"}} +<section class="page"> + <h1 style="text-align: center;">News & Announcements</h1> + {{ range .Pages}} + <h3><a class="link" href="{{.Permalink}}">{{.Title}}</a></h3> + <div class="list-item"> + <small class="label-dark">{{ .PublishDate.Format "January 2, 2006" }}</small> + </div> + <p>{{ .Summary }}</p> + {{end}} +</section> +{{end}} diff --git a/website/layouts/news/single.html b/website/layouts/news/single.html new file mode 100644 index 0000000..bb6dba2 --- /dev/null +++ b/website/layouts/news/single.html @@ -0,0 +1,9 @@ +{{define "main"}} +<section class="page"> + <h1 style="text-align: center;">{{.Title}}</h1> + {{.Content }} + <div style="margin: 24px 0 12px"> + <a class="button" href="..">Back to News</a> + </div> +</section> +{{end}} diff --git a/website/layouts/partials/nav.html b/website/layouts/partials/nav.html index d4d64f1..f83f5c6 100644 --- a/website/layouts/partials/nav.html +++ b/website/layouts/partials/nav.html @@ -11,6 +11,7 @@ <ul class="menu"> <li><a href="{{.Site.BaseURL}}#about">About</a></li> <li><a href="{{.Site.BaseURL}}/code-of-conduct">Code of Conduct</a></li> + <li><a href="{{.Site.BaseURL}}/news">News</a></li> <li><a href="{{.Site.BaseURL}}/sched">Schedule</a></li> <li><a href="{{.Site.BaseURL}}#contact">Contact</a></li> diff --git a/website/static/css/style.css b/website/static/css/style.css index 456efe3..37994f9 100644 --- a/website/static/css/style.css +++ b/website/static/css/style.css @@ -68,7 +68,7 @@ nav{ .menu a{ color: black; text-decoration: none; - padding: 0 35px; + padding: 0 20px; transition: 0.4s; } .show-menu-btn,.hide-menu-btn{ @@ -294,12 +294,11 @@ nav{ } .container{ display: flex; - margi } -.expectations{ +.page, .expectations{ display: flex; flex-direction: column; - margin: 10vh auto; + margin: 5vh auto; width: 60%; } .heading{ -- GitLab