electric-book-classic-theme 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05453b0475dd43b050bf7bdbb256d48919961d9a
4
- data.tar.gz: d7a489cc053b64c7a4bd038271d0cee7440f7fc3
3
+ metadata.gz: 65a0fb0bc8fe7911b9fc48fcc1fbc1a8d7eb0120
4
+ data.tar.gz: f27be566b51f47a902a4ebcc4ba5c2e1c12d0e39
5
5
  SHA512:
6
- metadata.gz: ed12ab8dd3a94ed5e1a30cace65d1af1e0e2ae9ce6b4307d6fc7062529eadbf9e36f99f9e1a4e1a545c1b56f3449c397f30643e6b7e0339df4916f33f85a10e2
7
- data.tar.gz: 44e5991be0f41633b04e1a987ad2a6274b8ce1fc1e7cd77b807fbb2c68f6b426581d92ff4b6c5e88111dc76f28bcde2d0d84bddc25ddbb98263a25df3cfd02ad
6
+ metadata.gz: dc058f78998551ff48bb9936026bfdfb86023e220eb1eb223d628175c34009ba7ab6ff01f3ccd5c31f2d6d68bfd23f198f40161bf3d991893e5a7a2cb49418c6
7
+ data.tar.gz: ac35be7f3d734872bb314d32c6b3f2447a2273ef841596e7eb91c8e8ffc445d8078ff106f6c4b35ccaa012041fd188035c7e7a0dcc20787545397307f7d3459e
data/README.md CHANGED
@@ -47,6 +47,26 @@ It's also a good idea to keep a local copy of the theme gem in your Jekyll site
47
47
 
48
48
  This theme is intended for use with the [Electric Book Jekyll template](https://github.com/electricbookworks/electric-book). For documentation on using the theme, visit [electricbook.io](http://electricbook.io).
49
49
 
50
+ ## Changelog
51
+
52
+ ### 0.1.2
53
+
54
+ * Add new nav-list include for the record (theme does not currently support it properly)
55
+ * Add new `web-nav-tree` support to `nav.html` (reads new template `web-nav-tree` metadata variable)
56
+ * Move `youtube` include from template to theme (how to embed is a theming decision)
57
+ * Revise default layout to support new template `redirect` include
58
+ * Allow injecting links and scripts into `<head>` with `head-elements` include
59
+ * Bug fix: add fallback `pdf-page-label` for custom `@page`s
60
+
61
+ ### 0.1.1
62
+
63
+ * Change `get-metadata` include to `metadata` (to match Electric Book template v0.4.1)
64
+ * Clarify including fonts in `.scss` comments
65
+
66
+ ### 0.1.0
67
+
68
+ * Original version, adapted from the Electric Book Jekyll template v 0.3.0.
69
+
50
70
  ## Contributing
51
71
 
52
72
  Bug reports and pull requests are welcome on GitHub at https://github.com/electricbookworks/electric-book-classic-theme. 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.
@@ -0,0 +1,8 @@
1
+ {% comment %}
2
+ After this comment block, include any links and scripts,
3
+ such as Google Analytics tracking scripts,
4
+ that you want in the <head> of your HTML.
5
+ Use Liquid logic tags to include only in certain outputs, e.g.
6
+ `if site.output == "web"` for Google Analytics scripts.
7
+ {% endcomment %}
8
+
@@ -23,6 +23,8 @@
23
23
  <meta name="DC.Relation" content="{{ print-pdf-identifier }}" />
24
24
  <meta name="DC.Description" CONTENT="{{ description }}" />
25
25
 
26
+ {% include head-elements %}
27
+
26
28
  </head>
27
29
  <body class="{{ directory }} {{ page.style }}">
28
30
 
@@ -40,10 +42,12 @@
40
42
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
41
43
  <meta name="viewport" content="width=device-width, initial-scale=1">
42
44
  <link rel="stylesheet" type="text/css" media="print" href="../styles/{{ page.stylesheet-screen-pdf }}" />
45
+
46
+ {% include head-elements %}
47
+
43
48
  </head>
44
49
  <body class="{{ directory }} {{ page.style }}">
45
50
 
46
-
47
51
  {% elsif site.output == 'print-pdf' %}
48
52
  <!doctype html>
49
53
  <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ language }}" xml:lang="{{ language }}">
