Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Refining #36

Closed
wants to merge 7 commits into from
Closed
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
10 changes: 6 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Jekyll
safe: true
markdown: kramdown
pygments: true
permalink: /:title.html
relative_permalinks: false
markdown: kramdown
highlighter: pygments
permalink: /:title.html
url:

# Shower
default_theme: ribbon
default_width: 792
default_lang: en
Expand Down
12 changes: 5 additions & 7 deletions _includes/setup.md → _includes/_setup.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% capture strip_whitespace %}
{% capture _strip_whitespace %}

# Set all the things
<!-- Set all the things -->

{% capture theme %}{% if page.theme and page.theme != 'default' %}{{ page.theme }}{% else %}{{ site.default_theme }}{% endif %}{% endcapture %}
{% capture width %}{% if page.width %}{{ page.width }}{% else %}{{ site.default_width }}{% endif %}{% endcapture %}
Expand All @@ -13,13 +13,11 @@
{% capture company_name %}{% if page.author.company %}{% if page.author.company.name %}{{ page.author.company.name }}{% else %}{{ page.author.company }}{% endif %}{% elsif page.company %}{% if page.company.name %}{{ page.company.name }}{% else %}{{ page.company }}{% endif %}{% else %}{{ site.author.company.name }}{% endif %}{% endcapture %}
{% capture company_url %}{% if page.author.company %}{{ page.author.company.url }}{% elsif page.company %}{{ page.company.url }}{% else %}{% if site.author.company.url %}{{ site.author.company.url }}{% endif %}{% endif %}{% endcapture %}

{% capture title %}{% if page.title %}{{ page.title }}{% else %}{{ supertitle }}{% endif %}{% endcapture %}

{% capture subtitle %}{% if page.subtitle %}{{ page.subtitle }}{% else %}{% if author_url != '' %}[{{ author_name }}]({{ author_url }}){% else %}{{ author_name }}{% endif %}{% if company_name != '' %}, {% if company_url != '' %}[{{ company_name }}]({{ company_url }}){% else %}{{ company_name }}{% endif %}{% endif %}{% endif %}{% endcapture %}{% capture subtitle %}{{ subtitle | markdownify }}{% endcapture %}

{% capture fork_url %}{% if page.fork_url %}{{ page.fork_url }}{% else %}{{ site.fork_url }}{% endif %}{% endcapture %}

## Set the progress var
<!-- Set the progress var -->

{% assign progress = page.progress | append:'' | size %}
{% if progress == 0 %}
Expand All @@ -28,7 +26,7 @@
{% assign progress = page.progress %}
{% endif %}

## Set the line numbers var
<!-- Set the line numbers var -->

{% assign line_numbers = page.line_numbers | append:'' | size %}
{% if line_numbers == 0 %}
Expand All @@ -37,4 +35,4 @@
{% assign line_numbers = page.line_numbers %}
{% endif %}

{% endcapture %}
{% endcapture %}
9 changes: 6 additions & 3 deletions _includes/showerify.html → _includes/_showerify.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% capture strip_whitespace %}
{% include setup.md %}
{% capture _strip_whitespace %}

<!-- Get things setup -->
{% include _setup.html %}

{% assign items = showerify_input | split:'<h1' %}
{% for item in items %}
{% assign subitems = item | split:'</h1>' %}
Expand Down Expand Up @@ -122,4 +125,4 @@
{% assign showerify_middle = showerify_middle | replace:'<hr />','</div></section><section class="slide"><div>' %}

{% capture showerify_output %}{{ showerify_middle }}{% endcapture %}
{% endcapture %}
{% endcapture %}
1 change: 0 additions & 1 deletion _layouts/bright.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

layout: default

theme: bright

---
Expand Down
9 changes: 4 additions & 5 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!DOCTYPE HTML>{% capture showerify_input %}{{ content }}{% endcapture %}{% include showerify.html %}{% include setup.md %}
<!DOCTYPE HTML>{% capture showerify_input %}{{ content }}{% endcapture %}{% include _showerify.html %}{% capture title %}{% if page.title %}{{ page.title }}{% else %}{{ supertitle }}{% endif %}{% endcapture %}
<html lang="{{ lang }}">
<head>
<title>{{ title | strip_html }}</title>
<title>{{ title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width={% if width %}{{ width }}{% else %}792{% endif %}, user-scalable=no">
<link rel="stylesheet" href="themes/{{ theme }}/styles/screen.css">
{% if page.style %}<style>
{{ page.style }}</style>{%endif%}
<link rel="stylesheet" href="{{ url }}/themes/{{ theme }}/styles/screen.css">
{% if page.style %}<style>{{ page.style }}</style>{%endif%}
</head>
<body class="{{ body_class }}">
<header class="caption">
Expand Down
1 change: 0 additions & 1 deletion _layouts/ribbon.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

layout: default

theme: ribbon

---
Expand Down
1 change: 0 additions & 1 deletion examples/bright.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

layout: bright

permalink: bright.html

---
Expand Down
1 change: 0 additions & 1 deletion examples/ribbon.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

layout: ribbon

permalink: ribbon.html

---
Expand Down
2 changes: 1 addition & 1 deletion examples/shower.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

layout: bright

permalink: shower.html
style: |

#Cover h2 {
Expand Down
2 changes: 1 addition & 1 deletion shower