Skip to content
Permalink
Browse files

updated theme to allow for more sections

separate by section instead of category

Added section previews in home page

Added pagination to sections

Added pagination to single pages

Added dropdown menu

Style Changes

Consolidated Files

Reorganized social icons

Section Previews in Home Page

Menu is now auto generated

Updated archetype

Added _index.md for sections

Updated contents

Metadata for pages

Reorganized homepage

Style updates

Removal/Reorganization

Reorganization

Updated theme.toml
  • Loading branch information...
darshanbaral committed Jun 1, 2019
1 parent 364e92f commit 62ffdf049d81237d9031696f6940da2417a9e217
Showing with 556 additions and 264 deletions.
  1. +11 −6 exampleSite/archetypes/default.md
  2. +3 −29 exampleSite/config.toml
  3. +3 −0 exampleSite/content/alltaxa/_index.md
  4. +3 −0 exampleSite/content/archive/_index.md
  5. +3 −0 exampleSite/content/blogs/_index.md
  6. +8 −8 exampleSite/content/{posts/post (6).md → blogs/blog-1.md}
  7. +8 −8 exampleSite/content/{posts/post (5).md → blogs/blog-2.md}
  8. +3 −0 exampleSite/content/post/_index.md
  9. +23 −22 exampleSite/content/{posts → post}/post (1).md
  10. +8 −8 exampleSite/content/{posts → post}/post (2).md
  11. +8 −8 exampleSite/content/{posts → post}/post (3).md
  12. +8 −8 exampleSite/content/{posts → post}/post (4).md
  13. +5 −4 layouts/_default/baseof.html
  14. +42 −12 layouts/_default/list.html
  15. +0 −26 layouts/_default/section.html
  16. +39 −23 layouts/_default/single.html
  17. +0 −18 layouts/_default/terms.html
  18. +15 −4 layouts/index.html
  19. +10 −0 layouts/partials/about.html
  20. +8 −39 layouts/partials/head.html
  21. +10 −0 layouts/partials/image-social.html
  22. +0 −33 layouts/partials/intro.html
  23. +37 −0 layouts/partials/metadata.html
  24. +14 −0 layouts/partials/metadataJS.html
  25. +44 −7 layouts/partials/navbar.html
  26. +28 −0 layouts/partials/prevNext.html
  27. +7 −0 layouts/partials/readingtime.html
  28. +18 −0 layouts/partials/recentarticles.html
  29. +23 −0 layouts/partials/taxa.html
  30. +4 −0 layouts/section/alltaxa.html
  31. +41 −0 layouts/section/archive.html
  32. +113 −0 static/css/mero.css
  33. BIN static/images/post1/post1_skyline_tn.jpeg
  34. +8 −0 static/js/mero.js
  35. +1 −1 theme.toml
@@ -1,6 +1,11 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

+++
title = ""
date = "{{ .Date }}"
tags = [""]
categories = [""]
description = ""
draft = true
mainImage = ""
mainImageThumbnail = ""
mainImageCaption = ""
+++
@@ -2,39 +2,13 @@ baseURL = "http://example.org/"
languageCode = "en-us"
title = "My Blog"
theme = "mero"
disableKinds = ["taxonomyTerm"]

[params]
dateFormat = "2006-01-02"
author = "Firstname Lastname"
description = "My awesome blog"

[menu]
[[menu.main]]
identifier = "home"
name = "Home"
title = "home"
url = "/"
weight = 100

[[menu.main]]
identifier = "posts"
name = "Posts"
title = "posts"
url = "/posts/"
weight = 200

[[menu.main]]
identifier = "categories"
name = "Categories"
title = "categories"
url = "/categories/"
weight = 300

[[menu.main]]
identifier = "tags"
name = "Tags"
title = "tags"
url = "/tags/"
weight = 400
mainImage = "images/main.jpeg"

