adam-jekyll 0.1.0 → 0.1.1

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: c2b36d9c21ed6c11bd193fb22e86cc52982f665deddbedeac067b811e157bdf9
4
- data.tar.gz: 4dfc0e851e814bea794075e943c78abcd1f0f509c32076f23ba96db2b880bb64
3
+ metadata.gz: 0c385d40bf5f019d5a31bd2bd2079d2bc9982e68bd17f9d19f5bd23e53b57c41
4
+ data.tar.gz: 0a4567918086ec99f1f150ded156a5b2594b2f9d437403f0686fa6d93cfa6ca9
5
5
  SHA512:
6
- metadata.gz: 8dbfb632268557efd7e50b6ca337e163715335043f69bcb9aa2846aaf1984062158c8d5a40a2d8487ea31b813d02f3f887aa98511508c28fb35502230d566775
7
- data.tar.gz: 8dc9e85cce3f37cbe56a7f545fa7b1077b550aef71eb7187e39c02967298c5dc5d7f4f43db67ccefceec0fb88b6382d71b9477aa054a2e68dc72860292c03da2
6
+ metadata.gz: ea34d0ea4bd0177697a3dae0c023b02e5537e4def11b5a2ec55d24e001d2222e039c44342ce26fd87ee2042c0aa48372e66e7b2fb4f76cddd55ed09828f16b37
7
+ data.tar.gz: 8308e40965930153489024e915f87de4f08a732179db95c2e87015e5e9e4c818473e7b2b787a48b87cb3ddd826005b7c10fa8e6c0b0d860bd3f33d1a0c56e482
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # adam
1
+ # Adam Jekyll
2
2
 
3
- Adam is a basic Jekyll theme meant as boilerplate code for more complex projects.
3
+ Adam Jekyll is a basic Jekyll theme meant as boilerplate code for more complex projects.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your Jekyll site's `Gemfile`:
8
8
 
9
9
  ```ruby
10
- gem "adam"
10
+ gem "adam-jekyll"
11
11
  ```
12
12
 
13
13
  And add this line to your Jekyll site's `_config.yml`:
14
14
 
15
15
  ```yaml
16
- theme: adam
16
+ theme: adam-jekyll
17
17
  ```
18
18
 
19
19
  And then execute:
@@ -22,7 +22,7 @@ And then execute:
22
22
 
23
23
  Or install it yourself as:
24
24
 
25
- $ gem install adam
25
+ $ gem install adam-jekyll
26
26
 
27
27
  ## Usage
28
28
 
@@ -42,13 +42,21 @@ This project borrows code from the following:
42
42
 
43
43
  ### Features
44
44
 
