Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/mero.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@users.noreply.github.com>2019-03-03 07:03:14 +0300
committerGitHub <noreply@github.com>2019-03-03 07:03:14 +0300
commit1426ca4851ec67c3828a9da0ba020b33b308f8b4 (patch)
tree05d974c21b0d80cf236d482a6cda8142ef239b83
parent045fb1aea4ecde7bff8b675072b24043c06a5970 (diff)
Add files via upload
-rw-r--r--LICENSE20
-rw-r--r--archetypes/default.md2
-rw-r--r--exampleSite/archetypes/default.md6
-rw-r--r--layouts/404.html8
-rw-r--r--layouts/_default/baseof.html11
-rw-r--r--layouts/_default/list.html16
-rw-r--r--layouts/_default/section.html28
-rw-r--r--layouts/_default/single.html28
-rw-r--r--layouts/_default/terms.html19
-rw-r--r--layouts/index.html6
-rw-r--r--layouts/partials/footer.html7
-rw-r--r--layouts/partials/head.html48
-rw-r--r--layouts/partials/intro.html33
-rw-r--r--layouts/partials/navbar.html7
-rw-r--r--static/images/main.jpegbin0 -> 159283 bytes
-rw-r--r--static/images/post1/post1_skyline.jpegbin0 -> 72931 bytes
-rw-r--r--theme.toml15
17 files changed, 254 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e76ff08
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Darshan Baral
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..c21f22f
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,2 @@
++++
++++
diff --git a/exampleSite/archetypes/default.md b/exampleSite/archetypes/default.md
new file mode 100644
index 0000000..22a7858
--- /dev/null
+++ b/exampleSite/archetypes/default.md
@@ -0,0 +1,6 @@
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
+
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..6cf7047
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,8 @@
+{{ define "main" }}
+<main>
+ <div>
+ Page not found.
+ </div>>
+</main>
+{{ partial "footer.html" . }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..a2c7c30
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+{{ partial "head.html" . }}
+
+<body class="container bg-dark text-white">
+ {{ partial "navbar.html" . }}
+ {{ block "main" . }}
+ {{ end }}
+</body>
+
+</html> \ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..6fc8cdf
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,16 @@
+{{ 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>
+</main>
+{{ partial "footer.html" . }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
new file mode 100644
index 0000000..31d49a0
--- /dev/null
+++ b/layouts/_default/section.html
@@ -0,0 +1,28 @@
+{{ define "main" }}
+<main>
+ <div class="row row-eq-height">
+ {{ $sectionName := .Title | lower }}
+ {{ range $key, $taxonomy := .Site.Taxonomies.categories.ByCount }}
+ <div class="col-md-6 mt-3">
+ <h2>
+ <a href="/categories/{{ .Name }}/">
+ {{ .Name }}
+ </a>
+ </h2>
+ <div class="border rounded p-2">
+ {{ range where $taxonomy.Pages.ByDate "Section" $sectionName }}
+ <h4 class="ml-2">
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </h4>
+ <p class="ml-4">{{ .Description }}</p>
+ {{ end }}
+ </div>
+ </div>
+ {{ end }}
+ </div>
+</main>
+
+{{ partial "footer.html" . }}
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..c614728
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,28 @@
+{{ define "main" }}
+<main>
+ <h1>
+ <u>{{ .Title }}</u>
+ </h1>
+ <ul class="list-inline">
+ <li class="list-inline-item">
+ {{ .Date.Format "2006-Jan-02" }} |
+ <a href="/tags/">
+ <i class="fas fa-tags"></i>
+ </a>
+ </li>
+ {{ range.Params.tags }}
+ <li class="list-inline-item">
+ <a href="/tags/{{ . }}/">
+ {{ . }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ <div>
+ <article id="content">
+ {{ .Content }}
+ </article>
+ </div>
+</main>
+{{ partial "footer.html" . }}
+{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..37830a2
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+<main>
+ <h1 id="title">{{ .Title }}</h1>
+ <div class="d-flex flex-row flex-wrap mb-3">
+ {{ $data := .Data }}
+ {{ range $key, $value := .Data.Terms }}
+ <div class="p-1 border rounded m-1">
+ <h3 class="m-0">
+ <a href="/{{ $data.Plural }}/{{ $key | urlize }}">
+ {{ $key }}
+ </a>
+ </h3>
+ <p class="ml-2">{{ len $value }} posts.</p>
+ </div>
+ {{ end }}
+ </div>
+</main>
+{{ partial "footer.html" . }}
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..6840b00
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+<main>
+ {{ partial "intro.html" . }}
+</main>
+{{ partial "footer.html" . }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..f3aa709
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,7 @@
+<div class="w-50 bg-danger ml-auto mr-auto mt-4" style="height: 2px;"></div>
+<div class="mt-4 mb-2" style="font-size: 0.9em;">
+ <p class="text-center">
+ {{ .Site.Params.footer.message | safeHTML }} | <a href="">Mero</a> theme by <a
+ href="https://www.darshanbaral.com">Darshan</a>
+ </p>
+</div> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..79f1607
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,48 @@
+<html lang="{{ .Site.LanguageCode }}">
+ <head>
+ <title>{{ .Site.Title }}</title>
+ <meta charset="utf-8" />
+ <meta content="width=device-width, initial-scale=1.0" name="viewport" />
+ <meta name="description" content="{{ .Site.Params.description }}" />
+ <meta name="author" content="{{ .Site.Params.author }}" />
+
+ <link
+ rel="stylesheet"
+ href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
+ />
+ <link
+ rel="stylesheet"
+ href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
+ />
+ <link
+ href="https://fonts.googleapis.com/css?family=Overlock"
+ rel="stylesheet"
+ />
+
+ <script>
+ setColors = function() {
+ let images = document.querySelectorAll("img");
+ images.forEach(elem => elem.classList.add("img-fluid", "rounded"));
+
+ let imagecaption = document.querySelectorAll("figcaption");
+ imagecaption.forEach(elem => elem.classList.add("initialism"));
+ };
+ window.onload = setColors;
+ </script>
+
+ <style>
+ a {
+ color: #ffc107 !important;
+ }
+ code {
+ color: #17a2b8 !important;
+ }
+ a:hover {
+ text-decoration: none;
+ }
+ * {
+ font-family: "Overlock", cursive;
+ }
+ </style>
+ </head>
+</html>
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
new file mode 100644
index 0000000..c7ad259
--- /dev/null
+++ b/layouts/partials/intro.html
@@ -0,0 +1,33 @@
+<div class="row row-eq-height">
+ <div class="col-md-4 mt-2">
+ <img class="w-100 rounded" src={{ "./images/main.jpeg" | absURL }}>
+ <div class="mt-1 text-center">
+ {{ range.Site.Params.social.list }}
+ <span class="ml-1 mr-1" style="font-size: 2em;">
+ <a href="{{ .url }}">
+ <i class="{{ .class }} {{ .icon }}"></i>
+ </a>
+ </span>
+ {{ end }}
+ </div>
+ </div>
+
+ <div class="col-md-8 p-2">
+ <h1>I am {{ .Site.Params.author }}.</h1>
+ {{ .Site.Params.introduction.text | markdownify }}
+ <div class="mt-4 bg-dark border-top p-2 text-center">
+ <h4>
+ <b>Recent Posts</b> |
+ <small
+ ><a href="./posts"><i>See All</i></a></small
+ >
+ </h4>
+ {{ range where .Pages "Section" "posts" | first 4}}
+ <a class="list-entry-link text-uppercase" href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ <p class="ml-4">{{ .Description }}</p>
+ {{ end }}
+ </div>
+ </div>
+</div>
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html
new file mode 100644
index 0000000..27d3c83
--- /dev/null
+++ b/layouts/partials/navbar.html
@@ -0,0 +1,7 @@
+<div class="btn-group mt-2 mb-4">
+ {{ range.Site.Menus.main }}
+ <a href="{{ .URL }}" class="border-warning bg-dark btn"
+ ><span>{{ .Name }}</span>
+ </a>
+ {{ end }}
+</div>
diff --git a/static/images/main.jpeg b/static/images/main.jpeg
new file mode 100644
index 0000000..204b1de
--- /dev/null
+++ b/static/images/main.jpeg
Binary files differ
diff --git a/static/images/post1/post1_skyline.jpeg b/static/images/post1/post1_skyline.jpeg
new file mode 100644
index 0000000..767b6fe
--- /dev/null
+++ b/static/images/post1/post1_skyline.jpeg
Binary files differ
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..45bb143
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,15 @@
+# theme.toml template for a Hugo theme
+# See https://github.com/gohugoio/hugoThemes#themetoml for an example
+
+name = "Sanstha"
+license = "MIT"
+licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
+description = "Theme for personal blogs"
+homepage = "http://example.org/"
+tags = ["Personal", "Blog", "Dark"]
+features = ["Responsive"]
+min_version = "0.41"
+
+[author]
+ name = "Darshan Baral"
+ homepage = "https://www.darshanbaral.com/" \ No newline at end of file