Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
geschke committed Nov 6, 2018
0 parents commit e2aaa34
Show file tree
Hide file tree
Showing 86 changed files with 21,719 additions and 0 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2018 Ralf Geschke

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.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Hugo Tikva Theme

Tikva is a minimalistic Hugo theme, based on [Bootstrap v4](https://getbootstrap.com/) CSS framework.
It is a port of the Tikva theme which I developed a while ago for the Grav CMS.

Tikva integrates multiple Bootstrap styles from the Bootswatch project and adds some customized styles.
It's also possible to edit some color options by config option.

## Demo

You can find a demo [here](https://themes.gohugo.io/theme/hugo-tikva/).

## Screenshots

### todo...

![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot.png)
![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot2.png)

## Configuration

Check `exampleSite/config.toml` for a commented example.

## Menu

The navbar displays the `main` menus by default. You can find more details about how to configure it [here](https://gohugo.io/templates/menu-templates/), as well as in the `exampleSite`.

## License

Open sourced under the [MIT license](./LICENSE.md).
2 changes: 2 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
+++
+++
Empty file added layouts/404.html
Empty file.
19 changes: 19 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}

<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>

{{ block "footer" . }}
{{ partial "footer_container.html" . }}
{{ partial "subfooter_container.html" . }}
{{ end }}
</body>

{{- partial "bottom.html" . -}}

</html>
9 changes: 9 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

{{ define "title" }}
<!-- This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example-->
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
9 changes: 9 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

{{ define "title" }}
<!-- This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example-->
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
22 changes: 22 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{ define "main" }}
<main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}

{{.Site.Params.BootstrapTheme}}
</div>
<div>
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
{{ range first 10 .Pages }}
{{ .Render "summary"}}
{{ end }}
</div>
</main>
{{ end }}
3 changes: 3 additions & 0 deletions layouts/partials/bottom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script src="{{ .Site.BaseURL }}js/jquery-3.3.1.min.js"></script>
<script src="{{ .Site.BaseURL }}js/popper.js"></script>
<script src="{{ .Site.BaseURL }}js/bootstrap.min.js"></script>
Empty file added layouts/partials/footer.html
Empty file.
3 changes: 3 additions & 0 deletions layouts/partials/footer_column.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="col">
Test output
</div>
14 changes: 14 additions & 0 deletions layouts/partials/footer_container.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="footer-container" style="">
<div class="container" style="padding-top: 20px;">
<footer>


<div class="row">
{{ partial "footer_column.html" . }}
{{ partial "footer_column.html" . }}
{{ partial "footer_column.html" . }}

</div>
</footer>
</div>
</div>
18 changes: 18 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<head>
<meta charset="utf-8" />
<title>{{ .Page.Title }}{{ if .Site.Params.AppendSiteTitle }} | {{ .Site.Title }}{{ end }}</title>

<meta name="viewport" content="width=device-width, initial-scale=1">

{{ range $metaName, $metaValue := .Site.Params.Meta }}
<meta name="{{ $metaName }}" content="{{ htmlUnescape $metaValue }}">{{ end }}

{{ if .Site.Params.Theme.BootstrapTheme }}
<link href="{{ .Site.BaseURL }}css/bootswatch/{{ .Site.Params.Theme.BootstrapTheme }}.min.css" rel="stylesheet">
{{ else }}
<link href="{{ .Site.BaseURL }}css/bootstrap.min.css" rel="stylesheet">
{{ end }}
<link href="{{ .Site.BaseURL }}css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/custom.css" rel="stylesheet">

</head>
37 changes: 37 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<nav class="navbar fixed-top navbar-expand-lg {{ .Site.Params.Navbar.ColorScheme }} {{ .Site.Params.Navbar.BgScheme }}">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMain" aria-controls="navbarMain"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarMain">
<ul class="navbar-nav mr-auto">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="nav-item dropdown {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
{{ .Pre }}
{{ .Name }}
</a>
<div class="sub-menu dropdown-menu" aria-labelledby="navbarDropdown">
{{ range .Children }}

<a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</div>
</li>
{{ else }}
<li>
<a class="nav-link" href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
{{ end }}

</ul>
</nav>
18 changes: 18 additions & 0 deletions layouts/partials/subfooter_container.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ .Site.Params.Tikva.Subfooter.Content }}
{{ .Site.Params.Meta.Description }}
{{ .Site.Params.BootstrapTheme }}

{{ if .Site.Params.Tikva.Subfooter.Enabled }}
<div class="subfooter-container" style="">

<div class="container">
<div class="footer">
<div class="row wrapper padding">
<div class="col-xs-12 col-md-12">
{{ .Site.Params.Tikva.Subfooter.Content }}
</div>
</div>
</div>
</div>
</div>
{{ end }}
7 changes: 7 additions & 0 deletions static/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/bootstrap.min.css.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/bolt.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/bstrap.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/btcn.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/calabaza.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/cerulean.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/cosmo.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/cyborg.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/darkly.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/flatly.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/hoff.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/journal.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/kdo2.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/kdo_flatly.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/kunsch.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/litera.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/lumen.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/lux.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/malibu.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/materia.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/minim.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/minty.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/pulse.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/sandstone.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/signa.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/simplex.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/sketchy.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/slate.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/slate_accessibility_ready.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/solar.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/sonic.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/spacelab.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/superhero.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/united.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions static/css/bootswatch/yeti.min.css

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@


/* Menu Settings */
.main-nav ul {
text-align: center;
letter-spacing: -1em;
margin: 0;
padding: 0;
}

.main-nav ul li {
display: inline-block;
letter-spacing: normal;
}

.main-nav ul li a {
position: relative;
display: block;
line-height: 45px;
color: #fff;
padding: 0 20px;
white-space: nowrap;
}

.main-nav > ul > li > a {
border-radius: 2px;
}

/*Active dropdown nav item */
.main-nav ul li:hover > a {
background-color: #175E91;
}

/* Selected Dropdown nav item */
.main-nav ul li.selected > a {
background-color: #fff;
color: #175E91;
}


/* Dropdown CSS */
.main-nav ul li {position: relative;}

.main-nav ul li ul {
position: absolute;
background-color: #1F8DD6;
min-width: 100%;
text-align: left;
z-index: 999;

display: none;
}
.main-nav ul li ul li {
display: block;
}

/* Dropdown CSS */
.main-nav ul li ul ul {
left: 100%;
top: 0;
}

/* Active on Hover */
.main-nav li:hover > ul {
display: block;
}

/* Child Indicator */
.main-nav .has-children > a {
padding-right: 30px;
}
.main-nav .has-children > a:after {
font-family: FontAwesome;
content: '\f107';
position: absolute;
display: inline-block;
right: 8px;
top: 0;
}

.main-nav .has-children .has-children > a:after {
content: '\f105';
}
Loading

0 comments on commit e2aaa34

Please sign in to comment.