jekyll-theme-eva 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a872db79927b62d67b65a6bd68276d992da9c8dac7f7c8d9a4020d388b85ad1b
4
+ data.tar.gz: 7e803245257a06ea4d99a7bb6fe31fbfa1d6b6ce7a5d7096b6a796fef7f983b0
5
+ SHA512:
6
+ metadata.gz: aa340a7eca385a6015d81baec6da7cd370b629ed232c48a004256178e07802622a46e28c3279a9426e68c35cfd46efa90578f5ebbc3fa6804948f6aa8fe63811
7
+ data.tar.gz: 53e5a24acf0274231449a698f37fd05bc68de43279f0fa4fe02ca81ef0b0a55931342950a65bb89a0af0df97587b7359314dfea4f113a6f6926ba575da4b6540
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *.gem
2
+ .bundle
3
+ .sass-cache/
4
+ _site/
5
+ Gemfile.lock
6
+ node_modules/
7
+ .jekyll-metadata
8
+ assets/resized/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Anton Strogonoff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Eva: Jekyll theme for artist’s portfolio
2
+
3
+ To start:
4
+
5
+ - Add "jekyll-theme-eva" gem to your Gemfile
6
+ - Specify "jekyll-theme-eva" theme in your site configuration
7
+ - Copy theme’s _plugins directory into your site base directory
8
+ - Create _data/albums and populate it with album data
9
+
10
+ Album data structure:
11
+
12
+ - albums/
13
+ - <album 1 name>/
14
+ - about.yml
15
+ - artwork/
16
+ - <artwork 1 name>/
17
+ - about.yml
18
+ - <image file name>.svg
19
+ - <artwork 2 name>/
20
+ - about.yml
21
+ - <image file name>.svg
22
+
23
+ Customization:
24
+
25
+ - Create _includes/head_symbol_home.html for custom logo/mascot header
26
+ - Create assets/css/style.scss with variables and custom styling rules,
27
+ place variables before `@import 'jekyll-theme-eva';` and custom rules after
28
+
29
+ Note:
30
+ uses plugins and Node (Webpack), so not suitable for Github pages auto-build.
data/_config.yml ADDED
@@ -0,0 +1,35 @@
1
+ full_name: John Smith
2
+ given_name: John
3
+ family_name: Smith
4
+ job_title: Illustrator
5
+ tagline: here is tagline
6
+
7
+ url:
8
+
9
+ phone_number:
10
+
11
+ social:
12
+ links:
13
+ - https://www.instagram.com/anileated/
14
+
15
+ email: example@example.com
16
+
17
+ # Or,
18
+ # email_encoded: <encoded string>
19
+ # key: <crypto key>
20
+
21
+ # google_site_verification: <string>
22
+
23
+ # Language in the format outlined here:
24
+ # https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
25
+ language: en
26
+
27
+ plugins:
28
+ - jekyll-responsive-image
29
+
30
+ responsive_image:
31
+ template: _includes/_responsive_image.html
32
+ sizes:
33
+ - width: 480
34
+ quality: 80
35
+ - width: 800
@@ -0,0 +1,12 @@
1
+ {% comment %}Base size for the icon is 64x64px.{% endcomment %}
2
+ <link rel="icon"
3
+ type="image/png"
4
+ href="{{ "favicon.png" | relative_url }}">
5
+ <link rel="icon"
6
+ type="image/svg+xml"
7
+ href="{{ "favicon.svg" | relative_url }}">
8
+ <link rel="apple-touch-icon"
9
+ type="image/png"
10
+ sizes="256x256"
11
+ href="{{ "favicon@4x.png" | relative_url }}">
12
+
@@ -0,0 +1,9 @@
1
+ {% capture srcset %}
2
+ {% for i in resized %}
3
+ /{{ i.path }} {{ i.width }}w,
4
+ {% endfor %}
5
+ {% endcapture %}
6
+
7
+ {% assign largest = resized | sort: 'width' | last %}
8
+
9
+ <img src="/{{ largest.path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }}">
File without changes
@@ -0,0 +1,27 @@
1
+ {
2
+ "@context": "http://schema.org",
3
+ "@type": "Person",
4
+ "image": "{{ "favicon@4x.png" | relative_url }}",
5
+ "jobTitle": "{{ site.job_title }}",
6
+ {% if site.given_name %}
7
+ "givenName": "{{ site.given_name }}",
8
+ {% endif %}
9
+ {% if site.family_name %}
10
+ "familyName": "{{ site.family_name }}",
11
+ {% endif %}
12
+ {% if site.additional_name %}
13
+ "additionalName": "{{ site.additional_name }}",
14
+ {% endif %}
15
+ "name": "{{ site.full_name }}",
16
+ {% if site.telephone %}
17
+ "telephone": "{{ site.phone_number }}",
18
+ {% endif %}
19
+ {% if site.url %}
20
+ "url": "{{ site.url }}",
21
+ {% endif %}
22
+ "sameAs": [
23
+ {% for link in site.social.links %}
24
+ "{{ link }}"{% if forloop.last == false %},{% endif %}
25
+ {% endfor %}
26
+ ]
27
+ }
@@ -0,0 +1,36 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include head_symbol_home.html %}
6
+
7
+ <header class="album__header" role="banner">
8
+ <img
9
+ role="presentation"
10
+ class="shadowything-top"
11
+ src="{{ "assets/img/shadowything-top@2x.png" | relative_url }}">
12
+
13
+ <div class="brand" role="presentation">
14
+ <nav class="author">
15
+ <a href="/" title="Return to the main page">{{ site.given_name }}’s</a>
16
+ </nav>
17
+ <h1 class="album-title">{{ page.about.title | downcase }}</h1>
18
+ <p class="album-desc">{{ page.about.description }}</p>
19
+ </div>
20
+ </header>
21
+
22
+ <section class="album__artwork {{ page.about.artwork_list_style }}">
23
+ {% for artwork in page.artwork %}
24
+ {% assign artwork_data = artwork[1] %}
25
+ {% assign item = artwork_data.items[0] %}
26
+ <article class="item" title="{{ artwork_data.about.title }}">
27
+ {% if item.path contains ".svg" %}
28
+ <img src="{{ item.path | relative_url }}">
29
+ {% else %}
30
+ {% responsive_image_block %}
31
+ path: {{ item.source_path }}
32
+ {% endresponsive_image_block %}
33
+ {% endif %}
34
+ </article>
35
+ {% endfor %}
36
+ </section>
@@ -0,0 +1,110 @@
1
+ <!doctype html>
2
+
3
+ <html lang="{{ language }}">
4
+
5
+ <head>
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+
9
+ <title>{% if page.about.title %}{{ page.about.title }} — {% endif %}{{ site.full_name }}: {{ site.tagline }}</title>
10
+
11
+ {% if site.google_site_verification %}
12
+ <meta
13
+ name="google-site-verification"
14
+ content="{{ site.google_site_verification }}">
15
+ {% endif %}
16
+
17
+ {% if page.structured_data_include or layout.structured_data_include %}
18
+ <script type="application/ld+json">
19
+ {% if page.structured_data_include %}
20
+ {% include {{ page.structured_data_include }} %}
21
+ {% else %}
22
+ {% include {{ layout.structured_data_include }} %}
23
+ {% endif %}
24
+ </script>
25
+ {% endif %}
26
+
27
+ {% include _icon_head_links.html %}
28
+
29
+ {% comment %}Outdated browser detection & update prompt bootstrap{% endcomment %}
30
+ <script>
31
+ (function () {
32
+ function $buo_f() {
33
+ var e = document.createElement("script");
34
+ e.src = "{{ "assets/js/browser-update.js" | relative_url }}";
35
+ document.body.appendChild(e);
36
+ };
37
+ try {document.addEventListener("DOMContentLoaded", $buo_f, false)}
38
+ catch(e) {window.attachEvent("onload", $buo_f)}
39
+ }());
40
+ </script>
41
+
42
+ {% comment %}Email{% endcomment %}
43
+ <script>
44
+ (function () {
45
+ window.emailc = '{{ site.email_encoded }}:{{ site.key }}';
46
+ }());
47
+ </script>
48
+
49
+ <script defer src="https://use.fontawesome.com/releases/v5.0.10/js/solid.js" integrity="sha384-Q7KAHqDd5trmfsv85beYZBsUmw0lsreFBQZfsEhzUtUn5HhpjVzwY0Aq4z8DY9sA" crossorigin="anonymous"></script>
50
+ <script defer src="https://use.fontawesome.com/releases/v5.0.10/js/brands.js" integrity="sha384-6jhVhr5a+Z1nLr9h+fd7ocMEo847wnGFelCHddaOOACUeZNoQwFXTxh4ysXVam8u" crossorigin="anonymous"></script>
51
+ <script defer src="https://use.fontawesome.com/releases/v5.0.10/js/fontawesome.js" integrity="sha384-M2FSA4xMm1G9m4CNXM49UcDHeWcDZNucAlz1WVHxohug0Uw1K+IpUhp/Wjg0y6qG" crossorigin="anonymous"></script>
52
+
53
+ <link href="https://fonts.googleapis.com/css?family=Barlow+Condensed" rel="stylesheet">
54
+
55
+ <link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
56
+ </head>
57
+
58
+ <body class="layout-{{ page.layout }} name-{{ page.about.name }}">
59
+
60
+ <main>
61
+
62
+ {{ content }}
63
+
64
+ <footer class="footer">
65
+ <nav class="social fa-2x" aria-label="Social links & contact channels">
66
+ {% for link in site.social.links %}
67
+ <a href="{{ link }}" class="ico">
68
+ <span class="fa-layers">
69
+ <i class="fas fa-circle"></i>
70
+ <i class="fab
71
+ {% if link contains "twitter.com" %}
72
+ fa-twitter
73
+ {% elsif link contains "github.com" %}
74
+ fa-github
75
+ {% elsif link contains "facebook.com" %}
76
+ fa-facebook
77
+ {% elsif link contains "tumblr.com" %}
78
+ fa-tumblr
79
+ {% elsif link contains "instagram.com" %}
80
+ fa-instagram
81
+ {% endif %}
82
+ " data-fa-transform="shrink-6"></i>
83
+ </span>
84
+ </a>
85
+ {% endfor %}
86
+
87
+ {% if site.email_encoded or site.email %}
88
+ <a class="ico" title="Email"
89
+ {% if site.email_encoded %}
90
+ href=""
91
+ data-fill-email
92
+ {% else %}
93
+ href="mailto:{{ site.email }}"
94
+ {% endif %}>
95
+ <span class="fa-layers">
96
+ <i class="fas fa-circle"></i>
97
+ <i class="fas fa-envelope" data-fa-transform="shrink-8"></i>
98
+ </span>
99
+ </a>
100
+ {% endif %}
101
+ </nav>
102
+
103
+ <small class="legal">
104
+ © 2018 {{ site.full_name }}&emsp;•&emsp;All Rights Reserved
105
+ </small>
106
+ </footer>
107
+ </main>
108
+
109
+ <script src="{{ "assets/eva.js" | relative_url }}"></script>
110
+ </body>
@@ -0,0 +1,36 @@
1
+ ---
2
+ layout: default
3
+ structured_data_include: json_ld_person.html
4
+ ---
5
+
6
+ <header class="home__header" role="banner">
7
+ <h1 class="name">
8
+ {{ site.full_name }}
9
+ </h1>
10
+ <h2 class="tagline">
11
+ {{ site.tagline }}
12
+ </h2>
13
+ </header>
14
+
15
+ {% include head_symbol_home.html %}
16
+
17
+ <img class="home__shadowything"
18
+ src="{{ "assets/img/shadowything@2x.png" | relative_url }}"
19
+ role="presentation">
20
+
21
+ <nav class="home__nav" role="navigation">
22
+ {% assign albums_unsorted = site.data.albums | values %}
23
+ {% assign albums = albums_unsorted | sort: "about.priority" %}
24
+ {% for album in albums %}
25
+ <a class="{{ album.about.name }} nav-item
26
+ {{ album.about.home_nav_icon_style }}"
27
+ href="{{ album.url }}"
28
+ title="{{ album.about.title }}">
29
+ <div class="backdrop" role="presentation"></div>
30
+ <img class="icon"
31
+ src="{{ album.symbol_path | relative_url }}"
32
+ role="presentation">
33
+ <div class="label">{{ album.about.title | downcase }}</div>
34
+ </a>
35
+ {% endfor %}
36
+ </nav>
@@ -0,0 +1,148 @@
1
+ IMAGE_EXTS = ['.svg', '.png', '.jpg', '.jpeg']
2
+
3
+ def get_album_source_path(album_name)
4
+ # Relative to Jekyll’s data dir
5
+ return File.join("albums", album_name)
6
+ end
7
+
8
+ def get_album_symbol_filename()
9
+ return "symbol.png"
10
+ end
11
+
12
+ def get_album_static_dest_path(album_name)
13
+ # Relative to Jekyll’s assets dir
14
+ return File.join("albums", album_name)
15
+ end
16
+
17
+ def get_album_artwork_dest_path()
18
+ # Relative to album dest path
19
+ return "artwork"
20
+ end
21
+
22
+ module Jekyll
23
+
24
+ class AlbumSymbol < StaticFile
25
+ def initialize(site, album)
26
+ @album = album
27
+ fn = get_album_symbol_filename()
28
+ album_name = album["about"]["name"]
29
+
30
+ super(
31
+ site,
32
+ site.source,
33
+ File.join("_data", get_album_source_path(album_name)),
34
+ fn)
35
+
36
+ @relative_path = File.join(
37
+ "assets",
38
+ get_album_static_dest_path(album_name),
39
+ fn)
40
+ end
41
+
42
+ def destination_rel_dir
43
+ File.dirname(@relative_path)
44
+ end
45
+ end
46
+
47
+ class ArtworkItem < StaticFile
48
+ def initialize(site, album, artwork_name, item_filename)
49
+ @album = album
50
+ @artwork_name = artwork_name
51
+ album_name = album["about"]["name"]
52
+
53
+ super(
54
+ site,
55
+ site.source,
56
+ File.join(
57
+ "_data",
58
+ get_album_source_path(album_name),
59
+ "artwork",
60
+ artwork_name),
61
+ item_filename)
62
+
63
+ @relative_path = File.join(
64
+ "assets",
65
+ get_album_static_dest_path(album_name),
66
+ "artwork",
67
+ @artwork_name,
68
+ item_filename)
69
+ end
70
+
71
+ def destination_rel_dir
72
+ File.dirname(@relative_path)
73
+ end
74
+ end
75
+
76
+ class AlbumPage < Page
77
+ def initialize(site, base, dir, album_data)
78
+ @site = site
79
+ @base = base
80
+ @dir = dir
81
+ @name = "index.html"
82
+
83
+ self.process(@name)
84
+ self.read_yaml(File.join(base, "_layouts"), "album.html")
85
+
86
+ self.data["layout"] = "album"
87
+
88
+ album_data.each do |key, value|
89
+ self.data[key] = value
90
+ end
91
+ end
92
+ end
93
+
94
+ class AlbumGenerator < Generator
95
+ safe true
96
+
97
+ def generate(site)
98
+ # If all albums should be served from under common path…
99
+ base_path = site.config["albums_base_path"] || ""
100
+
101
+ site.data["albums"].each do |album_data|
102
+ album = album_data[1]
103
+ album_name = album["about"]["name"]
104
+
105
+ path = File.join(base_path, album_name)
106
+ album["url"] = path
107
+
108
+ symbol_static_file = AlbumSymbol.new(site, album)
109
+ album["symbol_path"] = symbol_static_file.url
110
+ site.static_files << symbol_static_file
111
+
112
+ artwork_root = File.join(
113
+ site.source,
114
+ "_data",
115
+ get_album_source_path(album_name),
116
+ "artwork")
117
+
118
+ album["artwork"].each do |artwork_name, artwork_data|
119
+ artwork_item_root = File.join(artwork_root, artwork_name)
120
+ next unless File.directory?(artwork_item_root)
121
+ artwork_items = []
122
+
123
+ Dir["#{artwork_item_root}/*"].each do |artwork_item|
124
+ next if (File.directory?(artwork_item) or !IMAGE_EXTS.include?(File.extname(artwork_item)))
125
+ item_filename = File.basename(artwork_item)
126
+
127
+ artwork_item_static_file = ArtworkItem.new(
128
+ site,
129
+ album,
130
+ artwork_name,
131
+ item_filename)
132
+ artwork_items.push({
133
+ "name" => File.basename(item_filename, ".*"),
134
+ "path" => artwork_item_static_file.url,
135
+ "source_path" => artwork_item_static_file.path,
136
+ })
137
+ site.static_files << artwork_item_static_file
138
+ end
139
+
140
+ album["artwork"][artwork_name]["items"] = artwork_items
141
+ end
142
+
143
+ site.pages << AlbumPage.new(site, site.source, path, album)
144
+ end
145
+ end
146
+ end
147
+
148
+ end