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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8db2f57d31d171f21e326e3ac92bf8642f958db87f38c5bd8d40375b4b839671
4
- data.tar.gz: 37fdf23887400278251eec91607e70f88e19916f32cb4dd62e9a7bfc36f8e4bd
3
+ metadata.gz: 7d33c0f33b30138d1e974e99cd5823ee64e35de94210b180b8d2fa5c34c5bece
4
+ data.tar.gz: d4e7c2abaf6ba064c022ed455b0ac077716bd6e36fbfd005b1d90b94c992c705
5
5
  SHA512:
6
- metadata.gz: 89105dc41c40fc03e3ed92be9b542f322d9e17214fdc9eb00b6f664833a7f39c01a60f560256008affa1aab3193be8d2834e95e1758b9c58487acde8dcd223e4
7
- data.tar.gz: b512219be5552762b4fe45364df66eb949a7e3a6d47d840c1230376191e60e97fa8532e4250aafd6751242875dfc9e67128b18d19ee0f846327976ac6d7aca58
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
- // Theme for the Swiss-Sided Dice podcast, red and white based on the Swiss flag - commented out for now, until a better solution can be found
25
-
26
- /*
27
- // Bulma's navbar reads its colors from CSS custom properties scoped on .navbar,
28
- // so a single block covers the background plus the hue/saturation/lightness
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: #E11A27;
33
- --bulma-navbar-h: 356deg;
34
- --bulma-navbar-s: 87%;
35
- --bulma-navbar-l: 45%;
36
- --bulma-navbar-item-color: #FFF;
37
- --bulma-navbar-burger-color: #FFF;
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 are a dark red for best contrast, but get lightened on hover for feedback
59
+ // Links and buttons in the website match the navbar, but get lightened on hover for feedback
41
60
  a {
42
- color: #CF000F;
61
+ color: #48CFAD;
43
62
  }
44
63
  a:hover {
45
- color: #EF3743;
64
+ color: #7BD1BD;
46
65
  }
47
66
  .button.is-primary {
48
- background-color: #CF000F;
67
+ background-color: #48CFAD;
49
68
  }
50
69
  .button.is-primary:hover, .button.is-primary:focus {
51
- background-color: #EF3743;
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
- GEM_DIR = Gem::Specification.find_by_name("jekyll-octopod").gem_dir
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'
@@ -2,7 +2,7 @@ module Jekyll
2
2
  class Octopod
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
- MINOR = 16
5
+ MINOR = 17
6
6
  TINY = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-octopod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann