jekyll-oedipus-theme 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7aa620504354fdfe705b8302a74f78be5a8599878299856c9489b0c69b3a8e7
4
- data.tar.gz: 634ef930492a8929462cb88f79c04b020f222fb2b4d29c0cbb8e83ca2c5f6616
3
+ metadata.gz: bc0780ba8e8bf872e38e50ccbc6a0a63d06bc51a1354aaa7b46a2f49ba93fc0f
4
+ data.tar.gz: 219abeaa45562318b7fa0c57005da5d8f83197fd87b642e3a0410fd36c75c699
5
5
  SHA512:
6
- metadata.gz: dcae0ce543bfc7637d1f8a9472d05d3b87c40b77836188eb4d5edb3ba3d54e02d5c8dfeb86984d3812e1d98d8ce4bcd5d7b52715632e896bfeeb174afd04694f
7
- data.tar.gz: 8c9fbeb100ecb59ea2329af71b7d19a5abd529d90f88b88ea0d764145f72baeee1a5fa075a1d6b22c4f0a008d759a014365c66b2115225201f84e3b918d20e97
6
+ metadata.gz: 66cf6caec4e95deb4c4083df8851d89e3fdcf50ad69ccec4c6d835b34e419a54021b048e5acb5c9fc57f0723ec5adde321b61012a8aa3377345a84a0286aa686
7
+ data.tar.gz: 5bc54dfaaf231fd4d4aa907e4997dcfe0ce52582a539bf9a4df786d79fcd0a97676d16a3e3eae1216b70c809cb6f12d28051a120df5684a9b271abe96e029296
data/README.md CHANGED
@@ -4,6 +4,10 @@ Build a motherfucking website with Jekyll (patricide optional).
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/jekyll-oedipus-theme.svg)](https://badge.fury.io/rb/jekyll-oedipus-theme)
6
6
 
7
+ ## Screenshot
8
+
9
+ ![Oedipus rendered on a Thinkpad T60 in Firefox ESR](https://raw.githubusercontent.com/matthewgraybosch/jekyll-oedipus-theme/main/screenshot.png)
10
+
7
11
  ## Installation
8
12
 
9
13
  Add this line to your Jekyll site's `Gemfile`:
@@ -28,15 +32,114 @@ Or install it yourself as:
28
32
 
29
33
  ## Usage
30
34
 
31
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
35
+ **Oedipus** can be customized to a great extent in [`_config.yml`](https://github.com/matthewgraybosch/jekyll-oedipus-theme/blob/main/_config.yml), but if you want to [override any part of the theme](https://jekyllrb.com/docs/themes/), you'll want a list of what's included.
36
+
37
+ ### _config.yml
38
+
39
+ All options for this theme are contained under the "site.oedipus" root. Therefore, the "rights" option listed below is actually "site.oedipus.rights".
40
+
41
+ - **rights**: a string that goes into the copyright line in the page footer
42
+ - **license.text.name**: a string identifying the license for your site's text
43
+ - **license.text.url**: the URL of the license for your site's text
44
+ - **license.code.name**: a string identifying the license for your site's code
45
+ - **license.code.url**: the URL of the license for your site's code
46
+ - **made-with**: a string indicating how the site was made.
47
+
48
+ The stylesheet for Oedipus is also configurable, and all style options are contained under "site.oedipus.style". The default colors were selected from [Color Safe](http://colorsafe.co/) for accessibility. The dark theme takes each of these variables and applies the [Sass `invert()`](https://sass-lang.com/documentation/modules/color) function to them.
49
+
50
+ - **bg-color**: set background color
51
+ - **fg-color**: set text color
52
+ - **link-color**: set default link color
53
+ - **link-hover-color**: change a link to this color on mouseover
54
+ - **link-active-color**: change a link to this color when clicked
55
+ - **link-visited-color**: change visited links to this color
56
+ - **border-thickness**: set the thickness for borders
57
+ - **hr-border-thickness**: set thickness for <hr> elements. Set this to half your intended value.
58
+ - **html-font-size**: allows use of [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units) for consistent scaling. Defaults to "medium".
59
+ - **body-margin**: control distance between text and screen edges
60
+ - **content-font-size**: Sets font-size for most text.
61
+ - **content-font-family**: Sets the font-family for most text. Use this to define a custom font stack.
62
+ - **content-line-height**: Sets separation between lines of text.
63
+ - **preformatted-font-size**: Sets font-size for preformatted-text and code.
64
+ - **preformatted-font-family**: Sets the font-family for most preformatted-text and code. Use this to define a custom font stack.
65
+ - **content-width**: Sets the content width in <main> and <article>
66
+ - **content-centered**: When true, Oedipus will horizontally center content.
67
+ - **compact-header**: When true, Oedipus will place the site title and description inside the masthead's <h1>.
68
+ - **home-header-icon** When true, any page assigned the "home" layout will show `/assets/favicon.svg` as part of the masthead.
69
+
70
+ ### Layouts
71
+
72
+ * **base.html**: a wrapper layout that sets language and encoding, sets up a skip navigation link, and links to favicons, stylesheets, and feeds. Also provides a target for `jekyll-seo-tag`.
73
+ * **default.html**: this wraps around **page.html** and **post.html** to provide headers, footers, and navigation.
74
+ * **home.html**: for your site's home page. It provides custom headers and footers in case you don't want nav bars on your landing page.
75
+ * **page.html**: for pages and other non-blog material. It wraps content inside a <main> element.
76
+ * **post.html**: for blog posts. It wraps content inside an <article> element and provides a footer for subscription and contact info.
77
+
78
+ ### Includes
79
+
80
+ * **masthead.html**: displays the site's title and description.
81
+ * **skip.html**: implements a [skip navigation](https://webaim.org/techniques/skipnav/) link.
82
+ * **navbar.html**: implements a navigation bar. It accepts "id", "label", and "source" arguments. Source is a data source accessible via `site.data`.
83
+ * **navlist.html**: implements an unordered navigation list and takes the same arguments as navbar.html.
84
+ * **header.html**: the default header for most pages and posts. Includes a navigation bar.
85
+ * **article-header.html**: a sub-header for posts that contains the post title and summary
86
+ * **home-header.html**: a header for the home page, sans nav bar.
87
+ * **footer.html**: the default footer for most pages and posts. Includes a navigation bar.
88
+ * **article-footer.html**: a sub-footer for posts that contains feed and contact links in lieu of a comments section
89
+ * **home-footer.html**: a footer for the home page, sans nav bar.
90
+ * **posts-list.html**: lists all posts as a set of <article> blocks.
91
+ * **recent-posts-list.html**: lists the *n* most recent posts, where the "limit" argument = *n*.
92
+ * **posts-table.html**: lists all posts in a table
93
+ * **recent-posts-table.html**: lists the *n* most recent posts in a table, where the "limit" argument = *n*.
94
+ * **copyright.html**: shows copyright info. used in footers.
95
+ * **license.html**: shows license links for text and code. used in footers.
96
+ * **made-with.html**: can be used to credit tools or represent a location. used in footers.
97
+
98
+ ### Sass
99
+
100
+ Oedipus' stylesheets are built with Sass, which is included with Jekyll.
101
+
102
+ - **assets/style.scss**: wrapper file for the main stylesheet. It contains logic to override Sass variables with custom values from `_config.yml`.
103
+ - **assets/print.scss**: wrapper file for the print stylesheet
104
+ - **_sass/variables.scss**: contains variables with default values
105
+ - **_sass/main.scss**: contains style definitions for the screen
106
+ - **_sass/skip.scss**: implements Sass to hide the [skip navigation](https://webaim.org/techniques/skipnav/) link until tabbed into
107
+ - **_sass/dark.scss**: provides dark mode support.
108
+
109
+ ### Data
110
+
111
+ Oedipus comes with two _data files: `header-nav.yml` and `footer-nav.yml`, which I use to build nav bars. They both contain entries in the following format:
112
+
113
+ ```
114
+ - name: home
115
+ url: /
116
+ desc: front page
117
+ ```
118
+
119
+ ### Assets
120
+
121
+ The only asset Oedipus provides, in addition to the stylesheets, is [favicon.svg](https://raw.githubusercontent.com/matthewgraybosch/jekyll-oedipus-theme/main/assets/favicon.svg). You can and should generate your own. I recommend using [Formito's generator](https://formito.com/tools/favicon). You can also use [favicon.io](https://favicon.io/), but you'll want to modify **base.html** and **home-header.html** since this site doesn't generate SVG.
32
122
 
33
123
  ## Contributing
34
124
 
35
- I built this theme for my own use. If you find this theme useful, you are welcome to it. If you wish to customize it, by all means fork it. However, I will not accept pull requests unless they suit my tastes. Any support I provide is at my own discretion.
125
+ I built this theme for my own use. If you find this theme useful, you are welcome to it. If you wish to customize it, by all means fork it. I will fix bugs and consider pull requests at my own discretion.
126
+
127
+ ### Code of Conduct
128
+
129
+ This is not a professional project, and I am not interested in collaborating with others here. I am most certainly *not* interested in fostering "community", let alone providing an "open and welcoming environment". Nevertheless, I suppose a rudimentary and informal code of conduct is necessary.
36
130
 
37
- The code of conduct is simple: **don't annoy me**.
131
+ 1. If you mess with me, you're banned.
132
+ 2. If you mess with other contributors on this project, you're fucking with me.
133
+ 3. When in doubt, refer to rule 1.
134
+
135
+ (with apologies to Matthew Woodring Stover)
38
136
 
39
137
  ## License
40
138
 
41
139
  The theme is available as open source under the terms of the [GNU GPL-3.0](https://opensource.org/licenses/GPL-3.0).
42
140
 
141
+ ### Commercial/Corporate/Government Use
142
+
143
+ I cannot prevent commercial use of this theme, but under no circumstance will I provide free technical support for commercial, corporate, or government projects. Issues and pull requests from people using Oedipus in a commercial, corporate, or government project will be summarily dismissed.
144
+
145
+ Note: I regard inclusion of this theme on a curated site supported by advertising as commercial use. Don't do it and then expect me to provide support to your visitors.
data/_config.yml CHANGED
@@ -9,9 +9,6 @@ github_username: matthewgraybosch
9
9
  lang: en
10
10
  encoding: utf-8
11
11
  locale: en_US
12
- rights: most rights reserved
13
- license: "text: CC BY-NC-SA 4.0 / code: GNU GPLv3"
14
- madeWith: "♥ in Pennsylvania"
15
12
 
16
13
  # Build settings
17
14
  theme: jekyll-oedipus-theme
@@ -24,4 +21,35 @@ plugins:
24
21
  sass:
25
22
  style: compressed
26
23
 
27
- permalink: /blog/:year/:month/:day/:title/
24
+ permalink: /blog/:year/:month/:day/:title/
25
+
26
+ oedipus:
27
+ rights: most rights reserved
28
+ license:
29
+ text:
30
+ name: "CC BY-NC-SA 4.0"
31
+ url: "https://creativecommons.org/licenses/by-nc-sa/4.0/"
32
+ code:
33
+ name: "GNU GPL-3.0"
34
+ url: "https://opensource.org/licenses/GPL-3.0/"
35
+ made-with: "♥ in Pennsylvania"
36
+ style:
37
+ bg-color: "#FFFFFF"
38
+ fg-color: "#000000"
39
+ link-color: "#0000B5"
40
+ link-hover-color: "#3A539B"
41
+ link-active-color: "#20603C"
42
+ link-visited-color: "#550000"
43
+ border-thickness: 2px
44
+ hr-border-thickness: 1px
45
+ html-font-size: medium
46
+ body-margin: 1rem
47
+ content-font-size: 1rem
48
+ content-line-height: 1.62
49
+ content-font-family: sans-serif
50
+ preformatted-font-size: 1rem
51
+ preformatted-font-family: monospace
52
+ content-width: 40rem
53
+ content-centered: true
54
+ compact-header: false
55
+ home-header-icon: true
@@ -0,0 +1,9 @@
1
+ <footer>
2
+ <p>
3
+ Thanks for reading.<br />
4
+ The best way to subscribe is with a feed reader:
5
+ <a href="/feed.xml" title="subscribe to the Atom feed">Atom</a>
6
+ <a href="/feed.json" title="subscribe to the JSON feed">JSON</a><br />
7
+ Questions or comments? Email <a href="mailto:{{ site.email }}" title="please allow up to 7 days for a reply">{{ site.email }}</a>.
8
+ </p>
9
+ </footer>
@@ -0,0 +1,4 @@
1
+ <header>
2
+ <h1>{{ page.title }}</h1>
3
+ <p><em>{{ page.description }}</em></p>
4
+ </header>
@@ -0,0 +1,6 @@
1
+ {% if site.oedipus.rights %}
2
+ &copy; {{ site.time | date: "%Y" }} {{ site.author }}, {{ site.oedipus.rights }}
3
+ {% else %}
4
+ &copy; {{ site.time | date: "%Y" }} {{ site.author }}
5
+ {% endif %}
6
+ <br />
@@ -1,7 +1,8 @@
1
1
  <footer>
2
2
  <p>
3
- &copy; {{ site.time | date: "%Y" }} {{ site.author }}, {{ site.rights }}<br />
4
- {{ site.license }}<br />
5
- made with {{ site.madeWith }}
3
+ {% include copyright.html %}
4
+ {% include license.html %}
5
+ {% include made-with.html %}
6
6
  </p>
7
+ {% include navbar.html id="footer-nav" label="bottom navigation" source=site.data.footer-nav %}
7
8
  </footer>
@@ -1,4 +1,4 @@
1
1
  <header>
2
- <h1>{{ site.title }}</h1>
3
- <p>{{ site.description }}</p>
2
+ {% include masthead.html %}
3
+ {% include navbar.html id="header-nav" label="main navigation" source=site.data.header-nav %}
4
4
  </header>
@@ -0,0 +1,7 @@
1
+ <footer>
2
+ <p>
3
+ {% include copyright.html %}
4
+ {% include license.html %}
5
+ {% include made-with.html %}
6
+ </p>
7
+ </footer>
@@ -1,8 +1,9 @@
1
1
  <header>
2
+ {% if site.oedipus.style.home-header-icon %}
2
3
  <img src="/assets/favicon.svg"
3
4
  height="128"
4
5
  width="128"
5
6
  alt="favicon for the Oedipus theme for Jekyll website">
6
- <h1>{{ site.title }}</h1>
7
- <p>{{ site.description }}</p>
7
+ {% endif %}
8
+ {% include masthead.html %}
8
9
  </header>
@@ -0,0 +1,12 @@
1
+ {% if site.oedipus.license.text %}
2
+ text: <a href="{{ site.oedipus.license.text.url }}">{{ site.oedipus.license.text.name }}</a>
3
+ {% endif %}
4
+ {% if site.oedipus.license.text and site.oedipus.license.code %}
5
+ /
6
+ {% endif %}
7
+ {% if site.oedipus.license.code %}
8
+ code: <a href="{{ site.oedipus.license.code.url }}">{{ site.oedipus.license.code.name }}</a>
9
+ {% endif %}
10
+ {% if site.oedipus.license.text or site.oedipus.license.code %}
11
+ <br />
12
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ {% if site.oedipus.made-with %}
2
+ made with {{ site.oedipus.made-with }}
3
+ {% endif %}
@@ -0,0 +1,6 @@
1
+ {% if site.oedipus.style.compact-header %}
2
+ <h1>{{ site.title }}<em>{{ site.description }}</em></h1>
3
+ {% else %}
4
+ <h1>{{ site.title }}</h1>
5
+ <p>{{ site.description }}</p>
6
+ {% endif %}
@@ -1,3 +1,4 @@
1
+ {% if include.source %}
1
2
  <nav id="{{ include.id }}" aria-label=" {{include.label }}">
2
3
  <p>
3
4
  {% for item in include.source %}
@@ -5,3 +6,4 @@
5
6
  {% endfor %}
6
7
  </p>
7
8
  </nav>
9
+ {% endif %}
@@ -1,3 +1,4 @@
1
+ {% if include.source %}
1
2
  <nav id="{{ include.id }}" aria-label=" {{include.label }}">
2
3
  <ul>
3
4
  {% for item in include.source %}
@@ -7,3 +8,4 @@
7
8
  {% endfor %}
8
9
  </ul>
9
10
  </nav>
11
+ {% endif %}
@@ -1,7 +1,7 @@
1
1
  {% for post in site.posts %}
2
2
  <article>
3
- <h3>{{ post.title }}</h3>
3
+ <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
4
4
  <p><em>{{ post.description }}</em></p>
5
- <p><a href="{{ post.url }}">» Read More</a> (posted on {{ post.date | date: "%Y-%m-%d" }})
5
+ <p>posted on {{ post.date | date: "%Y-%m-%d" }}</p>
6
6
  </article>
7
7
  {% endfor %}
@@ -1,15 +1,15 @@
1
1
  <table>
2
2
  <thead>
3
3
  <tr>
4
- <th>Date</th>
5
4
  <th>Title</th>
5
+ <th>Date</th>
6
6
  </tr>
7
7
  </thead>
8
8
  <tbody>
9
9
  {% for post in site.posts %}
10
10
  <tr>
11
- <td>{{ post.date | date: "%Y-%m-%d" }}</td>
12
11
  <td><a href="{{ post.url }}">{{ post.title }}</a></td>
12
+ <td>{{ post.date | date: "%Y-%m-%d" }}</td>
13
13
  </tr>
14
14
  {% endfor %}
15
15
  </tbody>
@@ -1,7 +1,7 @@
1
- {% for post in site.posts | limit: 10 %}
1
+ {% for post in site.posts | limit: include.limit %}
2
2
  <article>
3
- <h3>{{ post.title }}</h3>
3
+ <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
4
4
  <p><em>{{ post.description }}</em></p>
5
- <p><a href="{{ post.url }}">» Read More</a> (posted on {{ post.date | date: "%Y-%m-%d" }})
5
+ <p>posted on {{ post.date | date: "%Y-%m-%d" }}</p>
6
6
  </article>
7
7
  {% endfor %}
@@ -1,15 +1,15 @@
1
1
  <table>
2
2
  <thead>
3
3
  <tr>
4
- <th>Date</th>
5
4
  <th>Title</th>
5
+ <th>Date</th>
6
6
  </tr>
7
7
  </thead>
8
8
  <tbody>
9
- {% for post in site.posts | limit: 10 %}
9
+ {% for post in site.posts | limit: include.limit %}
10
10
  <tr>
11
- <td>{{ post.date | date: "%Y-%m-%d" }}</td>
12
11
  <td><a href="{{ post.url }}">{{ post.title }}</a></td>
12
+ <td>{{ post.date | date: "%Y-%m-%d" }}</td>
13
13
  </tr>
14
14
  {% endfor %}
15
15
  </tbody>
@@ -0,0 +1,3 @@
1
+ <aside id="skip">
2
+ <a href="#content">Skip to Main Content</a>
3
+ </aside>
data/_layouts/base.html CHANGED
@@ -4,13 +4,15 @@
4
4
  <meta charset="{{ site.encoding }}">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <link rel="icon" type="image/svg+xml" href="/assets/favicon.svg" />
7
- <link rel="icon" type="image/ico" href="/assets/favicon.ico" />
7
+ <link rel="icon" href="data:,">
8
8
  <link rel="stylesheet" type="text/css" href="/assets/style.css" />
9
9
  <link rel="alternate" type="application/atom+xml" href="/feed.xml" title="{{ site.title }} Atom Feed">
10
10
  <link rel="alternate" type="text/json" href="/feed.json" title="{{ site.title }} JSON Feed">
11
11
  {% seo %}
12
12
  </head>
13
13
  <body>
14
+ {% include skip.html %}
14
15
  {{ content }}
16
+ <link rel="stylesheet" type="text/css" href="/assets/print.css" />
15
17
  </body>
16
18
  </html>
@@ -3,9 +3,5 @@ layout: base
3
3
  ---
4
4
 
5
5
  {% include header.html %}
6
- {% include navbar.html id="header-nav" label="main navigation" source=site.data.header-nav %}
7
- <hr />
8
6
  {{ content }}
9
- <hr />
10
7
  {% include footer.html %}
11
- {% include navbar.html id="footer-nav" label="bottom navigation" source=site.data.footer-nav %}
data/_layouts/home.html CHANGED
@@ -3,9 +3,7 @@ layout: base
3
3
  ---
4
4
 
5
5
  {% include home-header.html %}
6
- <hr />
7
6
  <main id="content">
8
7
  {{ content }}
9
8
  </main>
10
- <hr />
11
- {% include footer.html %}
9
+ {% include home-footer.html %}
data/_layouts/page.html CHANGED
@@ -3,5 +3,6 @@ layout: default
3
3
  ---
4
4
 
5
5
  <main id="content">
6
+ <h1>{{ page.title }}</h1>
6
7
  {{ content }}
7
8
  </main>
data/_layouts/post.html CHANGED
@@ -3,20 +3,9 @@ layout: default
3
3
  ---
4
4
 
5
5
  <article id="content">
6
- <header>
7
- <h1>{{ page.title }}</h1>
8
- <p><em>{{ page.description }}</em></p>
9
- </header>
6
+ {% include article-header.html %}
10
7
  <section>
11
8
  {{ content }}
12
9
  </section>
13
- <hr />
14
- <footer>
15
- <p>
16
- Thanks for reading.<br />
17
- The best way to subscribe is with a feed reader:
18
- <a href="/feed.xml" title="subscribe to the Atom feed">Atom</a>
19
- <a href="/feed.json" title="subscribe to the JSON feed">JSON</a><br />
20
- Questions or comments: email <a href="mailto:{{ site.email }}" title="please allow up to 7 days for a reply">{{ site.email }}</a></p>
21
- </footer>
10
+ {% include article-footer.html %}
22
11
  </article>
data/_sass/dark.scss CHANGED
@@ -24,11 +24,48 @@
24
24
  }
25
25
 
26
26
  blockquote {
27
- border-left: 4px solid invert($fg-color);
27
+ border-left: $border-thickness solid invert($fg-color);
28
+ }
29
+
30
+ figure {
31
+ border: $border-thickness solid invert($fg-color);
28
32
  }
29
33
 
30
34
  hr {
31
- border: 2px solid invert($fg-color);
35
+ border: $hr-border-thickness solid invert($fg-color);
36
+ }
37
+
38
+ article {
39
+ footer {
40
+ border-top: $hr-border-thickness dashed invert($fg-color);
41
+ }
42
+ }
43
+
44
+ table {
45
+ border: $border-thickness solid invert($fg-color);
46
+ th, td {
47
+ border: $border-thickness solid invert($fg-color);
48
+ }
49
+ }
50
+
51
+ nav {
52
+ p {
53
+ a {
54
+ border: $border-thickness solid invert($link-color);
55
+ }
56
+
57
+ a:hover {
58
+ border: $border-thickness solid invert($link-hover-color);
59
+ }
60
+
61
+ a:active {
62
+ border: $border-thickness solid invert($link-active-color);
63
+ }
64
+
65
+ a:visited {
66
+ border: $border-thickness solid invert($link-visited-color);
67
+ }
68
+ }
32
69
  }
33
70
  }
34
71
  }
data/_sass/main.scss CHANGED
@@ -1,16 +1,19 @@
1
1
  html {
2
- font-size: medium;
2
+ font-size: $html-font-size;
3
3
  background-color: $bg-color;
4
4
  color: $fg-color;
5
5
 
6
6
  body {
7
7
  background-color: $bg-color;
8
8
  color: $fg-color;
9
- margin: 1rem;
10
- font: 1rem/1.62 sans-serif;
9
+ margin: $body-margin;
10
+ font-size: $content-font-size;
11
+ font-family: $content-font-family;
12
+ line-height: $content-line-height;
11
13
 
12
14
  a {
13
15
  color: $link-color;
16
+ text-underline-offset: 6px;
14
17
  }
15
18
 
16
19
  a:hover {
@@ -30,26 +33,64 @@ html {
30
33
  }
31
34
 
32
35
  header, footer, nav {
33
- text-align: center;
36
+ text-align: $content-alignment;
34
37
 
35
38
  h1 {
39
+ font-size: $content-font-size;
36
40
  margin-bottom: 1rem;
41
+
42
+ em {
43
+ margin-left: 1rem;
44
+ font-weight: normal;
45
+ }
37
46
  }
38
47
  }
39
48
 
49
+ header {
50
+ margin-bottom: 2rem;
51
+ padding-bottom: 1rem;
52
+ border-bottom: $border-thickness solid $fg-color;
53
+ }
54
+
55
+ footer {
56
+ margin-top: 2rem;
57
+ padding-top: 1rem;
58
+ border-top: $border-thickness solid $fg-color;
59
+ }
60
+
40
61
  nav {
62
+ margin-top: 1.5rem;
41
63
  p {
42
64
  a {
43
- margin-left: .5rem;
44
- margin-right: .5rem;
65
+ margin-right: 1rem;
66
+ border: $border-thickness solid $link-color;
67
+ border-radius: .5rem;
68
+ padding: .5rem;
69
+ text-decoration: none;
70
+ }
71
+
72
+ a:last-child {
73
+ margin-right: 0;
74
+ }
75
+
76
+ a:hover {
77
+ border: $border-thickness solid $link-hover-color;
78
+ }
79
+
80
+ a:active {
81
+ border: $border-thickness solid $link-active-color;
82
+ }
83
+
84
+ a:visited {
85
+ border: $border-thickness solid $link-visited-color;
45
86
  }
46
87
  }
47
88
  }
48
89
 
49
90
  main {
50
- margin: 1rem auto;
51
- max-width: 40rem;
52
- padding: 0 .62rem;
91
+ margin: $content-margin;
92
+ max-width: $content-width;
93
+ padding: $content-padding;
53
94
 
54
95
  article {
55
96
  margin-left: 2rem;
@@ -61,9 +102,9 @@ html {
61
102
  }
62
103
 
63
104
  article {
64
- margin: 1rem auto;
65
- max-width: 40rem;
66
- padding: 0 .62rem;
105
+ margin: $content-margin;
106
+ max-width: $content-width;
107
+ padding: $content-padding;
67
108
 
68
109
  header, footer {
69
110
  text-align: left;
@@ -71,22 +112,95 @@ html {
71
112
  }
72
113
 
73
114
  section {
74
- margin: 2rem auto;
115
+ margin: 2rem auto;
116
+ }
117
+
118
+ header {
119
+ margin-bottom: 1rem;
120
+ padding-bottom: 0;
121
+ border: none;
122
+ }
123
+
124
+ footer {
125
+ border-top: $hr-border-thickness dashed $fg-color;
126
+ }
127
+ }
128
+
129
+ main, article {
130
+ h1 {
131
+ font-size: $content-font-size * 2;
132
+ }
133
+
134
+ h2 {
135
+ font-size: $content-font-size * 1.6;
136
+ }
137
+
138
+ h3 {
139
+ font-size: $content-font-size * 1.2;
140
+ }
141
+
142
+ h4, h5, h6 {
143
+ font-size: $content-font-size * 1.1;
75
144
  }
76
145
  }
77
146
 
78
147
  blockquote {
148
+ font-size: $blockquote-font-size;
79
149
  margin: 2rem 4rem;
80
150
  padding: 0 1rem;
81
- border-left: 4px solid $fg-color;
151
+ border-left: $border-thickness solid $fg-color;
82
152
 
83
153
  cite {
84
154
  font-style: normal;
155
+ font-weight: bold;
156
+ }
157
+ }
158
+
159
+ figure {
160
+ font-size: $blockquote-font-size;
161
+ margin: 2rem 4rem;
162
+ padding: 1rem;
163
+ border: $border-thickness solid $fg-color;
164
+
165
+ img {
166
+ width: 100%;
167
+ }
168
+
169
+ figcaption {
170
+ font-style: normal;
171
+ font-weight: bold;
172
+ }
173
+ }
174
+
175
+ dl {
176
+ dt {
177
+ font-size: 1.1rem;
178
+ font-weight: bold;
179
+ }
180
+
181
+ dd {
182
+ margin-bottom: 1.1rem;
85
183
  }
86
184
  }
87
185
 
88
186
  hr {
89
- border: 2px solid $fg-color;
187
+ border: $hr-border-thickness solid $fg-color;
188
+ }
189
+
190
+ table {
191
+ margin: 2rem 0;
192
+ border-collapse: collapse;
193
+ border: $border-thickness solid $fg-color;
194
+ th, td {
195
+ padding: 1rem;
196
+ border: $border-thickness solid $fg-color;
197
+ text-align: left;
198
+ }
199
+ }
200
+
201
+ pre, code {
202
+ font-size: $preformatted-font-size;
203
+ font-family: $preformatted-font-family;
90
204
  }
91
205
  }
92
206
  }
data/_sass/paper.scss ADDED
@@ -0,0 +1,66 @@
1
+ @media print {
2
+ html, body {
3
+ font: 12pt/1.3 serif !important;
4
+ background: $bg-color !important;
5
+ color: $fg-color !important;
6
+ }
7
+
8
+ body {
9
+ header {
10
+ display: none;
11
+ }
12
+
13
+ footer {
14
+ nav {
15
+ display: none;
16
+ }
17
+ }
18
+
19
+ a, a:hover, a:active, a:visited {
20
+ color: $fg-color !important;
21
+ }
22
+ }
23
+
24
+
25
+ main, article {
26
+ width: 100%;
27
+ max-width: 100%;
28
+ margin: 0;
29
+ float: none;
30
+ }
31
+
32
+ h1 {
33
+ font-size: 2rem;
34
+ }
35
+
36
+ h2, h3, h4 {
37
+ font-size: 1.2rem;
38
+ margin-top: 2rem;
39
+ }
40
+
41
+ a {
42
+ page-break-inside: avoid
43
+ }
44
+
45
+ blockquote {
46
+ page-break-inside: avoid;
47
+ }
48
+
49
+ h1, h2, h3, h4, h5, h6 {
50
+ page-break-after: avoid;
51
+ page-break-inside: avoid
52
+ }
53
+
54
+ img {
55
+ page-break-inside: avoid;
56
+ page-break-after: avoid;
57
+ }
58
+
59
+ table, pre {
60
+ page-break-inside: avoid
61
+ }
62
+
63
+ ul, ol, dl {
64
+ page-break-before: avoid
65
+ }
66
+ }
data/_sass/skip.scss ADDED
@@ -0,0 +1,16 @@
1
+ #skip a
2
+ {
3
+ position: absolute;
4
+ left: -10000px;
5
+ top: auto;
6
+ width: 1px;
7
+ height: 1px;
8
+ overflow: hidden;
9
+ }
10
+
11
+ #skip a:focus
12
+ {
13
+ position: static;
14
+ width: auto;
15
+ height: auto;
16
+ }
data/_sass/variables.scss CHANGED
@@ -4,3 +4,18 @@ $link-color: #0000B5;
4
4
  $link-hover-color: #3A539B;
5
5
  $link-active-color: #20603C;
6
6
  $link-visited-color: #550000;
7
+ $border-thickness: 2px;
8
+ $hr-border-thickness: 1px;
9
+ $html-font-size: medium;
10
+ $body-margin: 2rem;
11
+ $content-font-size: 1rem;
12
+ $content-line-height: 1.62;
13
+ $content-font-family: sans-serif;
14
+ $preformatted-font-size: 1rem;
15
+ $preformatted-font-family: monospace;
16
+ $content-width: 40rem;
17
+ $content-alignment: center;
18
+ $content-margin: 2rem auto;
19
+ $content-padding: 0 .62rem;
20
+ $blockquote-font-size: 1.1rem;
21
+ $figure-font-size: 1.1rem;
data/assets/print.scss ADDED
@@ -0,0 +1,13 @@
1
+ ---
2
+ ---
3
+
4
+ @import "variables";
5
+
6
+ // now that our variables are defined, let's override them from the config.
7
+
8
+ {% if site.oedipus.style.content-width %}
9
+ $content-width: {{ site.oedipus.style.content-width }};
10
+ {% endif %}
11
+
12
+
13
+ @import "paper";
data/assets/style.scss CHANGED
@@ -2,5 +2,83 @@
2
2
  ---
3
3
 
4
4
  @import "variables";
5
+
6
+ // now that our variables are defined, let's override them from the config.
7
+
8
+ {% if site.oedipus.style.bg-color %}
9
+ $bg-color: {{ site.oedipus.style.bg-color }};
10
+ {% endif %}
11
+
12
+ {% if site.oedipus.style.fg-color %}
13
+ $fg-color: {{ site.oedipus.style.fg-color }};
14
+ {% endif %}
15
+
16
+ {% if site.oedipus.style.link-color %}
17
+ $link-color: {{ site.oedipus.style.link-color }};
18
+ {% endif %}
19
+
20
+ {% if site.oedipus.style.link-hover-color %}
21
+ $link-hover-color: {{ site.oedipus.style.link-hover-color }};
22
+ {% endif %}
23
+
24
+ {% if site.oedipus.style.link-active-color %}
25
+ $link-active-color: {{ site.oedipus.style.link-active-color }};
26
+ {% endif %}
27
+
28
+ {% if site.oedipus.style.link-visited-color %}
29
+ $link-visited-color: {{ site.oedipus.style.link-visited-color }};
30
+ {% endif %}
31
+
32
+ {% if site.oedipus.style.border-thickness %}
33
+ $border-thickness: {{ site.oedipus.style.border-thickness }};
34
+ {% endif %}
35
+
36
+ {% if site.oedipus.style.hr-border-thickness %}
37
+ $hr-border-thickness: {{ site.oedipus.style.hr-border-thickness }};
38
+ {% endif %}
39
+
40
+ {% if site.oedipus.style.body-margin %}
41
+ $body-margin: {{ site.oedipus.style.body-margin }};
42
+ {% endif %}
43
+
44
+ {% if site.oedipus.style.html-font-size %}
45
+ $html-font-size: {{ site.oedipus.style.html-font-size }};
46
+ {% endif %}
47
+
48
+ {% if site.oedipus.style.content-font-size %}
49
+ $content-font-size: {{ site.oedipus.style.content-font-size }};
50
+ {% endif %}
51
+
52
+ {% if site.oedipus.style.content-font-family %}
53
+ $content-font-family: {{ site.oedipus.style.content-font-family }};
54
+ {% endif %}
55
+
56
+ {% if site.oedipus.style.content-line-height %}
57
+ $content-line-height: {{ site.oedipus.style.content-line-height }};
58
+ {% endif %}
59
+
60
+ {% if site.oedipus.style.preformatted-font-size %}
61
+ $preformatted-font-size: {{ site.oedipus.style.preformatted-font-size }};
62
+ {% endif %}
63
+
64
+ {% if site.oedipus.style.preformatted-font-family %}
65
+ $preformatted-font-family: {{ site.oedipus.style.preformatted-font-family }};
66
+ {% endif %}
67
+
68
+ {% if site.oedipus.style.content-width %}
69
+ $content-width: {{ site.oedipus.style.content-width }};
70
+ {% endif %}
71
+
72
+ {% if site.oedipus.style.content-centered %}
73
+ $content-alignment: center;
74
+ $content-margin: 2rem auto;
75
+ $content-padding: 0 .62rem;
76
+ {% else %}
77
+ $content-alignment: left;
78
+ $content-margin: 0;
79
+ $content-padding: auto;
80
+ {% endif %}
81
+
5
82
  @import "main";
83
+ @import "skip";
6
84
  @import "dark";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-oedipus-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Graybosch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-23 00:00:00.000000000 Z
11
+ date: 2021-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -102,15 +102,23 @@ files:
102
102
  - LICENSE.txt
103
103
  - README.md
104
104
  - _config.yml
105
+ - _includes/article-footer.html
106
+ - _includes/article-header.html
107
+ - _includes/copyright.html
105
108
  - _includes/footer.html
106
109
  - _includes/header.html
110
+ - _includes/home-footer.html
107
111
  - _includes/home-header.html
112
+ - _includes/license.html
113
+ - _includes/made-with.html
114
+ - _includes/masthead.html
108
115
  - _includes/navbar.html
109
116
  - _includes/navlist.html
110
117
  - _includes/posts-list.html
111
118
  - _includes/posts-table.html
112
119
  - _includes/recent-posts-list.html
113
120
  - _includes/recent-posts-table.html
121
+ - _includes/skip.html
114
122
  - _layouts/base.html
115
123
  - _layouts/default.html
116
124
  - _layouts/home.html
@@ -118,9 +126,11 @@ files:
118
126
  - _layouts/post.html
119
127
  - _sass/dark.scss
120
128
  - _sass/main.scss
129
+ - _sass/paper.scss
130
+ - _sass/skip.scss
121
131
  - _sass/variables.scss
122
- - assets/favicon.ico
123
132
  - assets/favicon.svg
133
+ - assets/print.scss
124
134
  - assets/style.scss
125
135
  homepage: https://github.com/matthewgraybosch/jekyll-oedipus-theme
126
136
  licenses:
@@ -134,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
144
  requirements:
135
145
  - - ">="
136
146
  - !ruby/object:Gem::Version
137
- version: '0'
147
+ version: '2.7'
138
148
  required_rubygems_version: !ruby/object:Gem::Requirement
139
149
  requirements:
140
150
  - - ">="
data/assets/favicon.ico DELETED
Binary file