├── .eslintrc ├── .gitignore ├── .rubocop.yml ├── .stylelintrc ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── babel.config.json ├── config.rb ├── data ├── meta_tags.yml └── products.yml ├── features ├── homepage.feature ├── step_definitions │ └── homepage_steps.rb └── support │ └── env.rb ├── package.json ├── source ├── assets │ ├── fonts │ │ └── .keep │ ├── images │ │ └── favicon.ico │ ├── javascripts │ │ └── index.js │ └── stylesheets │ │ ├── app.css.scss │ │ ├── components │ │ ├── _alert.scss │ │ ├── _avatar.scss │ │ ├── _index.scss │ │ └── _navbar.scss │ │ ├── config │ │ ├── _bootstrap_variables.scss │ │ ├── _colors.scss │ │ └── _fonts.scss │ │ └── pages │ │ ├── _home.scss │ │ └── _index.scss ├── index.html.erb └── layouts │ └── layout.erb └── webpack.config.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb-base", 3 | "rules": { 4 | "comma-dangle": "off" 5 | }, 6 | "env": { 7 | "browser": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .env 3 | .sass-cache 4 | *.bundle 5 | *.cache 6 | *.log 7 | build 8 | dist 9 | node_modules 10 | yarn.lock 11 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | Style/Documentation: 2 | Enabled: false 3 | Style/FrozenStringLiteralComment: 4 | Enabled: false 5 | Style/HashSyntax: 6 | EnforcedStyle: ruby19_no_mixed_keys 7 | Style/MixinUsage: 8 | Enabled: false 9 | Style/ANewCop: 10 | Enabled: true -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-recommended-scss" 3 | } 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'middleman' 4 | gem 'middleman-autoprefixer' 5 | gem 'middleman-gh-pages' 6 | gem 'middleman-metaman' 7 | gem 'rake' 8 | gem 'rubocop' 9 | 10 | gem 'font-awesome-sass', '~> 5.13.0' 11 | 12 | group :test do 13 | gem 'capybara' 14 | gem 'cucumber' 15 | gem 'rspec' 16 | gem 'selenium-webdriver' 17 | end 18 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.1.4.1) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 1.6, < 2) 7 | minitest (>= 5.1) 8 | tzinfo (~> 2.0) 9 | zeitwerk (~> 2.3) 10 | addressable (2.8.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | ast (2.4.2) 13 | autoprefixer-rails (10.3.3.0) 14 | execjs (~> 2) 15 | backports (3.21.0) 16 | builder (3.2.4) 17 | capybara (3.35.3) 18 | addressable 19 | mini_mime (>= 0.1.3) 20 | nokogiri (~> 1.8) 21 | rack (>= 1.6.0) 22 | rack-test (>= 0.6.3) 23 | regexp_parser (>= 1.5, < 3.0) 24 | xpath (~> 3.2) 25 | childprocess (3.0.0) 26 | coffee-script (2.4.1) 27 | coffee-script-source 28 | execjs 29 | coffee-script-source (1.12.2) 30 | concurrent-ruby (1.1.9) 31 | contracts (0.13.0) 32 | cucumber (7.0.0) 33 | builder (~> 3.2, >= 3.2.4) 34 | cucumber-core (~> 10.0, >= 10.0.1) 35 | cucumber-create-meta (~> 6.0, >= 6.0.1) 36 | cucumber-cucumber-expressions (~> 12.1, >= 12.1.1) 37 | cucumber-gherkin (~> 20.0, >= 20.0.1) 38 | cucumber-html-formatter (~> 16.0, >= 16.0.1) 39 | cucumber-messages (~> 17.0, >= 17.0.1) 40 | cucumber-wire (~> 6.0, >= 6.0.1) 41 | diff-lcs (~> 1.4, >= 1.4.4) 42 | mime-types (~> 3.3, >= 3.3.1) 43 | multi_test (~> 0.1, >= 0.1.2) 44 | sys-uname (~> 1.2, >= 1.2.2) 45 | cucumber-core (10.0.1) 46 | cucumber-gherkin (~> 20.0, >= 20.0.1) 47 | cucumber-messages (~> 17.0, >= 17.0.1) 48 | cucumber-tag-expressions (~> 3.0, >= 3.0.1) 49 | cucumber-create-meta (6.0.1) 50 | cucumber-messages (~> 17.0, >= 17.0.1) 51 | sys-uname (~> 1.2, >= 1.2.2) 52 | cucumber-cucumber-expressions (12.1.3) 53 | cucumber-gherkin (20.0.1) 54 | cucumber-messages (~> 17.0, >= 17.0.1) 55 | cucumber-html-formatter (16.0.1) 56 | cucumber-messages (~> 17.0, >= 17.0.1) 57 | cucumber-messages (17.1.0) 58 | cucumber-tag-expressions (3.0.1) 59 | cucumber-wire (6.1.1) 60 | cucumber-core (~> 10.0, >= 10.0.1) 61 | cucumber-cucumber-expressions (~> 12.1, >= 12.1.2) 62 | cucumber-messages (~> 17.0, >= 17.0.1) 63 | diff-lcs (1.4.4) 64 | dotenv (2.7.6) 65 | erubis (2.7.0) 66 | execjs (2.8.1) 67 | fast_blank (1.0.1) 68 | fastimage (2.2.5) 69 | ffi (1.15.4) 70 | font-awesome-sass (5.13.1) 71 | sassc (>= 1.11) 72 | haml (5.2.2) 73 | temple (>= 0.8.0) 74 | tilt 75 | hamster (3.0.0) 76 | concurrent-ruby (~> 1.0) 77 | hashie (3.6.0) 78 | i18n (1.6.0) 79 | concurrent-ruby (~> 1.0) 80 | kramdown (2.3.1) 81 | rexml 82 | listen (3.0.8) 83 | rb-fsevent (~> 0.9, >= 0.9.4) 84 | rb-inotify (~> 0.9, >= 0.9.7) 85 | memoist (0.16.2) 86 | middleman (4.4.0) 87 | coffee-script (~> 2.2) 88 | haml (>= 4.0.5) 89 | kramdown (>= 2.3.0) 90 | middleman-cli (= 4.4.0) 91 | middleman-core (= 4.4.0) 92 | middleman-autoprefixer (3.0.0) 93 | autoprefixer-rails (~> 10.0) 94 | middleman-core (>= 4.0.0) 95 | middleman-cli (4.4.0) 96 | thor (>= 0.17.0, < 2.0) 97 | middleman-core (4.4.0) 98 | activesupport (>= 6.1, < 7.0) 99 | addressable (~> 2.4) 100 | backports (~> 3.6) 101 | bundler (~> 2.0) 102 | contracts (~> 0.13.0) 103 | dotenv 104 | erubis 105 | execjs (~> 2.0) 106 | fast_blank 107 | fastimage (~> 2.0) 108 | hamster (~> 3.0) 109 | hashie (~> 3.4) 110 | i18n (~> 1.6.0) 111 | listen (~> 3.0.0) 112 | memoist (~> 0.14) 113 | padrino-helpers (~> 0.15.0) 114 | parallel 115 | rack (>= 1.4.5, < 3) 116 | sassc (~> 2.0) 117 | servolux 118 | tilt (~> 2.0.9) 119 | toml 120 | uglifier (~> 3.0) 121 | webrick 122 | middleman-gh-pages (0.4.1) 123 | rake (> 0.9.3) 124 | middleman-metaman (0.1.11) 125 | middleman-core (>= 4.2.1) 126 | mime-types (3.3.1) 127 | mime-types-data (~> 3.2015) 128 | mime-types-data (3.2021.0901) 129 | mini_mime (1.1.1) 130 | mini_portile2 (2.6.1) 131 | minitest (5.14.4) 132 | multi_test (0.1.2) 133 | nokogiri (1.12.4) 134 | mini_portile2 (~> 2.6.1) 135 | racc (~> 1.4) 136 | padrino-helpers (0.15.1) 137 | i18n (>= 0.6.7, < 2) 138 | padrino-support (= 0.15.1) 139 | tilt (>= 1.4.1, < 3) 140 | padrino-support (0.15.1) 141 | parallel (1.20.1) 142 | parser (3.0.2.0) 143 | ast (~> 2.4.1) 144 | parslet (2.0.0) 145 | public_suffix (4.0.6) 146 | racc (1.5.2) 147 | rack (2.2.3) 148 | rack-test (1.1.0) 149 | rack (>= 1.0, < 3) 150 | rainbow (3.0.0) 151 | rake (13.0.6) 152 | rb-fsevent (0.11.0) 153 | rb-inotify (0.10.1) 154 | ffi (~> 1.0) 155 | regexp_parser (2.1.1) 156 | rexml (3.2.5) 157 | rspec (3.10.0) 158 | rspec-core (~> 3.10.0) 159 | rspec-expectations (~> 3.10.0) 160 | rspec-mocks (~> 3.10.0) 161 | rspec-core (3.10.1) 162 | rspec-support (~> 3.10.0) 163 | rspec-expectations (3.10.1) 164 | diff-lcs (>= 1.2.0, < 2.0) 165 | rspec-support (~> 3.10.0) 166 | rspec-mocks (3.10.2) 167 | diff-lcs (>= 1.2.0, < 2.0) 168 | rspec-support (~> 3.10.0) 169 | rspec-support (3.10.2) 170 | rubocop (1.20.0) 171 | parallel (~> 1.10) 172 | parser (>= 3.0.0.0) 173 | rainbow (>= 2.2.2, < 4.0) 174 | regexp_parser (>= 1.8, < 3.0) 175 | rexml 176 | rubocop-ast (>= 1.9.1, < 2.0) 177 | ruby-progressbar (~> 1.7) 178 | unicode-display_width (>= 1.4.0, < 3.0) 179 | rubocop-ast (1.11.0) 180 | parser (>= 3.0.1.1) 181 | ruby-progressbar (1.11.0) 182 | rubyzip (2.3.2) 183 | sassc (2.4.0) 184 | ffi (~> 1.9) 185 | selenium-webdriver (3.142.7) 186 | childprocess (>= 0.5, < 4.0) 187 | rubyzip (>= 1.2.2) 188 | servolux (0.13.0) 189 | sys-uname (1.2.2) 190 | ffi (~> 1.1) 191 | temple (0.8.2) 192 | thor (1.1.0) 193 | tilt (2.0.10) 194 | toml (0.3.0) 195 | parslet (>= 1.8.0, < 3.0.0) 196 | tzinfo (2.0.4) 197 | concurrent-ruby (~> 1.0) 198 | uglifier (3.2.0) 199 | execjs (>= 0.3.0, < 3) 200 | unicode-display_width (2.0.0) 201 | webrick (1.7.0) 202 | xpath (3.2.0) 203 | nokogiri (~> 1.8) 204 | zeitwerk (2.4.2) 205 | 206 | PLATFORMS 207 | ruby 208 | 209 | DEPENDENCIES 210 | capybara 211 | cucumber 212 | font-awesome-sass (~> 5.13.0) 213 | middleman 214 | middleman-autoprefixer 215 | middleman-gh-pages 216 | middleman-metaman 217 | rake 218 | rspec 219 | rubocop 220 | selenium-webdriver 221 | 222 | BUNDLED WITH 223 | 2.2.25 224 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Tom Rutgers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Middleman Boilerplate 2 | A simple way to build static pages with a Rails feel. 3 | 4 | ## Using 5 | 6 | - [Middleman](https://middlemanapp.com) 7 | - [Yarn](https://yarnpkg.com) 8 | - [webpack](https://webpack.js.org) with [Babel](https://babeljs.org) 9 | - [Sass](https://sass-lang.com) 10 | 11 | ## Init a new project 12 | 1. Click the green `Use this Template` button and give your project a name 13 | 2. In the new project, click on the green `Code` button to copy your SSH address 14 | 3. `cd` into the folder named after your Github username in your Terminal 15 | 4. Clone the repository like this 16 | `git clone git@github.com:dmbf29/NAME_OF_YOUR_PROJECT.git ` 17 | 5. Move into the directory `cd NAME_OF_YOUR_PROJECT` 18 | 19 | ### Installation 20 | *Only if you don't have bundler or yarn* 21 | ``` 22 | gem install bundler 23 | brew install yarn 24 | ``` 25 | Then: 26 | ``` 27 | gem install middleman 28 | bundle install 29 | yarn install 30 | ``` 31 | ⚠️ You may run into some into some gem warnings.
32 | Warnings == 👌, but Fatal errors == ⛔️
33 | If you get a fatal error, you can try fixing it with `bundle update` and hope for the best 🤞 34 | 35 | ## Run a server 36 | - `middleman`
37 | or if that fails, try 38 | - `bundle exec middleman` 39 | 40 | ## Deploy 41 | 1. [Sign into Netlify](https://www.netlify.com/) 42 | 2. Add new site from Git 43 | 3. Choose repository and branch 44 | 4. Make sure your deploy settings look like this: 45 | Screen Shot 2021-06-18 at 14 19 13 46 | 5. Website is deployed! 47 | 6. (Add purchased domain) 48 | 49 | ## Meta Tags 50 | To use the gem `middlman-metaman`, [follow these setup instructions](https://github.com/cacheventures/middleman-metaman/) 51 | 52 | ## Preinstalled 53 | - [Bootstrap 4.6 CSS & JS](https://getbootstrap.com/docs/4.6/getting-started/introduction/) 54 | - Font Awesome CDN 55 | - Webpack 56 | 57 | ## Contributing 58 | 59 | 1. Fork it 60 | 2. Create your feature branch (`git checkout -b my-new-feature`) 61 | 3. Commit your changes (`git commit -am 'Add some feature'`) 62 | 4. Push to the branch (`git push origin my-new-feature`) 63 | 5. Create a new Pull Request 64 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rainbow' 2 | 3 | linters = [ 4 | { 5 | name: 'ESLint', 6 | language: 'JavaScript', 7 | command: 'node_modules/.bin/eslint source/**/*.js --fix' 8 | }, 9 | { 10 | name: 'stylelint', 11 | language: 'CSS/SCSS', 12 | command: 'stylelint **/*.scss --fix' 13 | }, 14 | { 15 | name: 'RuboCop', 16 | language: 'Ruby', 17 | command: 'rubocop -a' 18 | } 19 | ] 20 | 21 | default_tasks = [] 22 | 23 | linters.each do |linter| 24 | desc "Check your #{linter[:language]} files with #{linter[:name]}" 25 | task linter[:name].downcase.to_sym do 26 | puts Rainbow( 27 | "Checking your #{linter[:language]} files with #{linter[:name]}..." 28 | ).bright.orange 29 | run_linter(linter[:command]) 30 | end 31 | default_tasks << linter[:name].downcase.to_sym 32 | end 33 | 34 | task default: default_tasks 35 | 36 | def run_linter(command) 37 | output = `#{command}` 38 | if output.empty? 39 | puts Rainbow('✔︎ Perfect style!').bright.green 40 | else 41 | system command 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "useBuiltIns": "usage", 7 | "corejs": "3" 8 | } 9 | ] 10 | ] 11 | } -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | # General config 2 | # http://localhost:4567/__middleman 3 | 4 | # For the metaman gem 5 | require "active_support/core_ext/hash/indifferent_access" 6 | # Import custom libraries and helpers 7 | Dir['./*/*.rb'].each { |file| load file } 8 | 9 | # Load Sass from node_modules 10 | config[:sass_assets_paths] << File.join(root, 'node_modules') 11 | 12 | set :css_dir, 'assets/stylesheets' 13 | set :fonts_dir, 'assets/fonts' 14 | set :images_dir, 'assets/images' 15 | set :js_dir, 'assets/javascripts' 16 | 17 | # Activate and configure extensions 18 | # https://middlemanapp.com/advanced/configuration/#configuring-extensions 19 | 20 | activate :autoprefixer do |config| 21 | config.browsers = '>0.25%, not ie 11, not op_mini all, not dead' 22 | end 23 | 24 | activate :external_pipeline, 25 | name: :webpack, 26 | command: build? ? 'npm run build' : 'npm run start', 27 | source: 'dist', 28 | latency: 1 29 | 30 | page '/*.xml', layout: false 31 | page '/*.json', layout: false 32 | page '/*.txt', layout: false 33 | 34 | configure :development do 35 | set :debug_assets, true 36 | end 37 | 38 | configure :build do 39 | ignore File.join(config[:js_dir], '*') # handled by webpack 40 | set :relative_links, true 41 | activate :asset_hash 42 | activate :gzip 43 | activate :minify_css 44 | activate :relative_assets 45 | end 46 | 47 | activate :metaman, host: 'https://domain.com' 48 | -------------------------------------------------------------------------------- /data/meta_tags.yml: -------------------------------------------------------------------------------- 1 | # IMPORTANT: at the bottom of your config.rb, make sure you update your domain 2 | og: 3 | project_name: "MY NAME - Web Developer" 4 | title: "MY NAME - Web Developer" 5 | description: "A portfolio of my web apps." 6 | # image: "og_image.png" 7 | -------------------------------------------------------------------------------- /data/products.yml: -------------------------------------------------------------------------------- 1 | - name: Some product 2 | image: some_product.png 3 | - name: Other product 4 | image: other_product.png 5 | -------------------------------------------------------------------------------- /features/homepage.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | Feature: homepage 3 | I expect the homepage to work 4 | 5 | Scenario: 6 | When I visit the homepage 7 | Then I should see the text 'Hello world' 8 | -------------------------------------------------------------------------------- /features/step_definitions/homepage_steps.rb: -------------------------------------------------------------------------------- 1 | When('I visit the homepage') do 2 | visit('/') 3 | end 4 | 5 | Then('I should see the text {string}') do |string| 6 | expect(page).to have_content(string) 7 | end 8 | -------------------------------------------------------------------------------- /features/support/env.rb: -------------------------------------------------------------------------------- 1 | Bundler.require :default, :test 2 | 3 | require 'capybara/cucumber' 4 | 5 | middleman_app = ::Middleman::Application.new do 6 | config[:environment] = :test 7 | end 8 | 9 | Capybara.app = ::Middleman::Rack.new(middleman_app).to_app 10 | Capybara.asset_host = 'http://localhost:4567' 11 | Capybara.server = :webrick 12 | 13 | Capybara.register_driver :selenium do |app| 14 | Capybara::Selenium::Driver.new(app, browser: :chrome) 15 | end 16 | 17 | Capybara.default_driver = :selenium 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "middleman-webpack", 3 | "version": "1.0.0", 4 | "license": "MIT", 5 | "browserslist": ">0.25%, not ie 11, not op_mini all, not dead", 6 | "devDependencies": { 7 | "@babel/core": "^7.11.0", 8 | "@babel/preset-env": "^7.11.0", 9 | "babel-loader": "^8.0.6", 10 | "css-loader": "^4.2.0", 11 | "eslint": "^7.6.0", 12 | "eslint-config-airbnb-base": "^14.2.0", 13 | "eslint-plugin-import": "^2.22.0", 14 | "postcss-loader": "^3.0.0", 15 | "style-loader": "^1.1.3", 16 | "stylelint": "^13.6.1", 17 | "stylelint-config-recommended-scss": "^4.1.0", 18 | "stylelint-scss": "^3.18.0", 19 | "webpack": "^4.44.1", 20 | "webpack-cli": "^3.3.12" 21 | }, 22 | "scripts": { 23 | "start": "NODE_ENV=development ./node_modules/webpack/bin/webpack.js --watch -d --color", 24 | "build": "NODE_ENV=production ./node_modules/webpack/bin/webpack.js --bail -p" 25 | }, 26 | "dependencies": { 27 | "bootstrap": "^4.5.2", 28 | "core-js": "^3.6.4", 29 | "jquery": "^3.6.0", 30 | "popper.js": "^1.16.1", 31 | "terser-webpack-plugin": "^3.0.8" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /source/assets/fonts/.keep: -------------------------------------------------------------------------------- 1 | # Import your .eot, .svg, .ttf, and .woff files here 2 | -------------------------------------------------------------------------------- /source/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmbf29/middleman-boilerplate/5fa6d1328b2b7363c3a8e8be8236418c03996f6b/source/assets/images/favicon.ico -------------------------------------------------------------------------------- /source/assets/javascripts/index.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap'; 2 | -------------------------------------------------------------------------------- /source/assets/stylesheets/app.css.scss: -------------------------------------------------------------------------------- 1 | // Graphical variables 2 | @import "config/fonts"; 3 | @import "config/colors"; 4 | @import "config/bootstrap_variables"; 5 | 6 | // External libraries 7 | // Using CDN for font-awesome 8 | @import 'bootstrap/scss/bootstrap'; 9 | 10 | 11 | // Your CSS partials 12 | @import "components/index"; 13 | @import "pages/index"; 14 | -------------------------------------------------------------------------------- /source/assets/stylesheets/components/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | position: fixed; 3 | bottom: 16px; 4 | right: 16px; 5 | z-index: 1000; 6 | } 7 | -------------------------------------------------------------------------------- /source/assets/stylesheets/components/_avatar.scss: -------------------------------------------------------------------------------- 1 | .avatar { 2 | width: 40px; 3 | border-radius: 50%; 4 | } 5 | .avatar-large { 6 | width: 56px; 7 | border-radius: 50%; 8 | } 9 | .avatar-bordered { 10 | width: 40px; 11 | border-radius: 50%; 12 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 13 | border: white 1px solid; 14 | } 15 | .avatar-square { 16 | width: 40px; 17 | border-radius: 0px; 18 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 19 | border: white 1px solid; 20 | } 21 | -------------------------------------------------------------------------------- /source/assets/stylesheets/components/_index.scss: -------------------------------------------------------------------------------- 1 | // Import your components CSS files here. 2 | @import "alert"; 3 | @import "avatar"; 4 | @import "navbar"; 5 | -------------------------------------------------------------------------------- /source/assets/stylesheets/components/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar-lewagon { 2 | justify-content: space-between; 3 | background: white; 4 | } 5 | 6 | .navbar-lewagon .navbar-collapse { 7 | flex-grow: 0; 8 | } 9 | 10 | .navbar-lewagon .navbar-brand img { 11 | width: 40px; 12 | } 13 | -------------------------------------------------------------------------------- /source/assets/stylesheets/config/_bootstrap_variables.scss: -------------------------------------------------------------------------------- 1 | // This is where you override default Bootstrap variables 2 | // 1. All Bootstrap variables are here => https://github.com/twbs/bootstrap/blob/master/scss/_variables.scss 3 | // 2. These variables are defined with default value (see https://robots.thoughtbot.com/sass-default) 4 | // 3. You can override them below! 5 | 6 | // General style 7 | $font-family-sans-serif: $body-font; 8 | $headings-font-family: $headers-font; 9 | $body-bg: $light-gray; 10 | $font-size-base: 1rem; 11 | 12 | // Colors 13 | $body-color: $gray; 14 | $primary: $blue; 15 | $success: $green; 16 | $info: $yellow; 17 | $danger: $red; 18 | $warning: $orange; 19 | 20 | // Buttons & inputs' radius 21 | $border-radius: 2px; 22 | $border-radius-lg: 2px; 23 | $border-radius-sm: 2px; 24 | 25 | // Override other variables below! 26 | -------------------------------------------------------------------------------- /source/assets/stylesheets/config/_colors.scss: -------------------------------------------------------------------------------- 1 | // Define variables for your color scheme 2 | 3 | // For example: 4 | $red: #FD1015; 5 | $blue: #167FFB; 6 | $yellow: #FFC65A; 7 | $orange: #E67E22; 8 | $green: #1EDD88; 9 | $gray: #0E0000; 10 | $light-gray: #F4F4F4; 11 | -------------------------------------------------------------------------------- /source/assets/stylesheets/config/_fonts.scss: -------------------------------------------------------------------------------- 1 | // Import Google fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito:400,700|Work+Sans:400,700&display=swap'); 3 | 4 | // Define fonts for body and headers 5 | $body-font: "Work Sans", "Helvetica", "sans-serif"; 6 | $headers-font: "Nunito", "Helvetica", "sans-serif"; 7 | 8 | // To use a font file (.woff) uncomment following lines 9 | // @font-face { 10 | // font-family: "Font Name"; 11 | // src: font-url('FontFile.eot'); 12 | // src: font-url('FontFile.eot?#iefix') format('embedded-opentype'), 13 | // font-url('FontFile.woff') format('woff'), 14 | // font-url('FontFile.ttf') format('truetype') 15 | // } 16 | // $my-font: "Font Name"; 17 | -------------------------------------------------------------------------------- /source/assets/stylesheets/pages/_home.scss: -------------------------------------------------------------------------------- 1 | // Specific CSS for your home-page 2 | -------------------------------------------------------------------------------- /source/assets/stylesheets/pages/_index.scss: -------------------------------------------------------------------------------- 1 | // Import page-specific CSS files here. 2 | @import "home"; 3 | -------------------------------------------------------------------------------- /source/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Middleman Boilerplate

5 |

Bootstrap and Font Awesome already installed.

6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /source/layouts/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Portfolio 15 | 16 | <%= display_meta_tags %> 17 | <%= favicon_tag 'favicon.ico' %> 18 | <%= stylesheet_link_tag "app" %> 19 | 20 | 21 | 22 | 23 | <%= yield %> 24 | <%= javascript_include_tag "bundle" %> 25 | 26 | 27 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const TerserPlugin = require('terser-webpack-plugin') 3 | 4 | module.exports = { 5 | entry: { 6 | main: './source/assets/javascripts/index.js' 7 | }, 8 | output: { 9 | path: path.resolve(__dirname, 'dist'), 10 | filename: 'bundle.js' 11 | }, 12 | module: { 13 | rules: [ 14 | { 15 | test: /\.m?js$/, 16 | exclude: /(node_modules)/, 17 | loader: 'babel-loader' 18 | }, 19 | { 20 | test: /\.(sa|sc|c)ss$/, 21 | use: ['style-loader', 'css-loader', 'sass-loader'] 22 | }, 23 | { 24 | test: /\.css$/, 25 | use: ['style-loader', 'css-loader'] 26 | } 27 | ] 28 | }, 29 | 30 | optimization: { 31 | minimize: true, 32 | minimizer: [ 33 | new TerserPlugin({ 34 | cache: true, 35 | parallel: true, 36 | terserOptions: { 37 | output: { 38 | comments: false 39 | } 40 | } 41 | }), 42 | ] 43 | } 44 | }; 45 | --------------------------------------------------------------------------------