Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkbm committed Aug 25, 2016
0 parents commit cd1c506
Show file tree
Hide file tree
Showing 25 changed files with 10,135 additions and 0 deletions.
20 changes: 20 additions & 0 deletions LICENSE.md
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016 Exchange Rate API (Pty) Ltd.

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.
159 changes: 159 additions & 0 deletions README.md
@@ -0,0 +1,159 @@
# Strange Case

Strange Case was built for people who like the original Jekyll theme [Hyde](https://github.com/poole/hyde) and its [port to Hugo](https://github.com/spf13/hyde) but prefer to use [Bootstrap](http://getbootstrap.com).

The theme was built from an empty Bootstrap 3 template with the goal of easy modifcation for end users. The code is as simple as possible - clearly formatted HTML and a single stylesheet. It's a two column responsive design and currently includes version 3.3.7 of Bootstrap.

Pull requests are welcome.

![Strange Case Screenshot](http://i.imgur.com/i7aarpG.png)


## Contents

- [Installation](#installation)
- [Customization](#customization)
- [Sidebar](#sidebar)
- [Color Schemes](#color-schemes)
- [Analytics](#analytics)
- [Author](#author)
- [Inspired By](#inspired-by)
- [License](#license)


## Installation

Installing **Strange Case** is easy. Simple clone this repo to `themes/` in your Hugo folder.

~$ cd your-hugo-folder/themes/
~$ git clone https://github.com/ExchangeRate-API/strange-case.git

Next, open the `config.toml` file in the base of the Hugo folder and ensure the theme is set to `strange-case`.

theme = "strange-case"


## Customization

There are various options you can easily set from your `config.toml` file.

This text will appear after the Title of your site in your `<title>` meta tag:

description = "A Hugo Theme built with Bootstrap"


### Sidebar

This text will appear in the sidebar immediately under your site's Title:

sidebarDescription = "A Hugo Theme built with Bootstrap"

This text will appear in a free paragraph below the Title & sidebarDescription and above the menu links. Set it to "" if you don't want it.

sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."

You can also include useful menu links by including `"menu=main"` items in your `config.toml`. Example:

[[menu.main]]
name = "Hugo"
post = "<span class='glyphicon glyphicon-fire'></span>"
url = "http://gohugo.io"

You can optionally use the `pre` and `post` vars to include HTML before or after the `name` in the resulting links.


### Color Schemes

In keeping with our attempt to replicate the original Hyde in Bootstrap we've included some colour scheme options. These are not the same as in the original, but we used palettes from the same [Base16](https://github.com/chriskempson/base16) project.

![Strange Case in Light Brown](http://i.imgur.com/oLjV8LV.png)

The themes are:

- Dark Brown (`colorScheme="scheme-darkbrown"`)
- Light Brown (`colorScheme="scheme-lightbrown"`)
- Green (`colorScheme="scheme-green"`)
- Orange (`colorScheme="scheme-orange"`)
- Slate (`colorScheme="scheme-slate"`)

And then a bonus theme that isn't from Base16:

- Gulf Racing (`colorScheme="scheme-gulfracing"`)

Using a theme is as simple as changing the `colorScheme` param in your `config.toml`. Example:

baseurl = "/blog"
title = "Strange Case Hugo Theme"

theme = "strange-case"

[params]
colorScheme = "scheme-darkbrown"
DateFormat = "2 Jan 2006"
description = "A Hugo Theme built with Bootstrap"
sidebarDescription = "A Hugo Theme built with Bootstrap"
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."


#### Creating Your Own Theme

To create your own custom theme simply scroll to the end of the `strange-case.css` stylesheet in the `your-hugo-dir/themes/strange-case/static` folder and edit the template we've left there.

We'll happily accept pull requests for quality color schemes.


### Analytics

This theme supports Hugo's native GA integration & a Piwik integration.

For Google Analytics, simply set your UA number in your `config.toml` file. Example:

baseurl = "/blog"
title = "Strange Case Hugo Theme"

theme = "strange-case"

googleAnalytics = "UA-123-456"

For Piwik, set the following two `params` options as below:

baseurl = "/blog"
title = "Strange Case Hugo Theme"

theme = "strange-case"

[params]
colorScheme = "scheme-darkbrown"
piwikSiteID = "1234"
piwikURL = "www.your-site.com"


## Author

**ExchangeRate-API.com**

- <https://github.com/ExchangeRate-API/>
- <https://www.exchangerate-api.com>

#### Strange Case Uses Bootstrap

**Bootstrap**

- <http://getbootstrap.com>

## Inspired By

**Mark Otto** - creator of the Hyde Jekyll theme

- <https://github.com/mdo>
- <https://twitter.com/mdo>

**Steve Francia** - porter of the original Hyde theme to Hugo

- <https://github.com/spf13>
- <https://twitter.com/spf13>


## Licensing

This theme is released under the [MIT License](LICENSE.md).
2 changes: 2 additions & 0 deletions archetypes/default.md
@@ -0,0 +1,2 @@
+++
+++
Binary file added images/screenshot-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tn.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions layouts/404.html
@@ -0,0 +1,28 @@
{{ partial "header.html" . }}

<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-md-3 col-lg-3 sidebar">

{{ partial "sidebar-content.html" . }}

</div>
<div class="col-sm-7 col-sm-offset-4 col-md-6 col-md-offset-3 col-lg-5 col-lg-offset-3 content">

<div class="post">

<div class="post-heading">
<h1>404 Not Found</h1>
<p>Unfortunately we couldn't find the page you requested.</p>
<p><a href="{{ .Site.BaseURL }}">Return to {{ .Site.Title }}</a></p>
</div>

</div>

</div>
<div class="col-sm-1 col-md-3 col-md-4">
</div>
</div>
</div>

{{ partial "footer.html" . }}
31 changes: 31 additions & 0 deletions layouts/_default/list.html
@@ -0,0 +1,31 @@
{{ partial "header.html" . }}

<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-md-3 col-lg-3 sidebar">

{{ partial "sidebar-content.html" . }}

</div>
<div class="col-sm-7 col-sm-offset-4 col-md-6 col-md-offset-3 col-lg-5 col-lg-offset-3 content">

{{ range first 10 .Data.Pages }}
<div class="post">

<div class="post-heading">
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span>{{ .Date.Format .Site.Params.DateFormat }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</span>
</div>

{{ .Content }}

</div>
{{ end }}

</div>
<div class="col-sm-1 col-md-3 col-md-4">
</div>
</div>
</div>

{{ partial "footer.html" . }}
29 changes: 29 additions & 0 deletions layouts/_default/single.html
@@ -0,0 +1,29 @@
{{ partial "header.html" . }}

<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-md-3 col-lg-3 sidebar">

{{ partial "sidebar-content.html" . }}

</div>
<div class="col-sm-7 col-sm-offset-4 col-md-6 col-md-offset-3 col-lg-5 col-lg-offset-3 content">

<div class="post">

<div class="post-heading">
<h1>{{ .Title }}</h1>
<span class="post-date"><a href="{{ .Permalink }}"># {{ .Date.Format .Site.Params.DateFormat }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</a></span>
</div>

{{ .Content }}

</div>

</div>
<div class="col-sm-1 col-md-3 col-md-4">
</div>
</div>
</div>

{{ partial "footer.html" . }}
31 changes: 31 additions & 0 deletions layouts/index.html
@@ -0,0 +1,31 @@
{{ partial "header.html" . }}

<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-md-3 col-lg-3 sidebar">

{{ partial "sidebar-content.html" . }}

</div>
<div class="col-sm-7 col-sm-offset-4 col-md-6 col-md-offset-3 col-lg-5 col-lg-offset-3 content">

{{ range first 10 .Data.Pages }}
<div class="post">

<div class="post-heading">
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span>{{ .Date.Format .Site.Params.DateFormat }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</span>
</div>

{{ .Content }}

</div>
{{ end }}

</div>
<div class="col-sm-1 col-md-3 col-md-4">
</div>
</div>
</div>

{{ partial "footer.html" . }}
31 changes: 31 additions & 0 deletions layouts/partials/footer.html
@@ -0,0 +1,31 @@

{{ template "_internal/google_analytics.html" . }}

{{ if .Site.Params.piwikSiteID }}
{{ if .Site.Params.piwikURL }}

<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{{ .Site.Params.piwikURL }}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', {{ .Site.Params.piwikSiteID }}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->

{{ end }}
{{ end }}

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{ .Site.BaseURL }}/js/bootstrap.min.js"></script>

</body>
</html>
26 changes: 26 additions & 0 deletions layouts/partials/header.html
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ .Hugo.Generator }}
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{ .Title }} - {{ .Site.Params.description }}</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link href="{{ .Site.BaseURL }}/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/strange-case.css" rel="stylesheet">
<!--<style type="text/css" media="all">
# Optional: comment out strange-case.css above, minify it with YUICompressor and paste inline styles here to lose a request...
</style>-->

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
{{ "<!--[if lt IE 9]>" | safeHTML }}
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
{{ "<![endif]-->" | safeHTML }}
</head>
<body class="{{ .Site.Params.colorScheme }}">

0 comments on commit cd1c506

Please sign in to comment.