Skip to content

Commit

Permalink
onionskin
Browse files Browse the repository at this point in the history
  • Loading branch information
Arty2 committed Sep 16, 2020
1 parent 7421b04 commit e718cbe
Show file tree
Hide file tree
Showing 32 changed files with 1,282 additions and 554 deletions.
17 changes: 0 additions & 17 deletions .gitattributes

This file was deleted.

125 changes: 10 additions & 115 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,127 +1,22 @@
# /xerographic
# onionskin

An experimental* theme for the [Hugo](https://gohugo.io/) static site generator. See [heracl.es](https://heracl.es) for a live preview, and the theme’s Git respority [/xerographic](https://github.com/Arty2/xerographic) for more details.
An experimental theme for [Hugo](https://gohugo.io/).
See [heracl.es](https://heracl.es) for a live preview, and [/onionskin](https://heracl.es/onionskin) for more details on the theme.

* Major breaking changes may occur between versions, both in functionality and design approach. Using versioned releases is more than encouraged.
Not stable, but very usable. Documentation pending.

## Installation
- Hosted on GitLab: https://gitlab.com/heracles/onionskin
- Mirrored on GitHub: https://github.com/Arty2/onionskin

The following instructions assume that you already have your site’s content in a Git repository. You may move the provided `.bat` scripts (for Windows 10) in your root directory to easily update to newer versions.

### As a submodule

The official [Hugo documentation for themes](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) suggest to install as a *submodule*:

```
cd themes
git submodule add https://github.com/Arty2/xerographic
```

To update the theme to the most current version:

```
cd themes/xerographic
git checkout master
git pull
cd ../../
```

### As a subtree

Installing as a *subtree* has [several advantages](https://training.github.com/downloads/submodule-vs-subtree-cheat-sheet/) if you wish to actively contribute with pull-requests:

```
git remote add xerographic https://github.com/Arty2/xerographic.git
git subtree add --prefix=themes/xerographic xerographic master --squash
```

To update the theme to the most current version:

```
git subtree pull --prefix=themes/xerographic xerographic master --squash
```

## Features

- Plug & Play; should work with zero configuration.
- Multilingual ready.
- Fully responsive. Two fluid breakpoints.
- Themable. Automatic light and dark themes respective to user settings.
- Sidenotes (marginalia) inspired by [Tufte CSS](https://edwardtufte.github.io/tufte-css/). Collapsible on mobile.
- Inline comments and external links preview when `title=""` is provided.
- Detailed & extensible page and post metadata. Automatic Table of Contents for lengthy posts.
- Page and post types: normal; preformatted.

## Built-in Shortcodes

- articles-list
- articles-filter
- gallery
- img
- marginalia
- menu-social
- section


## Customisation

### Favicon

Add a `/static/favicon.png` file.

### CSS Variables

...

### Custom CSS

This theme supports per page custom styles via `custom.css` in the page’s bundle or folder. Global styles may be customized by creating a `/static/styles/custom.css` file.

### Custom JavaScript

`./script.js` ...

### Site configuration

See `config.default.yml`

```yaml
...
```


## Post and page frontmatter options

Automatic featured images, by name `*__featured.ext`

```yaml
title
summary
tags
draft
featured_image
show_comments
show_meta
license
rating
dateread
datecreated
crosspost
publication.title
```



***

## Bundled / Credits

- jQuery
- [fancybox](http://fancyapps.com/fancybox/3/)
- Alegreya font
- Fantasque Sans Mono font
- fancybox
- leaderline
- Project avatar: [onion by Kyle Tezak](https://thenounproject.com/term/onion/26154) from the Noun Project


***

© 2018-2020 [Heracles Papatheodorou](http://heracl.es) a.k.a [@Arty2](https://www.twitter.com/Arty2), [MIT Licence](LICENCE.txt)
© 2018-2019 [Heracles Papatheodorou](http://heracl.es) a.k.a [@Arty2](https://www.twitter.com/Arty2), [MIT Licence](LICENCE.txt)
11 changes: 4 additions & 7 deletions i18n/el.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ reset:
## social sharing

share:
other: μοιράσου
other: Μοιράσου

share-twitter:
other: twitter
other: Τιτίβισε

share-facebook:
other: facebook
other: Μοιράσου

share-email:
other: με email
other: Στείλε email

## post details

Expand Down Expand Up @@ -48,9 +48,6 @@ publish-date:
post-details:
other: Σχετικά

post-meta:
other: Meta

publication-details:
other: Στοιχεία έκδοσης

Expand Down
11 changes: 4 additions & 7 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ reset:
## social sharing

share:
other: share
other: Share

share-twitter:
other: twitter
other: Tweet

share-facebook:
other: facebook
other: Share

share-email:
other: by email
other: Send email

## post details

Expand Down Expand Up @@ -48,9 +48,6 @@ publish-date:
post-details:
other: Post details

post-meta:
other: Meta

publication-details:
other: Publication details

Expand Down
45 changes: 40 additions & 5 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,54 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<style>
body {
margin: 4em;
background: #ccc;
}
a { color: #333; }
a {
border-bottom: 1px solid #ccc;
border-color: rgba(0,0,0,0.2);
color: #333;
text-decoration: none;

-webkit-transition : border .3s;
-moz-transition : border .3s;
transition : border .3s;
}
a:hover {
border-bottom: 4px solid #000
}
</style>
</head>
<body>
<body onload="init()">
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
<h2>Error 404: Page Not Found</h2>
<p><a href="{{ .Site.BaseURL }}">« Return to the homepage</a></p>
<p id="output">404</p>
<script type="text/javascript">
var count = 1, output = document.getElementById('output');

setTimeout(function(){
output.innerHTML += ' = ';
}, 20);

function write() {
if (count < 404) {
output.innerHTML += '1';
setTimeout(function(){
output.innerHTML += ' + ';
}, 2);
count++;
}
else {
output.innerHTML += '1 <a onclick="history.go(-1);">Page Not Found.</a>';
window.clearInterval(timer);
}
}

function init() {
timer = setInterval(write, 10);
}
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{{ $customcss.Content | safeCSS }}
</style>
{{ end -}}
<!-- {{ if ne .Site.Params.show_languages false }}{{ partial "languages" . }}{{ end }} -->
{{ if ne .Site.Params.show_ui false }}{{ partialCached "ui" . }}{{ end }}
{{ if ne .Site.Params.show_languages false }}{{ partial "languages" . }}{{ end }}
{{ if ne .Site.Params.show_ui false }}{{ partial "ui" . }}{{ end }}
<header class="cluster">
{{ block "header" . }}{{ partial "header/inner" . }}{{end}}
</header>
Expand Down
Loading

0 comments on commit e718cbe

Please sign in to comment.