45
+ #### Search
46
+
47
+ I used [Christian Fei's Simple Jekyll Search](https://github.com/christian-fei/Simple-Jekyll-Search).
48
+
45
49
  #### Image Gallery
46
50
 
47
51
  I used the [image gallery solution from Jekyll Codex](https://jekyllcodex.org/without-plugin/image-gallery/).
48
52
 
53
+ #### Breadcrumbs
54
+
55
+ I used the [breadcrumbs solution from Jekyll Codex](https://jekyllcodex.org/without-plugin/breadcrumbs/).
56
+
49
57
  ## Contributing
50
58
 
51
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
59
+ Bug reports and pull requests are welcome on GitHub at https://github.com/victorangeloblancada/adam. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
52
60
 
53
61
  ## Development
54
62
 
@@ -57,7 +65,7 @@ To set up your environment to develop this theme, run `bundle install`.
57
65
  Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
58
66
 
59
67
  When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
60
- To add a custom directory to your theme-gem, please edit the regexp in `adam.gemspec` accordingly.
68
+ To add a custom directory to your theme-gem, please edit the regexp in `adam-jekyll.gemspec` accordingly.
61
69
 
62
70
  ## License
63
71
 
@@ -0,0 +1,7 @@
1
+ Reading time:
2
+ {% assign words = content | number_of_words %}
3
+ {% if words < 360 %}
4
+ 1 min
5
+ {% else %}
6
+ {{ words | divided_by:180 }} mins
7
+ {% endif %}
@@ -0,0 +1,16 @@
1
+ <script type="text/javascript">
2
+ window.onscroll = function() {myScrollIndicator()};
3
+
4
+ function myScrollIndicator() {
5
+ var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
6
+ var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
7
+ var scrolled = (winScroll / height) * 100;
8
+ document.getElementById("myBar").style.width = scrolled + "%";
9
+ }
10
+ </script>
11
+
12
+ <div class="header">
13
+ <div class="progress-container">
14
+ <div class="progress-bar" id="myBar"></div>
15
+ </div>
16
+ </div>
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+ <title>{% if page.title and page.title != 'Home' %}{{ page.title }} | {% endif %}{{ site.title }}</title>
9
+ {% assign pagecontent_description = page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | strip_html | strip_newlines | replace: ' ', ' ' | truncate: 160 %}
10
+ <meta name="description" content="{% if pagecontent_description.size > 10 %}{{ pagecontent_description }}{% else %}{{ site.description }}{% endif %}">
11
+
12
+ <link rel="shortcut icon" type="image/png" href="/img/icon-192x192.png">
13
+ <link rel="shortcut icon" sizes="192x192" href="/img/icon-192x192.png">
14
+ <link rel="apple-touch-icon" href="/img/icon-192x192.png">
15
+
16
+ <!-- Facebook integration -->
17
+ <meta property="og:title" content="{{ page.title }}"/>
18
+ {% if page.image %}<meta property="og:image" content="{{ page.image | prepend: site.baseurl | prepend: site.url }}"/>{% endif %}
19
+ <meta property="og:url" content="{{ page.url | prepend: site.baseurl | prepend: site.url }}"/>
20
+ <meta property="og:type" content="article">
21
+ <meta property="og:site_name" content="{{ site.title }}"/>
22
+ <meta property="og:description" content="{% if pagecontent_description.size > 10 %}{{ pagecontent_description }}{% else %}{{ site.description }}{% endif %}"/>
23
+
24
+ <!-- Twitter integration -->
25
+ <meta name="twitter:card" content="summary">
26
+ {% if site.twitter_url %}<meta name="twitter:site" content="{{ site.twitter_url }}">{% endif %}
27
+ <meta name="twitter:title" content="{{ page.title }}" />
28
+ {% if page.image %}<meta name="twitter:image" content="{{ site.url }}{{ page.image }}" />{% endif %}
29
+ <meta name="twitter:url" content="{{ site.url }}{{ page.url }}" />
30
+ <meta name="twitter:description" content="{% if pagecontent_description.size > 10 %}{{ pagecontent_description }}{% else %}{{ site.description }}{% endif %}" />
31
+
32
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
33
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
34
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="{{ "/sitemap.xml" | prepend: site.baseurl | prepend: site.url }}" />
35
+
36
+ </head>
37
+ <body class="{{ page.layout }}" id="top">
@@ -4,12 +4,13 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>{{ page.title }}</title>
7
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Crimson+Pro&display=swap">
7
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Crimson+Pro&family=JetBrains+Mono&display=swap">
8
8
  <link rel="stylesheet" href="/assets/css/styles.css">
9
9
  </head>
10
10
  <body>
11
- {% include navigation.html %}
12
- {% include breadcrumbs.html %}
11
+ {% include seo.html %} <!-- SEO -->
12
+ {% include navigation.html %} <!-- Navigation bar -->
13
+ <!--{% include breadcrumbs.html %} Breadcrumbs -->
13
14
  {{ content }}
14
15
  </body>
15
16
  </html>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{{ page.title }}</title>
7
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Crimson+Pro&family=JetBrains+Mono&display=swap">
8
+ <link rel="stylesheet" href="/assets/css/styles.css">
9
+ </head>
10
+ <body>
11
+ {% include seo.html %} <!-- SEO -->
12
+ {% include navigation.html %} <!-- Navigation bar -->
13
+ <!--{% include breadcrumbs.html %} Breadcrumbs -->
14
+ {{ content }}
15
+ </body>
16
+ </html>
data/_layouts/post.html CHANGED
@@ -1,8 +1,12 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+ {% include scroll-indicator.html %}
5
+
4
6
  <h1>{{ page.title }}</h1>
5
7
 
8
+ <p>{% include reading-time.html %}</p>
9
+
6
10
  <p>
7
11
  {{ page.date | date_to_string }}
8
12
  {% assign author = site.authors | where: 'short_name', page.author | first %}
data/_sass/main.scss CHANGED
@@ -1,4 +1,21 @@
1
- /*@import url('https://fonts.googleapis.com/css?family=Inter&Crimson+Prodisplay=swap');*/
1
+ /* Settings */
2
+
3
+ $min_width: 320px;
4
+ $max_width: 1200px;
5
+ $min_font: 16px;
6
+ $max_font: 24px;
7
+
8
+ $text-color: #353535;
9
+ $link-color: #3c6e71;
10
+ $bg-color: #d9d9d9;
11
+ $accent-color-1: #f3f4f4;
12
+ $accent-color-2: #777777;
13
+
14
+ $header-font: Inter, sans-serif;
15
+ $body-font: 'Crimson Pro', serif;
16
+ $code-font: 'JetBrains Mono', monospace, sans-serif;
17
+
18
+ /* Responsive Text */
2
19
 
3
20
  @function strip-unit($value) {
4
21
  @return $value / ($value * 0 + 1);
@@ -23,17 +40,6 @@
23
40
  }
24
41
  }
25
42
 
26
- $min_width: 320px;
27
- $max_width: 1200px;
28
- $min_font: 16px;
29
- $max_font: 24px;
30
-
31
- $text-color: #444;
32
- $bg-color: #EEE;
33
-
34
- $header-font: Inter, sans-serif;
35
- $body-font: 'Crimson Pro', serif;
36
-
37
43
  html {
38
44
  @include fluid-type($min_width, $max_width, $min_font, $max_font);
39
45
  }
@@ -41,10 +47,6 @@ html {
41
47
  body{
42
48
  color: $text-color;
43
49
  background-color: $bg-color;
44
- margin: 40px auto;
45
- max-width: 650px;
46
- line-height: 1.6em;
47
- padding: 0;
48
50
  font-family: $body-font;
49
51
  }
50
52
 
@@ -52,19 +54,115 @@ h1, h2, h3, h4, h5, h6 {
52
54
  font-family: $header-font;
53
55
  }
54
56
 
57
+ p, h1, h2, h3, h4, h5, h6, nav, pre, ul, ol, table, blockquote, hr {
58
+ margin: 40px auto;
59
+ max-width: 650px;
60
+ padding: 0;
61
+ }
62
+
63
+ p {
64
+ line-height: 1.6em;
65
+ }
66
+
67
+ /* Navigation */
68
+
55
69
  nav {
56
70
  font-family: $header-font;
57
71
  font-weight: 800;
58
72
  }
59
73
 
74
+ .current {
75
+ color: $text-color;
76
+ }
77
+
78
+ /* Links */
79
+
60
80
  a {
61
81
  text-decoration: none;
82
+ color: $link-color;
62
83
  }
63
84
 
64
85
  a:hover {
65
86
  text-decoration: underline;
66
87
  }
67
88
 
68
- .current {
69
- color: $text-color;
89
+ /* CSS for Markdown */
90
+
91
+ code {
92
+ font-family: $code-font;
93
+ font-size: .75em;
94
+ border: 1px solid $accent-color-2;
95
+ border-radius: .25rem;
96
+ padding: 0 .125rem;
97
+ background: $accent-color-1;
98
+ }
99
+
100
+ pre code {
101
+ display: block;
102
+ white-space: pre;
103
+ -webkit-overflow-scrolling: touch;
104
+ overflow-x: scroll;
105
+ max-width: 100%;
106
+ min-width: 100px;
107
+ }
108
+
109
+ blockquote {
110
+ border-left: 4px solid $accent-color-1;
111
+ padding: 0 15px;
112
+ color: $accent-color-2;
113
+ }
114
+
115
+ blockquote blockquote {
116
+ padding-right: 0;
117
+ }
118
+
119
+ hr {
120
+ border-color: $accent-color-2;
121
+ }
122
+
123
+ /* Tables */
124
+
125
+ table {
126
+ border: 1px solid $accent-color-2;
127
+ /*margin: 1rem 0;*/
128
+ }
129
+
130
+ table tr:nth-child(2n) {
131
+ background: $accent-color-1;
132
+ }
133
+
134
+ thead {
135
+ background: $text-color;
136
+ color: $bg-color;
137
+ font-family: $header-font;
138
+ }
139
+
140
+ td, th {
141
+ padding: .35rem .7rem;
142
+ border: 1px solid $accent-color-1;
143
+ }
144
+
145
+ /* Scroll Indicator */
146
+
147
+ /* Style the header: fixed position (always stay at the top) */
148
+ .header {
149
+ position: fixed;
150
+ top: 0;
151
+ z-index: 1;
152
+ width: 100%;
153
+ background-color: $accent-color-1;
154
+ }
155
+
156
+ /* The progress container (grey background) */
157
+ .progress-container {
158
+ width: 100%;
159
+ height: 8px;
160
+ background: #ccc;
161
+ }
162
+
163
+ /* The progress bar (scroll indicator) */
164
+ .progress-bar {
165
+ height: 8px;
166
+ background: $accent-color-2;
167
+ width: 0%;
70
168
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adam-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gelo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-01 00:00:00.000000000 Z
11
+ date: 2021-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -64,8 +64,12 @@ files:
64
64
  - _includes/breadcrumbs.html
65
65
  - _includes/image-gallery.html
66
66
  - _includes/navigation.html
67
+ - _includes/reading-time.html
68
+ - _includes/scroll-indicator.html
69
+ - _includes/seo.html
67
70
  - _layouts/author.html
68
71
  - _layouts/default.html
72
+ - _layouts/home.html
69
73
  - _layouts/page.html
70
74
  - _layouts/post.html
71
75
  - _sass/main.scss