bulmatown 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +38 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +22 -0
  5. data/CHANGELOG.md +7 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +53 -0
  9. data/Rakefile +8 -0
  10. data/bridgetown.automation.rb +11 -0
  11. data/bulmatown.gemspec +29 -0
  12. data/components/bulmatown/button.liquid +16 -0
  13. data/components/bulmatown/collection.liquid +37 -0
  14. data/components/bulmatown/collection.scss +12 -0
  15. data/components/bulmatown/hero.liquid +16 -0
  16. data/components/bulmatown/hero.scss +31 -0
  17. data/components/bulmatown/hero_wrapper.liquid +12 -0
  18. data/components/bulmatown/navbar.liquid +20 -0
  19. data/components/bulmatown/navbar.scss +54 -0
  20. data/components/bulmatown/pagination.liquid +31 -0
  21. data/content/bulmatown/example_page.md +8 -0
  22. data/content/bulmatown/train-on-rails.jpeg +0 -0
  23. data/example/.gitignore +35 -0
  24. data/example/Gemfile +22 -0
  25. data/example/bridgetown.config.yml +26 -0
  26. data/example/frontend/fonts/forkawesome-webfont.eot +0 -0
  27. data/example/frontend/fonts/forkawesome-webfont.svg +2849 -0
  28. data/example/frontend/fonts/forkawesome-webfont.ttf +0 -0
  29. data/example/frontend/fonts/forkawesome-webfont.woff +0 -0
  30. data/example/frontend/fonts/forkawesome-webfont.woff2 +0 -0
  31. data/example/frontend/javascript/index.js +4 -0
  32. data/example/frontend/styles/index.scss +5 -0
  33. data/example/package.json +37 -0
  34. data/example/plugins/builders/.keep +0 -0
  35. data/example/plugins/site_builder.rb +4 -0
  36. data/example/src/404.html +9 -0
  37. data/example/src/_components/footer.liquid +53 -0
  38. data/example/src/_components/head.liquid +9 -0
  39. data/example/src/_components/navbar.liquid +51 -0
  40. data/example/src/_data/authors.yml +5 -0
  41. data/example/src/_data/site_metadata.yml +18 -0
  42. data/example/src/_layouts/default.html +15 -0
  43. data/example/src/_layouts/home.html +5 -0
  44. data/example/src/_layouts/page.html +5 -0
  45. data/example/src/_layouts/post.html +5 -0
  46. data/example/src/_posts/2020-06-13-this-is-groovy.md +29 -0
  47. data/example/src/_posts/2020-06-13-welcome-to-bridgetown.md +30 -0
  48. data/example/src/about.md +11 -0
  49. data/example/src/favicon.ico +0 -0
  50. data/example/src/images/jared-white-avatar.jpg +0 -0
  51. data/example/src/index.md +21 -0
  52. data/example/src/posts.md +11 -0
  53. data/example/start.js +17 -0
  54. data/example/sync.js +35 -0
  55. data/example/webpack.config.js +78 -0
  56. data/example/yarn.lock +6127 -0
  57. data/layouts/bulmatown/homepage.html +18 -0
  58. data/layouts/bulmatown/page.html +18 -0
  59. data/layouts/bulmatown/post.html +29 -0
  60. data/lib/bulmatown.rb +11 -0
  61. data/lib/bulmatown/builder.rb +13 -0
  62. data/lib/bulmatown/version.rb +5 -0
  63. data/package.json +21 -0
  64. data/yarn.lock +51 -0
  65. metadata +210 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fb0ffe4a2acca8312f34dbbf78fa5c591fd4ff6144eac218c489eb1dd9746766
