Skip to content

Commit

Permalink
Initial subtree commit
Browse files Browse the repository at this point in the history
  • Loading branch information
siawyoung committed Mar 30, 2016
1 parent 6aefa08 commit 6edc47a
Show file tree
Hide file tree
Showing 29 changed files with 3,462 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,4 +1,3 @@
_site
.sass-cache
.jekyll-metadata
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion _config.yml
@@ -1,7 +1,6 @@
title: Immaculate
description: >
A beautiful, ultra-fast, AMP-compliant Jekyll theme based on Tufte CSS.
logo: "/assets/images/logo.jpg"
baseurl: ""
url: "https://github.com/siawyoung/immaculate"
paginate: 2 # The number of posts to show per page on your homepage
Expand Down
6 changes: 6 additions & 0 deletions _site/Gemfile
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'jekyll'
gem 'jekyll-paginate'
gem 'jekyll-compose', group: [:jekyll_plugins]
gem 'byebug'
52 changes: 52 additions & 0 deletions _site/Gemfile.lock
@@ -0,0 +1,52 @@
GEM
remote: https://rubygems.org/
specs:
byebug (8.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
colorator (0.1)
ffi (1.9.10)
hitimes (1.2.2)
jekyll (3.1.2)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-compose (0.4.1)
jekyll (>= 2.5.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-watch (1.2.1)
listen (~> 2.7)
kramdown (1.9.0)
liquid (3.0.6)
listen (2.10.1)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.5)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.15)
timers (4.0.1)
hitimes

PLATFORMS
ruby

DEPENDENCIES
byebug
jekyll
jekyll-compose
jekyll-paginate

BUNDLED WITH
1.11.2
119 changes: 119 additions & 0 deletions _site/README.md
@@ -0,0 +1,119 @@
# Immaculate

A beautiful, ultra-fast, AMP-compliant Jekyll theme based on Tufte CSS.

[]
[Tufte CSS](https://github.com/edwardtufte/tufte-css)

Immaculate currently includes tag support for some of the more commonly-used Tufte CSS layout options, including sidenotes, margin notes, full-width figures. Other features, such as `newthought`, can still be used by typing raw HTML in your Markdown files.

**Caveat (need hep!)**: AMP HTML does not allow form elements, including checkboxes, which are used in Tufte CSS to toggle the display of sidenotes and margin notes at smaller widths. As such, I've modified Immaculate to disable this functionality at smaller widths for the time being. It's a big deal, and I'm looking for help on emulating this functionality without using checkboxes.

## Helper Tags

Immaculate comes with a few helper tags.

```
{% image <src> <width> <height> <option?> %}
```

The `image` tag allows you to insert AMP-compliant images into the post.

`src` is the `src` attribute of the image tag.

`width` and `height` of the image must be specified, as per AMP specifications.

`option` - an optional argument which supports the following options:

- `fw` - makes the image full width
- `raw` - outputs the raw `amp-img` tag, can be used in conjunction with margin notes

##### Example usage

```
{% image https://image.com/image.jpg 1200 600 fw %}
```

```
{% youtube <id> <width> <height> <option?> %}
```

The `youtube` tag allows you to insert AMP-compliant embedded Youtube videos into the post.

`id` is the Youtube viddeo ID.

`width` and `height` of the video must be specified, as per AMP specifications.

`option` - an optional argument which supports the following options:

- `fw` - makes the video full width
- `raw` - outputs the raw `amp-youtube` tag, can be used in conjunction with margin notes

##### Example usage

```
{% youtube aj2h3h1sf 600 400 %}
```

```
{% sidenote <id> <body> %}
```

The `sidenote` tag allows you insert sidenotes into the post.

`id` is a unique identifier for the sidenote, and it can be anything - it will not show up visually.

`body` is the body of the sidenote. It can also accommodate `span`-level HTML elements (`<b>`, `<em>`, `<i>`, no block-level elements).

##### Example usage

```
This is a very long{% sidenote meh Yes, <i>very</i> long. %} sentence.
```

```
{% marginnote <id> %}
<body>
{% endmarginnote %}
```

The `marginnote` tag block allows you to insert margin notes into the post.

`id` is a unique identifier for the margin note, and it can be anything - it will not show up visually.

`body` is the body of the sidenote. It can also accommodate `span`-level HTML elements (`<b>`, `<em>`, `<i>`, no block-level elements).

You can also use margin notes in conjunction with `image` and `youtube` tags by specifying the `raw` option.

##### Example usage

```
{% marginnote yt %}
{% youtube aj2h3h1sf 350 200 raw %}
This is a <b>extremely</b> succinct example.
{% endmarginnote %}
```

## Syntax highlighting

Immaculate supports syntax highlighting, but the stylesheet is commented out by default to keep the page lean. Simply uncomment the following line in `_includes/styles.scss`:

```css
// @import 'syntax-highlighting';
```

## FAQ

*How can I use the sans-serif versin of Tufte CSS, which uses Gill Sans?*

You can override the CSS style in `_includes/styles.scss` with the font stack of your choice:

```
body {
font-family: "Gill Sans"
}
```

## Credits

Credits to [Amplify]() for most of the AMP-related code.

0 comments on commit 6edc47a

Please sign in to comment.