Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Version 5.0.0 #197

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# [Alembic](https://alembic.darn.es/)

[![Gem Version](https://badge.fury.io/rb/alembic-jekyll-theme.svg)](https://badge.fury.io/rb/alembic-jekyll-theme)

⚗ A Jekyll boilerplate theme designed to be a starting point for any Jekyll website.
Expand All @@ -8,6 +9,7 @@
[<img src="https://cdn.buymeacoffee.com/buttons/default-yellow.png" width="217"/>](https://buymeacoffee.com/daviddarnes#support)

## Contents

- [About](#about)
- [Features](#features)
- [Examples](#examples)
Expand Down Expand Up @@ -63,9 +65,6 @@ To give you a running start I've put together some starter kits that you can dow

- Vanilla Jekyll starter kit:
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-kit)
- Forestry starter kit:
[![Deploy to Forestry](https://assets.forestry.io/import-to-forestry.svg)](https://app.forestry.io/quick-start?repo=daviddarnes/alembic-forestry-kit&engine=jekyll)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-forestry-kit)
- Netlify CMS starter kit:
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-netlifycms-kit&stack=cms)

Expand Down Expand Up @@ -166,45 +165,53 @@ If you want to customise this further you can find the include for custom fonts
There are 2 main types of includes: ones designed for the site and ones that are designed as shortcodes. Here are a list of the shortcode includes:

### `button.html`

A button that can link to a page of any kind.

Example usage: `{% include button.html text="I'm a button" link="https://david.darn.es" %}`

Available options:

- `text`: The text of the button _required_
- `link`: The link that the button goes to _required_
- `icon`: The icon that is added to the end of the button text
- `color`: The colour of the button

### `figure.html`

An image with optional caption.

Example usage: `{% include figure.html image="/uploads/feature-image.jpg" caption="Check out my photo" %}`

Available options:

- `image`: The image shown _required_
- `caption`: A caption to explain the image
- `position`: The position of the image; `left`, `right` or `center`
- `width` & `height`: Optional width and height attributes of the containing image

### `icon.html`

An icon.

Example usage: `{% include icon.html id="twitter" %}`

Available options:

- `id`: The reference for the icon _required_
- `title`: The accessible label for the icon
- `color`: The desired colour of the icon
- `width` & `height`: Width and height attributes for the icon, default is `16`

### `nav-share.html`

A set of buttons that share the current page to various social networks, which is controlled within the `_config.yml` file under the `sharing_links` keyword.

Example usage: `{% include nav-share.html %}`

Available options:
``` yml

```yml
Twitter: "#1DA1F2"
facebook: "#3B5998"
Pinterest: "#BD081C"
Expand All @@ -219,41 +226,48 @@ Email: true
_The first item is the name of the network (must be one of the ones stated above) and the second is the colour of the button. To remove a button remove the line of the same name._

### `video.html`

A YouTube video.

Example usage: `{% include video.html id="zrkcGL5H3MU" %}`

Available options:

- `id`: The YouTube ID for the video _required_

### `map.html`

A Google map. _See Google [My Maps](https://www.google.com/mymaps)_

Example usage: `{% include map.html id="1UT-2Z-Vg_MG_TrS5X2p8SthsJhc" %}`

Available options:

- `id`: The map ID for the video _required_

### `site-form.html`

Adds a contact form to the page. This can be used with [Formspree](https://formspree.io/) or [Netlify Forms](https://www.netlify.com/docs/form-handling/) depending on your setup.

Example usage: `{% include site-form.html %}`

Available options:

- `netlify_form=true`: Set whether you would like to use Netlify Forms, otherwise the form will default to Formspree
- `name`: Give the form a name, by default the form is called "Contact". The name will be reflected when form submissions come through in Netlify or in your email client. The name is also used in the label and input elements for accessibility


Use the `email` option in the `/_config.yml` to change to the desired email.

### `site-search.html`

Adds a search form to the page.

Example usage: `{% include site-search.html %}`

This include has no options. This include will add a block of javascript to the page and javascript reference in order for the search field to work correctly.

### `site-before-start.html` & `site-before-end.html`

Optional html includes for adding scripts, css, js or any embed code you wish to add to every page without the need to overwrite the entire `default.html` template.

**Example usage:** These are different to other includes as they are designed to be overwritten. If you create a `site-before-start.html` file in the `_includes/` the contents of the file will be included immediately before the closing `</head>` tag. If you create a `site-before-end.html` file the contents of the file will be included immediately before the closing `</body>` tag.
Expand Down Expand Up @@ -283,4 +297,4 @@ There are some more specific options you can apply when creating a page or a pos
- Thanks to [Sassline](https://sassline.com/) for the typographic basis, by [Jake Giltsoff](https://twitter.com/jakegiltsoff)
- Thanks to [Flexbox mixin](https://github.com/mastastealth/sass-flex-mixin) by [Brian Franco](https://twitter.com/brianfranco)
- Thanks to [Normalize](https://necolas.github.io/normalize.css/) by [Nicolas Gallagher](https://twitter.com/necolas) and [Jonathan Neal](https://twitter.com/jon_neal).
- Thanks to [pygments-css](http://richleland.github.io/pygments-css/) for the autumn syntax highlighting, by [Rich Leland](https://twitter.com/richleland)
- Thanks to [pygments-css](http://richleland.github.io/pygments-css/) for the autumn and monokai syntax highlighting, by [Rich Leland](https://twitter.com/richleland)
22 changes: 22 additions & 0 deletions _includes/site-color-scheme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script
type="module"
src="https://esm.sh/@daviddarnes/[email protected]"
></script>

<storage-form class="color-scheme">
<form>
<legend>Color scheme</legend>
<label>
<input type="radio" name="theme" value="dark" />
<span>Dark</span>
</label>
<label>
<input type="radio" name="theme" value="light" />
<span>Light</span>
</label>
<label>
<input type="radio" name="theme" value="" checked />
<span>Default</span>
</label>
</form>
</storage-form>
8 changes: 5 additions & 3 deletions _includes/site-footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<footer class="footer">
<div class="container">
<div class="copyright typeset">
<small class="small">&copy; {{ site.title }} {{ site.time | date: '%Y' }}</small>
<div class="copyright typeset">
<small class="small">
&copy; {{ site.title }} {{ site.time | date: '%Y' }}
</small>
</div>

{% include nav-footer.html %}
{% include site-color-scheme.html %} {% include nav-footer.html %}
</div>
</footer>
6 changes: 2 additions & 4 deletions _includes/site-header.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<header class="header">
<div class="container">
{% if site.logo %}{% include site-logo.html %}{% endif %}

{% include nav-header.html %}
{% if site.logo %}{% include site-logo.html %}{% endif %} {% include
nav-header.html %}
</div>

{% include site-feature.html %}

</header>
45 changes: 31 additions & 14 deletions _sass/_settings.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,55 @@
// Background colours
$backgroundColour: #ffffff !default;
$codeBackgroundColour: #fafafa !default;
$featureBackgroundColour: #f9fafa !default;
$accentColour: #05bf85 !default;
$backgroundColour: var(--background, #ffffff) !default;
$codeBackgroundColour: var(--background-code, #fafafa) !default;
$featureBackgroundColour: var(--background-feature, #f9fafa) !default;
$accentColour: var(--accent, #05bf85) !default;

// Text colours
$headingColour: #242e2b !default;
$bodyColour: #384743 !default;
$linkColour: #05bf85 !default;
$hoverColour: #008000 !default;
$focusColour: #fa407a !default;
$captionColour: #a8adac !default;
$white: #ffffff !default;
$headingColour: var(--heading, #242e2b) !default;
$bodyColour: var(--body, #384743) !default;
$linkColour: var(--link, #05bf85) !default;
$hoverColour: var(--hover, #008000) !default;
$focusColour: var(--focus, #fa407a) !default;
$captionColour: var(--caption, #a8adac) !default;
$white: var(--white, #ffffff) !default;

// Dark colours
@mixin dark-scheme {
// Background colours
--background: #111111;
--background-code: #333333;
--background-feature: #343737;
--accent: #05bf85;

// Text colours
--heading: #ebf8f4;
--body: #f0fffb;
--link: #05bf85;
--hover: #008000;
--focus: #fa407a;
--caption: #6f7473;
}

// Typography
$bodytype: (
font-family: "Georgia, serif",
regular: 400,
bold: 700,
italic: italic,
cap-height: 0.75
cap-height: 0.75,
) !default;

$headingtype: (
font-family: '"Merriweather", serif',
regular: 400,
bold: 700,
cap-height: 0.75
cap-height: 0.75,
) !default;

$monospacetype: (
font-family: "Menlo, monospace",
regular: 400,
cap-height: 0.68
cap-height: 0.68,
) !default;

// TIP: Load custom fonts in _config.yaml
Loading