bulmatown 1.0.2 → 1.0.3

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: 491df0f4017115c834e573c2dbe73c9a4b7b06b723f68a5fec4528f241d67ee6
4
- data.tar.gz: f64c37e0dd7372f115a3136c18431ffc9d1d72a319ef02ac005afe97a80e2780
3
+ metadata.gz: 0cf33656582634a453a7e2119a081162519d60f7f6e7d3869a2df20737d8ab8c
4
+ data.tar.gz: 25cd31c1d7eeb1147d4bec23a24b6fddf9988c1536cb4c98a44371a6bb6a010d
5
5
  SHA512:
6
- metadata.gz: ada1ec76386a705994c49455f0630fde74977cba340db71ea1248a4a37441b5a45b225fb8bb85ef55eafdf1c0e6176e07e2fc1a3f3558183f8214eec40f40abc
7
- data.tar.gz: 313896cf57d651b83f1abf8355288ca40cabcd173c464170d9cd101ae1b4491faa045dbef93b024691555d0351de116febcb91bd4291643e5e57c22df881c82b
6
+ metadata.gz: dd1a8720b2e838b6e67d2742e9e642bd6c3dffcd59288c07e8f4165f9aa67cb4da203d5a19643b15d8d98a6fbe3f5fbc481c002433f0d9f5ddbe380c54f530cd
7
+ data.tar.gz: 0ee7fac751358286b63c588bd14f82775b410d68003eb5b010593d217bf83724f815c5d55236101d652e4d5665f9429b4d6048969b19176591d62ec4c81e3827
@@ -1,8 +1,17 @@
1
+ # Thanks to https://github.com/ParamagicDev for a bunch of the smarts in this
2
+ # automation :)
3
+
1
4
  add_bridgetown_plugin "bulmatown"
2
5
  add_bridgetown_plugin "bridgetown-quick-search"
3
- add_yarn_for_gem "bulmatown"
6
+
7
+ # 0.15 bug! :( can't use this:
8
+ #add_yarn_for_gem "bulmatown"
9
+
10
+ gem_version = (`bundle info bulmatown`).match(/\*.*\((.*?)\)/)[1]
11
+ run "yarn add bulmatown@#{gem_version}"
4
12
 
5
13
  require 'fileutils'
14
+ require 'shellwords'
6
15
 
7
16
  unless Dir.exist? "frontend/fonts"
8
17
  FileUtils.mkdir_p "frontend/fonts"
@@ -12,18 +21,76 @@ run "cp node_modules/fork-awesome/fonts/* frontend/fonts"
12
21
 
13
22
  javascript_import 'import Bulmatown from "bulmatown"'
14
23
 
