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

github.com/apvarun/showcase-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun A P <varunlakshmananap@gmail.com>2020-06-03 20:26:41 +0300
committerVarun A P <varunlakshmananap@gmail.com>2020-06-03 20:26:41 +0300
commit1f19a82fae5cfcae9401ab272a1658ace290104a (patch)
treece8e7c5879e01ded22eef9211118d0511cd94519
parent37296e50819b6b00072ea524e00da5195954b5b3 (diff)
Initial theme version
-rw-r--r--.gitignore2
-rw-r--r--layouts/404.html38
-rw-r--r--layouts/_default/baseof.html11
-rw-r--r--layouts/index.html44
-rw-r--r--layouts/partials/custom-message.html7
-rw-r--r--layouts/partials/footer.html135
-rw-r--r--layouts/partials/head.html37
-rw-r--r--layouts/partials/header.html40
-rw-r--r--readme.md80
-rw-r--r--static/BreeSerif-Regular.ttfbin0 -> 43476 bytes
-rw-r--r--theme.toml12
11 files changed, 406 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..34af1ac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+exampleSite/resources
+exampleSite/public \ No newline at end of file
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..35695bb
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>{{ .Site.Title }}</title>
+ <link
+ href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
+ rel="stylesheet"
+ />
+ </head>
+ <body>
+ <section class="text-gray-700 body-font">
+ <div
+ class="container mx-auto flex px-5 py-24 items-center justify-center flex-col"
+ >
+ <div class="text-center lg:w-2/3 w-full">
+ <h1
+ class="title-font text-6xl mb-4 font-medium text-gray-900"
+ >
+ 404
+ </h1>
+ <p class="mb-8 leading-relaxed">
+ Looks like you are lost
+ </p>
+ <div class="flex justify-center">
+ <a
+ href="{{ .Site.BaseURL }}"
+ class="inline-flex text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded text-lg"
+ >
+ Go back home
+ </a>
+ </div>
+ </div>
+ </div>
+ </section>
+ </body>
+</html>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..5f8e2ec
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ {{- partial "head.html" . -}}
+ <body>
+ {{- partial "header.html" . -}}
+ <div id="content">
+ {{- block "main" . }}{{- end }}
+ </div>
+ {{- partial "footer.html" . -}}
+ </body>
+</html>
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..f82d0c8
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,44 @@
+{{ define "main" }}
+
+<section class="text-gray-700 body-font">
+ <div class="container px-5 py-8 mx-auto">
+ {{- partial "custom-message.html" . -}}
+
+ <div class="flex flex-wrap sm:-m-4 -mx-4 -mb-10 -mt-4">
+ {{ range where .Site.Pages "Kind" "page" }}
+ <a
+ target="_blank"
+ rel="noopener"
+ href="{{ .Params.Link }}"
+ class="card p-4 md:w-1/3 sm:mb-4 mb-6 hover:shadow-xl hover:bg-gray-400 transition duration-200 ease-in rounded-lg {{ lower .Section }}"
+ >
+ <div class="rounded-lg h-64 overflow-hidden relative">
+ {{ if (or .Params.Image .CurrentSection.Params.Image) }}
+ <img
+ alt="{{ .Title }}"
+ class="object-cover object-center h-full w-full"
+ src="{{ (or .Params.Image .CurrentSection.Params.Image) }}"
+ />
+ {{ end }}
+ <span
+ class="bg-blue-500 text-white px-3 py-1 tracking-widest text-xs absolute right-0 top-0 rounded-bl"
+ >{{ title .Section }}</span
+ >
+ <h2
+ class="text-white px-2 py-1 tracking-widest text-2xl leading-tight font-extrabold font-bree text-center w-full h-full flex justify-center items-center absolute top-0 left-0"
+ >
+ {{ .Title }}
+ </h2>
+ <p
+ class="text-white px-2 py-1 tracking-widest text-md leading-tight font-light w-full text-center absolute bottom-0 left-0"
+ >
+ {{ .Params.Subtitle }}
+ </p>
+ </div>
+ </a>
+ {{ end }}
+ </div>
+ </div>
+</section>
+
+{{ end }}
diff --git a/layouts/partials/custom-message.html b/layouts/partials/custom-message.html
new file mode 100644
index 0000000..0a1e16f
--- /dev/null
+++ b/layouts/partials/custom-message.html
@@ -0,0 +1,7 @@
+<div class="flex flex-wrap sm:flex-row flex-col py-6 mb-12">
+ {{ if .Site.Params.Message }}
+ <h1 class="text-gray-900 font-medium title-font text-2xl mb-2 sm:mb-0 text-center w-full">
+ {{ .Site.Params.Message }}
+ </h1>
+ {{ end }}
+</div> \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..a3b9321
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,135 @@
+<footer class="text-gray-700 body-font">
+ <div
+ class="container px-5 py-8 mx-auto flex items-center sm:flex-row flex-col"
+ >
+ <p
+ class="text-sm text-gray-500 sm:ml-4 sm:pl-4 sm:border-l-1 sm:border-gray-200 sm:py-2 sm:mt-0 mt-4"
+ >
+ <a href="{{ .Site.BaseURL }}">&copy; {{ .Site.Params.Author }}</a>
+ </p>
+ <span
+ class="inline-flex sm:ml-auto sm:mt-0 mt-4 justify-center sm:justify-start"
+ >
+ {{ if .Site.Social.facebook }}
+ <a class="text-gray-500" href="{{ .Site.Social.facebook }}">
+ <svg
+ fill="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ class="w-5 h-5"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"
+ ></path>
+ </svg>
+ </a>
+ {{ end }} {{ if .Site.Social.twitter }}
+ <a class="ml-3 text-gray-500" href="{{ .Site.Social.twitter }}">
+ <svg
+ fill="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ class="w-5 h-5"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"
+ ></path>
+ </svg>
+ </a>
+ {{ end }} {{ if .Site.Social.instagram }}
+ <a class="ml-3 text-gray-500" href="{{ .Site.Social.instagram }}">
+ <svg
+ fill="none"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ class="w-5 h-5"
+ viewBox="0 0 24 24"
+ >
+ <rect width="20" height="20" x="2" y="2" rx="5" ry="5"></rect>
+ <path
+ d="M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zm1.5-4.87h.01"
+ ></path>
+ </svg>
+ </a>
+ {{ end }} {{ if .Site.Social.linkedin }}
+ <a class="ml-3 text-gray-500" href="{{ .Site.Social.linkedin }}">
+ <svg
+ fill="currentColor"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="0"
+ class="w-5 h-5"
+ viewBox="0 0 24 24"
+ >
+ <path
+ stroke="none"
+ d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z"
+ ></path>
+ <circle cx="4" cy="4" r="2" stroke="none"></circle>
+ </svg>
+ </a>
+ {{ end }}
+ </span>
+ </div>
+</footer>
+{{ template "_internal/google_analytics_async.html" . }}
+
+<script>
+ const allTypes = ["all", {{ range .Site.Sections }}"{{lower .Title}}",{{ end }}];
+ const filter = (event, type) => {
+ const isActive = event.target.classList.contains("active");
+
+ showAll();
+ if (!isActive) {
+ hideAll();
+ event.target.classList.add("active");
+ if (type !== "other") {
+ document
+ .querySelectorAll(`.${type}`)
+ .forEach((item) => item.classList.remove("hide"));
+ } else {
+ document
+ .querySelectorAll(
+ `.card${specificTypes.map((type) => `:not(.${type})`).join("")}`
+ )
+ .forEach((item) => item.classList.remove("hide"));
+ }
+ }
+ };
+
+ const showAll = () => {
+ allTypes.forEach((type) => {
+ document
+ .querySelectorAll(`.${type}`)
+ .forEach((item) => item.classList.remove("hide"));
+ document
+ .querySelectorAll(`.filter-${type}`)
+ .forEach((filterItem) => filterItem.classList.remove("active"));
+ });
+ };
+
+ const hideAll = () => {
+ allTypes.forEach((type) => {
+ document
+ .querySelectorAll(`.container a.card`)
+ .forEach((item) => item.classList.add("hide"));
+ });
+ };
+
+ allTypes.forEach((type) => {
+ document
+ .querySelectorAll(`.filter-${type}`)
+ .forEach((filterItem) =>
+ filterItem.addEventListener("click", (event) => filter(event, type))
+ );
+ });
+
+ document.querySelector(`.show-all`).addEventListener("click", showAll);
+</script>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..5bc3fd6
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,37 @@
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ {{ if .Site.Params.Author }}
+ <meta name="author" content="{{ .Site.Params.Author }}" />
+ {{ end }}
+ {{ if .Site.Params.Description }}
+ <meta
+ name="description"
+ content="{{ .Site.Params.Description }}"
+ />
+ {{ end }}
+ <title>{{ .Site.Title }}</title>
+ <link
+ href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
+ rel="stylesheet"
+ />
+ <style>
+ @font-face {
+ font-family: "Bree Serif";
+ src: url("./BreeSerif-Regular.ttf") format("truetype");
+ }
+ .font-bree {
+ font-family: "Bree Serif", serif;
+ }
+ .hide {
+ display: none;
+ }
+ .active {
+ background-color: #4299e1;
+ color: white;
+ }
+ .active:hover {
+ color: white;
+ }
+ </style>
+</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..8a6bb77
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,40 @@
+<header class="text-gray-700 body-font sticky top-0 bg-white z-10">
+ <div
+ class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center"
+ >
+ <a
+ class="flex title-font font-medium items-center text-gray-900 mb-4 md:mb-0"
+ href="{{ .Site.BaseURL }}"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ class="w-10 h-10 text-white p-2 bg-blue-500 rounded-full"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"
+ ></path>
+ </svg>
+ <span class="ml-3 text-xl">{{ .Site.Params.Author }}</span>
+ </a>
+ <nav
+ class="md:ml-auto flex flex-wrap items-center text-base justify-center"
+ >
+ <a
+ class="mr-2 px-2 rounded cursor-pointer select-none hover:text-gray-900 show-all"
+ >All</a
+ >
+ {{ range .Site.Sections }}
+ <a
+ class="mr-2 px-2 rounded cursor-pointer select-none hover:text-gray-900 filter-{{lower .Title}}"
+ >{{.Title}}</a
+ >
+ {{ end }}
+ </nav>
+ </div>
+</header>
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..59c4366
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,80 @@
+# Showcase theme for Hugo
+
+![Latest Release](https://img.shields.io/github/tag/apvarun/showcase-hugo-theme.svg)
+![Showcase hugo theme](https://img.shields.io/github/license/apvarun/showcase-hugo-theme)
+![Hugo generator](https://img.shields.io/badge/generator-hugo-brightgreen)
+
+Showcase is a minimal, single page theme for Hugo
+
+![Preview](https://github.com/apvarun/showcase-hugo-theme/blob/master/images/screenshot.png)
+
+Features:
+
+- Auto-generated menu
+- Responsive content
+- Filtering content
+- Social links
+
+## Get the theme
+
+Run from the root of your Hugo site:
+
+```sh
+git clone https://github.com/apvarun/showcase-hugo-theme.git themes/showcase
+```
+
+Alternatively, you can include this repository as a [git submodule](https://git-scm.com/docs/gitsubmodules). This makes it easier to update this theme if you have your Hugo site in git as well:
+
+```sh
+git submodule add https://github.com/apvarun/showcase-hugo-theme.git themes/showcase
+```
+
+## Preview the theme
+
+Showcase theme ships with an fully configured example site. For a quick preview:
+
+```sh
+cd themes/showcase/exampleSite/
+hugo serve --themesDir ../..
+```
+
+Then visit `http://localhost:1313/` in your browser to view the example site.
+
+## Add content
+
+The following explains how to add content to your Hugo site. You can find sample content in the `exampleSite/` folder.
+
+### Structure:
+ .
+ ├── ...
+ ├── projects # Section Name
+ │ ├── project1 # Project 1
+ │ ├── project2 # Project 2
+ │ └── _index # (optional) Customize section name &
+ │ # default image for section contents
+ └── ...
+
+
+## Configure your site
+
+From `exampleSite/`, copy `config.toml` to the root folder of your Hugo site and change the fields as you like. Helpful comments are provided.
+
+## Menu
+
+Menu in Showcase theme is auto-generated from the sections inside your content folder.
+
+## Google Analytics
+
+Set `googleAnalytics` in `config.toml` to activate Hugo's [internal Google Analytics template](https://gohugo.io/templates/internal/#google-analytics).
+
+## Issues
+
+If you have a question, please [open an issue](https://github.com/apvarun/showcase-hugo-theme/issues) for help and to help those who come after you. The more information you can provide, the better!
+
+## Contributing
+
+Contributions are welcome. For major changes, please open an issue first to discuss what you would like to change.
+
+## License
+
+Licensed under [MIT](LICENSE) \ No newline at end of file
diff --git a/static/BreeSerif-Regular.ttf b/static/BreeSerif-Regular.ttf
new file mode 100644
index 0000000..e2d77e2
--- /dev/null
+++ b/static/BreeSerif-Regular.ttf
Binary files differ
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..968bfc0
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,12 @@
+name = "Showcase"
+license = "MIT"
+licenselink = "https://github.com/apvarun/showcase-hugo-theme/blob/master/LICENSE"
+description = "Minimal, one page, theme for showcasing your work"
+homepage = "https://showcase-hugo-theme.now.sh/"
+tags = ["clean", "gallery", "minimal", "minimalist", "mobile", "one page", "personal", "responsive", "simple", "single page", "tailwind", "starter", "projects", "white" ]
+features = ["responsive", "portfolio", "gallery"]
+min_version = "0.41.0"
+
+[author]
+ name = "Varun A P"
+ homepage = "https://apvarun.com"