mirror of
https://gitlab.com/fabinfra/fabinfra-theme.git
synced 2025-03-12 14:41:51 +01:00
Rebuild Theme without Javascript
This commit is contained in:
parent
b5ad5af6fe
commit
f7bd1c7946
155
README.md
155
README.md
@ -1,155 +1,6 @@
|
||||
# fabinfra by min_night
|
||||
# FabInfra - Theme
|
||||
Responsive Theme without Javascript
|
||||
|
||||
## Main Colors
|
||||
1. #00d4aa
|
||||
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!
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{ partial "head_meta" . }}
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ range (.Paginator 10).Pages }}
|
||||
@ -13,20 +13,8 @@
|
||||
<a href="{{ .Permalink }}">
|
||||
<h4>{{ .Title }}</h4>
|
||||
</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>
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
|
||||
{{ partial "footer" . }}
|
@ -1,5 +1,5 @@
|
||||
{{ partial "head_meta" . }}
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<div class="item-header">
|
||||
<h2>{{ .Title }}</h2>
|
||||
@ -9,5 +9,4 @@
|
||||
<div class="text-justify">{{ .Content }}</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
@ -1,18 +1,8 @@
|
||||
{{ partial "head_meta" . }}
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main class = "content-box">
|
||||
<div class="intro">
|
||||
<div class="avatar">
|
||||
<img class="img-responsive" src="/img/favicon/logo_512x512.png" alt="Logo no found" style = "margin: 0 auto;">
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
</div>
|
||||
<div style = "margin-top: 50px">
|
||||
<h2>{{ .Site.Params.Description }}</h2>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<main>
|
||||
<!-- Start Content -->
|
||||
<div class="text-justify">{{ .Content }}</div>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
@ -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 }}
|
||||
|
@ -1,8 +1,23 @@
|
||||
<footer id = "bigfooter">
|
||||
<div style = "padding:15px;">
|
||||
<p>{{ "Powered by [Hugo](https://gohugo.io). Themed by [fabinfra](https://gitlab.com/fabinfra/fabinfra-theme)." | markdownify }}
|
||||
</p>
|
||||
<footer class="footer">
|
||||
{{ if .Params.sponsor }}
|
||||
<div class="sponsor_placeholder"></div>
|
||||
{{ 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>
|
||||
|
||||
{{ if .Params.sponsor }}
|
||||
<img class="sponsor" src="{{ .Params.sponsor }}"/>
|
||||
{{ end }}
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
10
layouts/partials/head_meta.html
Normal file
10
layouts/partials/head_meta.html
Normal 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>
|
@ -1,51 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ partial "css" . }} {{ partial "js" . }} {{ hugo.Generator }}
|
||||
<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">
|
||||
<header class="header">
|
||||
<a href="{{ "/" | relLangURL }}" class="logo">{{ .Site.Title }}</a>
|
||||
<input class="menu-btn" type="checkbox" id="menu-btn" />
|
||||
<label class="menu-icon" for="menu-btn"><span class="nav-icon"></span></label>
|
||||
{{ if .Site.Menus.main }}
|
||||
<ul class="nav navbar-nav">
|
||||
<ul class="menu">
|
||||
{{ range sort .Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Site.Menus.icon }}
|
||||
<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 }}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
@ -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>
|
@ -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 }}
|
@ -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>
|
@ -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>
|
@ -1,32 +1,20 @@
|
||||
{{ partial "head_meta" . }}
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ range .Pages }}
|
||||
<div class="list-item">
|
||||
<div class="list-logo">
|
||||
<a href="{{ .Permalink }}">
|
||||
<div class="list-project">
|
||||
<div class="item">
|
||||
<a class="logo" href="{{ .Permalink }}">
|
||||
<img src="{{ .Params.logo }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="content">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h4>{{ .Title }}</h4>
|
||||
</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>
|
||||
{{end}}
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
@ -1,7 +1,7 @@
|
||||
{{ partial "head_meta" . }}
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<div class="item-header">
|
||||
<div class="header-project">
|
||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||
{{ with .Params.repo }}
|
||||
{{ $repoHost := default "gitlab" $.Params.repoHost }}
|
||||
@ -13,28 +13,15 @@
|
||||
{{ end }}
|
||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||
|
||||
<a href="{{ .Scratch.Get "link" }}">
|
||||
<img class="logo" src="../{{ .Params.logo }}">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</a>
|
||||
<h4>{{ $.Scratch.Get "subtitle" }}</h4>
|
||||
|
||||
{{ 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 }}
|
||||
<a class="content" href="{{ .Scratch.Get "link" }}">
|
||||
<div class="text">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<h4 class="subtitle">{{ $.Scratch.Get "subtitle" }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<br> <div class="text-justify">{{ .Content }}</div>
|
||||
<img class="logo" src="{{ .Params.logo }}">
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-justify">{{ .Content }}</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
10
static/css/color.css
Normal file
10
static/css/color.css
Normal 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
59
static/css/content.css
Normal 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;
|
||||
}
|
||||
}
|
@ -1,215 +1,219 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size:1.5em;
|
||||
padding-top: 55px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
background-color: var(--color-main-background);
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
margin: auto;
|
||||
padding: 25px;
|
||||
flex: auto;
|
||||
max-width: 750px;
|
||||
padding: 75px 30px 100px 30px;
|
||||
font-family: Roboto, sans-serif;
|
||||
}
|
||||
|
||||
/* 48em = 768px @ 16pt font */
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
/* footer */
|
||||
.copyright {
|
||||
margin: 15px 0;
|
||||
}
|
||||
.footer {
|
||||
background-color: var(--color-header-background);
|
||||
color: var(--color-header-text);
|
||||
font-family: Mina, sans-serif;
|
||||
|
||||
/*home page*/
|
||||
.intro {
|
||||
/* transform: translateY(80%); */
|
||||
}
|
||||
box-shadow: 1px 1px 4px 0 rgba(0,0,0,.1);
|
||||
text-align: center;
|
||||
|
||||
.intro > h1 {
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.intro > h2 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.intro > .profile {
|
||||
width: 10vh;
|
||||
height: 10vh;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/*apply accent colour to links*/
|
||||
a:link, a:visited {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
#bigbody main a {
|
||||
color: var(--accent) !important;
|
||||
}
|
||||
|
||||
#bigfooter a:link, a:visited {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
#bigfooter a:hover {
|
||||
text-decoration: underline;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
/*paginator at bottom of list view*/
|
||||
.pages {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.pages-icon {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/*list item for posts and projects*/
|
||||
.list-item {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px 0px;
|
||||
display: flex;
|
||||
padding-top: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.item-cat {
|
||||
background-color: #757575;
|
||||
margin:1px;
|
||||
.footer .text{
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.item-tag {
|
||||
background-color: var(--accent);
|
||||
margin:1px;
|
||||
.footer .sponsor{
|
||||
height: 76px;
|
||||
width: 115px;
|
||||
margin: -15px 30px -15px auto;
|
||||
}
|
||||
|
||||
.terms {
|
||||
margin: 1px;
|
||||
padding: 1px;
|
||||
.footer .sponsor_placeholder{
|
||||
height: 76px;
|
||||
width: 115px;
|
||||
margin: -15px auto -15px 30px;
|
||||
}
|
||||
|
||||
.footer p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: var(--color-header-text);
|
||||
text-decoration: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
color: var(--color-header-text-hover);
|
||||
}
|
||||
|
||||
.footer .lang {
|
||||
color: var(--color-header-text);
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list-logo {
|
||||
flex: 0 0 20%;
|
||||
.footer .lang li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list-content {
|
||||
text-align: left;
|
||||
margin-left: 10px;
|
||||
flex: 1;
|
||||
.footer .lang li a {
|
||||
display: block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 10px 5px 0px 5px;
|
||||
text-decoration: none;
|
||||
color: var(--color-header-text);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
.footer .lang li a:hover {
|
||||
color: var(--color-header-text-hover);
|
||||
}
|
BIN
static/img/sponsors/BMBF.jpg
Normal file
BIN
static/img/sponsors/BMBF.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
@ -3,13 +3,9 @@ license = "MIT"
|
||||
licenselink = ""
|
||||
description = "Theme for the FabInfra Project"
|
||||
homepage = "https://gitlab.com/fabinfra/fabinfra-theme"
|
||||
tags = []
|
||||
tags = [responsive, nojs]
|
||||
features = []
|
||||
min_version = "0.35"
|
||||
|
||||
[author]
|
||||
name = "TheJoKlLa"
|
||||
|
||||
[original]
|
||||
name = "Nate Day"
|
||||
homepage = "https://natedayta.com"
|
||||
|
Loading…
x
Reference in New Issue
Block a user