[params.introduction]
text = "**This website** is my blog. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
@@ -0,0 +1,3 @@
+++
title = "taxa"
+++
@@ -0,0 +1,3 @@
---
title: "Archive"
---
@@ -0,0 +1,3 @@
+++
title= "Blogs"
+++
@@ -1,9 +1,9 @@
+++
title = "Title of the post 6"
date = "2018-12-15"
tags = ["other"]
categories = ["Category 11"]
description = "A brief summary for the post 6."
+++

+++
title = "Title of the blog 1"
date = "2019-01-01"
tags = ["random"]
categories = ["Category 1"]
description = "A brief summary for the blog 1"
+++

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -1,9 +1,9 @@
+++
title = "Title of the post 5"
date = "2018-10-10"
tags = ["other"]
categories = ["Category 11"]
description = "A brief summary for the post 5"
+++

+++
title = "Title of the blog 2"
date = "2018-12-11"
tags = ["random1", "random2"]
categories = ["Category 11"]
description = "A brief summary for the blog 2"
+++

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -0,0 +1,3 @@
+++
title= "Posts"
+++
@@ -1,23 +1,24 @@
+++
title = "Create new hugo theme"
date = "2018-12-10"
tags = ["tutorial"]
categories = ["Hugo"]
description = "A brief summary for the post 1. And this is slightly longer than the others. And this one also has three sentences. Nevermind, this one actually has four sentences."
+++

The `hugo new theme` command will scaffold the beginnings of a new theme for you to get you on your way.

If you’re creating a theme with plans to share it on the Hugo Themes website please note the following: - If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">` - Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme’s demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets. - If using external CSS and JS from a CDN, make sure to load these assets over `https`. Please do not use relative protocol URLs in your theme’s templates.

Hugo can initialize a new blank theme directory within your existing themes using the hugo new command:

```
hugo new theme [name]
```

An image is here.

{{< figure src="/images/post1/post1_skyline.jpeg" caption="Awesome Caption *Here*" >}}

+++
title = "Create new hugo theme"
date = "2019-05-10"
tags = ["tutorial"]
categories = ["Hugo"]
description = "A brief summary for the post 1. And this is slightly longer than the others. And this one also has three sentences. Nevermind, this one actually has four sentences."
mainImage = "images/post1/post1_skyline.jpeg"
mainImageThumbnail = "images/post1/post1_skyline_tn.jpeg"
mainImageCaption = "Awesome Caption *Here*"
+++

The `hugo new theme` command will scaffold the beginnings of a new theme for you to get you on your way.

If you’re creating a theme with plans to share it on the Hugo Themes website please note the following: - If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">` - Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme’s demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets. - If using external CSS and JS from a CDN, make sure to load these assets over `https`. Please do not use relative protocol URLs in your theme’s templates.

Hugo can initialize a new blank theme directory within your existing themes using the hugo new command:

```
hugo new theme [name]
```

An image is here.

If you’re creating a theme with plans to share it on the Hugo Themes website please note the following: - If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">` - Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme’s demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets. - If using external CSS and JS from a CDN, make sure to load these assets over `https`. Please do not use relative protocol URLs in your theme’s templates.
@@ -1,9 +1,9 @@
+++
title = "Title of the post 2"
date = "2018-12-11"
tags = ["random1", "random2"]
categories = ["Category 11"]
description = "A brief summary for the post 2"
+++

+++
title = "Title of the post 2"
date = "2018-12-11"
tags = ["random1", "random2"]
categories = ["Category 11"]
description = "A brief summary for the post 2"
+++

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -1,9 +1,9 @@
+++
title = "Title of the post 3"
date = "2018-12-12"
tags = ["random"]
categories = ["Category 1"]
description = "A brief summary for the post 3"
+++

+++
title = "Title of the post 3"
date = "2018-12-12"
tags = ["random"]
categories = ["Category 1"]
description = "A brief summary for the post 3"
+++

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -1,9 +1,9 @@
+++
title = "Title of the post 4"
date = "2018-11-10"
tags = ["random"]
categories = ["Category 1"]
description = "A brief summary for the post 4"
+++