@@ -59,12 +63,7 @@
59
63
  <meta name="viewport" content="width=device-width, initial-scale=1">
60
64
  <link rel="stylesheet" type="text/css" media="print" href="../styles/{{ page.stylesheet-print-pdf }}" />
61
65
 
62
- <!-- Google Analytics, runs unless this is running through PrinceXML -->
63
- <script>
64
- if (typeof Prince === "undefined") {
65
- <!--Paste any Google Analytics code here. The surrounding if statement stops the script slowing down PrinceXML-->
66
- }
67
- </script>
66
+ {% include head-elements %}
68
67
 
69
68
  </head>
70
69
  <!--ontouchstart="" onmouseover="" required for iOS devices-->
@@ -95,12 +94,7 @@
95
94
  <link rel="stylesheet" type="text/css" media="print" href="../styles/{{ page.stylesheet-screen-pdf }}" />
96
95
  {% endif %}
97
96
 
98
- <!-- Google Analytics, runs unless this is running through PrinceXML -->
99
- <script>
100
- if (typeof Prince === "undefined") {
101
- <!--Paste any Google Analytics code here. The surrounding if statement stops the script slowing down PrinceXML-->
102
- }
103
- </script>
97
+ {% include head-elements %}
104
98
 
105
99
  </head>
106
100
  <!--ontouchstart="" onmouseover="" required for iOS devices-->
@@ -0,0 +1,22 @@
1
+ {% comment %}
2
+ The nav-tree variable has been defined in the include that called this file.
3
+ To include child items in that tree, this file includes itself,
4
+ defining nav-tree as the children of the nav-tree it received originally.
5
+ Turtles all the way down, at least as deep as the nav tree in meta.yml goes.
6
+ Credit to Christian Specht for the inspiration:
7
+ https://christianspecht.de/2014/06/18/building-a-pseudo-dynamic-tree-menu-with-jekyll/
8
+ {% endcomment %}
9
+
10
+ <ol>
11
+ {% for item in include.nav-tree | sort: "order" %}
12
+ <li>
13
+ <a href="{{ base.url}}{{ item.file }}.html{% if item.id != nil %}#{{ item.id }}{% endif %}"
14
+ class="{% if page.url contains item.file %}active{% endif %}">
15
+ {{ item.label }}
16
+ </a>
17
+ </li>
18
+ {% if item.children != nil %}
19
+ {% include nav-list nav-tree=item.children %}
20
+ {% endif %}
21
+ {% endfor %}
22
+ </ol>
@@ -1,5 +1,20 @@
1
1
  {% include metadata %}
2
2
 
3
+ {% if site.nav-source == "nav" %}
4
+
5
+ <div id="nav" class="non-printing">
6
+ <ol>
7
+ <li class="nav-series-home"><a href="{{ site.baseurl }}/" title="Home: {{ series-name }}" class="nav-series-home-link">{{ series-name }}</a></li>
8
+ <li class="nav-book"><a href="{{ web-contents-page }}" title="Contents: {{ title }}" class="nav-book-link">{{ title }}</a></li>
9
+
10
+ {% comment %}Fetch recursive navigation{% endcomment %}
11
+ {% include nav-list nav-tree=web-nav-tree %}
12
+
13
+ </ol>
14
+ </div><!--#nav-->
15
+
16
+ {% else %}
17
+
3
18
  <div id="nav" class="non-printing">
4
19
  <ul>
5
20
  <li class="nav-series-home"><a href="{{ site.baseurl }}/" title="Home: {{ series-name }}" class="nav-series-home-link">{{ series-name }}</a></li>
@@ -25,3 +40,5 @@
25
40
  </ul>
26
41
  </ul>
27
42
  </div><!--#nav-->