15
- if ask "The Bulmatown theme can update layout and page templates in your site to use the theme. Would you like to continue?"
16
- layout_tmpl = ->(tmpl_name) do
17
- <<~HTML
18
- ---
19
- layout: bulmatown/#{tmpl_name}
20
- ---
21
-
22
- {{ content }}
23
- HTML
24
+ # *** Set up remote repo pull
25
+
26
+ # Dynamically determined due to having to load from the tempdir
27
+ @current_dir = File.expand_path(__dir__)
28
+
29
+ # If its a remote file, the branch is appended to the end, so go up a level
30
+ ROOT_PATH = if __FILE__ =~ %r{\Ahttps?://}
31
+ File.expand_path('../', __dir__)
32
+ else
33
+ File.expand_path(__dir__)
34
+ end
35
+
36
+ DIR_NAME = File.basename(ROOT_PATH)
37
+
38
+ # DIR_NAME = 'bulmtatown'
39
+ GITHUB_PATH = "https://github.com/whitefusionhq/#{DIR_NAME}.git"
40
+
41
+ # Copied from: https://github.com/mattbrictson/rails-template
42
+ # Add this template directory to source_paths so that Thor actions like
43
+ # copy_file and template resolve against our source files. If this file was
44
+ # invoked remotely via HTTP, that means the files are not present locally.
45
+ # In that case, use `git clone` to download them to a local temporary dir.
46
+ def add_template_repository_to_source_path
47
+ if __FILE__ =~ %r{\Ahttps?://}
48
+ require 'tmpdir'
49
+
50
+ source_paths.unshift(tempdir = Dir.mktmpdir(DIR_NAME + '-'))
51
+ at_exit { FileUtils.remove_entry(tempdir) }
52
+ run("git clone --quiet #{GITHUB_PATH.shellescape} #{tempdir.shellescape}")
53
+
54
+ if (branch = __FILE__[%r{#{DIR_NAME}/(.+)/bridgetown.automation.rb}, 1])
55
+ Dir.chdir(tempdir) { system("git checkout #{branch}") }
56
+ @current_dir = File.expand_path(tempdir)
57
+ end
58
+ else
59
+ source_paths.unshift(DIR_NAME)
24
60
  end
25
- create_file "src/_layouts/home.html", layout_tmpl(:home)
26
- create_file "src/_layouts/page.html", layout_tmpl(:page)
27
- create_file "src/_layouts/post.html", layout_tmpl(:post)
61
+ end
28
62
 
63
+ if yes? "The Bulmatown installer can update styles, layouts, and page templates to use the new theme. You'll have the option to type 'a' to overwrite all existing files or 'd' to inspect each change. Would you like to proceed? (Y/N)"
64
+ add_template_repository_to_source_path
65
+
66
+ create_file "frontend/styles/index.scss", '@import "~bulmatown/frontend/styles"'
67
+
68
+ copy_file "example/src/_layouts/home.html", "src/_layouts/home.html"
69
+ copy_file "example/src/_layouts/page.html", "src/_layouts/page.html"
70
+ copy_file "example/src/_layouts/post.html", "src/_layouts/post.html"
71
+
72
+
73
+ gsub_file "src/_layouts/default.html", '{% render "footer", ', '{% render "footer", url: site.url, '
74
+
75
+ copy_file "example/src/index.md", "src/index.md"
76
+ copy_file "example/src/posts.md", "src/posts.md"
77
+ copy_file "example/src/404.html", "src/404.html"
78
+
79
+ copy_file "example/src/_components/navbar.liquid", "src/_components/navbar.liquid"
80
+ copy_file "example/src/_components/footer.liquid", "src/_components/footer.liquid"
81
+
82
+ inject_into_file "bridgetown.config.yml", "pagination:\n enabled: true\n", after: "permalink: pretty\n"
29
83
  end
84
+
85
+ twitter = ask "Do you have a Twitter handle? If so, enter it here, otherwise type 'no'"
86
+
87
+ if twitter != "" && twitter != "no"
88
+ append_to_file "src/_data/site_metadata.yml" do
89
+ <<~YAML
90
+ twitter: #{twitter}
91
+
92
+ YAML
93
+ end
94
+ end
95
+
96
+ say_status :bulmatown, "Theme installation complete! Enjoy your fresh new design :)"
@@ -21,6 +21,15 @@ $gradient-bottom-right: transparentize(lighten(saturate(adjust-hue($dark, 10deg)
21
21
  background-image: linear-gradient(141deg, var(--overlay-top-left) 0%, var(--overlay-center) 65%, var(--overlay-bottom-right) 100%);
22
22
  }
23
23
 
24
+ .container.is-fluid {
25
+ @include mobile {
26
+ margin-left: 0;
27
+ margin-right: 0;
28
+ padding-left: 0;
29
+ padding-right: 0;
30
+ }
31
+ }
32
+
24
33
  .title {
25
34
  text-shadow: 0px 2px 3px transparentize($black, 0.5);
26
35
  }
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "bridgetown-quick-search": "^1.0.3",
16
- "bulmatown": "^1.0.0"
16
+ "bulmatown": "1.0.3"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.9.0",
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  permalink: /404.html
3
- layout: default
3
+ layout: page
4
+ title: 404 Not Found
4
5
  ---
5
6
 
6
- <h1>404</h1>
7
-
8
7
  <p><strong>Page not found :(</strong></p>
9
8
  <p>The requested page could not be found.</p>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  layout: page
3
3
  title: Articles
4
+ exclude_from_search: true
4
5
  pagination:
5
6
  enabled: true
6
7
  ---
@@ -1534,9 +1534,9 @@ bulma@^0.9:
1534
1534
  integrity sha512-rV75CJkubNUroAt0qCRkjznZLoaXq/ctfMXsMvKSL84UetbSyx5REl96e8GoQ04G4Tkw0XF3STECffTOQrbzOQ==
1535
1535
 
1536
1536
  bulmatown@^1.0.0:
1537
- version "1.0.1"
1538
- resolved "https://registry.yarnpkg.com/bulmatown/-/bulmatown-1.0.1.tgz#6fde191351b8a29ee7ad679ff2d234414d1bf898"
1539
- integrity sha512-DH77Xps8EFTuATWTnTQWb1qfknqOuz/mdZ78rQpSleQnMBNY7S/h9C2qc7BuO2ryUSzdv4/WhxklBhAY1PhN5g==
1537
+ version "1.0.2"
1538
+ resolved "https://registry.yarnpkg.com/bulmatown/-/bulmatown-1.0.2.tgz#d791813163eb51dbd44c86782545cb8500f47931"
1539
+ integrity sha512-2tPbxIDhi/LSHO6QZP24Jnt/3cAe8fGKb8ArAEjXI9zeiPCgbbj/x56bQc221PgHCC5dbavp/NsNm5wgxUKPRA==
1540
1540
  dependencies:
1541
1541
  bridgetown-quick-search "^1.0.3"
1542
1542
  bulma "^0.9"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bulmatown
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulmatown",
3
3
  "description": "A Bulma CSS starter theme for Bridgetown",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "main": "frontend/javascript/index.js",
6
6
  "repository": {
7
7
  "type": "git",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulmatown
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared White
@@ -186,7 +186,7 @@ homepage: https://github.com/whitefusionhq/bulmatown
186
186
  licenses:
187
187
  - MIT
188
188
  metadata:
189
- yarn-add: bulmatown@1.0.2
189
+ yarn-add: bulmatown@1.0.3
190
190
  post_install_message:
191
191
  rdoc_options: []
192
192
  require_paths: