Rebuild Theme without Javascript

This commit is contained in:
TheJoKlLa 2020-09-24 17:05:45 +02:00
parent b5ad5af6fe
commit f7bd1c7946
19 changed files with 356 additions and 619 deletions

155
README.md
View File

@ -1,155 +1,6 @@
# fabinfra by min_night # FabInfra - Theme
Responsive Theme without Javascript
## Main Colors ## Main Colors
1. #00d4aa 1. #00d4aa
2. #3c474d 2. #3c474d
Blogs are for reading and sharing. This theme tries to make both of those better.
`min_night` is built on top of [Minimal](https://github.com/calintat/minimal), and keeps a lot of the cool original features:
- Bootstrap
- GoogleAnalytics
- GoogleFonts
- FontAwesome
- HighlightJS
It also gets a bunch of new add-ons:
- A night-mode toggle, with HTML5 storage to remember view preferences
- OpenGraph and TwitterCard meta tags for upgrading your social sharing
- Favicon support via the [RealFaviconGenerator](https://realfavicongenerator.net/)
- A site logo for index.html (headshot, hexsticker...its up to you)
- A tags/categories list page template from [Xmin](https://github.com/yihui/hugo-xmin)
- Updated tag labels to hyperlinks (categories too)
- Tweaked list templates for posts and projects
A live demo is available [here](https://natedayta.com).
## Installation
Installing Hugo themes as submodules is best.
This is how you can get starting with `min_night` using the [QuickStart tutorial](https://gohugo.io/getting-started/quick-start/). Run each line individually.
```bash
hugo new site quick
cd quick
git init
git submodule add https://github.com/nathancday/min_night.git themes/min_night
cp -r themes/min_night/exampleSite/ .
hugo server -D
```
Now your brand new site is being served locally at `localhost:1313`.
Submodules are better because it makes updating the theme easier for future you.
```
$ git submodule update --remote themes/min_night
```
Personally I use this theme via the `R` package `blogdown`, and you can too, like this:
```
library(blogdown)
new_site(theme = "nathancday/min_night")
```
## Configuration
To configure most of the customizations in this theme all you need to do is edit the parameters in `quick/config.toml`.
### Colors
```toml
[params]
accent = "#006264"
backgroundColor = "#f5f5f5"
```
- `accent` changes the color of the navbar and footer in day-mode and the color of the body background of your site in night-mode. Dark colors work best.
- `backgroundColor` changes the background color of the body. The default is light grey for easy eye reading.
Always use hex codes.
### Fonts
```toml
[params]
font = "Mina"
```
This theme uses [Google Fonts](https://fonts.google.com), so go nuts.
### Syntax highlighting
```toml
[params]
highlight = true
highlightStyle = "solarized-dark"
highlightLanguages = ["r", "python", "bash"]
```
The theme supports syntax highlighting thanks to [highlight.js](https://highlightjs.org), which is turned on by default. Checkout out the available palette options [here](https://highlightjs.org/static/demo/). Note `highlightStyle` param should be hyphen-separated lowercase.
Make sure your main languages render well and keep control on the languages that get special highlighted.
For best aesthetics with dark-mode, I reccommend choosing a light background style that matches your `accent` color.
### Favicons
This theme comes equipped with stock favicons modeled as hex stickers.
To update those, pick out an image and head over to [RealFaviconGenerator](https://realfavicongenerator.net/). Go through their build process and append the path `/img/favicon/` at the last step when you download. Just unzip and drop all of the new files in `quick/static/img/favicon/`. Now you have favicons for everything from tablets to tiles, that's tight.
### Site Logo
The site logo defaults to using the 192x192 Android favicon but you can change the path for `logo` param in `config.toml`. This could be a headshot, another hex-sticker or something completely different, but if you want to change the image dimensions drastically, you may have to tweak `layouts/index.html` directly to get a good result.
### Social Sharing
You must change `baseURL` to your current domain for this feature to work properly.
```toml
baseURL = "your_domain.com"
```
The current set up has two TwitterCard/OpenGraph options depending on the params you specify in your post's front matter. If you add the param `twitter_img` to a post, with the valid image path, then a summary card with large image will be shown. If you don't provide `twitter_img` then a summary card with the site logo will be shown instead. For best scaling large image summary wants a 2:1 ratio image and regular summary wants 1:1. The post `exampleSite/creating-a-new-theme.md` has been tweaked to include these new params, so you can template and test off of that.
The summary description will use the one provided in a post's front matter if it exists or use the generic site description from `config.toml`. You should also adjust the `twitterAuthor` and `twitterSite` params in `config.toml` to point to your account. You can check how your cards are rendering once your website is being publish with the [TwitterCard Validator](https://cards-dev.twitter.com/validator).
### Font Awesome
Font Awesome v5 icons are supported. The syntax for using these icons has changed with the version update. You must now include the full name of the icon e.g. `far fa-twitter` which adds a tag that specifies the weight of the icon used. Note that only free icons are supported by default. If you are a Font Awesome Pro user, you can add your website as a new project which will generate the code necessary to reference the pro CDN. Use the HTML code that is generated to replace that in the file at layouts/partials/css.html. Learn more in the [Font Awesome docs](https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use).
### [Coral](https://github.com/coralproject/talk) (formarly Talk)
[Coral](https://github.com/coralproject/talk) is set of tools back by Mozilla, to make website commenting better. It is aimed at the news industry and has a lot of features for moderating a community, including abilities to mute annoying voices, set up specific notifications and access detailed commentor histories.
While Coral can be viewed as alternative to Hugo's built-in support of Disqus, but it is definately geared towrds larger sites and requires extra tech infrastructure. Inorder to run Coral you will need to install additional software on your server, but this theme includes partial layouts for easily adding the required JS + HTML into your pages.
To enable the parts for Talk v4 and Coral (Talk v5) edit your `config.toml` file like this:
```toml
talkHost = "talk.example.com" # TalkV4
coralHost = "coral.example.com"
```
Make sure you comment out (or delete) the `disqusShortName` field in `config.toml` to prevent multiple comment plugins being included. And make sure your host has SSL encryption (eg https://example.com) enabled becasue Talk/Coral requires it.
Talk/Coral templates are graciously contributed by @mzch
## Going forward
This theme is something I enjoy and hope you do to.
If you get unexpected behavior post an issue and try to keep it as minimal as possible. Ideally bug reports would be reproducible using the [QuickStart tutorial](https://gohugo.io/getting-started/quick-start/) plus whatever changes cause the problem.
Pull requests are literally the best thing since ever, so if you have the idea (and the time) to add something to `min_night` do it! I promise I will respond quickly.
Happy blogging!

View File

@ -1,5 +1,5 @@
{{ partial "head_meta" . }}
{{ partial "header" . }} {{ partial "header" . }}
<main> <main>
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
{{ range (.Paginator 10).Pages }} {{ range (.Paginator 10).Pages }}
@ -13,20 +13,8 @@
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">
<h4>{{ .Title }}</h4> <h4>{{ .Title }}</h4>
</a> </a>
<h5>{{ .Description }}</h5>
{{ range.Params.categories }}
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
<kbd class="item-cat"> {{ . }} </kbd>
</a>
{{ end }}
{{ range .Params.tags }}
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
<kbd class="item-tag"> {{ . }} </kbd>
</a>
{{ end }}
</div> </div>
</div> </div>
{{ end }} {{ end }}
</main> </main>
{{ partial "footer" . }}

View File

@ -1,5 +1,5 @@
{{ partial "head_meta" . }}
{{ partial "header" . }} {{ partial "header" . }}
<main> <main>
<div class="item-header"> <div class="item-header">
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
@ -9,5 +9,4 @@
<div class="text-justify">{{ .Content }}</div> <div class="text-justify">{{ .Content }}</div>
</div> </div>
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}

View File

@ -1,18 +1,8 @@
{{ partial "head_meta" . }}
{{ partial "header" . }} {{ partial "header" . }}
<main>
<main class = "content-box"> <!-- Start Content -->
<div class="intro"> <div class="text-justify">{{ .Content }}</div>
<div class="avatar"> <!-- End Content -->
<img class="img-responsive" src="/img/favicon/logo_512x512.png" alt="Logo no found" style = "margin: 0 auto;"> </main>
<h1>{{ .Site.Title }}</h1>
</div>
<div style = "margin-top: 50px">
<h2>{{ .Site.Params.Description }}</h2>
</div>
<br>
<br>
<div class="text-justify">{{ .Content }}</div>
</div>
</main>
{{ partial "footer" . }} {{ partial "footer" . }}

View File

@ -1,30 +0,0 @@
<style>
html body {
font-family: '{{ .Site.Params.font }}', sans-serif;
background-color: {{ .Site.Params.backgroundColor | default "white" }};
}
:root {
--accent: {{ .Site.Params.accent | default "#2196F3" }};
--border-width: {{ if .Site.Params.showBorder | default false }} 5px {{ else }} 0 {{ end }};
}
</style>
<!-- google fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ .Site.Params.font }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=VT323">
<!-- bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- font awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.0/css/all.css" integrity="sha384-Mmxa0mLqhmOeaE8vgOSbKacftZcsNYDjQzuCOm6D02luYSzBG8vpaOykv9lFQ51Y" crossorigin="anonymous">
<!-- main -->
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
<!-- custom -->
{{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }}

View File

@ -1,8 +1,23 @@
<footer id = "bigfooter"> <footer class="footer">
<div style = "padding:15px;"> {{ if .Params.sponsor }}
<p>{{ "Powered by [Hugo](https://gohugo.io). Themed by [fabinfra](https://gitlab.com/fabinfra/fabinfra-theme)." | markdownify }} <div class="sponsor_placeholder"></div>
</p> {{ end }}
<div class="text">
<p>Powered by <a href="https://gohugo.io">Hugo</a>. Themed by <a href="https://gitlab.com/fabinfra/fabinfra-theme">FabInfra</a>.</p>
{{ if .Site.Home.AllTranslations}}
<ul class="lang">
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
{{ end }}
</div> </div>
{{ if .Params.sponsor }}
<img class="sponsor" src="{{ .Params.sponsor }}"/>
{{ end }}
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -0,0 +1,10 @@
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="/css/color.css">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/content.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mina">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
</head>
<body>

View File

@ -1,51 +1,12 @@
<!DOCTYPE html> <header class="header">
<html lang="{{ .Site.LanguageCode }}"> <a href="{{ "/" | relLangURL }}" class="logo">{{ .Site.Title }}</a>
<head> <input class="menu-btn" type="checkbox" id="menu-btn" />
<meta charset="utf-8"> <label class="menu-icon" for="menu-btn"><span class="nav-icon"></span></label>
<meta name="viewport" content="width=device-width, initial-scale=1"> {{ if .Site.Menus.main }}
<title>{{ .Title }}</title> <ul class="menu">
<link rel="canonical" href="{{ .Permalink }}"> {{ range sort .Site.Menus.main }}
{{ partial "css" . }} {{ partial "js" . }} {{ hugo.Generator }} <li><a href="{{ .URL }}">{{ .Name }}</a></li>
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
<!-- Favicons - https://realfavicongenerator.net/ -->
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
<link rel="manifest" href="/img/favicon/site.webmanifest">
<link rel="mask-icon" href="/img/favicon/safari-pinned-tab.svg" color="#00d4aa">
<meta name="msapplication-TileColor" content="#3c474d">
<meta name="theme-color" content="#3c474d">
</head>
<body id = "bigbody">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand visible-xs" href="#">{{ .Title }}</a>
<button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse">
{{ if .Site.Menus.main }}
<ul class="nav navbar-nav">
{{ range sort .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }} {{ end }}
{{ if .Site.Menus.icon }} </ul>
<ul class="nav navbar-nav navbar-right">
{{ range sort .Site.Menus.icon }}
<li class="navbar-icon"><a href="{{ .URL }}"><i class="{{ .Name }}"></i></a></li>
{{ end }}
{{ partial "toggle"}}
</ul>
{{ end }} {{ end }}
</div> </header>
</div>
</nav>

View File

@ -1,42 +0,0 @@
<!-- custom -->
{{ range .Site.Params.js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
<!-- jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- bootstrap -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- boostrap toggle tool -->
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<!-- dismiss expanded navigation bar with click -->
<script>$(document).on('click', function() { $('.collapse').collapse('hide'); })</script>
<!-- nightmode-toggle -->
<script>
$(document).ready(function(){
var input = $('#night-mode-toggle');
var container = $('#bigbody');
var stat = $('#button-status');
container.toggleClass(localStorage.toggled);
stat.bootstrapToggle(localStorage.button).change();
input.on('click', function() {
if (localStorage.toggled != "-nightmode" ) {
container.toggleClass("-nightmode", true );
localStorage.toggled = "-nightmode";
localStorage.button = "on";
} else {
container.toggleClass("-nightmode", false );
localStorage.toggled = "";
localStorage.button = "off"
}
})
});
</script>

View File

@ -1,17 +0,0 @@
{{ if or .Paginator.HasPrev .Paginator.HasNext }}
<div class="pages">
{{ if .Paginator.HasPrev }}
<a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
<i class="fas fa-arrow-left"></i>
</a>
{{ end }} {{ if .Paginator.HasNext }}
<a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
<i class="fas fa-arrow-right"></i>
</a>
{{ end }}
</div>
{{ end }}

View File

@ -1,22 +0,0 @@
{{ partial "header-post" .}}
<div class="item">
<br> <div class="text-justify">{{ .Content }}</div>
<!-- related posts with the same tags -->
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ if $related }}
<h4 class="page-header">Related</h4>
{{ range $related }} {{ partial "list-item" . }} {{ end }}
{{ end }}
{{ if and .Site.DisqusShortname (not .Params.disableComments) }}
<h4 class="page-header">Comments</h4>
{{ template "_internal/disqus.html" . }}
{{ end }}
</div>

View File

@ -1,10 +0,0 @@
<li id="night-mode-toggle">
<input type="checkbox" id = "button-status"
data-toggle="toggle"
data-width = "10"
data-height = "1"
data-on="<i class='far fa-moon fa-lg'></i>"
data-off= "<i class='far fa-sun fa-lg'></i>"
data-style="ios"
data-onstyle = "default">
</li>

View File

@ -1,32 +1,20 @@
{{ partial "head_meta" . }}
{{ partial "header" . }} {{ partial "header" . }}
<main> <main>
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
{{ range .Pages }} {{ range .Pages }}
<div class="list-item"> <div class="list-project">
<div class="list-logo"> <div class="item">
<a href="{{ .Permalink }}"> <a class="logo" href="{{ .Permalink }}">
<img src="{{ .Params.logo }}"> <img src="{{ .Params.logo }}">
</a> </a>
</div> <div class="content">
<div class="list-content"> <a href="{{ .Permalink }}">
<a href="{{ .Permalink }}"> <h4>{{ .Title }}</h4>
<h4>{{ .Title }}</h4> </a>
</a> <h5>{{ .Description }}</h5>
<h5>{{ .Description }}</h5> </div>
{{ range.Params.categories }} </div>
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}"> {{end}}
<kbd class="item-cat"> {{ . }} </kbd>
</a>
{{ end }}
{{ range .Params.tags }}
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
<kbd class="item-tag"> {{ . }} </kbd>
</a>
{{ end }}
</div>
</div>
{{end}}
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}

View File

@ -1,40 +1,27 @@
{{ partial "head_meta" . }}
{{ partial "header" . }} {{ partial "header" . }}
<main> <main>
<div class="item-header"> <div class="header-project">
{{ $.Scratch.Set "link" .RelPermalink }} {{ $.Scratch.Set "link" .RelPermalink }}
{{ with .Params.repo }} {{ with .Params.repo }}
{{ $repoHost := default "gitlab" $.Params.repoHost }} {{ $repoHost := default "gitlab" $.Params.repoHost }}
{{ if eq "github" $repoHost }} {{ if eq "github" $repoHost }}
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }} {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
{{ else if eq "gitlab" $repoHost }} {{ else if eq "gitlab" $repoHost }}
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }} {{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }} {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
<a href="{{ .Scratch.Get "link" }}"> <a class="content" href="{{ .Scratch.Get "link" }}">
<img class="logo" src="../{{ .Params.logo }}"> <div class="text">
<h1>{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
</a> <h4 class="subtitle">{{ $.Scratch.Get "subtitle" }}</h4>
<h4>{{ $.Scratch.Get "subtitle" }}</h4> </div>
<img class="logo" src="{{ .Params.logo }}">
{{ range.Params.categories }} </a>
</div>
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}"> <br>
<kbd class="item-cat"> {{ . }} </kbd> <div class="text-justify">{{ .Content }}</div>
</a>
{{ end }}
{{ range .Params.tags }}
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
<kbd class="item-tag"> {{ . }} </kbd>
</a>
{{ end }}
</div>
<div class="item">
<br> <div class="text-justify">{{ .Content }}</div>
</div>
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}

10
static/css/color.css Normal file
View File

@ -0,0 +1,10 @@
:root {
--color-header-background: #3c474d;
--color-header-text: #cccccc;
--color-header-text-hover: #ffffff;
--color-header-text-accent: #00d4aa;
--color-main-background: #f5f5f5;
--color-main-text: #3c474d;
--color-main-link: #f5f5f5;
}

59
static/css/content.css Normal file
View File

@ -0,0 +1,59 @@
/*main*/
main a {
color: var(--color-main-text);
text-decoration: none;
}
main a:hover {
text-decoration: underline;
}
/*list item for projects*/
main .list-project .item {
display: flex;
padding-top: 5px;
margin-top: 10px;
max-height: 100px;
}
main .list-project .logo {
width: 150px;
}
main .list-project .logo img {
height: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
main .list-project .content {
text-align: left;
margin-left: 10px;
flex: 1;
}
/* project sites */
main .header-project .content{
display: flex;
padding-top: 5px;
margin-top: 10px;
max-height: 200px;
}
main .header-project .content .logo {
width: 200px;
margin-left: auto;
margin-right: 20px;
}
main .header-project .content .logo img {
width: : 100%;
}
@media (max-width: 35em) {
main .header-project .content .logo {
display: none;
}
}

View File

@ -1,215 +1,219 @@
html, body {
height: 100%;
}
body { body {
font-size:1.5em; margin: 0;
padding-top: 55px; background-color: var(--color-main-background);
display: flex; position: relative;
text-align: center; min-height: 100vh;
flex-direction: column;
} }
/* header */
.header {
background-color: var(--color-header-background);
font-family: Mina, sans-serif;
box-shadow: 1px 1px 4px 0 rgba(0,0,0,.1);
position: fixed;
width: 100%;
z-index: 3;
}
.header a {
color: var(--color-header-text);
}
.header ul {
margin: 0;
padding: 0px 20px 0px 0px;
list-style: none;
overflow: hidden;
}
.header li a {
display: block;
padding: 20px 20px;
text-decoration: none;
}
.header li a:hover,
.header .menu-btn:hover {
color: var(--color-header-text-hover);
}
.header .logo {
display: block;
float: left;
font-size: 2em;
padding: 10px 20px 10px 30px;
text-decoration: none;
color: var(--color-header-text-accent)
}
/* menu */
.header .menu {
clear: both;
max-height: 0;
transition: max-height .2s ease-out;
}
/* menu icon */
.header .menu-icon {
cursor: pointer;
float: right;
padding: 28px 30px 28px 20px;
position: relative;
user-select: none;
}
.header .menu-icon .nav-icon {
background: var(--color-header-text);
display: block;
height: 2px;
position: relative;
transition: background .2s ease-out;
width: 18px;
}
.header .menu-icon .nav-icon:before,
.header .menu-icon .nav-icon:after {
background: var(--color-header-text);
content: '';
display: block;
height: 100%;
position: absolute;
transition: all .2s ease-out;
width: 100%;
}
.header .menu-icon .nav-icon:before {
top: 5px;
}
.header .menu-icon .nav-icon:after {
top: -5px;
}
/* menu btn */
.header .menu-btn {
display: none;
}
.header .menu-btn:checked ~ .menu {
max-height: 240px;
}
.header .menu-btn:checked ~ .menu-icon .nav-icon {
background: transparent;
}
.header .menu-btn:checked ~ .menu-icon .nav-icon:before {
transform: rotate(-45deg);
top:0;
}
.header .menu-btn:checked ~ .menu-icon .nav-icon:after {
transform: rotate(45deg);
top:0;
}
/* main */
main { main {
margin: auto; padding: 75px 30px 100px 30px;
padding: 25px; font-family: Roboto, sans-serif;
flex: auto;
max-width: 750px;
} }
/*footer*/ /* 48em = 768px @ 16pt font */
.copyright {
margin: 15px 0; @media (min-width: 48em) {
.header li {
float: left;
}
.header li a {
padding: 20px 30px;
}
.header .menu {
clear: none;
float: right;
max-height: none;
}
.header .menu-icon {
display: none;
}
main {
padding: 75px 150px 100px 150px;
}
} }
/*home page*/ /* footer */
.intro { .footer {
/* transform: translateY(80%); */ background-color: var(--color-header-background);
color: var(--color-header-text);
font-family: Mina, sans-serif;
box-shadow: 1px 1px 4px 0 rgba(0,0,0,.1);
text-align: center;
position: absolute;
bottom: 0;
width: 100%;
padding: 20px 0px;
display: flex;
} }
.intro > h1 { .footer .text{
font-size: 4em; margin-right: auto;
font-weight: bold; margin-left: auto;
} }
.intro > h2 { .footer .sponsor{
font-size: 2em; height: 76px;
width: 115px;
margin: -15px 30px -15px auto;
} }
.intro > .profile { .footer .sponsor_placeholder{
width: 10vh; height: 76px;
height: 10vh; width: 115px;
border-radius: 50%; margin: -15px auto -15px 30px;
} }
/*apply accent colour to links*/ .footer p {
a:link, a:visited { margin: 0;
color: #555555;
} }
#bigbody main a { .footer a {
color: var(--accent) !important; color: var(--color-header-text);
text-decoration: none;
margin: 0;
} }
#bigfooter a:link, a:visited { .footer a:hover {
color: #cccccc; color: var(--color-header-text-hover);
} }
#bigfooter a:hover { .footer .lang {
text-decoration: underline; color: var(--color-header-text);
color: #FFF; list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
display: inline-block;
} }
.footer .lang li {
/*paginator at bottom of list view*/ float: left;
.pages {
padding: 15px 0;
} }
.pages-icon { .footer .lang li a {
padding: 0 15px; display: block;
color: white;
text-align: center;
padding: 10px 5px 0px 5px;
text-decoration: none;
color: var(--color-header-text);
} }
/*list item for posts and projects*/ .footer .lang li a:hover {
.list-item { color: var(--color-header-text-hover);
display: flex;
padding-top: 5px;
margin-top: 10px;
}
.item-cat {
background-color: #757575;
margin:1px;
}
.item-tag {
background-color: var(--accent);
margin:1px;
}
.terms {
margin: 1px;
padding: 1px;
list-style-type: none;
}
.list-logo {
flex: 0 0 20%;
}
.list-content {
text-align: left;
margin-left: 10px;
flex: 1;
}
/* project sites */
.item-header .logo {
width: 150px;
}
/*navigation bar icons*/
.navbar-icon {
font-size: 120%;
display: inline-block !important;
}
/*coloured borders at top and bottom of the page*/
.navbar.navbar-default {
border-top: var(--border-width) solid var(--accent);
background-color: var(--accent);
font-size: 120%;
color: #FFF !important;
}
.navbar-default .navbar-nav li a {
color: #cccccc;
}
.navbar-default .navbar-nav li a:hover {
color: #FFF;
}
.navbar-default .navbar-nav.-nightmode li a:hover {
color: #cccccc;
}
.navbar-default .navbar-brand {
color: #cccccc !important;
}
/* custome footer */
footer {
background-color: var(--accent);
border-top: #e7e7e7 solid;
border-top-width: 1px;
color: #fff;
/* border-bottom: var(--border-width) solid #f8f8f8; */
}
footer a {
color: #cccccc;
}
footer p {
color: #cccccc;
}
img {
max-width: 100%;
}
.flaticon {
font-size: 0.5em
}
/** Intvert colors
* Wonderful CSS filter trick by Leo Nikkilä
* @link https://lnikki.la/articles/night-mode-css-filter/
*/
#bigbody.-nightmode {
background: var(--accent)!important;
color: #333333 !important;
-webkit-filter: invert(1) hue-rotate(180deg);
filter: invert(1) hue-rotate(180deg)
}
/* "re-flip"" certain elements to keep colors */
#bigbody.-nightmode img, video {
-webkit-filter: invert(1) hue-rotate(-180deg);
filter: invert(1) hue-rotate(-180deg)
}
#bigbody.-nightmode iframe {
-webkit-filter: invert(1) hue-rotate(-180deg);
filter: invert(1) hue-rotate(-180deg)
}
/* custom behavior for specfic element */
#bigbody.-nightmode main a {
color: var(--accent) !important;
}
#bigbody.-nightmode .item-tag {
background-color: var(--accent) !important;
color: #f8f8f8 !important;
}
/* slider attributes match navbar elements */
#night-mode-toggle {
font-size: 100%;
padding-top:10px;
}
/* built on-top of Custom Style .ios
from: http://www.bootstraptoggle.com/ */
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20px}
.toggle.ios .toggle-handle { border-radius: 20px;}
.toggle.ios .toggle-group {transition: none;-webkit-transition: none;}
.toggle-on {
background-color: #e1e1e1;
color: #373a3d;
}
.toggle-on:hover {
background-color: var(--accent);
color: #e1e1e1;
}
.toggle-off:hover {
background-color: var(--accent) !important;
color: #f8f8f8 !important;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -3,13 +3,9 @@ license = "MIT"
licenselink = "" licenselink = ""
description = "Theme for the FabInfra Project" description = "Theme for the FabInfra Project"
homepage = "https://gitlab.com/fabinfra/fabinfra-theme" homepage = "https://gitlab.com/fabinfra/fabinfra-theme"
tags = [] tags = [responsive, nojs]
features = [] features = []
min_version = "0.35" min_version = "0.35"
[author] [author]
name = "TheJoKlLa" name = "TheJoKlLa"
[original]
name = "Nate Day"
homepage = "https://natedayta.com"