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 +4 -4
- data/bridgetown.automation.rb +80 -13
- data/components/bulmatown/hero.scss +9 -0
- data/example/package.json +1 -1
- data/example/src/404.html +2 -3
- data/example/src/posts.md +1 -0
- data/example/yarn.lock +3 -3
- data/lib/bulmatown/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cf33656582634a453a7e2119a081162519d60f7f6e7d3869a2df20737d8ab8c
|
4
|
+
data.tar.gz: 25cd31c1d7eeb1147d4bec23a24b6fddf9988c1536cb4c98a44371a6bb6a010d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd1a8720b2e838b6e67d2742e9e642bd6c3dffcd59288c07e8f4165f9aa67cb4da203d5a19643b15d8d98a6fbe3f5fbc481c002433f0d9f5ddbe380c54f530cd
|
7
|
+
data.tar.gz: 0ee7fac751358286b63c588bd14f82775b410d68003eb5b010593d217bf83724f815c5d55236101d652e4d5665f9429b4d6048969b19176591d62ec4c81e3827
|
data/bridgetown.automation.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
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
|
}
|
data/example/package.json
CHANGED
data/example/src/404.html
CHANGED
data/example/src/posts.md
CHANGED
data/example/yarn.lock
CHANGED
@@ -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.
|
1538
|
-
resolved "https://registry.yarnpkg.com/bulmatown/-/bulmatown-1.0.
|
1539
|
-
integrity sha512-
|
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"
|
data/lib/bulmatown/version.rb
CHANGED
data/package.json
CHANGED
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.
|
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.
|
189
|
+
yarn-add: bulmatown@1.0.3
|
190
190
|
post_install_message:
|
191
191
|
rdoc_options: []
|
192
192
|
require_paths:
|