Update theme and content
This commit is contained in:
parent
76ed4205b9
commit
d4db9d25ed
126 changed files with 2131 additions and 4 deletions
20
themes/crab/LICENSE.md
Normal file
20
themes/crab/LICENSE.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Thomas Heller
|
||||
|
||||
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.
|
126
themes/crab/README.md
Normal file
126
themes/crab/README.md
Normal file
|
@ -0,0 +1,126 @@
|
|||
# Crab
|
||||
|
||||
Crab is a clean website theme for the [Hugo](https://gohugo.io) static
|
||||
site generator.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- responsive
|
||||
- nested menus
|
||||
- two-column
|
||||
- tag support
|
||||
- blog articles
|
||||
|
||||
## Preview
|
||||
|
||||
If you'd like to get a live demo of the Crab theme locally, you could
|
||||
clone the repository, cd to the `exampleSite` directory and run
|
||||
`HUGO_THEMESDIR=../.. hugo serve -t crab` from there (assuming
|
||||
[Hugo](http://gohugo.io) is already installed).
|
||||
|
||||
## Installation
|
||||
|
||||
Read the [Hugo Quickstart
|
||||
Guide](https://gohugo.io/overview/quickstart/) for an introduction to
|
||||
Hugo itself. Once you created a new Hugo site, you can use the Crab
|
||||
theme.
|
||||
|
||||
In your Hugo site's folder:
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/thomasheller/crab themes/crab
|
||||
```
|
||||
|
||||
Alternatively, if your site is in a git repository, you can use git
|
||||
submodules:
|
||||
|
||||
```sh
|
||||
$ git submodule add https://github.com/thomasheller/crab themes/crab
|
||||
```
|
||||
|
||||
To update the theme to the latest version, simply pull in the changes:
|
||||
|
||||
```sh
|
||||
$ git -C themes/crab pull
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The file `exampleSite/config.toml` provides an example for how the
|
||||
Crab theme can be configured, especially in regard to the menu items.
|
||||
|
||||
Once you put a `config.toml` in your site's root directory, you can
|
||||
get a preview of your Hugo site as usual:
|
||||
|
||||
```sh
|
||||
$ hugo serve -t crab
|
||||
```
|
||||
|
||||
## Menus
|
||||
|
||||
See the `exampleSite/config.toml` file for how the menus can be
|
||||
configured:
|
||||
|
||||
- Use the `weight` attribute to specify the order of menu items.
|
||||
Menu items with smaller numbers appear before those with bigger
|
||||
numbers.
|
||||
- For every menu, specify an `identifier` if you intend the menu to
|
||||
have sub-items. In each sub-item, make sure the `parent` attribute
|
||||
matches the value of the `identifier` used for the parent menu.
|
||||
- Choose a unique `name` for each item in the same menu.
|
||||
|
||||
## Two-column layout
|
||||
|
||||
Look at the `exampleSite/content/home.md` file for a sidebar example.
|
||||
If you put a shortcode like this at the beginning of your content
|
||||
file, the summary will appear in the right column:
|
||||
|
||||
```md
|
||||
{{% summary %}}
|
||||
This appears in the sidebar. *Markdown* is supported!
|
||||
{{% /summary %}}
|
||||
```
|
||||
|
||||
## Tags
|
||||
|
||||
Tags are supported as [taxonomies described in the Hugo
|
||||
manual](https://gohugo.io/taxonomies/usage/). Make sure your config
|
||||
file contains a proper `taxonomies` declaration, like in the
|
||||
`exampleSite/config.toml`. You can then put tags in the front matter
|
||||
as usual:
|
||||
|
||||
```
|
||||
+++
|
||||
title = "A Page With Tags"
|
||||
tags = [ "Hugo", "theme", "Crab" ]
|
||||
...
|
||||
```
|
||||
|
||||
Tags will appear both on regular (fixed, static) pages as well as for
|
||||
blog posts, although they are probably more commonly used with blog
|
||||
posts.
|
||||
|
||||
## Blog
|
||||
|
||||
Blog posts are intended to be created in the special directory
|
||||
`/blog/`. The main difference about blog articles is that the layout
|
||||
includes the timestamp when they were published (fixed pages don't
|
||||
show a timestamp by default) and that they appear in the list of blog
|
||||
articles.
|
||||
|
||||
The `exampleSites/config.toml` shows the kind of `permalinks`
|
||||
declaration required to generate blog posts in the correct place.
|
||||
|
||||
## Logo
|
||||
|
||||
To change the logo of the crab to your own customised image,
|
||||
add `logoimage` to `config.toml`, where `logoimage` is the
|
||||
path inside your site's `static` directory.
|
||||
|
||||
## Contact
|
||||
|
||||
If you think anything could be improved about the Crab theme, feel
|
||||
free to [send a PR](https://github.com/thomasheller/crab) to the Crab
|
||||
repository.
|
2
themes/crab/archetypes/default.md
Normal file
2
themes/crab/archetypes/default.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
+++
|
||||
+++
|
103
themes/crab/exampleSite/config.toml
Normal file
103
themes/crab/exampleSite/config.toml
Normal file
|
@ -0,0 +1,103 @@
|
|||
languageCode = "en-us"
|
||||
title = "Crab"
|
||||
theme = "crab"
|
||||
baseurl = "https://example.com"
|
||||
|
||||
[params]
|
||||
description = "A clean Hugo theme for websites"
|
||||
# logoimage = "images/logo.jpg"
|
||||
# copyright = "foo"
|
||||
|
||||
# mathjax = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
|
||||
## Uncomment if you want mathjax enabled. The above cdn source is taken from https://gohugo.io/content-management/formats/#mathjax-with-hugo
|
||||
|
||||
|
||||
|
||||
[permalinks]
|
||||
blog = "/blog/:year/:month/:title/"
|
||||
|
||||
[taxonomies]
|
||||
tags = "tags"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 1
|
||||
name = "Home"
|
||||
url = "/"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 2
|
||||
name = "Features"
|
||||
url = "/features/"
|
||||
identifier = "features"
|
||||
[[menu.main]]
|
||||
parent = "features"
|
||||
weight = 1
|
||||
name = "Responsive design"
|
||||
url = "/features/responsive-design/"
|
||||
[[menu.main]]
|
||||
parent = "features"
|
||||
weight = 2
|
||||
name = "Nested menus"
|
||||
url = "/features/nested-menus/"
|
||||
identifier = "nested-menus"
|
||||
[[menu.main]]
|
||||
parent = "nested-menus"
|
||||
weight = 1
|
||||
name = "Third level page #1"
|
||||
url = "/features/nested-menus/third-level-1/"
|
||||
[[menu.main]]
|
||||
parent = "nested-menus"
|
||||
weight = 2
|
||||
name = "Third level page #2"
|
||||
url = "/features/nested-menus/third-level-2/"
|
||||
[[menu.main]]
|
||||
parent = "nested-menus"
|
||||
weight = 3
|
||||
name = "Third level page #3"
|
||||
url = "/features/nested-menus/third-level-3/"
|
||||
[[menu.main]]
|
||||
parent = "features"
|
||||
weight = 3
|
||||
name = "Two-column layout"
|
||||
url = "/features/two-column-layout/"
|
||||
[[menu.main]]
|
||||
parent = "features"
|
||||
weight = 4
|
||||
name = "Tags"
|
||||
url = "/features/tags/"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 3
|
||||
name = "Another item"
|
||||
url = "/another/"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 4
|
||||
name = "More items"
|
||||
url = "/more/"
|
||||
identifier = "more"
|
||||
[[menu.main]]
|
||||
parent = "more"
|
||||
weight = 1
|
||||
name = "Some more menu"
|
||||
url = "/more/some-more-menu/"
|
||||
[[menu.main]]
|
||||
parent = "more"
|
||||
weight = 2
|
||||
name = "items to show"
|
||||
url = "/more/items-to-show/"
|
||||
[[menu.main]]
|
||||
parent = "more"
|
||||
weight = 3
|
||||
name = "the nested menus feature"
|
||||
url = "/more/the-nested-menus-feature/"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 5
|
||||
name = "Blog"
|
||||
url = "/blog/"
|
||||
|
||||
[[menu.main]]
|
||||
weight = 6
|
||||
name = "Contact"
|
||||
url = "/contact/"
|
10
themes/crab/exampleSite/content/another.md
Normal file
10
themes/crab/exampleSite/content/another.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Another page"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Just another demo page.
|
||||
|
||||

|
11
themes/crab/exampleSite/content/blog/more-blog.md
Normal file
11
themes/crab/exampleSite/content/blog/more-blog.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
+++
|
||||
date = "2017-02-27T21:30:00+01:00"
|
||||
draft = false
|
||||
title = "More blogging"
|
||||
tags = ["this", "post", "also", "has", "some", "tags"]
|
||||
|
||||
+++
|
||||
|
||||
This is yet another blog post to demonstrate the blog feature. It's
|
||||
from a different month than other posts, to show you how the archive
|
||||
feature works.
|
19
themes/crab/exampleSite/content/blog/welcome-blog.md
Normal file
19
themes/crab/exampleSite/content/blog/welcome-blog.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
+++
|
||||
date = "2017-03-27T21:30:00+01:00"
|
||||
draft = false
|
||||
title = "Welcome to my blog"
|
||||
|
||||
+++
|
||||
|
||||
This page is intended to give you a feeling of what a blog post looks
|
||||
like. Crab supports both fixed (static) pages as well as blog posts.
|
||||
|
||||
In order to make blog pages work correctly, you need proper permalinks
|
||||
settings in your site's `config.toml`.
|
||||
|
||||
Hugo will then treat all files in the `blog` directory (for example)
|
||||
like blog posts.
|
||||
|
||||
Have a look at the `config.toml` provided with this example site, as
|
||||
well as [the page about Permalinks from the Hugo
|
||||
docs](https://gohugo.io/extras/permalinks/).
|
25
themes/crab/exampleSite/content/contact.md
Normal file
25
themes/crab/exampleSite/content/contact.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
+++
|
||||
date = "2017-03-18T10:59:56+01:00"
|
||||
title = "Contact"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
{{% summary %}}
|
||||
This is a an example contact page.
|
||||
{{% /summary %}}
|
||||
|
||||
Contact the website author:
|
||||
|
||||
*Mister Crab
|
||||
42 Ocean Street
|
||||
Oceania, OC 98765*
|
||||
|
||||
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper
|
||||
suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
|
||||
vel eum iriure dolor in hendrerit in vulputate velit esse molestie
|
||||
consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et
|
||||
accumsan et iusto odio dignissim qui blandit praesent luptatum zzril
|
||||
delenit augue duis dolore te feugait nulla facilisi.
|
||||
|
||||
Thanks for your feeback!
|
14
themes/crab/exampleSite/content/features.md
Normal file
14
themes/crab/exampleSite/content/features.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Features"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Some of Crab's features are:
|
||||
|
||||
- [Responsive design](responsive-design/)
|
||||
- [Nested menus](nested-menus/)
|
||||
- [Two-column layout](two-column-layout/)
|
||||
|
||||
Click on the links above to learn more.
|
11
themes/crab/exampleSite/content/features/nested-menus.md
Normal file
11
themes/crab/exampleSite/content/features/nested-menus.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
+++
|
||||
title = "Nested menus"
|
||||
date = "2017-03-18T11:14:35+01:00"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Crab supports nested menus up to three levels deep.
|
||||
|
||||
This is especially helpful for websites that focus on content with
|
||||
a fixed, pre-defined strucure.
|
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Third-level page #1"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
A third level page is rendered like this in the menu structure.
|
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Third-level page #2"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
A third level page is rendered like this in the menu structure.
|
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Third-level page #3"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
A third level page is rendered like this in the menu structure.
|
|
@ -0,0 +1,12 @@
|
|||
+++
|
||||
date = "2017-03-18T11:14:30+01:00"
|
||||
title = "Responsive design"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Crab's design is responsive, it adapts to smaller screens of mobile
|
||||
devices.
|
||||
|
||||
Check out this example site on your smartphone or tablet (or on your
|
||||
desktop computer if you're currently on mobile).
|
14
themes/crab/exampleSite/content/features/tags.md
Normal file
14
themes/crab/exampleSite/content/features/tags.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
+++
|
||||
date = "2017-03-19T13:21:00+01:00"
|
||||
title = "Tags"
|
||||
draft = false
|
||||
tags = ["this", "page", "has", "some", "tags"]
|
||||
|
||||
+++
|
||||
|
||||
Crab also supports tags. This page has some tags, as you can see
|
||||
below, although tags are probably more common with blog posts.
|
||||
|
||||
If you click on a tag, you'll be redirected to a page that shows all
|
||||
pages and posts with that tag. (For some tags, there is only this one
|
||||
page.)
|
|
@ -0,0 +1,61 @@
|
|||
+++
|
||||
date = "2017-03-18T11:14:41+01:00"
|
||||
title = "Two-column layout"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
{{% summary %}}
|
||||
This is what sidebar content looks like.
|
||||
|
||||
Actually, this page has more info on:
|
||||
|
||||
- alpha
|
||||
- beta
|
||||
- gamma
|
||||
{{% /summary %}}
|
||||
|
||||
Crab allows you to put content in a second column on the right-hand
|
||||
side of the page.
|
||||
|
||||
You could use this space to provide the reader with a quick summary of
|
||||
what the current page is all about.
|
||||
|
||||
On mobile devices, the summary is rendered directly above the actual
|
||||
page content.
|
||||
|
||||
## Alpha
|
||||
|
||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
||||
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
|
||||
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
|
||||
ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
|
||||
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
||||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam
|
||||
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
|
||||
takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
|
||||
amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
||||
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
|
||||
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
||||
amet.
|
||||
|
||||
## Beta
|
||||
|
||||
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
|
||||
molestie consequat, vel illum dolore eu feugiat nulla facilisis at
|
||||
vero eros et accumsan et iusto odio dignissim qui blandit praesent
|
||||
luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
|
||||
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
|
||||
volutpat.
|
||||
|
||||
## Gamma
|
||||
|
||||
Nam liber tempor cum soluta nobis eleifend option congue nihil
|
||||
imperdiet doming id quod mazim placerat facer possim assum. Lorem
|
||||
ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
|
||||
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper
|
||||
suscipit lobortis nisl ut aliquip ex ea commodo consequat.
|
38
themes/crab/exampleSite/content/home.md
Normal file
38
themes/crab/exampleSite/content/home.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Home"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
{{% summary %}}
|
||||
Summary:
|
||||
Crab is a clean Hugo theme for websites. Its features include
|
||||
responsiveness, nested menu support, two-column layout, tag and blog
|
||||
article support.
|
||||
{{% /summary %}}
|
||||
|
||||
Welcome to Crab! Crab is a clean Hugo theme for websites.
|
||||
|
||||
Some of its features:
|
||||
|
||||
- Responsive design -- view it on mobile
|
||||
- Nested menus -- try the menu above
|
||||
- Two-column layout
|
||||
- Tags
|
||||
- Blog articles
|
||||
|
||||
A very popular quote:
|
||||
|
||||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
||||
> eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
|
||||
> minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
> aliquip ex ea commodo consequat. Duis aute irure dolor in
|
||||
> reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
||||
> pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
||||
> culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
This is an example site demonstrating the Crab theme for Hugo. If you
|
||||
think anything could be improved about the Crab theme, feel free to
|
||||
[send a PR](https://github.com/thomasheller/crab) to the Crab
|
||||
repository.
|
12
themes/crab/exampleSite/content/more.md
Normal file
12
themes/crab/exampleSite/content/more.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
+++
|
||||
date = "2017-03-19T13:21:00+01:00"
|
||||
title = "More"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Here are a few more demo pages:
|
||||
|
||||
- [Some more menu](some-more-menu/)
|
||||
- [items to show](items-to-show/)
|
||||
- [the nested menus feature](the-nested-menus-feature/)
|
13
themes/crab/exampleSite/content/more/items-to-show.md
Normal file
13
themes/crab/exampleSite/content/more/items-to-show.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "... items to show ..."
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
|
||||
commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus
|
||||
et magnis dis parturient montes, nascetur ridiculus mus. Donec quam
|
||||
felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla
|
||||
consequat massa quis enim. Donec pede justo, fringilla vel, aliquet
|
||||
nec, vulputate eget, arcu.
|
12
themes/crab/exampleSite/content/more/some-more-menu.md
Normal file
12
themes/crab/exampleSite/content/more/some-more-menu.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "Some more menu ..."
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam
|
||||
dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.
|
||||
Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
|
||||
Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.
|
||||
Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.
|
|
@ -0,0 +1,18 @@
|
|||
+++
|
||||
date = "2017-02-05T07:51:49+01:00"
|
||||
title = "... the nested menus feature"
|
||||
draft = false
|
||||
|
||||
+++
|
||||
|
||||
Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum.
|
||||
Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur
|
||||
ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas
|
||||
tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit
|
||||
amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel,
|
||||
luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante
|
||||
tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus.
|
||||
Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt.
|
||||
Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis
|
||||
magna. Sed consequat, leo eget bibendum sodales, augue velit cursus
|
||||
nunc.
|
0
themes/crab/exampleSite/static/.gitkeep
Normal file
0
themes/crab/exampleSite/static/.gitkeep
Normal file
71
themes/crab/i18n/ca.toml
Normal file
71
themes/crab/i18n/ca.toml
Normal file
|
@ -0,0 +1,71 @@
|
|||
[home]
|
||||
other = "Inici"
|
||||
|
||||
[templateBy]
|
||||
other = "Plantilla creada per"
|
||||
|
||||
[portedBy]
|
||||
other = "Adaptada a Hugo per"
|
||||
|
||||
[contactGoTo]
|
||||
other = "Anar a la pàgina de contacte"
|
||||
|
||||
[contactAddrTitle]
|
||||
other = "Adreça"
|
||||
|
||||
[contactTitle]
|
||||
other = "Contacte"
|
||||
|
||||
[contactForm]
|
||||
other = "Formulari de contacte"
|
||||
|
||||
[contactName]
|
||||
other = "El teu nom"
|
||||
|
||||
[contactMail]
|
||||
other = "El teu email"
|
||||
|
||||
[contactMessage]
|
||||
other = "El teu missatge"
|
||||
|
||||
[contactSend]
|
||||
other = "Enviar missatge"
|
||||
|
||||
[navHome]
|
||||
other = "anar a l'inici"
|
||||
|
||||
[navToggle]
|
||||
other = "Canviar Navigació"
|
||||
|
||||
[categoriesTitle]
|
||||
other = "Categories"
|
||||
|
||||
[searchTitle]
|
||||
other = "Cercar"
|
||||
|
||||
[tagsTitle]
|
||||
other = "Paraules clau"
|
||||
|
||||
[continueReading]
|
||||
other = "Continuar llegint"
|
||||
|
||||
[readMore]
|
||||
other = "Llegeix més"
|
||||
|
||||
[authorBy]
|
||||
other = "Per"
|
||||
|
||||
[recentPosts]
|
||||
other = "Entrades recents"
|
||||
|
||||
[aboutUs]
|
||||
other = "Sobre nosaltres"
|
||||
|
||||
[newer]
|
||||
other = "Més recent"
|
||||
|
||||
[older]
|
||||
other = "Més antic"
|
||||
|
||||
[publishedOn]
|
||||
other = "el"
|
71
themes/crab/i18n/en.toml
Normal file
71
themes/crab/i18n/en.toml
Normal file
|
@ -0,0 +1,71 @@
|
|||
[home]
|
||||
other = "Home"
|
||||
|
||||
[templateBy]
|
||||
other = "Template by"
|
||||
|
||||
[portedBy]
|
||||
other = "Ported to Hugo by"
|
||||
|
||||
[contactGoTo]
|
||||
other = "Go to contact page"
|
||||
|
||||
[contactAddrTitle]
|
||||
other = "Address"
|
||||
|
||||
[contactTitle]
|
||||
other = "Contact"
|
||||
|
||||
[contactForm]
|
||||
other = "Contact form"
|
||||
|
||||
[contactName]
|
||||
other = "Your Name"
|
||||
|
||||
[contactMail]
|
||||
other = "Your Email"
|
||||
|
||||
[contactMessage]
|
||||
other = "Your Message"
|
||||
|
||||
[contactSend]
|
||||
other = "Send Message"
|
||||
|
||||
[navHome]
|
||||
other = "go to homepage"
|
||||
|
||||
[navToggle]
|
||||
other = "Toggle Navigation"
|
||||
|
||||
[categoriesTitle]
|
||||
other = "Categories"
|
||||
|
||||
[searchTitle]
|
||||
other = "Search"
|
||||
|
||||
[tagsTitle]
|
||||
other = "Tags"
|
||||
|
||||
[continueReading]
|
||||
other = "Continue reading"
|
||||
|
||||
[readMore]
|
||||
other = "Read more"
|
||||
|
||||
[authorBy]
|
||||
other = "By"
|
||||
|
||||
[recentPosts]
|
||||
other = "Recent posts"
|
||||
|
||||
[aboutUs]
|
||||
other = "About us"
|
||||
|
||||
[newer]
|
||||
other = "Newer"
|
||||
|
||||
[older]
|
||||
other = "Older"
|
||||
|
||||
[publishedOn]
|
||||
other = "on"
|
BIN
themes/crab/images/screenshot.png
Normal file
BIN
themes/crab/images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
BIN
themes/crab/images/tn.png
Normal file
BIN
themes/crab/images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 KiB |
3
themes/crab/layouts/404.html
Normal file
3
themes/crab/layouts/404.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!--{{ partial "header.html" . }}-->
|
||||
Page not found.
|
||||
{{ partial "footer.html" . }}
|
25
themes/crab/layouts/_default/list.html
Normal file
25
themes/crab/layouts/_default/list.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
{{ range sort .Paginator.Pages }}
|
||||
<div id="paginator-page">
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
<div class="content">
|
||||
{{ .Summary | plainify | safeHTML }}
|
||||
...
|
||||
<div id="paginator-page-footer">
|
||||
{{ if not .Date.IsZero }}
|
||||
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
<div id="paginator-page-button">
|
||||
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ if .Params.tags }}
|
||||
{{ partial "tags" .Params.tags }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
9
themes/crab/layouts/_default/single.html
Normal file
9
themes/crab/layouts/_default/single.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
{{ if .Params.tags }}
|
||||
{{ partial "tags" .Params.tags }}
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
3
themes/crab/layouts/index.html
Normal file
3
themes/crab/layouts/index.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ .Content }}
|
||||
{{ partial "footer.html" . }}
|
12
themes/crab/layouts/partials/footer.html
Normal file
12
themes/crab/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © {{ now.Year }} {{ $.Site.Params.copyright }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
63
themes/crab/layouts/partials/header.html
Normal file
63
themes/crab/layouts/partials/header.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/crab.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}{{ .Site.Params.custom_css }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0">
|
||||
{{ .Hugo.Generator }}
|
||||
|
||||
|
||||
|
||||
{{ if isset .Site.Params "mathjax"}}
|
||||
<script type="text/javascript" src="{{ .Site.Params.mathjax }}">
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="header-left">
|
||||
|
||||
<div id="site-logo">
|
||||
<a href="{{ .Site.BaseURL }}"><img src="{{ .Site.BaseURL }}{{ .Site.Params.logoimage }}"></a>
|
||||
</div>
|
||||
|
||||
<div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
|
||||
<div id="site-slogan">{{ .Site.Params.Description }}</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="header-right">
|
||||
{{ if .IsTranslated }}
|
||||
<ul class="language-selector">
|
||||
<li>
|
||||
<a class="selected">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "menu.html" . }}
|
||||
|
||||
{{ if isset .Params "image"}}
|
||||
<div id="featured-image">
|
||||
<img src="{{ .Params.image }}">
|
||||
</div>
|
||||
{{end}}
|
||||
<div id="page-title-container">
|
||||
<div id="page-title">
|
||||
{{ .Title }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div id="article">
|
28
themes/crab/layouts/partials/menu.html
Normal file
28
themes/crab/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<nav>
|
||||
<ul class="first">
|
||||
{{ $currentNode := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}
|
||||
<li><a class="selected">{{ .Name }}</a>
|
||||
{{ else }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ if .HasChildren }}
|
||||
<ul class="second">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}{{ if .HasChildren }} »{{ end }}</a>
|
||||
{{ if .HasChildren }}
|
||||
<ul class="third">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
16
themes/crab/layouts/partials/pagination.html
Normal file
16
themes/crab/layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ $pag := .Paginator }}
|
||||
{{ if gt $pag.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">← {{ i18n "newer" }}</a></li>
|
||||
{{ else }}
|
||||
<li class="previous-disabled">← {{ i18n "newer" }}</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} →</a></li>
|
||||
{{ else }}
|
||||
<li class="next-disabled">{{ i18n "older" }} →</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
5
themes/crab/layouts/partials/tags.html
Normal file
5
themes/crab/layouts/partials/tags.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<p class="tags">
|
||||
Tags: {{ range . }}
|
||||
<a href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</p>
|
3
themes/crab/layouts/shortcodes/summary.html
Normal file
3
themes/crab/layouts/shortcodes/summary.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div id="summary">
|
||||
{{ .Inner }}
|
||||
</div>
|
377
themes/crab/static/css/crab.css
Normal file
377
themes/crab/static/css/crab.css
Normal file
|
@ -0,0 +1,377 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i|Open+Sans:400,400i,600,600i,700,700i');
|
||||
|
||||
html,
|
||||
body {
|
||||
background: #222222;
|
||||
color: #BBBBBB;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
#container {
|
||||
background: #292929;
|
||||
margin: auto;
|
||||
border-style: solid;
|
||||
border-radius: 10px;
|
||||
border-color: #252525;
|
||||
}
|
||||
|
||||
#header-left {
|
||||
padding-top: 15px;
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
#header-right {
|
||||
padding-top: 15px;
|
||||
float: right;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#site-logo {
|
||||
float: left;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
padding: 0 20px 0 20px;
|
||||
}
|
||||
|
||||
#site-title,
|
||||
a:link,
|
||||
a:active,
|
||||
a:visited {
|
||||
color: #BBBBBB;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #208DCC;
|
||||
}
|
||||
|
||||
#site-title {
|
||||
padding: 10px 20px 0 0;
|
||||
font-weight: 600;
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:active,
|
||||
a:visited,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background: #3E3E3E;
|
||||
color: #BBBBBB;
|
||||
padding: 10px 20px 10px 20px;
|
||||
clear: both;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
nav {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nav ul.first > li {
|
||||
display: block;
|
||||
margin: .5em 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
nav ul.second,
|
||||
nav ul.third {
|
||||
display: none;
|
||||
}
|
||||
|
||||
nav a:link,
|
||||
nav a:active,
|
||||
nav a:visited,
|
||||
nav a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav a:link,
|
||||
nav a:active,
|
||||
nav a:visited {
|
||||
color: #BBBBBB;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
color: #208DCC;
|
||||
}
|
||||
|
||||
nav a.selected {
|
||||
color: #208DCC;
|
||||
}
|
||||
|
||||
#content,
|
||||
#page-title {
|
||||
padding: 10px 20px 10px 20px;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Open Sans', serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#article p, #article ol li, #article ul li {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
#article blockquote {
|
||||
font-family: 'Lora', serif;
|
||||
font-style: italic;
|
||||
font-size: 1.05em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
#article dl dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#article dl dt em {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#article .timestamp,
|
||||
#article .tags,
|
||||
#article .tags a:link,
|
||||
#article .tags a:active,
|
||||
#article .tags a:visited,
|
||||
#article .tags a:hover {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-bottom: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
margin: 2.5em 0;
|
||||
}
|
||||
|
||||
span.upper {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
img.right {
|
||||
float: right;
|
||||
margin: 0 0 1em 1em;
|
||||
}
|
||||
|
||||
img.left {
|
||||
float: left;
|
||||
margin: 0 1em 1em 0;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: auto;
|
||||
max-width:100%;
|
||||
max-height:100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#featured-image img {
|
||||
max-width:100%;
|
||||
max-height:100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ul.pagination {
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pagination li {
|
||||
display: inline;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.pagination .active a:link,
|
||||
.pagination .active a:active,
|
||||
.pagination .active a:visited,
|
||||
.pagination .active a:hover,
|
||||
.pagination .disabled a:link,
|
||||
.pagination .disabled a:active,
|
||||
.pagination .disabled a:visited,
|
||||
.pagination .disabled a:hover,
|
||||
.pagination .previous-disabled,
|
||||
.pagination .next-disabled {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid grey;
|
||||
border-collapse: collapse;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
th {
|
||||
display:none;
|
||||
}
|
||||
|
||||
table img {
|
||||
vertical-align:middle;
|
||||
padding: 2px 2px 2px 2px;
|
||||
}
|
||||
|
||||
#page-title-container {
|
||||
background: #3E3E3E;
|
||||
border-top: 1px solid #444444;
|
||||
border-bottom: 1px solid #444444;
|
||||
display: block;
|
||||
font-weight: 200;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
#paginator-page {
|
||||
margin-bottom: 30px;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
#paginator-page-footer {
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
height: 45px;
|
||||
/*border-bottom: 1px solid #444444;*/
|
||||
}
|
||||
|
||||
#paginator-page-footer .timestamp {
|
||||
display: inline;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
#paginator-page-button {
|
||||
float: right;
|
||||
padding: 5px 10px;
|
||||
background: #208DCC;
|
||||
margin: 1px 1px 1px 1px;
|
||||
}
|
||||
|
||||
#paginator-page-button:hover {
|
||||
background: #006DAC;
|
||||
border: 1px solid #004D8C;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#paginator-page-button a:link,
|
||||
#paginator-page-button a:active,
|
||||
#paginator-page-button a:visited {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#paginator-page-button a:hover {
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
.language-selector {
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
float: right;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.language-selector li {
|
||||
display: inline;
|
||||
margin: .5em;
|
||||
}
|
||||
|
||||
.language-selector .selected,
|
||||
.first .selected {
|
||||
color: #208DCC;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 699px) {
|
||||
#site-logo {
|
||||
display: block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
#container {
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
nav ul li a {
|
||||
display: block;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.language-selector a {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
nav ul.first > li {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding-right: 1.25em;
|
||||
}
|
||||
|
||||
nav ul.second,
|
||||
nav ul.third {
|
||||
position: absolute;
|
||||
background: #000000;
|
||||
width: 160px;
|
||||
box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
nav ul.second {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
nav ul.third {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
nav ul.second li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
nav ul.third {
|
||||
left: 212px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
nav ul.first li:hover ul.second,
|
||||
nav ul.second li:hover ul.third {
|
||||
display: block;
|
||||
}
|
||||
|
||||
nav ul.second li a,
|
||||
nav ul.third li a {
|
||||
padding: 0.75em 1em;
|
||||
}
|
||||
|
||||
#article {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#summary {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 608px;
|
||||
width: 342px;
|
||||
}
|
||||
}
|
12
themes/crab/theme.toml
Normal file
12
themes/crab/theme.toml
Normal file
|
@ -0,0 +1,12 @@
|
|||
name = "Crab"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/thomasheller/crab/blob/master/LICENSE.md"
|
||||
description = "A clean Hugo theme for websites"
|
||||
homepage = "https://github.com/thomasheller/crab"
|
||||
tags = ["clean"]
|
||||
features = ["responsive", "404", "blog", "tags"]
|
||||
min_version = 0.18
|
||||
|
||||
[author]
|
||||
name = "Thomas Heller"
|
||||
homepage = "https://github.com/thomasheller"
|
Loading…
Add table
Add a link
Reference in a new issue