jekyll-octopod 0.16.0 → 0.17.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 +4 -4
- data/assets/_sass/_overrides.scss +37 -19
- data/bin/octopod +46 -2
- data/lib/octopod/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d33c0f33b30138d1e974e99cd5823ee64e35de94210b180b8d2fa5c34c5bece
|
|
4
|
+
data.tar.gz: d4e7c2abaf6ba064c022ed455b0ac077716bd6e36fbfd005b1d90b94c992c705
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a66245f2206986d49d319fd4edd0384123cddcf5964229564c108ba35955c132af238ca8c55f52972a4926f6a997fea9442266a29efc439062854efde4c5e960
|
|
7
|
+
data.tar.gz: a21441985a2cdbfe4f2ebaa6571c6b2ad2fe1879e946781a0c8142aaafb42fc228689ee347665353b8763a1b60af1db53905c9b162419ab6d4f633aa53f7d374
|
|
@@ -21,33 +21,51 @@ h1 small, h2 small, h3 small {
|
|
|
21
21
|
font-size: 45%;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
// triple it derives hover, active and dropdown shading from - no separate
|
|
30
|
-
// hover/toggle overrides needed the way Bootstrap required.
|
|
24
|
+
// Example: give your site its own brand color instead of Bulma's default navbar. Bulma's navbar
|
|
25
|
+
// reads its colors from CSS custom properties scoped on .navbar, so a single block covers the
|
|
26
|
+
// background plus the hue/saturation/lightness triple it derives hover, active and dropdown
|
|
27
|
+
// shading from. Swap the values below for your own color and delete this comment once you've
|
|
28
|
+
// made it yours.
|
|
31
29
|
.navbar {
|
|
32
|
-
--bulma-navbar-background-color: #
|
|
33
|
-
--bulma-navbar-h:
|
|
34
|
-
--bulma-navbar-s:
|
|
35
|
-
--bulma-navbar-l:
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
--bulma-navbar-background-color: #48CFAD;
|
|
31
|
+
--bulma-navbar-h: 166deg;
|
|
32
|
+
--bulma-navbar-s: 48%;
|
|
33
|
+
--bulma-navbar-l: 55%;
|
|
34
|
+
|
|
35
|
+
// Without this, Bulma still colors the *currently active* nav item (a.navbar-item.is-active)
|
|
36
|
+
// from its own global --bulma-link-h/-s/-l default (a blue unrelated to the values above) instead
|
|
37
|
+
// of from this navbar's own hue/saturation/lightness - these four properties are what it actually
|
|
38
|
+
// reads for that state, so they need to be pointed at our own values too.
|
|
39
|
+
--bulma-navbar-item-selected-h: var(--bulma-navbar-h);
|
|
40
|
+
--bulma-navbar-item-selected-s: var(--bulma-navbar-s);
|
|
41
|
+
--bulma-navbar-item-selected-l: var(--bulma-navbar-l);
|
|
42
|
+
--bulma-navbar-item-selected-background-l: 40%;
|
|
43
|
+
--bulma-navbar-item-selected-color-l: 97%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// The resting nav items' text color is Bulma's own --bulma-text-l, which is intentionally light
|
|
47
|
+
// in dark mode (for contrast against the page's now-dark background) - but our navbar's own
|
|
48
|
+
// background above is a literal color, so it doesn't darken with the rest of the page. Without
|
|
49
|
+
// this, dark mode ends up with near-white text on a background that's still light-mode teal,
|
|
50
|
+
// unreadable. Darkening the same hue/saturation here keeps the brand color recognizable while
|
|
51
|
+
// giving Bulma's light dark-mode text something dark enough to actually contrast against.
|
|
52
|
+
@media (prefers-color-scheme: dark) {
|
|
53
|
+
.navbar {
|
|
54
|
+
--bulma-navbar-background-color: #1B4B40;
|
|
55
|
+
--bulma-navbar-l: 20%;
|
|
56
|
+
}
|
|
38
57
|
}
|
|
39
58
|
|
|
40
|
-
// Links and buttons in the website
|
|
59
|
+
// Links and buttons in the website match the navbar, but get lightened on hover for feedback
|
|
41
60
|
a {
|
|
42
|
-
color: #
|
|
61
|
+
color: #48CFAD;
|
|
43
62
|
}
|
|
44
63
|
a:hover {
|
|
45
|
-
color: #
|
|
64
|
+
color: #7BD1BD;
|
|
46
65
|
}
|
|
47
66
|
.button.is-primary {
|
|
48
|
-
background-color: #
|
|
67
|
+
background-color: #48CFAD;
|
|
49
68
|
}
|
|
50
69
|
.button.is-primary:hover, .button.is-primary:focus {
|
|
51
|
-
background-color: #
|
|
70
|
+
background-color: #7BD1BD;
|
|
52
71
|
}
|
|
53
|
-
*/
|
data/bin/octopod
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
# require "byebug"
|
|
3
3
|
PWD = Dir.pwd
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
GEM_SPEC = Gem::Specification.find_by_name("jekyll-octopod")
|
|
6
|
+
GEM_DIR = GEM_SPEC.gem_dir
|
|
6
7
|
# HAS20170501 disgusting hack for development
|
|
7
8
|
# GEM_DIR = "/home/user/jekyll/jekyll-octopod/"
|
|
8
9
|
|
|
@@ -28,6 +29,11 @@ Basic Command Line Usage:
|
|
|
28
29
|
Additional Octopod commands:
|
|
29
30
|
octopod episode # adds a template for a new episode
|
|
30
31
|
octopod deploy # deploys your site
|
|
32
|
+
octopod update # updates template files from an existing setup to
|
|
33
|
+
# the currently installed jekyll-octopod version,
|
|
34
|
+
# without touching posts, imprint.md or index.md,
|
|
35
|
+
# and rewrites the old '{% podigee_player %}' tag
|
|
36
|
+
# to '{% podlove_player %}' wherever it's still used
|
|
31
37
|
|
|
32
38
|
See 'octopod <command> --help' for more information on a specific command.
|
|
33
39
|
|
|
@@ -110,7 +116,7 @@ def get_stdin(message)
|
|
|
110
116
|
STDIN.gets.chomp
|
|
111
117
|
end
|
|
112
118
|
|
|
113
|
-
if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == 'setup')
|
|
119
|
+
if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == 'setup' || ARGV[0] == 'update')
|
|
114
120
|
options = YAML.load_file(File.join(PWD, '_config.yml'))
|
|
115
121
|
options['posts_dir'] = File.join(PWD, '_posts')
|
|
116
122
|
|
|
@@ -271,6 +277,44 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
|
|
|
271
277
|
FileUtils.cp(GEM_DIR + "/assets/_config.yml.sample", PWD + "/_config.yml", verbose: true)
|
|
272
278
|
end
|
|
273
279
|
puts "===== ... done ===== ", ""
|
|
280
|
+
|
|
281
|
+
when 'update'
|
|
282
|
+
# Paths that are always left alone: real posts, hand-written content pages, and the gem's
|
|
283
|
+
# demo episode audio. Unlike 'setup', these are skipped outright rather than offered as a
|
|
284
|
+
# per-file prompt, since this command targets sites that are already live.
|
|
285
|
+
skip_on_update = %w[_posts imprint.md index.md episodes]
|
|
286
|
+
|
|
287
|
+
update_file = lambda do |file|
|
|
288
|
+
relative = file.split(GEM_DIR + "/assets")[1]
|
|
289
|
+
next if skip_on_update.any? { |skip| relative == "/#{skip}" || relative.start_with?("/#{skip}/") }
|
|
290
|
+
copy_file_or_create_dir(file)
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
puts "", "===== Updating template files to jekyll-octopod #{GEM_SPEC.version} ... ====="
|
|
294
|
+
puts "_posts/, imprint.md, index.md and the demo episodes/ directory are left untouched."
|
|
295
|
+
puts "You'll be asked before any other existing file gets overwritten.", ""
|
|
296
|
+
|
|
297
|
+
Dir.glob(GEM_DIR + "/assets/**/*").each(&update_file)
|
|
298
|
+
Dir.glob(GEM_DIR + "/assets/**/.*").each(&update_file)
|
|
299
|
+
puts "===== ... done ===== ", ""
|
|
300
|
+
|
|
301
|
+
puts "", "===== Rewriting the old '{% podigee_player %}' tag to '{% podlove_player %}' ... ====="
|
|
302
|
+
podigee_player_tag = /\{%-?\s*podigee_player\b.*?-?%\}/
|
|
303
|
+
updated_posts = Dir.glob(File.join(options['posts_dir'], '**', '*')).select do |post_file|
|
|
304
|
+
next false unless File.file?(post_file)
|
|
305
|
+
content = File.read(post_file)
|
|
306
|
+
next false unless content.match?(podigee_player_tag)
|
|
307
|
+
File.write(post_file, content.gsub(podigee_player_tag, '{% podlove_player %}'))
|
|
308
|
+
true
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if updated_posts.empty?
|
|
312
|
+
puts "No posts used the old 'podigee_player' tag."
|
|
313
|
+
else
|
|
314
|
+
puts "Updated:"
|
|
315
|
+
updated_posts.each { |post_file| puts " #{post_file}" }
|
|
316
|
+
end
|
|
317
|
+
puts "===== ... done ===== ", ""
|
|
274
318
|
end
|
|
275
319
|
else
|
|
276
320
|
puts octopod_help if ARGV.size > 0 && ARGV[0] == '--help'
|
data/lib/octopod/version.rb
CHANGED