jekyll-apple 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,20 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrapper">
4
+
5
+ <a class="site-title" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
6
+
7
+ <nav class="site-nav">
8
+ {% for link in site.data.navigation.main %}
9
+ {% if link.url contains "http" %}
10
+ {% assign url = link.url %}
11
+ {% else %}
12
+ {% assign url = link.url | relative_url %}
13
+ {% endif %}
14
+ <a class="page-link" href="{{ url }}">{{ link.title }}</a>
15
+ {% endfor %}
16
+ </nav>
17
+
18
+ </div>
19
+
20
+ </header>
@@ -0,0 +1,11 @@
1
+ {% if paginator.total_pages > 1 %}
2
+ <div class="pagination">
3
+ {% if paginator.next_page %}
4
+ <a class="previous" href="{{ paginator.next_page_path | relative_url }}">&laquo; Older</a>
5
+ {% endif %}
6
+
7
+ {% if paginator.previous_page %}
8
+ <a class="next" href="{{ paginator.previous_page_path | relative_url }}">Newer &raquo;</a>
9
+ {% endif %}
10
+ </div>
11
+ {% endif %}
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en" }}">
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+
8
+ {% include header.html %}
9
+
10
+ <main class="page-content" aria-label="Content">
11
+ <div class="wrapper">
12
+ {{ content }}
13
+ </div>
14
+ </main>
15
+
16
+ {% include footer.html %}
17
+
18
+ </body>
19
+
20
+ </html>
data/_layouts/feed.xml ADDED
@@ -0,0 +1,92 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+ <?xml version="1.0" encoding="utf-8"?>
5
+ <feed xmlns="http://www.w3.org/2005/Atom"{% if site.lang %} xml:lang="{{ site.lang }}"{% endif %}>
6
+ <generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
7
+ {% assign feed_path = "/feed.xml" %}
8
+ {% if site.feed and site.feed.path %}
9
+ {% assign feed_path = site.feed.path %}
10
+ {% endif %}
11
+ <link href="{{ feed_path | absolute_url }}" rel="self" type="application/atom+xml" />
12
+ <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
13
+ <updated>{{ site.time | date_to_xmlschema }}</updated>
14
+ <id>{{ '/' | absolute_url | xml_escape }}/</id>
15
+
16
+ {% if site.title %}
17
+ <title type="html">{{ site.title | smartify | xml_escape }}</title>
18
+ {% elsif site.name %}
19
+ <title type="html">{{ site.name | smartify | xml_escape }}</title>
20
+ {% endif %}
21
+
22
+ {% if site.description %}
23
+ <subtitle>{{ site.description | xml_escape }}</subtitle>
24
+ {% endif %}
25
+
26
+ {% if site.author %}
27
+ <author>
28
+ <name>{{ site.author.name | default: site.author | xml_escape }}</name>
29
+ {% if site.author.email %}
30
+ <email>{{ site.author.email | xml_escape }}</email>
31
+ {% endif %}
32
+ {% if site.author.uri %}
33
+ <uri>{{ site.author.uri | xml_escape }}</uri>
34
+ {% endif %}
35
+ </author>
36
+ {% endif %}
37
+
38
+ {% for post in site.posts limit: 20 %}
39
+ {% unless post.draft %}
40
+ <entry{% if post.lang %} xml:lang="{{ post.lang }}"{% endif %}>
41
+ {% if post.external-url %}
42
+ <title type="html">{{ post.title | append: " &rarr;" | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
43
+ {% else %}
44
+ <title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
45
+ {% endif %}
46
+ <link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
47
+ <published>{{ post.date | date_to_xmlschema }}</published>
48
+ <updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
49
+ <id>{{ post.id | absolute_url | xml_escape }}</id>
50
+ <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
51
+
52
+ {% assign post_author = post.author | default: post.authors[0] | default: site.author %}
53
+ {% assign post_author = site.data.authors[post_author] | default: post_author %}
54
+ {% assign post_author_email = post_author.email | default: nil %}
55
+ {% assign post_author_uri = post_author.uri | default: nil %}
56
+ {% assign post_author_name = post_author.name | default: post_author %}
57
+
58
+ {% if post_author %}
59
+ <author>
60
+ <name>{{ post_author_name | xml_escape }}</name>
61
+ {% if post_author_email %}
62
+ <email>{{ post_author_email | xml_escape }}</email>
63
+ {% endif %}
64
+ {% if post_author_uri %}
65
+ <uri>{{ post_author_uri | xml_escape }}</uri>
66
+ {% endif %}
67
+ </author>
68
+ {% endif %}
69
+
70
+ {% for category in post.categories %}
71
+ <category term="{{ category | xml_escape }}" />
72
+ {% endfor %}
73
+
74
+ {% for tag in post.tags %}
75
+ <category term="{{ tag | xml_escape }}" />
76
+ {% endfor %}
77
+
78
+ {% if post.excerpt and post.excerpt != empty %}
79
+ <summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
80
+ {% endif %}
81
+
82
+ {% assign post_image = post.twitter_card.image | default: post.facebook.image %}
83
+ {% if post_image %}
84
+ {% unless post_image contains "://" %}
85
+ {% assign post_image = post_image | absolute_url | xml_escape %}
86
+ {% endunless %}
87
+ <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image }}" />
88
+ {% endif %}
89
+ </entry>
90
+ {% endunless %}
91
+ {% endfor %}
92
+ </feed>
@@ -0,0 +1,39 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="home">
6
+
7
+ {{ content }}
8
+
9
+ {% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %}
10
+
11
+ <ul class="post-list">
12
+ {% for post in paginator.posts %}
13
+ {% capture post_lang %}{{ post.lang | default: site_lang }}{% endcapture %}
14
+ {% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
15
+
16
+ <li{% if lang != empty %} lang="{{ lang }}"{% endif %}>
17
+ <header class="post-header">
18
+ <h1 class="post-title">
19
+ <a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
20
+ </h1>
21
+
22
+ <p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p>
23
+ </header>
24
+
25
+ <div class="post-content">
26
+ {{ post.excerpt }}
27
+ </div>
28
+ {% if post.content contains site.excerpt_separator %}
29
+ <p class="post-continue">
30
+ <a href="{{ post.url | relative_url }}">Read the post &rarr;</a>
31
+ </p>
32
+ {% endif %}
33
+ </li>
34
+ {% endfor %}
35
+ </ul>
36
+
37
+ {% include pagination.html %}
38
+
39
+ </div>
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title | escape }}</h1>
8
+ </header>
9
+
10
+ <div class="post-content">
11
+ {{ content }}
12
+ </div>
13
+
14
+ {% if site.comments != false and page.comments != false %}
15
+ <div class="post-comments">
16
+ {% include custom_comments_provider.html %}
17
+ </div>
18
+ {% endif %}
19
+
20
+ </article>
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
5
+
6
+ <header class="post-header">
7
+ {% if page.external-url %}
8
+ <h1 class="post-title" itemprop="name headline"><a href="{{ page.external-url }}">{{ page.title | escape }} &rarr;</a></h1>
9
+ {% else %}
10
+ <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
11
+ {% endif %}
12
+ <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
13
+ </header>
14
+
15
+ <div class="post-content" itemprop="articleBody">
16
+ {{ content }}
17
+ </div>
18
+
19
+ {% if site.comments != false and page.comments != false %}
20
+ <div class="post-comments" itemprop="comment">
21
+ {% include custom_comments_provider.html %}
22
+ </div>
23
+ {% endif %}
24
+
25
+ </article>
data/_sass/apple.scss ADDED
@@ -0,0 +1,51 @@
1
+ // Define defaults for each variable.
2
+ $base-font-family: -apple-system-font, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
3
+ $monospace-font-family: Monaco, Menlo, Consolas, "Courier New", DotumChe, monospace !default;
4
+ $base-font-size: 17px !default;
5
+ $base-font-weight: 400 !default;
6
+ $heavy-font-weight: 500 !default;
7
+ $small-font-size: $base-font-size * 0.875 !default;
8
+ $base-line-height: 1.5 !default;
9
+
10
+ $spacing-unit: 30px !default;
11
+
12
+ $text-color: #333 !default;
13
+ $light-text-color: #fff !default;
14
+ $background-color: #fff !default;
15
+ $dark-background-color: #111 !default;
16
+ $footer-background-color: #f2f2f2 !default;
17
+ $brand-color: #2568ba !default;
18
+ $a-color: #0070c9 !default;
19
+
20
+ $grey-color: #828282 !default;
21
+ $grey-color-light: lighten($grey-color, 40%) !default;
22
+ $grey-color-dark: darken($grey-color, 25%) !default;
23
+
24
+ // Width of the content area
25
+ $content-width: 980px !default;
26
+ $on-palm: 692px !default;
27
+ $on-laptop: 980px !default;
28
+
29
+
30
+
31
+ // Use media queries like this:
32
+ // @include media-query($on-palm) {
33
+ // .wrapper {
34
+ // padding-right: $spacing-unit / 2;
35
+ // padding-left: $spacing-unit / 2;
36
+ // }
37
+ // }
38
+ @mixin media-query($device) {
39
+ @media screen and (max-width: $device) {
40
+ @content;
41
+ }
42
+ }
43
+
44
+
45
+
46
+ // Import partials.
47
+ @import
48
+ "apple/base",
49
+ "apple/layout",
50
+ "apple/syntax-highlighting"
51
+ ;
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Reset some basic elements
3
+ */
4
+ body, h1, h2, h3, h4, h5, h6,
5
+ p, blockquote, pre, hr,
6
+ dl, dd, ol, ul, figure {
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+
12
+
13
+ /**
14
+ * Basic styling
15
+ */
16
+ body {
17
+ font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
18
+ color: $text-color;
19
+ background-color: $background-color;
20
+ -webkit-text-size-adjust: 100%;
21
+ -webkit-font-feature-settings: "kern" 1;
22
+ -moz-font-feature-settings: "kern" 1;
23
+ -o-font-feature-settings: "kern" 1;
24
+ font-feature-settings: "kern" 1;
25
+ font-kerning: normal;
26
+ }
27
+
28
+
29
+
30
+ /**
31
+ * Set `margin-bottom` to maintain vertical rhythm
32
+ */
33
+ h1, h2, h3, h4, h5, h6,
34
+ p, blockquote, pre,
35
+ ul, ol, dl, figure,
36
+ %vertical-rhythm {
37
+ margin-bottom: $spacing-unit / 2;
38
+ }
39
+
40
+
41
+
42
+ /**
43
+ * Images
44
+ */
45
+ img {
46
+ max-width: 100%;
47
+ vertical-align: middle;
48
+ }
49
+
50
+
51
+
52
+ /**
53
+ * Figures
54
+ */
55
+ figure > img {
56
+ display: block;
57
+ }
58
+
59
+ figcaption {
60
+ font-size: $small-font-size;
61
+ }
62
+
63
+
64
+
65
+ /**
66
+ * Lists
67
+ */
68
+ ul, ol {
69
+ margin-left: $spacing-unit;
70
+ }
71
+
72
+ li {
73
+ > ul,
74
+ > ol {
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+
79
+
80
+
81
+ /**
82
+ * Headings
83
+ */
84
+ h1, h2, h3, h4, h5, h6 {
85
+ font-weight: $heavy-font-weight;
86
+
87
+ code {
88
+ font-size: inherit;
89
+ }
90
+ }
91
+
92
+ h1 { font-size: 2em; }
93
+ h2 { font-size: 1.5em; }
94
+ h3 { font-size: 1.17em; }
95
+ h4 { font-size: 1.12em; }
96
+ h5 { font-size: .83em; }
97
+ h6 { font-size: .75em; }
98
+
99
+ /**
100
+ * Links
101
+ */
102
+ a {
103
+ color: $brand-color;
104
+ text-decoration: none;
105
+
106
+ &:visited {
107
+ color: darken($brand-color, 10%);
108
+ }
109
+
110
+ &:hover {
111
+ color: $text-color;
112
+ text-decoration: underline;
113
+ }
114
+ }
115
+
116
+
117
+
118
+ /**
119
+ * Blockquotes
120
+ */
121
+ blockquote {
122
+ color: $grey-color;
123
+ border-left: 4px solid $grey-color-light;
124
+ padding-left: $spacing-unit / 2;
125
+ font-size: 18px;
126
+ letter-spacing: -1px;
127
+ font-style: italic;
128
+
129
+ > :last-child {
130
+ margin-bottom: 0;
131
+ }
132
+ }
133
+
134
+
135
+
136
+ /**
137
+ * Rules
138
+ */
139
+ hr {
140
+ height: 4px;
141
+ margin: $spacing-unit / 2 0;
142
+ border: 0;
143
+ background-color: $grey-color-light;
144
+ }
145
+
146
+
147
+
148
+ /**
149
+ * Code formatting
150
+ */
151
+ pre,
152
+ code {
153
+ font-family: $monospace-font-family;
154
+ font-size: 13px;
155
+ border: 1px solid $grey-color-light;
156
+ border-radius: 0;
157
+ background-color: lighten($grey-color-light, 5%);
158
+ }
159
+
160
+ code {
161
+ padding: 1px 5px;
162
+ }
163
+
164
+ pre {
165
+ padding: 8px 12px;
166
+ overflow-x: auto;
167
+
168
+ > code {
169
+ border: 0;
170
+ padding-right: 0;
171
+ padding-left: 0;
172
+ }
173
+ }
174
+
175
+
176
+
177
+ /**
178
+ * Wrapper
179
+ */
180
+ .wrapper {
181
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
182
+ max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
183
+ margin-right: auto;
184
+ margin-left: auto;
185
+ padding-right: $spacing-unit;
186
+ padding-left: $spacing-unit;
187
+ @extend %clearfix;
188
+
189
+ @include media-query($on-laptop) {
190
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
191
+ max-width: calc(#{$content-width} - (#{$spacing-unit}));
192
+ padding-right: $spacing-unit / 2;
193
+ padding-left: $spacing-unit / 2;
194
+ }
195
+ }
196
+
197
+
198
+
199
+ /**
200
+ * Clearfix
201
+ */
202
+ %clearfix:after {
203
+ content: "";
204
+ display: table;
205
+ clear: both;
206
+ }