+++
title = "Title of the post 4"
date = "2018-11-10"
tags = ["random"]
categories = ["Category 1"]
description = "A brief summary for the post 4"
+++

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}

<body class="container bg-dark text-white">
<body class="bg-dark text-white m-auto" style="width:95%; max-width: 1024px;">
<div class="wrapper">
{{ partial "navbar.html" . }}
{{ block "main" . }}
{{ end }}
<main>
{{ block "main" . }}
{{ end }}
</main>
</div>
{{ partial "footer.html" . }}
</body>
@@ -1,15 +1,45 @@
{{ define "main" }}
<main>
<h1>{{ .Title }}</h1>
<table class="table table-striped">
{{ range .Pages }}
<tr>
<td>{{ .Date.Format "2006-Jan-02" }}</td>
<td>
<a href="{{.Permalink}}">{{.Title}}:</a> {{ .Description }}
</td>
</tr>
{{ end }}
</table>
<h1 class="mt-4">{{ .Title }}</h1>
<div class="d-flex flex-column">
{{ range (.Paginator 10).Pages }}
<div
class="border mt-3 mb-3 p-3 rounded position-relative"
>
<h3 class="mb-0">
<a href="{{ .Permalink | relURL }}" class="article-titles">
{{- .Title -}}
</a>
</h3>
<div
class="bg-dark pl-1 pr-1"
style="position: absolute; top: -1rem; left: 5px;"
>
<small>
<time>
{{- .Date.Format (default "2006-12-13" $.Site.Params.dateFormat) -}}
</time>
</small>
<span
class="more"
style="font-size: 1.2em;"
title="Show Metadata"
onclick="showMetadata(this)"
>
&#43;
</span>
</div>
{{ partial "metadata" . }}

{{ if .Params.Description }}
<p class="mt-2 mb-0 ml-2">{{ .Params.Description }}</p>
{{ end }}
</div>
{{ end }}
</div>
<div class="d-flex justify-content-center">
{{ template "_internal/pagination.html" . }}
</div>
</main>
{{ end }}
{{ partial "metadataJS" . }}
{{ end }}

This file was deleted.

@@ -1,28 +1,44 @@
{{ define "main" }}
<main>
<h1>
<u>{{ .Title }}</u>
</h1>
<ul class="list-inline">
<li class="list-inline-item">
{{ .Date.Format "2006-Jan-02" }}
</li>
<a href="/tags/">
<i class="fas fa-tags"></i>
</a>
{{ range.Params.tags }}
<li class="list-inline-item">
<a href="/tags/{{ . }}/">
{{ . }}
<article class="border rounded p-3 position-relative" style="margin-top: 2.5em;">
<div class="header">
<h1 style="font-size: 2.5em;">
{{ .Title }}
</h1>
<div
class="mb-1 mr-3 pl-1 pr-1 rounded bg-dark"
style="position: absolute; top: -19px; font-size: 0.9em;"
>
<time>
{{- .Date.Format (default "January 2, 2006" $.Site.Params.dateFormat) -}}
</time>
<span
class="more"
style="font-size: 1.5em;"
title="Show Metadata"
onclick="showMetadata(this)"
>
&#43;
</span>
</div>
{{- partial "metadata" . -}}
</div>
<div class="article pb-3 pt-3 border-bottom border-top">
{{ if .Params.mainImage }}
<figure>
<a href="{{ .Params.mainImage | relURL }}">
<img
src="{{ .Params.mainImageThumbnail | relURL }}"
alt="{{ .Params.mainImageCaption | markdownify }}"
/>
</a>
</li>
<figcaption>
{{ .Params.mainImageCaption | markdownify }}
</figcaption>
</figure>
{{ end }}
</ul>

<div>
<article id="content">
{{ .Content }}
</article>
{{ .Content }}
</div>
</main>
{{ partial "prevNext" . }}
</article>
{{ partial "metadataJS" . }}
{{ end }}

0 comments on commit 62ffdf0

Please sign in to comment.
You can’t perform that action at this time.