43
+
44
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ <div class="videowrapper non-printing">
2
+ <iframe width="853" height="480" max-width="100%" src="https://www.youtube.com/embed/{{ include.id }}" frameborder="0" allowfullscreen></iframe>
3
+ </div><!--.videowrapper-->
@@ -1,26 +1,26 @@
1
- {% if page.type == 'file-list' %}
2
-
3
- {{ content }}
4
-
5
-
6
- {% elsif site.output == 'epub' or site.output == 'print-pdf' or site.output == 'screen-pdf' %}
7
-
8
- {% include head.html %}
9
- {% include start-wrapper.html %}
10
- {{ content }}
11
- {% include close-wrapper.html %}
12
- {% include close-body.html %}
13
-
14
-
15
- {% else %}
16
-
17
- {% include head.html %}
18
- {% include nav.html %}
19
- {% include start-wrapper.html %}
20
- {{ content }}
21
- {% include close-wrapper.html %}
22
- {% include footer.html %}
23
- {% include close-body.html %}
24
-
25
-
1
+ {% if page.type == 'file-list' or page.type == 'redirect' %}
2
+
3
+ {{ content }}
4
+
5
+
6
+ {% elsif site.output == 'epub' or site.output == 'print-pdf' or site.output == 'screen-pdf' %}
7
+
8
+ {% include head.html %}
9
+ {% include start-wrapper.html %}
10
+ {{ content }}
11
+ {% include close-wrapper.html %}
12
+ {% include close-body.html %}
13
+
14
+
15
+ {% else %}
16
+
17
+ {% include head.html %}
18
+ {% include nav.html %}
19
+ {% include start-wrapper.html %}
20
+ {{ content }}
21
+ {% include close-wrapper.html %}
22
+ {% include footer.html %}
23
+ {% include close-body.html %}
24
+
25
+
26
26
  {% endif %}
@@ -10,6 +10,12 @@
10
10
  }
11
11
 
12
12
  // Make the PDF page labels (numbers in PDF navigation) match the numbers of the book pages
13
+ // First, set the default for all pages (in case we create new ones in custom CSS)
14
+ @page {
15
+ prince-pdf-page-label: counter(page);
16
+ }
17
+
18
+ // Then set specific page labels for pages we support out of the box
13
19
  @page cover {
14
20
  prince-pdf-page-label: counter(page, lower-alpha);
15
21
  }
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "electric-book-classic-theme"
5
- spec.version = "0.1.1"
5
+ spec.version = "0.1.2"
6
6
  spec.authors = ["Arthur Attwell"]
7
7
  spec.email = ["arthur@arthurattwell.com"]
8
8
 
9
- spec.summary = %q{A Jekyll theme for use with the Electric Book, a template for making books, ebooks and book-like websites}
9
+ spec.summary = %q{A theme for use with the Electric Book Jekyll template for making books, ebooks and book-like websites}
10
10
  spec.description = %q{This is the default theme for the Electric Book, a Jekyll template for making books, ebooks and book-like websites. Use it in conjunction with the Electric Book jekyll template. Documentation at electricbook.io.}
11
11
  spec.homepage = "http://electricbook.io"
12
12
  spec.license = "MIT"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: electric-book-classic-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Attwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-02 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -74,9 +74,12 @@ files:
74
74
  - _includes/close-body.html
75
75
  - _includes/close-wrapper.html
76
76
  - _includes/footer.html
77
+ - _includes/head-elements
77
78
  - _includes/head.html
79
+ - _includes/nav-list
78
80
  - _includes/nav.html
79
81
  - _includes/start-wrapper.html
82
+ - _includes/youtube
80
83
  - _layouts/default.html
81
84
  - _layouts/min.html
82
85
  - _sass/epub.scss
@@ -177,7 +180,7 @@ files:
177
180
  - _sass/print-pdf.scss
178
181
  - _sass/screen-pdf.scss
179
182
  - _sass/web.scss
180
- - electric-book-classic-theme-0.1.0.gem
183
+ - electric-book-classic-theme-0.1.1.gem
181
184
  - electric-book-classic-theme.gemspec
182
185
  - index.md
183
186
  - screenshot.png
@@ -204,6 +207,6 @@ rubyforge_project:
204
207
  rubygems_version: 2.2.3
205
208
  signing_key:
206
209
  specification_version: 4
207
- summary: A Jekyll theme for use with the Electric Book, a template for making books,
210
+ summary: A theme for use with the Electric Book Jekyll template for making books,
208
211
  ebooks and book-like websites
209
212
  test_files: []