4
+ data.tar.gz: 7a45a597d789e0b1b38a7b164bc37797cd655a5f4af6923e5cda676cad181412
5
+ SHA512:
6
+ metadata.gz: 8c76f1c258c15b7a1a1ca6678f07e24cee1a044e5fb83aac0b911f7cf4737efeae31d5a0ce038347391910b98fd7384ff9a0c35651e8bdfc099a1b6f6bb8da3c
7
+ data.tar.gz: 7e4a40ed0afa14d3337ce409c99eed50e4a49efeb6f2b15507979e97b134da6e18fa6811d172dab61a557a2014560fcc1f42a4852e48107d66d954bcfeb7b20a
@@ -0,0 +1,38 @@
1
+ /vendor
2
+ /.bundle/
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ *.bundle
12
+ *.so
13
+ *.o
14
+ *.a
15
+ mkmf.log
16
+ *.gem
17
+ Gemfile.lock
18
+ .bundle
19
+ .ruby-version
20
+
21
+ # Node
22
+ node_modules
23
+ .npm
24
+ .node_repl_history
25
+
26
+ # Yarn
27
+ yarn-error.log
28
+ yarn-debug.log*
29
+ .pnp/
30
+ .pnp.js
31
+
32
+ # Yarn Integrity file
33
+ .yarn-integrity
34
+
35
+ spec/dest
36
+ .bridgetown-metadata
37
+ .bridgetown-cache
38
+ .bridgetown-webpack
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -0,0 +1,22 @@
1
+ require: rubocop-bridgetown
2
+
3
+ inherit_gem:
4
+ rubocop-bridgetown: .rubocop.yml
5
+
6
+ AllCops:
7
+ TargetRubyVersion: 2.5
8
+ Include:
9
+ - lib/**/*.rb
10
+
11
+ Exclude:
12
+ - .gitignore
13
+ - .rspec
14
+ - .rubocop.yml
15
+
16
+ - Gemfile.lock
17
+ - CHANGELOG.md
18
+ - LICENSE.txt
19
+ - README.md
20
+
21
+ - script/**/*
22
+ - vendor/**/*
@@ -0,0 +1,7 @@
1
+ # master
2
+
3
+ * Use this file to keep track of plugin updates
4
+
5
+ # 0.1.0 / 2020-05-01
6
+
7
+ * First version
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec
5
+
6
+ gem "bridgetown", ENV["BRIDGETOWN_VERSION"] if ENV["BRIDGETOWN_VERSION"]
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-present
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,53 @@
1
+ # Sample plugin for Bridgetown
2
+
3
+ _NOTE: This isn't a real plugin! Copy this sample code and use it to create your own Ruby gem! [Help guide here…](https://www.bridgetownrb.com/docs/plugins)_ 😃
4
+
5
+ A Bridgetown plugin to [fill in the blank]…
6
+
7
+ ## Installation
8
+
9
+ Run this command to add this plugin to your site's Gemfile:
10
+
11
+ ```shell
12
+ $ bundle add my-awesome-plugin -g bridgetown_plugins
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ The plugin will…
18
+
19
+ ### Optional configuration options
20
+
21
+ The plugin will automatically use any of the following metadata variables if they are present in your site's `_data/site_metadata.yml` file.
22
+
23
+
24
+
25
+ ## Testing
26
+
27
+ * Run `bundle exec rspec` to run the test suite
28
+ * Or run `script/cibuild` to validate with Rubocop and test with rspec together.
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it (https://github.com/username/my-awesome-plugin/fork)
33
+ 2. Clone the fork using `git clone` to your local development machine.
34
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
35
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
36
+ 5. Push to the branch (`git push origin my-new-feature`)
37
+ 6. Create a new Pull Request
38
+
39
+ ----
40
+
41
+ ## Releasing (you can delete this section in your own plugin repo)
42
+
43
+ To release a new version of the plugin, simply bump up the version number in both `version.rb` and
44
+ `package.json`, and then run `script/release`. This will require you to have a registered account
45
+ with both the [RubyGems.org](https://rubygems.org) and [NPM](https://www.npmjs.com) registries.
46
+ You can optionally remove the `package.json` and `frontend` folder if you don't need to package frontend
47
+ assets for Webpack.
48
+
49
+ If you run into any problems or need further guidance, please check out our [Bridgetown community resources](https://www.bridgetownrb.com/docs/community)
50
+ where friendly folks are standing by to help you build and release your plugin or theme.
51
+
52
+ **NOTE:** make sure you add the `bridgetown-plugin` [topic](https://github.com/topics/bridgetown-plugin) to your
53
+ plugin's GitHub repo so the plugin or theme will show up on [Bridgetown's official Plugin Directory](https://www.bridgetownrb.com/plugins)! (There may be a day or so delay before you see it appear.)
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task :default => :spec
@@ -0,0 +1,11 @@
1
+ add_bridgetown_plugin "bulmatown"
2
+ add_bridgetown_plugin "bridgetown-quick-search"
3
+ add_yarn_for_gem "bulmatown"
4
+
5
+ require 'fileutils'
6
+
7
+ unless Dir.exist? "frontend/fonts"
8
+ FileUtils.mkdir_p "frontend/fonts"
9
+ end
10
+
11
+ run "cp node_modules/fork-awesome/fonts/* frontend/fonts"
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bulmatown/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bulmatown"
7
+ spec.version = Bulmatown::VERSION
8
+ spec.author = "Jared White"
9
+ spec.email = "jared@whitefusion.io"
10
+ spec.summary = "A Bumlma CSS starter theme for Bridgetown"
11
+ spec.homepage = "https://github.com/whitefusionhq/bulmatown"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
15
+ spec.test_files = spec.files.grep(%r!^spec/!)
16
+ spec.require_paths = ["lib"]
17
+ spec.metadata = { "yarn-add" => "bulmatown@#{Bulmatown::VERSION}" }
18
+
19
+ spec.required_ruby_version = ">= 2.5.0"
20
+
21
+ spec.add_dependency "bridgetown", ">= 0.15", "< 2.0"
22
+ spec.add_dependency "bridgetown-quick-search", "~> 1.0"
23
+
24
+ spec.add_development_dependency "bundler"
25
+ spec.add_development_dependency "nokogiri", "~> 1.6"
26
+ spec.add_development_dependency "rake", "~> 12.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
29
+ end
@@ -0,0 +1,16 @@
1
+ {%- assign classes = "button" | split: " " %}
2
+ {%- if type %}
3
+ {%- assign type_class = type | prepend: "is-" %}
4
+ {%- assign classes = classes | push: type_class %}
5
+ {%- endif %}
6
+ {%- capture button_inner %}
7
+ {%- if icon %}
8
+ <span class="icon"><i class="fa fa-{{ icon }}"></i></span>
9
+ {%- endif %}
10
+ <span>{{ label }}</span>
11
+ {%- endcapture %}
12
+ {%- if link %}
13
+ <a href="{{ link }}" class="{{classes | join: " "}}">{{ button_inner }}</a>
14
+ {%- else %}
15
+ <button class="{{classes | join: " "}}">{{ button_inner }}</button>
16
+ {%- endif %}
@@ -0,0 +1,37 @@
1
+ <div class="columns is-multiline">
2
+ {% for document in collection %}
3
+ {%- assign imagesource = metadata.bulmatown_theme.image_sizes.embed | default: "image" %}
4
+ <div class="column is-full-mobile is-full-tablet is-half-desktop">
5
+ <div class="box document-entry">
6
+ {% if document.image %}
7
+ <figure class="image is-5by3">
8
+ <a href="{{ document.url }}">
9
+ <img src="{{ document[imagesource] }}" />
10
+ </a>
11
+ </figure>
12
+ {% endif %}
13
+
14
+ <div class="content">
15
+ <h3>
16
+ <a class="is-decorationless" href="{{ document.url }}">
17
+ {{ document.title | smartify }}
18
+ </a>
19
+ </h3>
20
+
21
+ {% if document.subtitle and document.subtitle != "" %}
22
+ {% assign excerpt = document.subtitle | smartify | prepend: "<p>" | append: "</p>" %}
23
+ {% elsif document.description and document.description != "" %}
24
+ {% assign excerpt = document.description | smartify | prepend: "<p>" | append: "</p>" %}
25
+ {% else %}
26
+ {% assign excerpt = document.excerpt %}
27
+ {% endif %}
28
+ {{ excerpt }}
29
+
30
+ <p class="mt-5">
31
+ {% render "bulmatown/button", type: "primary", label: "Continue Reading", link: document.url, icon: "file-text" %}
32
+ </p>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ {% endfor %}
37
+ </div>
@@ -0,0 +1,12 @@
1
+ .document-entry {
2
+ figure {
3
+ margin-left: -$box-padding;
4
+ margin-right: -$box-padding;
5
+ &:not(:last-child) {
6
+ margin-bottom: $box-padding;
7
+ }
8
+ img {
9
+ object-fit: cover;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,16 @@
1
+ <header class="hero {{ class }}"{% if cover %} style="background-image: url({{ cover }})"{% endif %}>
2
+ <div{% if cover %} class="cover-overlay"{% endif %}>
3
+ <div class="hero-body">
4
+ <div class="container is-fluid">
5
+ <h1 class="p-name title is-2 is-spaced {{ title_class }}">
6
+ {{ title | smartify }}
7
+ </h1>
8
+ {% if subtitle and subtitle != "" %}
9
+ <h2 class="p-summary subtitle {{ subtitle_class }}">
10
+ {{ subtitle | smartify }}
11
+ </h2>
12
+ {% endif %}
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </header>
@@ -0,0 +1,31 @@
1
+ $center: transparentize($dark, 0.3);
2
+ //$edges: transparentize(darken($dark, 15%), 0.15);
3
+ $gradient-top-left: transparentize(darken(saturate(adjust-hue($dark, -10deg), 10%), 10%), 0.3);
4
+ $gradient-bottom-right: transparentize(lighten(saturate(adjust-hue($dark, 10deg), 5%), 5%), 0.15);
5
+
6
+ .hero {
7
+ background-size: cover;
8
+ background-position: center center;
9
+ --overlay-center: #{$center};
10
+ --overlay-top-left: #{$gradient-top-left};
11
+ --overlay-bottom-right: #{$gradient-bottom-right};
12
+
13
+ &.rainbow {
14
+ --overlay-center: rgba(212, 133, 165, 0.7);
15
+ --overlay-top-left: rgba(6, 52, 29, 0.6);
16
+ --overlay-bottom-right: rgba(18, 36, 117, 0.85);
17
+ }
18
+
19
+ .cover-overlay {
20
+ margin: -1px;
21
+ background-image: linear-gradient(141deg, var(--overlay-top-left) 0%, var(--overlay-center) 65%, var(--overlay-bottom-right) 100%);
22
+ }
23
+
24
+ .title {
25
+ text-shadow: 0px 2px 3px transparentize($black, 0.5);
26
+ }
27
+
28
+ .subtitle {
29
+ text-shadow: 0px 1px 2px transparentize($black, 0.8);
30
+ }
31
+ }
@@ -0,0 +1,12 @@
1
+ {%- assign heroclass = "is-dark is-medium is-bold has-text-centered" | split:" " %}
2
+ {%- if page.rainbow_hero %}{% assign heroclass = heroclass | push: "rainbow" %}{% endif %}
3
+ {%- assign heroclass = heroclass | join: " " %}
4
+ {%- assign imagesource = metadata.bulmatown_theme.image_sizes.hero | default: "image" %}
5
+ {%- render "bulmatown/hero",
6
+ class: heroclass,
7
+ cover: page[imagesource],
8
+ title: title,
9
+ title_class: "has-text-light",
10
+ subtitle: subtitle,
11
+ subtitle_class: "has-text-light"
12
+ %}
@@ -0,0 +1,20 @@
1
+ <nav class="navbar {{ class }}">
2
+ <div class="navbar-brand">
3
+ {{ logo }}
4
+ <div class="navbar-burger burger" data-target="top-navbar" onclick="this.classList.toggle('is-active');document.querySelector('#top-navbar').classList.toggle('is-active')">
5
+ <span></span>
6
+ <span></span>
7
+ <span></span>
8
+ </div>
9
+ </div>
10
+
11
+ <div id="top-navbar" class="navbar-menu">
12
+ <div class="navbar-start">
13
+ {{ items_start }}
14
+ </div>
15
+
16
+ <div class="navbar-end">
17
+ {{ items_end }}
18
+ </div>
19
+ </div>
20
+ </nav>
@@ -0,0 +1,54 @@
1
+ .navbar {
2
+ @include touch {
3
+ .navbar-menu {
4
+ background-color: inherit;
5
+ .navbar-item, .navbar-link {
6
+ color: $white;
7
+ }
8
+ a.navbar-item:focus,
9
+ a.navbar-item:focus-within,
10
+ a.navbar-item:hover,
11
+ a.navbar-item.is-active,
12
+ .navbar-link:focus,
13
+ .navbar-link:focus-within,
14
+ .navbar-link:hover,
15
+ .navbar-link.is-active {
16
+ background-color: darken($dark, 5%);
17
+ }
18
+ }
19
+ }
20
+
21
+ .search-item input {
22
+ font-size: 1em;
23
+ height: 1.5em;
24
+ padding: 0.2em 0.6em;
25
+ background: white;
26
+ opacity: 0.8;
27
+ width: 95%;
28
+ max-width: 400px;
29
+ transition: opacity 0.3s;
30
+
31
+ &::-webkit-search-decoration {
32
+ -webkit-appearance: none;
33
+ }
34
+ &::placeholder {
35
+ color: #888;
36
+ opacity: 1;
37
+ }
38
+
39
+ border: none;
40
+ &:focus {
41
+ opacity: 1;
42
+ }
43
+
44
+ @include desktop {
45
+ width: calc(9vw * 2);
46
+ }
47
+ }
48
+ }
49
+
50
+ bridgetown-search-results {
51
+ --link-color: #{$link};
52
+ --divider-color: #eee;
53
+ --text-color: #{$text};
54
+ }
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Pagination
3
+ description: Display previous page and/or next page buttons to navigate through paginated pages.
4
+ variables:
5
+ paginator:
6
+ - object
7
+ - The Bridgetown Paginator object ([see documentation here](https://www.bridgetownrb.com/docs/content/pagination/))
8
+ mocks:
9
+ paginator:
10
+ total_pages: 3
11
+ previous_page: true
12
+ previous_page_path: "#previous"
13
+ next_page: true
14
+ next_page_path: "#next"
15
+ ---
16
+ {% if paginator.total_pages > 1 %}
17
+ <ul class="pagination mt-6">
18
+ {% if paginator.previous_page %}
19
+ <li>
20
+ <a href="{{ paginator.previous_page_path }}" class="button is-primary is-outlined is-small"><span class="icon"><i class="fa fa-arrow-left"></i></span> <span>Previous Page</span></a>
21
+ </li>
22
+ {% else %}
23
+ <li></li>
24
+ {% endif %}
25
+ {% if paginator.next_page %}
26
+ <li>
27
+ <a href="{{ paginator.next_page_path }}" class="button is-primary is-outlined is-small"><span>Next Page</span> <span class="icon"><i class="fa fa-arrow-right"></i></span></a>
28
+ </li>
29
+ {% endif %}
30
+ </ul>
31
+ {% endif %}