├── .fasterer.yml ├── .github ├── FUNDING.yml └── workflows │ ├── linters.yml │ ├── specs_rails6.0.yml │ ├── specs_rails6.1.yml │ └── specs_rails7.0.yml ├── .gitignore ├── .reviewdog.yml ├── .rspec ├── .rubocop.yml ├── Appraisals ├── CHANGELOG.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── activeadmin_blaze_theme.gemspec ├── app └── assets │ ├── fonts │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ └── icomoon.woff │ └── stylesheets │ └── activeadmin_blaze_theme │ ├── _base.scss │ ├── _contents.scss │ ├── _footer.scss │ ├── _form.scss │ ├── _header.scss │ ├── _navigation.scss │ ├── _sidebars.scss │ ├── _tables.scss │ ├── _variables.scss │ ├── blaze │ ├── blaze.colors.scss │ ├── blaze.scss │ ├── components.addresses.scss │ ├── components.alerts.scss │ ├── components.avatars.scss │ ├── components.badges.scss │ ├── components.breadcrumbs.scss │ ├── components.bubbles.scss │ ├── components.buttons.scss │ ├── components.calendars.scss │ ├── components.cards.scss │ ├── components.headings.scss │ ├── components.hints.scss │ ├── components.input-groups.scss │ ├── components.inputs.scss │ ├── components.links.scss │ ├── components.lists.scss │ ├── components.navs.scss │ ├── components.overlays.scss │ ├── components.pagination.scss │ ├── components.progress.scss │ ├── components.ranges.scss │ ├── components.tables.scss │ ├── components.tabs.scss │ ├── components.tags.scss │ ├── components.toggles.scss │ ├── components.tooltips.scss │ ├── components.trees.scss │ ├── components.typography.scss │ ├── generics.global.scss │ ├── mixins │ │ ├── _components.alerts.scss │ │ ├── _components.badges.scss │ │ ├── _components.buttons.scss │ │ ├── _components.inputs.scss │ │ ├── _components.links.scss │ │ ├── _components.lists.scss │ │ ├── _components.navs.scss │ │ ├── _components.ranges.scss │ │ ├── _components.tabs.scss │ │ ├── _components.toggles.scss │ │ ├── _components.typography.scss │ │ ├── _objects.containers.scss │ │ ├── _objects.grid.scss │ │ ├── _settings.global.scss │ │ ├── _tools.mediaqueries.scss │ │ ├── _utilities.alignment.scss │ │ ├── _utilities.boxing.scss │ │ └── _utilities.visibility.scss │ ├── objects.containers.scss │ ├── objects.drawers.scss │ ├── objects.forms.scss │ ├── objects.grid.responsive.scss │ ├── objects.grid.scss │ ├── objects.images.scss │ ├── objects.media.scss │ ├── objects.modals.scss │ ├── objects.panels.scss │ ├── themes │ │ └── blaze.example.scss │ ├── utilities.alignment.scss │ ├── utilities.boxing.scss │ ├── utilities.elevation.scss │ ├── utilities.sizes.scss │ └── utilities.visibility.scss │ ├── icomoon.scss │ └── theme.scss ├── bin ├── appraisal ├── fasterer ├── rails ├── rake ├── rspec └── rubocop ├── extra ├── README.md ├── edit.png └── index.png ├── gemfiles ├── rails52_activeadmin20.gemfile ├── rails52_activeadmin20.gemfile.lock ├── rails60_activeadmin.gemfile ├── rails60_activeadmin.gemfile.lock ├── rails60_activeadmin22.gemfile ├── rails60_activeadmin22.gemfile.lock ├── rails61_activeadmin.gemfile ├── rails61_activeadmin.gemfile.lock ├── rails61_activeadmin29.gemfile ├── rails61_activeadmin29.gemfile.lock ├── rails70_activeadmin.gemfile └── rails70_activeadmin.gemfile.lock ├── index.js ├── lib ├── activeadmin │ └── views │ │ └── activeadmin_form.rb ├── activeadmin_blaze_theme.rb ├── activeadmin_blaze_theme │ └── version.rb └── formtastic │ └── inputs │ └── blaze_toggle_input.rb ├── package.json └── spec ├── dummy ├── .ruby-version ├── Rakefile ├── app │ ├── admin │ │ ├── authors.rb │ │ ├── dashboard.rb │ │ ├── posts.rb │ │ └── tags.rb │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ ├── images │ │ │ └── .keep │ │ ├── javascripts │ │ │ └── active_admin.js │ │ └── stylesheets │ │ │ ├── active_admin.scss │ │ │ └── application.css │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── controllers │ │ ├── application_controller.rb │ │ └── concerns │ │ │ └── .keep │ ├── helpers │ │ └── application_helper.rb │ ├── javascript │ │ └── packs │ │ │ └── application.js │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ ├── author.rb │ │ ├── concerns │ │ │ └── .keep │ │ ├── post.rb │ │ ├── post_tag.rb │ │ ├── profile.rb │ │ └── tag.rb │ └── views │ │ └── layouts │ │ ├── application.html.erb │ │ ├── mailer.html.erb │ │ └── mailer.text.erb ├── bin │ ├── rails │ ├── rake │ └── setup ├── config.ru ├── config │ ├── application.rb │ ├── boot.rb │ ├── cable.yml │ ├── database.yml │ ├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── initializers │ │ ├── active_admin.rb │ │ ├── application_controller_renderer.rb │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├── content_security_policy.rb │ │ ├── cookies_serializer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── mime_types.rb │ │ └── wrap_parameters.rb │ ├── locales │ │ └── en.yml │ ├── puma.rb │ ├── routes.rb │ ├── spring.rb │ └── storage.yml ├── db │ ├── migrate │ │ ├── 20170806125915_create_active_storage_tables.active_storage.rb │ │ ├── 20180101010101_create_active_admin_comments.rb │ │ ├── 20180607053251_create_authors.rb │ │ ├── 20180607053254_create_profiles.rb │ │ ├── 20180607053255_create_tags.rb │ │ ├── 20180607053257_create_post_tags.rb │ │ └── 20180607053739_create_posts.rb │ ├── schema.rb │ └── seeds.rb ├── lib │ └── assets │ │ └── .keep └── public │ ├── 404.html │ ├── 422.html │ ├── 500.html │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ └── favicon.ico ├── rails_helper.rb ├── spec_helper.rb ├── support ├── capybara.rb └── capybara_cuprite.rb └── system └── theme_spec.rb /.fasterer.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_paths: 3 | - bin/* 4 | - db/schema.rb 5 | - gemfiles/**/* 6 | - spec/dummy/**/* 7 | - vendor/**/* 8 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [blocknotes] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/workflows/linters.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Linters 3 | 4 | on: 5 | push: 6 | branches: [develop, main] 7 | pull_request: 8 | branches: [develop, main] 9 | 10 | jobs: 11 | linters: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Check out code 16 | uses: actions/checkout@v2 17 | 18 | - name: Set up Ruby 19 | uses: ruby/setup-ruby@v1 20 | with: 21 | ruby-version: '2.7' 22 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 23 | 24 | - uses: reviewdog/action-setup@v1 25 | with: 26 | reviewdog_version: latest 27 | 28 | - name: Run reviewdog 29 | env: 30 | REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | run: | 32 | reviewdog -fail-on-error -reporter=github-pr-review -runners=fasterer,rubocop 33 | 34 | # NOTE: check with: reviewdog -fail-on-error -reporter=github-pr-review -runners=fasterer -diff="git diff" -tee 35 | -------------------------------------------------------------------------------- /.github/workflows/specs_rails6.0.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Specs Rails 6.0 3 | 4 | on: 5 | push: 6 | branches: 7 | - master 8 | pull_request: 9 | branches: 10 | - master 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | ruby: ['2.7'] 19 | gemfile: ['rails60_activeadmin22', 'rails60_activeadmin'] 20 | 21 | env: 22 | BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile 23 | 24 | steps: 25 | - name: Checkout repository 26 | uses: actions/checkout@v2 27 | 28 | - name: Set up Ruby 29 | uses: ruby/setup-ruby@v1 30 | with: 31 | ruby-version: ${{ matrix.ruby }} 32 | bundler-cache: true 33 | 34 | - name: Run tests 35 | run: bundle exec rspec --profile 36 | 37 | - name: On failure, archive screenshots as artifacts 38 | uses: actions/upload-artifact@v2 39 | if: failure() 40 | with: 41 | name: test-failed-screenshots 42 | path: spec/dummy/tmp/screenshots 43 | -------------------------------------------------------------------------------- /.github/workflows/specs_rails6.1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Specs Rails 6.1 3 | 4 | on: 5 | push: 6 | branches: 7 | - main 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | ruby: ['2.7', '3.0'] 19 | gemfile: ['rails61_activeadmin29', 'rails61_activeadmin'] 20 | 21 | env: 22 | BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile 23 | 24 | steps: 25 | - name: Checkout repository 26 | uses: actions/checkout@v2 27 | 28 | - name: Set up Ruby 29 | uses: ruby/setup-ruby@v1 30 | with: 31 | ruby-version: ${{ matrix.ruby }} 32 | bundler-cache: true 33 | 34 | - name: Run tests 35 | run: bundle exec rspec --profile 36 | 37 | - name: On failure, archive screenshots as artifacts 38 | uses: actions/upload-artifact@v2 39 | if: failure() 40 | with: 41 | name: test-failed-screenshots 42 | path: spec/dummy/tmp/screenshots 43 | -------------------------------------------------------------------------------- /.github/workflows/specs_rails7.0.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Specs Rails 7.0 3 | 4 | on: 5 | push: 6 | branches: 7 | - main 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | ruby: ['2.7', '3.0', '3.1', '3.2'] 19 | gemfile: ['rails70_activeadmin'] 20 | 21 | env: 22 | BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile 23 | 24 | steps: 25 | - name: Checkout repository 26 | uses: actions/checkout@v2 27 | 28 | - name: Set up Ruby 29 | uses: ruby/setup-ruby@v1 30 | with: 31 | ruby-version: ${{ matrix.ruby }} 32 | bundler-cache: true 33 | 34 | - name: Run tests 35 | run: bundle exec rspec --profile 36 | 37 | - name: On failure, archive screenshots as artifacts 38 | uses: actions/upload-artifact@v2 39 | if: failure() 40 | with: 41 | name: test-failed-screenshots 42 | path: spec/dummy/tmp/screenshots 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.orig 3 | 4 | /.rspec_failures 5 | /.rubocop-* 6 | /Gemfile.lock 7 | 8 | /_misc/ 9 | /coverage/ 10 | /spec/dummy/db/*.sqlite3* 11 | /spec/dummy/log/ 12 | /spec/dummy/storage/ 13 | /spec/dummy/tmp/ 14 | -------------------------------------------------------------------------------- /.reviewdog.yml: -------------------------------------------------------------------------------- 1 | --- 2 | runner: 3 | fasterer: 4 | cmd: bin/fasterer 5 | level: info 6 | rubocop: 7 | cmd: bin/rubocop 8 | level: info 9 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require rails_helper 2 | --format documentation 3 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | inherit_from: 3 | - https://relaxed.ruby.style/rubocop.yml 4 | 5 | AllCops: 6 | Exclude: 7 | - bin/* 8 | - db/schema.rb 9 | - gemfiles/**/* 10 | - spec/dummy/**/* 11 | - vendor/**/* 12 | NewCops: enable 13 | -------------------------------------------------------------------------------- /Appraisals: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | appraise 'rails52-activeadmin20' do 4 | gem 'activeadmin', '~> 2.0.0' 5 | gem 'rails', '~> 5.2.0' 6 | end 7 | 8 | appraise 'rails60-activeadmin22' do 9 | gem 'activeadmin', '~> 2.2.0' 10 | gem 'rails', '~> 6.0.0' 11 | gem 'selenium-webdriver', require: false 12 | end 13 | 14 | appraise 'rails60-activeadmin' do 15 | gem 'activeadmin' 16 | gem 'rails', '~> 6.0.0' 17 | gem 'selenium-webdriver', require: false 18 | end 19 | 20 | appraise 'rails61-activeadmin29' do 21 | gem 'activeadmin', '~> 2.9.0' 22 | gem 'rails', '~> 6.1.0' 23 | end 24 | 25 | appraise 'rails61-activeadmin' do 26 | gem 'activeadmin' 27 | gem 'rails', '~> 6.1.0' 28 | end 29 | 30 | appraise 'rails70-activeadmin' do 31 | gem 'activeadmin' 32 | gem 'rails', '~> 7.0.0' 33 | gem 'sprockets-rails' 34 | end 35 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # ActiveAdmin Blaze Theme 3 | 4 | An ActiveAdmin theme based on Blaze CSS UI toolkit. 5 | 6 | ## v1.1.0 - 2022-04-18 7 | 8 | - Change ActiveAdmin dependency version range to support 3.x 9 | - Set minimum Ruby version to 2.7.0 10 | 11 | ## v1.0.0 - 2022-04-18 12 | 13 | - Set minimum Ruby version to 2.6.0 14 | - Enable Rails 7.0 specs support 15 | - Internal improvements 16 | 17 | ## v0.7.10 - 2022-02-06 18 | 19 | - Remove Sassc runtime dependency 20 | - Avoid using `calc()` in some style properties 21 | - Minor internal changes 22 | 23 | ## v0.7.8 - 2021-09-14 24 | 25 | - Import some extra styles for Roboto font to improve the appearance 26 | 27 | ## v0.7.6 - 2021-06-06 28 | 29 | - Fix button styles for has_many outside inputs blocks 30 | - Minor internal changes 31 | - Move some dependencies from gemspec to Gemfile 32 | - Specs structure improvements 33 | 34 | ## v0.7.4 - 2021-05-11 35 | 36 | - Update Blaze CSS to version 3.6.3 37 | - The Blaze update also fix some issues with the accordion 38 | - Internal gem improvements 39 | 40 | ## v0.7.0 - 2021-05-10 41 | 42 | - Add Webpacker support (experimental) 43 | 44 | ## v0.6.2 - 2021-03-21 45 | 46 | - Fix blaze toggle widget 47 | - Update dependencies to test on Rails 6.1 48 | 49 | ## v0.6.0 - 2020-10-18 50 | 51 | - Update Blaze CSS framework (9.2.0) 52 | - Split in style partials 53 | 54 | ## v0.5.16 - 2020-10-17 55 | 56 | - Add minimum specs 57 | - Add Rubocop 58 | 59 | ## v0.5.14 - 2020-09-04 60 | 61 | - Support ActiveAdmin 2.X 62 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org' 4 | 5 | gemspec 6 | 7 | group :development, :test do 8 | gem 'puma' 9 | gem 'sassc' 10 | gem 'sqlite3' 11 | 12 | # Testing 13 | gem 'capybara' 14 | gem 'cuprite' 15 | gem 'rspec_junit_formatter' 16 | gem 'rspec-rails' 17 | 18 | # Linters 19 | gem 'fasterer' 20 | gem 'rubocop' 21 | gem 'rubocop-packaging' 22 | gem 'rubocop-performance' 23 | gem 'rubocop-rails' 24 | gem 'rubocop-rspec' 25 | 26 | # Tools 27 | gem 'pry-rails' 28 | end 29 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020-2022 Mattia Roccoberton 2 | 3 | MIT License 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. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Active Admin Blaze Theme 2 | [![gem version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme) 3 | [![gem downloads](https://badgen.net/rubygems/dt/activeadmin_blaze_theme)](https://rubygems.org/gems/activeadmin_blaze_theme) 4 | [![linters](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/linters.yml) 5 | [![specs Rails 6.1](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.1.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.1.yml) 6 | [![specs Rails 7.0](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails7.0.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails7.0.yml) 7 | 8 | A theme for Active Admin based on [Blaze CSS](http://blazecss.com) 3.x 9 | 10 | Features: 11 | 12 | - CSS only theme with clean UI 13 | - compact nested forms 14 | - [customizable](#customize) options: colors, sidebar position, squared style, scroll on cells 15 | - custom controls / components: [toggle](#toggle), [Sidebar menu](#sidebar-menu), [Accordion](#accordion), [Readonly field](#readonly-field), [Styled table](#styled-table) 16 | - Blaze CSS [widgets](#blaze-widgets) 17 | 18 | See some [screenshots](#screenshots). 19 | 20 | Please :star: if you like it. 21 | 22 | ## Install 23 | 24 | First, add to your Gemfile: `gem 'activeadmin_blaze_theme'` (and execute `bundle`) 25 | 26 | Then, if you installed Active Admin **without Webpacker** support (so using Sprockets): 27 | 28 | - Add a SASS/SCSS gem to your Gemfile (ex. `gem 'sassc'`) 29 | - Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_): 30 | 31 | ```scss 32 | @import "activeadmin_blaze_theme/theme"; 33 | ``` 34 | 35 | Otherwise, **with Webpacker**: 36 | 37 | - Add the component to the _package.json_: `yarn add blocknotes/activeadmin_blaze_theme` 38 | - Add at the end of your Active Admin javascript pack (_app/javascript/packs/active_admin.js_): 39 | 40 | ```js 41 | require('activeadmin_blaze_theme'); 42 | ``` 43 | 44 | - Another option is appending to _app/javascript/stylesheets/active_admin.scss_ (in this case the JS require line is not needed): 45 | 46 | ```scss 47 | // ... 48 | // optionally add custom colors variables here 49 | @import "~activeadmin_blaze_theme/app/assets/stylesheets/activeadmin_blaze_theme/theme"; 50 | ``` 51 | 52 | - Sometimes it could be necessary to remove the _node_modules_ path and recreate it (using `yarn install --check-files`) or to clean the tmp path: `bin/rails tmp:clear` 53 | 54 | ## Customize 55 | 56 | - Colors customization is available using some Sass variables; 57 | - With Sprockets: you need to update your Active Admin styles (before **activeadmin_blaze_theme/theme** import line); 58 | - With Webpacker: you need to import the theme using the Sass/Scss option as described above. 59 | 60 | ```scss 61 | // blaze colors 62 | $color-brand: #2c3e50; 63 | $color-info: #4dabf5; 64 | $color-warning: #ff9800; 65 | $color-success: #4caf50; 66 | $color-error: #f44336; 67 | // main variables 68 | $bg-footer: #dfdfdf; // bg footer bar 69 | $bg-form1: #f4f4f4; // bg 1st level forms 70 | $bg-form2: darken($bg-form1, 3%); // bg 2nd level forms (nested) 71 | $bg-form3: darken($bg-form1, 6%); // bg 3rd level forms (nested) 72 | $bg-form4: darken($bg-form1, 9%); // bg 4th level forms (nested) 73 | $bg-form-sub-headings: lighten($color-brand, 64%); // bg nested forms title 74 | $bg-header: $color-brand; // bg header bar 75 | $bg-inputs: #fff; // bg forms inputs 76 | $bg-menu-active: #7b929e; // bg menu item current / hover 77 | $bg-sidebar: #efefef; // bg sidebar 78 | $fg-box-title: #fff; 79 | $fg-button-link: #fff; 80 | $fg-menu-items: #f8f8f8; 81 | $fg-table-borders: #e4e4e4; 82 | $fg-table-link: #eee; 83 | // other variables 84 | $form-padding: 10px; 85 | $inputs-spacing: 10px; 86 | $height-inputs: 26px; 87 | $height-topbar: 40px; 88 | $height-titlebar: 38px; 89 | $text-shadow: #000; 90 | ``` 91 | 92 | - To move sidebar on the left add to your Active Admin styles (after blaze theme import): 93 | 94 | ```scss 95 | #active_admin_content.with_sidebar { 96 | @extend .sidebar_left; 97 | } 98 | ``` 99 | 100 | - Squared style (no rounded borders): 101 | 102 | ```scss 103 | #active_admin_content, .active_admin #title_bar { 104 | @extend .no_rounded; 105 | } 106 | ``` 107 | 108 | - More options: 109 | 110 | ```scss 111 | // scrollable table cells 112 | body.active_admin .index_content table { 113 | @extend .scrollable_cells; 114 | } 115 | ``` 116 | 117 | ```scss 118 | // fix ckeditor width 119 | body.active_admin .cke { 120 | @extend .ckeditor_width_fix 121 | } 122 | ``` 123 | 124 | ## Custom fields / components 125 | 126 | ### Toggle 127 | 128 | In *form* \ *inputs* block: 129 | 130 | ```ruby 131 | f.input :boolean, as: :blaze_toggle 132 | ``` 133 | 134 | To change toggle color: 135 | 136 | ```ruby 137 | f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' } 138 | ``` 139 | 140 | Available: `c-toggle--brand, c-toggle--info, c-toggle--warning, c-toggle--success, c-toggle--error` 141 | 142 | Standard checkbox with label on the left: 143 | 144 | ```ruby 145 | f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true } 146 | ``` 147 | 148 | ### Sidebar menu 149 | 150 | A sidebar menu (*priority* option permit to put the sidebar above the filters): 151 | 152 | ```ruby 153 | sidebar :help, priority: 0 do 154 | ul class: 'blaze-menu' do 155 | li do 156 | link_to 'Menu item 1', admin_root_path 157 | end 158 | li do 159 | link_to 'Menu item 2', admin_root_path 160 | end 161 | li do 162 | link_to 'Menu item 3', admin_root_path 163 | end 164 | end 165 | end 166 | ``` 167 | 168 | ### Accordion 169 | 170 | An accordion group in a form: 171 | 172 | ```ruby 173 | f.accordion_group do 174 | f.accordion 'First accordion' do 175 | f.inputs for: [:detail, f.object.detail || Detail.new] do |f2| 176 | f2.input :meta_title 177 | f2.input :meta_keywords 178 | end 179 | end 180 | f.accordion 'Second accordion' do 181 | f.inputs for: [:more_detail, f.object.morel_detail || Detail.new] do |f2| 182 | f2.input :meta_title 183 | f2.input :meta_keywords 184 | end 185 | end 186 | end 187 | ``` 188 | 189 | ### Readonly field 190 | 191 | Some readonly fields in a form: 192 | 193 | ```ruby 194 | f.readonly :position 195 | ``` 196 | 197 | ```ruby 198 | f.readonly :position, f.object.position * 2 199 | ``` 200 | 201 | ```ruby 202 | f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class' 203 | ``` 204 | 205 | ```ruby 206 | f.readonly nil, 'Value only, no label' 207 | ``` 208 | 209 | ### Styled table 210 | Table styles: 211 | 212 | ```ruby 213 | table_for User.all, class: 'blaze-table table-rows table-striped' do 214 | # ... 215 | end 216 | ``` 217 | 218 | ## Blaze widgets 219 | 220 | See components available in Blaze CSS [docs](http://blazecss.com/components/buttons/). 221 | 222 | Badge example: 223 | 224 | ```ruby 225 | f.input :price, label: raw( 'Price in $' ) 226 | ``` 227 | 228 | Button example: 229 | 230 | ```ruby 231 | a 'clear form', href: '#', class: 'c-button c-button--error', onclick: 'event.preventDefault();document.forms[0].reset();' 232 | ``` 233 | 234 | Progress bar example: 235 | 236 | ```ruby 237 | div class: 'c-progress' do 238 | div class: 'c-progress__bar c-progress__bar--success', style: "width: #{f.object.a_field}%;" 239 | end 240 | ``` 241 | 242 | ## Notes 243 | 244 | - To use this plugins with Active Admin 1.x please use the version [0.5.12](https://github.com/blocknotes/activeadmin_blaze_theme/releases/tag/v0.5.12) 245 | 246 | ## Screenshots 247 | 248 | Index: 249 | ![index](extra/index.png) 250 | 251 | Edit: 252 | ![edit](extra/edit.png) 253 | 254 | ## Changelog 255 | 256 | The changelog is available [here](CHANGELOG.md). 257 | 258 | ## Do you like it? Star it! 259 | 260 | If you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source). 261 | 262 | Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me). 263 | 264 | ## Contributors 265 | 266 | - [Mattia Roccoberton](http://blocknot.es): author 267 | - The good guys that opened issues and pull requests from time to time 268 | 269 | ## License 270 | 271 | The gem is available as open-source under the terms of the [MIT](LICENSE.txt). 272 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'bundler/gem_tasks' 4 | 5 | begin 6 | require 'rspec/core/rake_task' 7 | 8 | RSpec::Core::RakeTask.new(:spec) do |t| 9 | # t.ruby_opts = %w[-w] 10 | t.rspec_opts = ['--color', '--format documentation'] 11 | end 12 | 13 | task default: :spec 14 | rescue LoadError 15 | puts '! LoadError: no RSpec available' 16 | end 17 | -------------------------------------------------------------------------------- /activeadmin_blaze_theme.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | lib = File.expand_path('lib', __dir__) 4 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 5 | require 'activeadmin_blaze_theme/version' 6 | 7 | Gem::Specification.new do |spec| 8 | spec.name = 'activeadmin_blaze_theme' 9 | spec.version = ActiveAdminBlazeTheme::VERSION 10 | spec.authors = ['Mattia Roccoberton'] 11 | spec.email = ['mat@blocknot.es'] 12 | spec.summary = 'ActiveAdmin Blaze Theme' 13 | spec.description = 'An ActiveAdmin theme based on Blaze CSS UI toolkit' 14 | spec.homepage = 'https://github.com/blocknotes/activeadmin_blaze_theme' 15 | spec.license = 'MIT' 16 | 17 | spec.required_ruby_version = '>= 2.7.0' 18 | 19 | spec.metadata['homepage_uri'] = spec.homepage 20 | spec.metadata['source_code_uri'] = spec.homepage 21 | spec.metadata['changelog_uri'] = 'https://github.com/blocknotes/activeadmin_blaze_theme/blob/main/CHANGELOG.md' 22 | spec.metadata['rubygems_mfa_required'] = 'true' 23 | 24 | spec.files = Dir["{app,lib}/**/*", 'LICENSE.txt', 'README.md', 'index.js', 'package.json'] 25 | spec.require_paths = ['lib'] 26 | 27 | spec.add_runtime_dependency 'activeadmin', '>= 2.0', '< 4' 28 | 29 | spec.add_development_dependency 'appraisal', '~> 2.4' 30 | end 31 | -------------------------------------------------------------------------------- /app/assets/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/app/assets/fonts/icomoon.eot -------------------------------------------------------------------------------- /app/assets/fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/assets/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/app/assets/fonts/icomoon.ttf -------------------------------------------------------------------------------- /app/assets/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/app/assets/fonts/icomoon.woff -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_base.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | font-family: 'Roboto', sans-serif; 3 | font-size: 12px; 4 | min-height: 100vh; 5 | 6 | .button-base { 7 | @extend .c-button; 8 | 9 | background-image: none; 10 | box-shadow: initial; 11 | color: #f4f4f4; 12 | text-shadow: $text-shadow 0 1px 0; 13 | } 14 | .c-input-group .c-button:not(:first-child) { 15 | border-left: 1px solid #ddd; 16 | } 17 | 18 | // misc 19 | a.member_link { 20 | color: #f4f4f4; 21 | text-decoration: none; 22 | } 23 | .download_links { 24 | padding-bottom: 10px; 25 | 26 | >a { 27 | @extend .c-button; 28 | @extend .c-button--info; 29 | @extend .u-small; 30 | } 31 | } 32 | .ui-datepicker { 33 | > .ui-datepicker-header { 34 | background-color: $bg-header; 35 | background-image: none; 36 | border-bottom: 0 none; 37 | border-radius: 0; 38 | height: auto; 39 | margin: 0; 40 | padding: 8px 10px; 41 | width: 100%; 42 | } 43 | .ui-datepicker-calendar th { 44 | padding: 3px 0; 45 | } 46 | > .ui-datepicker-calendar { 47 | left: 0; 48 | width: 100%; 49 | a { 50 | text-decoration: none; 51 | } 52 | } 53 | } 54 | 55 | // comments 56 | .comments { 57 | .actions { 58 | padding: 0; 59 | } 60 | 61 | .inputs >ol { 62 | background-color: transparent; 63 | } 64 | 65 | .pagination_information { 66 | float: none; 67 | } 68 | } 69 | 70 | // boolean values 71 | .status_tag { 72 | min-width: 30px; 73 | display: inline-block; 74 | text-align: center; 75 | &.no { 76 | background-color: $color-error; 77 | } 78 | &.yes { 79 | background-color: $color-success; 80 | } 81 | } 82 | 83 | // dialogs 84 | .ui-dialog { 85 | button.ui-button { 86 | @extend .button-base; 87 | margin-right: 10px; 88 | &:hover, &.ui-widget:hover { 89 | background-color: #aaa; 90 | background-image: none; 91 | } 92 | &.ui-dialog-titlebar-close { 93 | // display: none; // hides close button 94 | margin-right: 0; 95 | } 96 | } 97 | .ui-dialog-content { 98 | min-height: auto; 99 | } 100 | .ui-dialog-titlebar { 101 | display: flex; 102 | justify-content: space-between; 103 | > * { 104 | align-self: center 105 | } 106 | } 107 | // .ui-dialog-buttonset { 108 | // text-align: right; 109 | // } 110 | } 111 | 112 | // special components 113 | .filter_form .select-one-inputs { 114 | display: flex; 115 | >input[type="text"], >select { 116 | width: 49%; 117 | } 118 | >input[type="text"] { 119 | margin: 0 1% 0 0; 120 | } 121 | select { 122 | margin: 0 0 0 1%; 123 | } 124 | } 125 | .selectize.input > .selectize-control > .selectize-input { 126 | padding-left: 4px; 127 | padding-top: 3px; 128 | } 129 | 130 | // optional customizations 131 | .compact_titlebar { 132 | white-space: initial; 133 | } 134 | .sidebar_left { 135 | #main_content_wrapper { 136 | order: 2; 137 | width: calc( 100% - 270px ); 138 | #main_content { 139 | width: 100%; 140 | } 141 | } 142 | #sidebar { 143 | order: 1; 144 | margin-left: 0; 145 | } 146 | } 147 | table.scrollable_cells { 148 | th, td { 149 | max-width: 200px; 150 | overflow: scroll; 151 | } 152 | } 153 | .ckeditor_width_fix { 154 | display: inline-block; 155 | min-width: 450px; 156 | width: auto; 157 | // width: calc(80% - 22px); 158 | } 159 | .no_rounded { 160 | *, .action_items span.action_item > a, .panel { 161 | border-radius: 0; 162 | } 163 | } 164 | 165 | // menu 166 | .blaze-menu { 167 | @extend .c-card; 168 | @extend .c-card--menu; 169 | @extend .u-high; 170 | li { 171 | @extend .c-card__item; 172 | padding: 0; 173 | a { 174 | display: block; 175 | padding: 0.5em; 176 | text-decoration: none; 177 | } 178 | } 179 | } 180 | .sidebar_section .blaze-menu { 181 | margin-bottom: 4px; 182 | } 183 | 184 | // textarea comments 185 | #active_admin_comment_body { 186 | width: 100%; 187 | } 188 | 189 | // misc 190 | #active_admin_content.without_sidebar #main_content_wrapper #main_content { 191 | width: 100%; 192 | } 193 | #wrapper { 194 | display: block; 195 | min-height: 100vh; 196 | padding-bottom: 40px; // footer height 197 | position: relative; 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_contents.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | // main content 3 | #main_content { 4 | margin: 0; 5 | padding: 25px 20px; 6 | width: calc(100% - 270px); 7 | .panel { 8 | @extend .c-card; 9 | @extend .u-high; 10 | background: $bg-form1; 11 | > h3 { 12 | @extend .c-card__item; 13 | @extend .c-card__item--brand; 14 | background-image: none; 15 | border: 0 none !important; 16 | color: $fg-box-title; 17 | margin: 0; 18 | padding: 8px 11px; 19 | text-shadow: $text-shadow 0 1px 0; 20 | } 21 | > .panel_contents .actions { 22 | margin: 0; 23 | } 24 | table { 25 | margin: 0; 26 | } 27 | } 28 | .section { 29 | background: transparent; 30 | box-shadow: none; 31 | margin-bottom: 0; 32 | } 33 | } 34 | 35 | // admin content 36 | #active_admin_content { 37 | display: flex; 38 | padding: 0; 39 | } 40 | &.logged_out #active_admin_content { // devise forms 41 | display: block; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_footer.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | #footer { 3 | bottom: 0; 4 | position: absolute; 5 | background-color: $bg-footer; 6 | line-height: 20px; 7 | padding: 10px; 8 | text-align: center; 9 | width: 100%; 10 | > p { 11 | margin: 0; 12 | padding: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_header.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | #header { 3 | background-color: $bg-header; 4 | background-image: none; 5 | border-bottom: 0 none; 6 | padding: 0; 7 | position: relative; 8 | .header-item { 9 | top: 0; 10 | } 11 | .site_title { 12 | color: $fg-menu-items; 13 | padding-top: 0; 14 | padding-bottom: 0; 15 | img { 16 | max-height: $height-topbar; 17 | max-width: 250px; 18 | // top: -1px; 19 | vertical-align: middle; 20 | } 21 | } 22 | ul.tabs { 23 | >li { 24 | margin-left: 1px; 25 | padding: 0; 26 | } 27 | li { 28 | height: $height-topbar; 29 | line-height: $height-topbar; 30 | } 31 | li > a { 32 | color: $fg-menu-items; 33 | height: $height-topbar; 34 | line-height: $height-topbar; 35 | padding-left: 20px; 36 | padding-right: 20px; 37 | } 38 | li:hover, li.current { 39 | background: $bg-menu-active; 40 | } 41 | > li.has_nested { 42 | > a { 43 | background-color: transparent; 44 | border-bottom: 0; 45 | } 46 | > ul { 47 | background: lighten( $bg-header, 5% ); 48 | border-radius: 0; 49 | padding: 0; 50 | margin: 0; 51 | a { 52 | line-height: 2em; 53 | } 54 | li:hover { 55 | background: $bg-menu-active; 56 | } 57 | } 58 | } 59 | } 60 | } 61 | 62 | #tabs, #utility_nav { 63 | @extend .c-nav; 64 | // @extend .c-nav--inline; 65 | background-color: $bg-header; 66 | > li { 67 | @extend .c-nav__item; 68 | float: left; 69 | margin: 0; 70 | &.current { 71 | @extend .c-nav__item--active; 72 | > a { 73 | background: transparent; 74 | } 75 | } 76 | > a { 77 | display: block; 78 | padding: 0; 79 | } 80 | > a:hover { 81 | background: transparent; 82 | } 83 | } 84 | > li:hover > a { 85 | background: transparent; 86 | } 87 | } 88 | 89 | #utility_nav { 90 | position: absolute; 91 | right: 0; 92 | width: auto; 93 | } 94 | 95 | // title bar 96 | #title_bar { 97 | background-image: none; 98 | box-shadow: none; 99 | padding-top: 0; 100 | padding-bottom: 0; 101 | .breadcrumb { 102 | float: left; 103 | font-size: 1em; 104 | line-height: initial; 105 | margin: 0; 106 | padding: 0; 107 | > a, > a:link, > a:visited, > a:active { 108 | opacity: 0.7; 109 | } 110 | } 111 | .action_items span.action_item { 112 | > a, 113 | > .dropdown_menu > a { 114 | @extend .button-base; 115 | @extend .c-button--info; 116 | 117 | color: #f4f4f4; 118 | } 119 | > a:hover, 120 | > .dropdown_menu > a:hover { 121 | background-color: #aaa; 122 | background-image: none; 123 | } 124 | a[data-method='delete'] { 125 | @extend .c-button--error; 126 | } 127 | } 128 | #page_title { 129 | display: block; 130 | float: left; 131 | font-size: 1em; 132 | // font-size: 2em; 133 | line-height: initial; 134 | margin-left: 5px; 135 | } 136 | #titlebar_left, #titlebar_right { 137 | height: $height-titlebar; 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_navigation.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | nav.pagination { 3 | @extend .c-pagination; 4 | 5 | float: none; 6 | justify-content: center; 7 | margin: 0; 8 | padding: 0; 9 | 10 | span > a { 11 | background: transparent; 12 | background-image: none; 13 | border: 0 none; 14 | box-shadow: none; 15 | color: initial; 16 | cursor: pointer; 17 | padding: 6px 10px; 18 | margin: 0 auto; 19 | text-shadow: none; 20 | } 21 | 22 | a:hover, span:hover > a { 23 | background: transparent; 24 | background-image: none; 25 | color: #888; 26 | text-shadow: none; 27 | } 28 | 29 | .first, .prev, .next, .last { 30 | display: inline-block; 31 | margin-right: 2px; 32 | padding: 0; 33 | } 34 | 35 | .prev { 36 | margin-right: 16px; 37 | } 38 | 39 | .next { 40 | margin-left: 14px; 41 | } 42 | 43 | .page { 44 | display: inline-block; 45 | margin-right: 2px; 46 | padding: 0; 47 | &.current { 48 | background-color: transparent; 49 | background-image: none; 50 | border-radius: 20px; 51 | color: #000; 52 | padding: 6px 10px; 53 | text-shadow: none; 54 | } 55 | &.current:hover { 56 | background-color: transparent; 57 | background-image: none; 58 | } 59 | &.gap { 60 | border: 0 none; 61 | } 62 | &.gap:hover { 63 | background-color: transparent; 64 | color: initial; 65 | cursor: default; 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_sidebars.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | #sidebar { 3 | background: $bg-sidebar; 4 | min-height: calc(100vh - #{$height-topbar + $height-titlebar + 2 + 40}); 5 | padding: 0 15px; 6 | .sidebar_section { 7 | margin-bottom: 20px; 8 | } 9 | .filter_form .selectize-control > .selectize-input { 10 | width: 100%; 11 | } 12 | } 13 | #active_admin_content > #sidebar, #active_admin_content > #main_content_wrapper { 14 | float: none; 15 | } 16 | .panel_contents { 17 | @extend .c-card__item; 18 | padding: 8px 10px 10px 10px; 19 | } 20 | .sidebar_section { 21 | @extend .c-card; 22 | @extend .u-high; 23 | .filter_form_field { 24 | input[type='datetime-local'], 25 | input[type='email'], 26 | input[type='number'], 27 | input[type='password'], 28 | input[type='search'], 29 | input[type='tel'], 30 | input[type='text'], 31 | input[type='time'], 32 | input[type='url'], 33 | textarea { 34 | background-color: $bg-inputs; 35 | background-image: none; 36 | } 37 | select { 38 | background-color: $bg-inputs; 39 | } 40 | } 41 | > h3 { 42 | @extend .c-card__item; 43 | @extend .c-card__item--brand; 44 | background-image: none; 45 | border: 0 none !important; 46 | color: $fg-box-title; 47 | margin-bottom: 2px; 48 | margin-top: 0; 49 | padding: 8px 11px; 50 | text-shadow: $text-shadow 0 1px 0; 51 | } 52 | h4 { 53 | margin: 0; 54 | } 55 | input[type='submit'] { 56 | @extend .c-button--info; 57 | 58 | color: #f4f4f4; 59 | } 60 | ul { 61 | margin: 0 0 8px 0; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_tables.scss: -------------------------------------------------------------------------------- 1 | body.active_admin { 2 | .blaze-table { 3 | @extend .c-table; 4 | // @extend .c-table--striped; 5 | // @extend .c-table--condensed; 6 | >thead { 7 | @extend .c-table__head; 8 | >tr { 9 | @extend .c-table__row; 10 | @extend .c-table__row--heading; 11 | >th { 12 | @extend .c-table__cell; 13 | } 14 | } 15 | } 16 | >tbody { 17 | @extend .c-table__body; 18 | >tr { 19 | @extend .c-table__row; 20 | >td { 21 | @extend .c-table__cell; 22 | } 23 | } 24 | } 25 | &.table-bordered { 26 | border: 1px solid #ddd; 27 | &.table-rows { 28 | border-bottom: 0 none; 29 | } 30 | } 31 | &.table-rows >tbody >tr { 32 | border-bottom: 1px solid #ddd; 33 | } 34 | &.table-striped >tbody >tr.even { 35 | background: #f4f4f4; 36 | } 37 | } 38 | 39 | .table_tools { 40 | a { 41 | @extend .button-base; 42 | cursor: pointer; 43 | margin-right: 10px; 44 | span { 45 | color: $fg-table-link; 46 | } 47 | } 48 | a:hover, 49 | a.table_tools_button:hover, 50 | .dropdown_menu_button:hover { 51 | background-color: #aaa; 52 | background-image: none; 53 | } 54 | .dropdown_menu_list a { 55 | width: 100%; 56 | } 57 | } 58 | 59 | .index_table { 60 | th { 61 | background-image: none; 62 | background-color: #eee; 63 | border: 0 none; 64 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 1px #fff inset; 65 | } 66 | tbody > tr > td:first-child { 67 | border-left: 1px solid $fg-table-borders; 68 | } 69 | tbody > tr > td { 70 | border-right: 1px solid $fg-table-borders; 71 | } 72 | .col.col-selectable > div { 73 | text-align: center; 74 | } 75 | } 76 | .index_as_table { 77 | overflow-x: auto; 78 | } 79 | .panel_contents table tr:last-child { 80 | > td, > th { 81 | border-bottom: 0 none; 82 | } 83 | } 84 | .col-actions { 85 | padding: 1px 2px 0 6px; 86 | vertical-align: middle; 87 | a.c-button { 88 | // color: #222; 89 | margin-right: 1px; 90 | margin-left: 1px; 91 | } 92 | // .table_actions { 93 | // text-align: center; 94 | // } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/_variables.scss: -------------------------------------------------------------------------------- 1 | // default colors 2 | $color-black: #111 !default; 3 | $color-grey: #B0BEC5 !default; 4 | $color-white: #FFF !default; 5 | $color-beige: #F2F2EA !default; 6 | $color-red: #F44336 !default; 7 | $color-pink: #E91E63 !default; 8 | $color-purple: #9C27B0 !default; 9 | $color-blue: #2196F3 !default; 10 | $color-green: #4CAF50 !default; 11 | $color-cyan: #00BCD4 !default; 12 | $color-yellow: #FFEB3B !default; 13 | $color-orange: #FF9800 !default; 14 | $color-brown: #795548 !default; 15 | 16 | $color-brand: #2C3E50 !default; 17 | $color-info: $color-blue !default; 18 | $color-warning: $color-orange !default; 19 | $color-success: $color-green !default; 20 | $color-error: $color-red !default; 21 | 22 | // main variables 23 | $bg-footer: #dfdfdf !default; // bg footer bar 24 | $bg-form1: #f4f4f4 !default; // bg 1st level forms 25 | $bg-form2: darken($bg-form1, 3%) !default; // bg 2nd level forms (nested) 26 | $bg-form3: darken($bg-form1, 6%) !default; // bg 3rd level forms (nested) 27 | $bg-form4: darken($bg-form1, 9%) !default; // bg 4th level forms (nested) 28 | $bg-form-sub-headings: lighten( $color-brand, 64% ) !default; // bg nested forms title 29 | $bg-header: $color-brand !default; // bg header bar 30 | $bg-inputs: #fff !default; // bg forms inputs 31 | $bg-menu-active: #7b929e !default; // bg menu item current / hover 32 | $bg-sidebar: #efefef; // bg sidebar 33 | $fg-box-title: #fff !default; 34 | $fg-button-link: #fff !default; 35 | $fg-menu-items: #f8f8f8 !default; 36 | $fg-table-borders: #e4e4e4 !default; 37 | $fg-table-link: #eee !default; 38 | 39 | // other variables 40 | $color-validation-error: #932419 !default; 41 | $form-padding: 10px !default; 42 | $inputs-spacing: 10px !default; 43 | $height-inputs: 26px !default; 44 | $height-topbar: 40px !default; 45 | $height-titlebar: 38px !default; 46 | $text-shadow: #000 !default; 47 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.colors.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | // 4 | // Colors 5 | // 6 | @each $name, $value in $colors { 7 | .u-color-#{$name} { 8 | color: $value; 9 | } 10 | 11 | .u-bg-#{$name} { 12 | background-color: $value; 13 | } 14 | 15 | .u-fill-#{$name} { 16 | fill: $value; 17 | } 18 | 19 | .u-stroke-#{$name} { 20 | stroke: $value; 21 | } 22 | } 23 | 24 | .u-stroke-none { 25 | stroke: none; 26 | } 27 | 28 | .u-fill-none { 29 | fill: none; 30 | } 31 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.scss: -------------------------------------------------------------------------------- 1 | // v3.6.3 2 | @import "generics.global"; 3 | @import "objects.containers"; 4 | @import "objects.grid"; 5 | @import "objects.grid.responsive"; 6 | @import "objects.images"; 7 | @import "objects.panels"; 8 | @import "objects.media"; 9 | @import "objects.forms"; 10 | @import "objects.modals"; 11 | @import "objects.drawers"; 12 | @import "components.typography"; 13 | @import "components.badges"; 14 | @import "components.headings"; 15 | @import "components.addresses"; 16 | @import "components.tables"; 17 | @import "components.cards"; 18 | @import "components.buttons"; 19 | @import "components.links"; 20 | @import "components.lists"; 21 | @import "components.breadcrumbs"; 22 | @import "components.trees"; 23 | @import "components.tabs"; 24 | @import "components.inputs"; 25 | @import "components.input-groups"; 26 | @import "components.hints"; 27 | @import "components.toggles"; 28 | @import "components.tags"; 29 | @import "components.ranges"; 30 | @import "components.pagination"; 31 | @import "components.overlays"; 32 | @import "components.bubbles"; 33 | @import "components.tooltips"; 34 | @import "components.alerts"; 35 | @import "components.calendars"; 36 | @import "components.navs"; 37 | @import "components.progress"; 38 | @import "components.avatars"; 39 | @import "utilities.alignment"; 40 | @import "utilities.boxing"; 41 | @import "utilities.elevation"; 42 | @import "utilities.sizes"; 43 | @import "utilities.visibility"; 44 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.addresses.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/components.typography"; 3 | 4 | .c-address { 5 | @include paragraph; 6 | font-style: $address-font-style; 7 | } 8 | 9 | .c-address__heading { 10 | display: block; 11 | font-weight: $address-heading-font-weight; 12 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.alerts.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.alerts"; 2 | 3 | .c-alerts { 4 | display: block; 5 | position: absolute; 6 | width: $alerts-width; 7 | max-height: 100%; 8 | background-color: $alerts-background-color; 9 | z-index: $alerts-z-index; 10 | overflow-y: auto; 11 | } 12 | 13 | .c-alerts--topleft { 14 | top: $alerts-margin; 15 | left: $alerts-margin; 16 | } 17 | 18 | .c-alerts--topright { 19 | top: $alerts-margin; 20 | right: $alerts-margin; 21 | } 22 | 23 | .c-alerts--bottomleft { 24 | bottom: 0; 25 | left: $alerts-margin; 26 | } 27 | 28 | .c-alerts--bottomright { 29 | right: $alerts-margin; 30 | bottom: 0; 31 | } 32 | 33 | .c-alert { 34 | @include alert-color; 35 | position: relative; 36 | margin: $alert-margin; 37 | padding: $alert-padding; 38 | border-radius: $alert-border-radius; 39 | } 40 | 41 | .c-alert--brand { 42 | @include alert-color($alert-brand-background-color); 43 | } 44 | 45 | .c-alert--info { 46 | @include alert-color($alert-info-background-color); 47 | } 48 | 49 | .c-alert--warning { 50 | @include alert-color($alert-warning-background-color); 51 | } 52 | 53 | .c-alert--success { 54 | @include alert-color($alert-success-background-color); 55 | } 56 | 57 | .c-alert--error { 58 | @include alert-color($alert-error-background-color); 59 | } 60 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.avatars.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-avatar { 4 | display: inline-block; 5 | position: relative; 6 | width: $avatar-medium-size; 7 | height: $avatar-medium-size; 8 | margin: $avatar-margin; 9 | border-radius: $avatar-img-border-radius; 10 | background-color: $avatar-background-color; 11 | color: $avatar-color; 12 | } 13 | 14 | .c-avatar[data-text]:after { 15 | position: absolute; 16 | top: 50%; 17 | left: 50%; 18 | transform: translate(-50%, -50%); 19 | content: attr(data-text); 20 | } 21 | 22 | .c-avatar__img { 23 | display: block; 24 | width: 100%; 25 | height: 100%; 26 | border-radius: $avatar-img-border-radius; 27 | overflow: hidden; 28 | } 29 | 30 | .c-avatar__img + .c-avatar__img { 31 | position: absolute; 32 | right: 0; 33 | bottom: 0; 34 | width: $avatar-inner-img-size; 35 | height: $avatar-inner-img-size; 36 | } 37 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.badges.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.badges"; 2 | 3 | .c-badge { 4 | @include badge($badge-background-color, $badge-color, $badge-background-color); 5 | display: inline-block; 6 | margin: $badge-margin; 7 | padding: $badge-padding; 8 | border-radius: $badge-border-radius; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: $badge-line-height; 12 | 13 | &.c-badge--ghost { 14 | @include badge($badge-ghost-background-color, $badge-ghost-color) 15 | } 16 | } 17 | 18 | .c-badge--rounded { 19 | border-radius: $badge-border-radius-rounded; 20 | } 21 | 22 | .c-badge--brand { 23 | @include badge($badge-brand-background-color, $badge-brand-color, $badge-brand-background-color); 24 | 25 | &.c-badge--ghost { 26 | @include badge($badge-ghost-brand-background-color, $badge-ghost-brand-color) 27 | } 28 | } 29 | 30 | .c-badge--info { 31 | @include badge($badge-info-background-color, $badge-info-color, $badge-info-background-color); 32 | 33 | &.c-badge--ghost { 34 | @include badge($badge-ghost-info-background-color, $badge-ghost-info-color) 35 | } 36 | } 37 | 38 | .c-badge--warning { 39 | @include badge($badge-warning-background-color, $badge-warning-color, $badge-warning-background-color); 40 | 41 | &.c-badge--ghost { 42 | @include badge($badge-ghost-warning-background-color, $badge-ghost-warning-color) 43 | } 44 | } 45 | 46 | .c-badge--success { 47 | @include badge($badge-success-background-color, $badge-success-color, $badge-success-background-color); 48 | 49 | &.c-badge--ghost { 50 | @include badge($badge-ghost-success-background-color, $badge-ghost-success-color) 51 | } 52 | } 53 | 54 | .c-badge--error { 55 | @include badge($badge-error-background-color, $badge-error-color, $badge-error-background-color); 56 | 57 | &.c-badge--ghost { 58 | @include badge($badge-ghost-error-background-color, $badge-ghost-error-color) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-breadcrumbs { 4 | display: block; 5 | margin: $breadcrumb-margin; 6 | padding: $breadcrumb-padding; 7 | list-style: none; 8 | } 9 | 10 | .c-breadcrumbs__crumb { 11 | display: inline-block; 12 | width: auto; 13 | padding: $breadcrumb-crumb-padding; 14 | 15 | &:not(:last-child):after { 16 | padding: $breadcrumb-crumb-separator-padding; 17 | color: $breadcrumb-crumb-separator-color; 18 | content: $breadcrumb-crumb-separator-content; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.bubbles.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-bubble { 4 | display: inline-block; 5 | position: relative; 6 | padding: $bubble-padding; 7 | border-radius: $bubble-border-radius; 8 | background-color: $bubble-background-color; 9 | color: $bubble-color; 10 | text-align: $bubble-text-align; 11 | white-space: nowrap; 12 | 13 | &:after { 14 | display: block; 15 | position: absolute; 16 | width: 0; 17 | height: 0; 18 | border: $bubble-arrow-width solid transparent; 19 | content: ""; 20 | } 21 | } 22 | 23 | .c-bubble--top:after { 24 | bottom: -($bubble-arrow-width * 2); 25 | left: 50%; 26 | transform: translateX(-50%); 27 | border-top-color: $bubble-background-color; 28 | } 29 | 30 | .c-bubble--right:after { 31 | top: 50%; 32 | left: -($bubble-arrow-width * 2); 33 | transform: translateY(-50%); 34 | border-right-color: $bubble-background-color; 35 | } 36 | 37 | .c-bubble--bottom:after { 38 | top: -($bubble-arrow-width * 2); 39 | left: 50%; 40 | transform: translateX(-50%); 41 | border-bottom-color: $bubble-background-color; 42 | } 43 | 44 | .c-bubble--left:after { 45 | top: 50%; 46 | right: -($bubble-arrow-width * 2); 47 | transform: translateY(-50%); 48 | border-left-color: $bubble-background-color; 49 | } 50 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.buttons.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.buttons"; 2 | 3 | .c-button { 4 | @include button; 5 | } 6 | 7 | .c-button--close { 8 | @include button-color(transparent, inherit); 9 | position: absolute; 10 | right: $spacing-small; 11 | padding: 0; 12 | outline: 0; 13 | font-size: $button-close-font-size; 14 | font-weight: $button-close-font-weight; 15 | line-height: 1; 16 | } 17 | 18 | .c-button--block { 19 | display: inline-block; 20 | width: 100%; 21 | } 22 | 23 | .c-button--rounded { 24 | border-radius: $button-rounded-border-radius; 25 | } 26 | 27 | .c-button--brand { 28 | @include button-color($button-brand-background-color, $button-brand-color); 29 | } 30 | 31 | .c-button--info { 32 | @include button-color($button-info-background-color, $button-info-color); 33 | } 34 | 35 | .c-button--warning { 36 | @include button-color($button-warning-background-color, $button-warning-color); 37 | } 38 | 39 | .c-button--success { 40 | @include button-color($button-success-background-color, $button-success-color); 41 | } 42 | 43 | .c-button--error { 44 | @include button-color($button-error-background-color, $button-error-color); 45 | } 46 | 47 | .c-button--ghost { 48 | @include button-ghost; 49 | } 50 | 51 | .c-button--ghost-brand { 52 | @include button-ghost($button-ghost-brand-color, $button-ghost-brand-hover-color); 53 | } 54 | 55 | .c-button--ghost-info { 56 | @include button-ghost($button-ghost-info-color, $button-ghost-info-hover-color); 57 | } 58 | 59 | .c-button--ghost-warning { 60 | @include button-ghost($button-ghost-warning-color, $button-ghost-warning-hover-color); 61 | } 62 | 63 | .c-button--ghost-success { 64 | @include button-ghost($button-ghost-success-color, $button-ghost-success-hover-color); 65 | } 66 | 67 | .c-button--ghost-error { 68 | @include button-ghost($button-ghost-error-color, $button-ghost-error-hover-color); 69 | } 70 | 71 | .c-button__icon-left { 72 | padding-right: $button-icon-left-padding; 73 | } 74 | 75 | .c-button__icon-right { 76 | padding-left: $button-icon-right-padding; 77 | } 78 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.calendars.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/objects.grid"; 3 | @import "mixins/components.buttons"; 4 | 5 | .c-calendar { 6 | @include grid; 7 | @include grid--wrap; 8 | @include grid--center; 9 | @include grid__cell--no-gutter; 10 | max-width: $calendar-max-width; 11 | padding: $calendar-padding; 12 | border: $calendar-border; 13 | border-radius: $calendar-border-radius; 14 | background-color: $calendar-background-color; 15 | text-align: $calendar-text-align; 16 | z-index: $z-over-control; 17 | } 18 | 19 | .c-calendar__control, 20 | .c-calendar__date { 21 | @include button-color($calendar-control-background-color, $calendar-control-color); 22 | display: inline; 23 | flex: 0 0 14.28%; 24 | max-width: 14.28%; 25 | margin: 0; 26 | padding: $calendar-control-padding; 27 | border: $calendar-control-border-width $calendar-control-border-style transparent; 28 | border-radius: $calendar-control-border-radius; 29 | outline: 0; 30 | font-size: $calendar-control-font-size; 31 | cursor: pointer; 32 | user-select: none; 33 | } 34 | 35 | .c-calendar__header { 36 | @include grid__cell; 37 | @include grid__cell--no-gutter; 38 | @include grid__cell--width(70%); 39 | padding: $calendar-header-padding; 40 | } 41 | 42 | .c-calendar__day { 43 | @include grid__cell; 44 | @include grid__cell--no-gutter; 45 | flex: 0 0 14.28%; 46 | max-width: 14.28%; 47 | padding: $calendar-day-padding; 48 | font-weight: $calendar-day-font-weight; 49 | } 50 | 51 | .c-calendar__date { 52 | &:hover { 53 | border: $calendar-control-border-hover; 54 | } 55 | } 56 | 57 | .c-calendar__date--in-month { 58 | color: $calendar-control-date-in-month-color; 59 | } 60 | 61 | .c-calendar__date--today { 62 | border-color: $calendar-today-border-color; 63 | } 64 | 65 | .c-calendar__date--selected, 66 | .c-calendar__date--selected:hover { 67 | @include button-color($calendar-control-selected-background-color, $calendar-control-selected-color); 68 | border-color: $calendar-control-selected-border-color; 69 | } 70 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.cards.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/components.lists"; 3 | 4 | .c-card { 5 | @include list--unstyled; 6 | display: block; 7 | width: 100%; 8 | border-radius: $card-border-radius; 9 | background-color: $card-background-color; 10 | box-shadow: $card-box-shadow; 11 | overflow: hidden; 12 | 13 | > .o-image:not(:first-child) { 14 | padding: $spacing-medium 0 0; 15 | } 16 | } 17 | 18 | .c-card + .c-card { 19 | margin: $card-margin; 20 | } 21 | 22 | .c-card__header { 23 | padding: $card-header-padding; 24 | 25 | .c-heading { 26 | padding: 0; 27 | } 28 | } 29 | 30 | .c-card__item { 31 | padding: $card-item-padding; 32 | } 33 | 34 | .c-card__body { 35 | padding: $card-body-padding; 36 | } 37 | 38 | .c-card__footer { 39 | padding: $card-footer-padding; 40 | } 41 | 42 | .c-card__item + .c-card__footer--block { 43 | padding: 0; 44 | } 45 | 46 | .c-card__footer--block { 47 | padding: $card-footer-block-padding; 48 | 49 | .c-input-group .c-button { 50 | border-bottom: 0; 51 | } 52 | 53 | .c-input-group .c-button:first-child { 54 | border-left: 0; 55 | border-top-left-radius: 0; 56 | border-bottom-left-radius: 0; 57 | } 58 | 59 | .c-input-group .c-button:last-child { 60 | border-right: 0; 61 | border-top-right-radius: 0; 62 | border-bottom-right-radius: 0; 63 | } 64 | } 65 | 66 | .c-card__item:not(:last-child) { 67 | border-bottom: $card-item-border-bottom; 68 | } 69 | 70 | .c-card--accordion { 71 | label.c-card__item { 72 | display: block; 73 | position: relative; 74 | width: 100%; 75 | padding-left: $spacing-xlarge; 76 | cursor: pointer; 77 | 78 | &:before { 79 | position: absolute; 80 | left: .75em; 81 | content: "+"; 82 | } 83 | } 84 | 85 | > input { 86 | display: none; 87 | } 88 | 89 | > input + .c-card__item + .c-card__item { 90 | display: none; 91 | } 92 | 93 | > input:checked + .c-card__item + .c-card__item { 94 | display: block; 95 | } 96 | 97 | > input:checked + .c-card__item:before { 98 | transform: rotate(45deg); 99 | } 100 | } 101 | 102 | .c-card--menu { 103 | display: block; 104 | width: $card-width; 105 | max-height: $card-max-height; 106 | margin: $card-margin; 107 | z-index: $card-z-index; 108 | overflow-y: auto; 109 | overflow-x: hidden; 110 | -webkit-overflow-scrolling: touch; 111 | } 112 | 113 | .c-card--grouped { 114 | .c-card__item { 115 | &:not(:last-child) { 116 | border-bottom: 0; 117 | } 118 | } 119 | } 120 | 121 | .c-card__divider { 122 | height: $card-item-border-width; 123 | background-color: $card-item-divider-background-color; 124 | overflow: hidden; 125 | } 126 | 127 | .c-card__item--divider { 128 | background-color: $card-item-divider-background-color; 129 | color: $card-item-divider-color; 130 | font-weight: $card-item-divider-font-weight; 131 | } 132 | 133 | .c-card__item--brand { 134 | background-color: $card-item-brand-background-color; 135 | color: $card-item-brand-color; 136 | } 137 | 138 | .c-card__item--info { 139 | background-color: $card-item-info-background-color; 140 | color: $card-item-info-color; 141 | } 142 | 143 | .c-card__item--warning { 144 | background-color: $card-item-warning-background-color; 145 | color: $card-item-warning-color; 146 | } 147 | 148 | .c-card__item--success { 149 | background-color: $card-item-success-background-color; 150 | color: $card-item-success-color; 151 | } 152 | 153 | .c-card__item--error { 154 | background-color: $card-item-error-background-color; 155 | color: $card-item-error-color; 156 | } 157 | 158 | .c-card__item--disabled { 159 | cursor: not-allowed; 160 | opacity: $card-item-disabled-opacity; 161 | } 162 | 163 | .c-card--menu .c-card__item:not(.c-card__item--disabled):not(.c-card__item--divider):hover, 164 | .c-card--accordion label.c-card__item:not(.c-card__item--disabled):not(.c-card__item--divider):hover { 165 | background-color: $card-item-hover-background-color; 166 | cursor: pointer; 167 | 168 | &.c-card__item--brand { 169 | background-color: $card-item-brand-hover-background-color; 170 | } 171 | 172 | &.c-card__item--info { 173 | background-color: $card-item-info-hover-background-color; 174 | } 175 | 176 | &.c-card__item--warning { 177 | background-color: $card-item-warning-hover-background-color; 178 | } 179 | 180 | &.c-card__item--success { 181 | background-color: $card-item-success-hover-background-color; 182 | } 183 | 184 | &.c-card__item--error { 185 | background-color: $card-item-error-hover-background-color; 186 | } 187 | } 188 | 189 | .c-card__item--active, 190 | .c-card--accordion > input:checked + .c-card__item { 191 | background-color: $card-item-active-background-color; 192 | font-weight: $card-item-active-font-weight; 193 | 194 | &.c-card__item--brand { 195 | background-color: $card-item-brand-active-background-color; 196 | } 197 | 198 | &.c-card__item--info { 199 | background-color: $card-item-info-active-background-color; 200 | } 201 | 202 | &.c-card__item--warning { 203 | background-color: $card-item-warning-active-background-color; 204 | } 205 | 206 | &.c-card__item--success { 207 | background-color: $card-item-success-active-background-color; 208 | } 209 | 210 | &.c-card__item--error { 211 | background-color: $card-item-error-active-background-color; 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.headings.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-heading, 4 | .c-heading__sub { 5 | margin: $heading-margin; 6 | padding: $heading-padding; 7 | font-weight: $heading-font-weight; 8 | } 9 | 10 | .c-heading__sub { 11 | padding: $heading-subheading-padding; 12 | font-size: $heading-subheading-font-size; 13 | opacity: $heading-subheading-opacity; 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.hints.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-hint { 4 | position: absolute; 5 | padding: $hint-padding; 6 | transform: scale(.8); 7 | transform-origin: top left; 8 | color: $hint-color; 9 | font-size: $hint-font-size; 10 | opacity: 0; 11 | pointer-events: none; 12 | } 13 | 14 | .c-hint--static, 15 | .c-field:focus ~ .c-hint, 16 | .c-label__field:focus ~ .c-hint { 17 | transform: scale(.9); 18 | opacity: 1; 19 | } 20 | 21 | .c-hint--success { 22 | color: $hint-success-color; 23 | } 24 | 25 | .c-hint--error { 26 | color: $hint-error-color; 27 | } 28 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.input-groups.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/objects.grid"; 2 | @import "mixins/components.inputs"; 3 | 4 | // INPUT GROUP 5 | .c-input-group { 6 | @include grid; 7 | 8 | .c-button { 9 | border-radius: 0; 10 | 11 | &:not(:first-child) { 12 | border-left-width: 0; 13 | } 14 | 15 | &:first-child { 16 | border-top-left-radius: $border-radius; 17 | border-bottom-left-radius: $border-radius; 18 | } 19 | 20 | &:last-child { 21 | border-top-right-radius: $border-radius; 22 | border-bottom-right-radius: $border-radius; 23 | } 24 | } 25 | 26 | .o-field { 27 | @include grid__cell--fit; 28 | 29 | .c-field { 30 | border-radius: 0; 31 | } 32 | 33 | &:not(:first-child) .c-field { 34 | border-left-width: 0; 35 | } 36 | 37 | &:first-child .c-field { 38 | border-top-left-radius: $border-radius; 39 | border-bottom-left-radius: $border-radius; 40 | } 41 | 42 | &:last-child .c-field { 43 | border-top-right-radius: $border-radius; 44 | border-bottom-right-radius: $border-radius; 45 | } 46 | 47 | &--fixed { 48 | @include grid__cell--width-fixed; 49 | } 50 | } 51 | } 52 | 53 | .c-input-group--rounded { 54 | .c-button { 55 | &:first-child { 56 | border-top-left-radius: $border-radius-rounded; 57 | border-bottom-left-radius: $border-radius-rounded; 58 | } 59 | 60 | &:last-child { 61 | border-top-right-radius: $border-radius-rounded; 62 | border-bottom-right-radius: $border-radius-rounded; 63 | } 64 | } 65 | 66 | .o-field { 67 | &:first-child .c-field { 68 | border-top-left-radius: $border-radius-rounded; 69 | border-bottom-left-radius: $border-radius-rounded; 70 | } 71 | 72 | &:last-child .c-field { 73 | border-top-right-radius: $border-radius-rounded; 74 | border-bottom-right-radius: $border-radius-rounded; 75 | } 76 | } 77 | } 78 | 79 | .c-input-group--rounded-left { 80 | .c-button { 81 | &:first-child { 82 | border-top-left-radius: $border-radius-rounded; 83 | border-bottom-left-radius: $border-radius-rounded; 84 | } 85 | } 86 | 87 | .o-field { 88 | &:first-child .c-field { 89 | border-top-left-radius: $border-radius-rounded; 90 | border-bottom-left-radius: $border-radius-rounded; 91 | } 92 | } 93 | } 94 | 95 | .c-input-group--rounded-right { 96 | .c-button { 97 | &:last-child { 98 | border-top-right-radius: $border-radius-rounded; 99 | border-bottom-right-radius: $border-radius-rounded; 100 | } 101 | } 102 | 103 | .o-field { 104 | &:last-child .c-field { 105 | border-top-right-radius: $border-radius-rounded; 106 | border-bottom-right-radius: $border-radius-rounded; 107 | } 108 | } 109 | } 110 | 111 | .c-input-group--stacked { 112 | @include grid; 113 | @include grid--wrap; 114 | 115 | .o-field:not(:first-child) .c-field { 116 | border-left-width: $field-border-width; 117 | } 118 | 119 | .c-button:not(:first-child) { 120 | border-left-width: $button-border-width; 121 | } 122 | 123 | .o-field, 124 | .c-button { 125 | @include grid__cell--full; 126 | } 127 | 128 | .c-button { 129 | &:not(:first-child) { 130 | border-top: 0; 131 | } 132 | 133 | &:not(:first-child):not(:last-child) { 134 | border-radius: 0; 135 | } 136 | 137 | &:first-child { 138 | border-radius: $field-border-radius $field-border-radius 0 0; 139 | } 140 | 141 | &:last-child { 142 | border-radius: 0 0 $field-border-radius $field-border-radius; 143 | } 144 | } 145 | 146 | .o-field { 147 | &:not(:first-child) .c-field { 148 | border-top: 0; 149 | } 150 | 151 | &:not(:first-child):not(:last-child) .c-field { 152 | border-radius: 0; 153 | } 154 | 155 | &:first-child .c-field { 156 | border-radius: $field-border-radius $field-border-radius 0 0; 157 | } 158 | 159 | &:last-child .c-field { 160 | border-radius: 0 0 $field-border-radius $field-border-radius; 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.inputs.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.inputs"; 2 | 3 | .o-field { 4 | position: relative; 5 | 6 | .c-field:disabled ~ .c-icon { 7 | color: $field-disabled-border-color; 8 | } 9 | 10 | .c-icon { 11 | position: absolute; 12 | top: 50%; 13 | transform: translateY(-50%); 14 | } 15 | } 16 | 17 | .o-field--icon-right { 18 | .c-field + .c-icon { 19 | right: $field-padding; 20 | } 21 | 22 | .c-field { 23 | padding-right: $field-padding * 4; 24 | } 25 | } 26 | 27 | .o-field--icon-left { 28 | .c-icon:first-child { 29 | left: $field-padding; 30 | } 31 | 32 | .c-field { 33 | padding-left: $field-padding * 4; 34 | } 35 | } 36 | 37 | .c-fieldset, 38 | .c-fieldset.c-list { 39 | display: block; 40 | width: $fieldset-width; 41 | margin: $fieldset-margin; 42 | padding: $fieldset-padding; 43 | border: $fieldset-border; 44 | } 45 | 46 | .c-fieldset__legend { 47 | @include label; 48 | padding: $legend-padding; 49 | } 50 | 51 | // LABELS 52 | .c-label { 53 | @include label; 54 | } 55 | 56 | // TEXT FIELDS 57 | .c-field { 58 | display: block; 59 | width: 100%; 60 | margin: $field-margin; 61 | padding: $field-padding; 62 | border: $field-border; 63 | border-radius: $field-border-radius; 64 | outline: 0; 65 | background-color: $field-background-color; 66 | font-family: inherit; 67 | font-size: $field-font-size; 68 | font-weight: $field-font-weight; 69 | resize: vertical; 70 | appearance: none; 71 | 72 | &:focus { 73 | border-color: $field-focus-border-color; 74 | box-shadow: $field-focus-box-shadow; 75 | } 76 | } 77 | 78 | // SELECTS, CHECKBOXES AND RADIOS 79 | select.c-field { 80 | cursor: pointer; 81 | 82 | &::-ms-expand { 83 | display: none; 84 | } 85 | } 86 | 87 | // SELECTS 88 | select.c-field:not([multiple]) { 89 | padding-right: 1em; 90 | background-image: url("data:image/png;base64,R0lGODlhDwAUAIABAAAAAP///yH5BAEAAAEALAAAAAAPABQAAAIXjI+py+0Po5wH2HsXzmw//lHiSJZmUAAAOw=="); 91 | background-repeat: no-repeat; 92 | background-position: 99% 50%; 93 | } 94 | 95 | // CHECKBOXES and RADIOs 96 | .c-field input { 97 | margin-right: $checkbox-margin; 98 | outline: 0; 99 | font-size: $checkbox-font-size; 100 | } 101 | 102 | .c-field--label { 103 | margin: $label-field-margin; 104 | } 105 | 106 | .c-field--error { 107 | border-color: $field-error-border-color; 108 | color: $field-error-color; 109 | } 110 | 111 | .c-field--success { 112 | border-color: $field-success-border-color; 113 | color: $field-success-color; 114 | } 115 | 116 | .c-field--choice { 117 | border: $checkbox-border; 118 | border-radius: 0; 119 | background-color: $checkbox-background-color; 120 | } 121 | 122 | .c-fieldset--disabled .c-field, 123 | .c-fieldset:disabled .c-field, 124 | .c-field--disabled, 125 | .c-field:disabled { 126 | @include field--disabled; 127 | 128 | &.c-field--choice { 129 | background-color: $checkbox-background-color; 130 | } 131 | } 132 | 133 | .c-field input:disabled { 134 | @include disabled; 135 | } 136 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.links.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.links"; 2 | 3 | .c-link { 4 | @include link--color; 5 | text-decoration: $link-text-decoration; 6 | cursor: pointer; 7 | 8 | &:hover { 9 | text-decoration: $link-hover-text-decoration; 10 | } 11 | } 12 | 13 | .c-link--brand { 14 | @include link--color($link-brand-color); 15 | } 16 | 17 | .c-link--info { 18 | @include link--color($link-info-color); 19 | } 20 | 21 | .c-link--warning { 22 | @include link--color($link-warning-color); 23 | } 24 | 25 | .c-link--success { 26 | @include link--color($link-success-color); 27 | } 28 | 29 | .c-link--error { 30 | @include link--color($link-error-color); 31 | } 32 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.lists.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.lists"; 2 | 3 | .c-list { 4 | display: block; 5 | margin: $list-margin; 6 | padding: $list-padding; 7 | list-style-position: outside; 8 | } 9 | 10 | .c-list .c-list { 11 | padding: $list-nested-padding; 12 | } 13 | 14 | .c-list__item { 15 | padding: $list-item-padding; 16 | } 17 | 18 | .c-list__item--unstyled { 19 | list-style: $list-item-unstyled-list-style; 20 | } 21 | 22 | .c-list--unstyled { 23 | @include list--unstyled; 24 | } 25 | 26 | .c-list--ordered { 27 | @include list--unstyled; 28 | counter-reset: ordered; 29 | 30 | .c-list__item { 31 | &:before { 32 | padding: $list-ordered-item-padding; 33 | content: counters(ordered, ".") " "; 34 | counter-increment: ordered; 35 | } 36 | } 37 | } 38 | 39 | .c-list--inline { 40 | @include list--inline; 41 | 42 | .c-list--inline { 43 | @include list--inline; 44 | } 45 | 46 | .c-list__item { 47 | display: inline-block; 48 | width: auto; 49 | padding-right: $list-inline-item-padding-right; 50 | } 51 | 52 | &:not(.c-list--unstyled) { 53 | .c-list__item { 54 | &:before { 55 | padding: $list-inline-item-bullet-padding; 56 | content: $list-inline-item-bullet-content; 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.navs.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.navs"; 2 | 3 | .c-nav { 4 | @include nav--color; 5 | width: $nav-width; 6 | margin: $nav-margin; 7 | padding: $nav-padding; 8 | z-index: $nav-z-index; 9 | } 10 | 11 | .c-nav__item, 12 | .c-nav__content { 13 | display: block; 14 | height: $nav-height; 15 | padding: 0 $nav-item-padding; 16 | color: inherit; 17 | line-height: $nav-height; 18 | vertical-align: middle; 19 | 20 | .o-image { 21 | height: 100%; 22 | } 23 | } 24 | 25 | .c-nav__item { 26 | @include nav__item--color; 27 | text-decoration: none; 28 | cursor: pointer; 29 | } 30 | 31 | .c-nav--inline { 32 | .c-nav__item, 33 | .c-nav__content { 34 | display: inline-block; 35 | } 36 | 37 | .c-nav__item--right, 38 | .c-nav__content--right { 39 | float: right; 40 | } 41 | } 42 | 43 | .c-nav--light { 44 | @include nav--color($nav-light-background-color, $nav-light-color); 45 | } 46 | 47 | .c-nav--top { 48 | position: absolute; 49 | top: 0; 50 | right: 0; 51 | bottom: auto; 52 | left: 0; 53 | 54 | } 55 | 56 | .c-nav--bottom { 57 | position: absolute; 58 | top: auto; 59 | right: 0; 60 | bottom: 0; 61 | left: 0; 62 | } 63 | 64 | .c-nav--left { 65 | position: absolute; 66 | top: 0; 67 | right: auto; 68 | bottom: 0; 69 | left: 0; 70 | } 71 | 72 | .c-nav--right { 73 | position: absolute; 74 | top: 0; 75 | right: 0; 76 | bottom: 0; 77 | left: auto; 78 | } 79 | 80 | .c-nav--fixed { 81 | position: fixed; 82 | } 83 | 84 | .c-nav__item--active { 85 | @include nav__item--active; 86 | } 87 | 88 | .c-nav__item--brand { 89 | @include nav__item--color($nav-item-brand-hover-background-color, $nav-item-brand-hover-color); 90 | 91 | &.c-nav__item--active { 92 | @include nav__item--active($nav-item-brand-active-background-color, $nav-item-brand-active-color); 93 | } 94 | } 95 | 96 | .c-nav__item--info { 97 | @include nav__item--color($nav-item-info-hover-background-color, $nav-item-info-hover-color); 98 | 99 | &.c-nav__item--active { 100 | @include nav__item--active($nav-item-info-active-background-color, $nav-item-info-active-color); 101 | } 102 | } 103 | 104 | .c-nav__item--warning { 105 | @include nav__item--color($color-warning); 106 | 107 | &.c-nav__item--active { 108 | @include nav__item--active($nav-item-warning-active-background-color, $nav-item-warning-active-color); 109 | } 110 | } 111 | 112 | .c-nav__item--success { 113 | @include nav__item--color($color-success); 114 | 115 | &.c-nav__item--active { 116 | @include nav__item--active($nav-item-success-active-background-color, $nav-item-success-active-color); 117 | } 118 | } 119 | 120 | .c-nav__item--error { 121 | @include nav__item--color($color-error); 122 | 123 | &.c-nav__item--active { 124 | @include nav__item--active($nav-item-error-active-background-color, $nav-item-error-active-color); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.overlays.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-overlay { 4 | display: block; 5 | position: fixed; 6 | top: 0; 7 | right: 0; 8 | bottom: 0; 9 | left: 0; 10 | width: 100%; 11 | height: 100%; 12 | background-color: transparentize($overlay-background-color, .6); 13 | opacity: 0; 14 | visibility: hidden; 15 | z-index: $overlay-z-index; 16 | } 17 | 18 | .c-overlay--visible { 19 | opacity: 1; 20 | visibility: visible; 21 | } 22 | 23 | .c-overlay--fullpage { 24 | position: fixed; 25 | } 26 | 27 | .c-overlay--transparent { 28 | background-color: $overlay-transparent-background-color; 29 | } 30 | 31 | .c-overlay--dismissable { 32 | cursor: pointer; 33 | } 34 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.pagination.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/components.buttons"; 3 | 4 | .c-pagination { 5 | display: block; 6 | width: $pagination-width; 7 | padding: $pagination-padding; 8 | font-size: $pagination-font-size; 9 | text-align: center; 10 | } 11 | 12 | .c-pagination__controls { 13 | display: inline-block; 14 | text-align: center; 15 | } 16 | 17 | .c-pagination__controls--backward { 18 | float: left; 19 | text-align: left; 20 | } 21 | 22 | .c-pagination__controls--forward { 23 | float: right; 24 | text-align: right; 25 | } 26 | 27 | .c-pagination__control, 28 | .c-pagination__page { 29 | @include button; 30 | @include button-ghost($pagination-control-color); 31 | min-width: 2.4em; 32 | border-radius: $pagination-control-border-radius; 33 | } 34 | 35 | .c-pagination__page--current { 36 | background-color: $pagination-page-current-background-color; 37 | color: $pagination-page-current-color; 38 | } 39 | 40 | .c-pagination__ellipsis { 41 | padding: $pagination-ellipsis-padding; 42 | } 43 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.progress.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-progress { 4 | display: block; 5 | border: $progress-border; 6 | border-radius: $progress-border-radius; 7 | background-color: $progress-background-color; 8 | color: $progress-color; 9 | text-align: center; 10 | overflow: hidden; 11 | } 12 | 13 | .c-progress--rounded { 14 | border-radius: $progress-rounded-border-radius; 15 | } 16 | 17 | .c-progress__bar { 18 | display: block; 19 | height: 100%; 20 | float: left; 21 | border-radius: 0; 22 | background-color: $progress-bar-background-color; 23 | text-overflow: ellipsis; 24 | white-space: nowrap; 25 | overflow: hidden; 26 | } 27 | 28 | .c-progress__bar:after { 29 | color: transparent !important; 30 | content: "-"; 31 | } 32 | 33 | .c-progress__bar--brand { 34 | background-color: $color-brand; 35 | } 36 | 37 | .c-progress__bar--info { 38 | background-color: $color-info; 39 | } 40 | 41 | .c-progress__bar--warning { 42 | background-color: $color-warning; 43 | } 44 | 45 | .c-progress__bar--success { 46 | background-color: $color-success; 47 | } 48 | 49 | .c-progress__bar--error { 50 | background-color: $color-error; 51 | } 52 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.ranges.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.ranges"; 2 | 3 | .c-range { 4 | @include range--color; 5 | width: $range-width; 6 | padding: $range-padding; 7 | outline: 0; 8 | -webkit-appearance: none; 9 | } 10 | 11 | .c-range--brand { 12 | @include range--color($range-brand-background-color); 13 | } 14 | 15 | .c-range--info { 16 | @include range--color($range-info-background-color); 17 | } 18 | 19 | .c-range--warning { 20 | @include range--color($range-warning-background-color); 21 | } 22 | 23 | .c-range--success { 24 | @include range--color($range-success-background-color); 25 | } 26 | 27 | .c-range--error { 28 | @include range--color($range-error-background-color); 29 | } 30 | 31 | .c-range::-webkit-slider-runnable-track { 32 | @include range__track; 33 | } 34 | 35 | .c-range::-webkit-slider-thumb { 36 | @include range__thumb; 37 | @include range__thumb--webkit; 38 | } 39 | 40 | .c-range::-moz-range-track { 41 | @include range__track; 42 | } 43 | 44 | .c-range::-moz-range-thumb { 45 | @include range__thumb; 46 | } 47 | 48 | .c-range::-ms-track { 49 | @include range__track; 50 | @include range__track--ms; 51 | } 52 | 53 | .c-range::-ms-fill-lower, 54 | .c-range::-ms-fill-upper { 55 | @include range__fill--ms; 56 | } 57 | 58 | .c-range::-ms-thumb { 59 | @include range__thumb; 60 | } 61 | 62 | .c-range:not(:disabled):active { 63 | &::-webkit-slider-thumb { 64 | @include range__thumb--active; 65 | } 66 | 67 | &::-moz-range-thumb { 68 | @include range__thumb--active; 69 | } 70 | 71 | &::-ms-thumb { 72 | @include range__thumb--active; 73 | } 74 | } 75 | 76 | .c-range:focus { 77 | &::-webkit-slider-thumb { 78 | @include range__thumb--focus; 79 | } 80 | 81 | &::-moz-range-thumb { 82 | @include range__thumb--focus; 83 | } 84 | 85 | &::-ms-thumb { 86 | @include range__thumb--focus; 87 | } 88 | } 89 | 90 | .c-range:disabled { 91 | &::-webkit-slider-thumb { 92 | @include range--disabled; 93 | } 94 | 95 | &::-webkit-slider-runnable-track { 96 | @include range--disabled; 97 | } 98 | 99 | &::-moz-range-thumb { 100 | @include range--disabled; 101 | } 102 | 103 | &::-moz-range-track { 104 | @include range--disabled; 105 | } 106 | 107 | &::-ms-thumb { 108 | @include range--disabled; 109 | } 110 | 111 | &::-ms-track { 112 | @include range--disabled; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tables.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/objects.grid"; 3 | 4 | .c-table { 5 | @include grid; 6 | @include grid--wrap; 7 | width: $table-width; 8 | margin: $table-margin; 9 | padding: $table-padding; 10 | border: $table-border; 11 | border-collapse: collapse; 12 | border-spacing: 0; 13 | } 14 | 15 | .c-table__caption { 16 | @include grid; 17 | @include grid__cell--full; 18 | max-width: $table-caption-max-width; 19 | padding: $table-caption-padding; 20 | color: $table-caption-color; 21 | font-size: $table-caption-font-size; 22 | text-align: $table-caption-text-align; 23 | } 24 | 25 | .c-table__row, 26 | .c-table__head, 27 | .c-table__body { 28 | display: flex; 29 | flex: 0 0 100%; 30 | flex-wrap: wrap; 31 | max-width: 100%; 32 | } 33 | 34 | .c-table--striped :not(.c-table__row--heading).c-table__row:nth-of-type(odd) { 35 | background-color: $table-row-striped-background-color; 36 | color: $table-row-striped-color; 37 | } 38 | 39 | .c-table__cell { 40 | display: flex; 41 | flex: 1; 42 | padding: $table-cell-padding; 43 | text-align: $table-cell-text-align; 44 | overflow: auto; 45 | } 46 | 47 | .c-table__row--heading .c-table__cell { 48 | display: flex; 49 | flex: 1; 50 | border-bottom: $table-heading-border; 51 | background-color: $table-heading-background-color; 52 | color: $table-heading-color; 53 | font-size: $text-font-size-medium; 54 | font-weight: $table-heading-font-weight; 55 | } 56 | 57 | .c-table--striped .c-table__row--heading .c-table__cell { 58 | background-color: $table-heading-striped-background-color; 59 | color: $table-heading-striped-color; 60 | } 61 | 62 | .c-table--clickable :not(.c-table__row--heading).c-table__row:hover .c-table__cell, 63 | .c-table__row--clickable:hover .c-table__cell { 64 | background-color: $table-row-clickable-background-color; 65 | color: $table-row-clickable-color; 66 | cursor: pointer; 67 | } 68 | 69 | .c-table__row--disabled { 70 | background-color: $table-row-disabled-background-color; 71 | color: $table-row-disabled-color; 72 | cursor: default; 73 | } 74 | 75 | .c-table--clickable :not(.c-table__row--heading).c-table__row--disabled:hover .c-table__cell, 76 | .c-table__row--disabled:hover .c-table__cell { 77 | background-color: $table-row-disabled-background-color; 78 | color: $table-row-disabled-color; 79 | cursor: not-allowed; 80 | } 81 | 82 | .c-table--condensed { 83 | font-size: $table-condensed-font-size; 84 | 85 | .c-table__cell { 86 | padding: $table-condensed-cell-padding; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tabs.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.tabs"; 2 | 3 | .c-tabs { 4 | display: block; 5 | } 6 | 7 | .c-tabs__headings { 8 | display: flex; 9 | text-align: $tab-headings-text-align; 10 | cursor: pointer; 11 | } 12 | 13 | .c-tab-heading { 14 | flex: 1; 15 | margin: $tab-heading-margin; 16 | padding: $tab-heading-padding; 17 | box-shadow: 0 -.2em 0 0 $tab-heading-box-shadow-color inset; 18 | } 19 | 20 | .c-tabs__nav { 21 | overflow: hidden; 22 | 23 | .c-tabs__headings { 24 | margin-bottom: -1em; 25 | padding-bottom: 1em; 26 | overflow-y: hidden; 27 | overflow-x: auto; 28 | } 29 | 30 | .c-tab-heading { 31 | white-space: nowrap; 32 | } 33 | } 34 | 35 | .c-tab-heading--active { 36 | @include tab-heading--color; 37 | } 38 | 39 | .c-tabs--brand .c-tab-heading--active { 40 | @include tab-heading--color($tab-heading-brand-active-box-shadow-color); 41 | } 42 | 43 | .c-tabs--info .c-tab-heading--active { 44 | @include tab-heading--color($tab-heading-info-active-box-shadow-color); 45 | } 46 | 47 | .c-tabs--warning .c-tab-heading--active { 48 | @include tab-heading--color($tab-heading-warning-active-box-shadow-color); 49 | } 50 | 51 | .c-tabs--success .c-tab-heading--active { 52 | @include tab-heading--color($tab-heading-success-active-box-shadow-color); 53 | } 54 | 55 | .c-tabs--error .c-tab-heading--active { 56 | @include tab-heading--color($tab-heading-error-active-box-shadow-color); 57 | } 58 | 59 | .c-tab-heading--disabled { 60 | background-color: $tab-heading-disabled-background-color; 61 | color: $tab-heading-disabled-color; 62 | cursor: not-allowed; 63 | } 64 | 65 | .c-tabs__tab { 66 | display: none; 67 | padding: $tab-padding; 68 | } 69 | 70 | .c-tabs__tab--active { 71 | display: block; 72 | } 73 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tags.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-tags { 4 | position: relative; 5 | width: $tags-width; 6 | text-align: $tags-text-align; 7 | } 8 | 9 | .c-tags .c-card--menu { 10 | position: absolute; 11 | width: 100%; 12 | } 13 | 14 | .c-tags__container { 15 | display: inline-block; 16 | max-width: $tags-container-width; 17 | padding-right: $spacing-xsmall; 18 | } 19 | 20 | .c-tag { 21 | display: inline-block; 22 | position: relative; 23 | max-width: $tags-container-width; 24 | margin: $tag-margin; 25 | padding: $tag-padding; 26 | } 27 | 28 | .c-tag__close { 29 | position: absolute; 30 | top: 7px; 31 | right: 5px; 32 | color: $tag-close-color; 33 | font-weight: $tag-close-font-weight; 34 | } 35 | 36 | .c-tags__field-container { 37 | display: inline-block; 38 | position: absolute; 39 | width: $tags-field-container-width; 40 | margin: $tags-field-container-margin; 41 | cursor: pointer; 42 | } 43 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.toggles.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.toggles"; 2 | 3 | .c-toggle { 4 | @include grid; 5 | @include grid--center; 6 | width: auto; 7 | cursor: pointer; 8 | user-select: none; 9 | 10 | input:not(:checked) + .c-toggle__track { 11 | background-color: $toggle-track-unchecked-background-color; 12 | 13 | .c-toggle__handle { 14 | transform: translateZ(0); 15 | } 16 | } 17 | 18 | input:disabled + .c-toggle__track { 19 | background-color: $toggle-track-disabled-background-color; 20 | cursor: not-allowed; 21 | 22 | .c-toggle__handle { 23 | background-color: $toggle-handle-disabled-background-color; 24 | cursor: not-allowed; 25 | } 26 | } 27 | } 28 | 29 | .c-toggle--brand .c-toggle__track { 30 | @include toggle__track--background-color($toggle-track-brand-background-color); 31 | } 32 | 33 | .c-toggle--info .c-toggle__track { 34 | @include toggle__track--background-color($toggle-track-info-background-color); 35 | } 36 | 37 | .c-toggle--warning .c-toggle__track { 38 | @include toggle__track--background-color($toggle-track-warning-background-color); 39 | } 40 | 41 | .c-toggle--success .c-toggle__track { 42 | @include toggle__track--background-color($toggle-track-success-background-color); 43 | } 44 | 45 | .c-toggle--error .c-toggle__track { 46 | @include toggle__track--background-color($toggle-track-error-background-color); 47 | } 48 | 49 | .c-toggle input { 50 | display: none; 51 | } 52 | 53 | .c-toggle__track { 54 | @include grid__cell; 55 | @include grid__cell--width-fixed; 56 | @include toggle__track--background-color; 57 | position: relative; 58 | width: 1em; 59 | height: .5em; 60 | margin: $toggle-margin; 61 | border-radius: $toggle-track-border-radius; 62 | } 63 | 64 | .c-toggle__handle { 65 | position: absolute; 66 | top: -.25em; 67 | left: 0; 68 | width: 1em; 69 | height: 1em; 70 | transform: translateX(100%); 71 | border-radius: $toggle-handle-border-radius; 72 | background-color: $toggle-handle-background-color; 73 | box-shadow: $toggle-handle-box-shadow; 74 | } 75 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tooltips.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-tooltip { 4 | position: relative; 5 | overflow: visible; 6 | 7 | &:before, 8 | &:after { 9 | visibility: hidden; 10 | z-index: $z-over-page; 11 | } 12 | 13 | &:before { 14 | position: absolute; 15 | border: $tooltip-arrow-width solid transparent; 16 | content: ""; 17 | } 18 | 19 | &:after { 20 | position: absolute; 21 | padding: .25em .5em; 22 | border: $tooltip-body-border-width $tooltip-body-border-style $tooltip-body-border-color; 23 | border-radius: $border-radius; 24 | background-color: $tooltip-body-background-color; 25 | color: $tooltip-body-color; 26 | line-height: $tooltip-line-height; 27 | white-space: nowrap; 28 | content: attr(aria-label); 29 | visibility: hidden; 30 | } 31 | 32 | &:hover:before, 33 | &:hover:after { 34 | visibility: visible; 35 | } 36 | } 37 | 38 | .c-tooltip--top { 39 | &:before { 40 | top: 0%; 41 | left: 50%; 42 | transform: translate(-50%, -1em); 43 | border-top-color: $tooltip-body-border-color; 44 | } 45 | 46 | &:after { 47 | top: 0%; 48 | left: 50%; 49 | transform: translate(-50%, -3em); 50 | } 51 | } 52 | 53 | .c-tooltip--right { 54 | &:before { 55 | top: 50%; 56 | left: 100%; 57 | transform: translate(0, -50%); 58 | border-right-color: $tooltip-body-border-color; 59 | } 60 | 61 | &:after { 62 | top: 50%; 63 | left: 100%; 64 | transform: translate(1em, -50%); 65 | } 66 | } 67 | 68 | .c-tooltip--bottom { 69 | &:before { 70 | bottom: 0; 71 | left: 50%; 72 | transform: translate(-50%, 1em); 73 | border-bottom-color: $tooltip-body-border-color; 74 | } 75 | 76 | &:after { 77 | bottom: 0; 78 | left: 50%; 79 | transform: translate(-50%, 3em); 80 | } 81 | } 82 | 83 | .c-tooltip--left { 84 | &:before { 85 | top: 50%; 86 | right: 100%; 87 | transform: translate(0, -50%); 88 | border-left-color: $tooltip-body-border-color; 89 | } 90 | 91 | &:after { 92 | top: 50%; 93 | right: 100%; 94 | transform: translate(-1em, -50%); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.trees.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .c-tree { 4 | display: block; 5 | margin: $tree-margin; 6 | padding: $tree-padding; 7 | list-style: none; 8 | 9 | .c-tree { 10 | padding: $tree-nested-padding; 11 | } 12 | } 13 | 14 | .c-tree__item { 15 | padding: $tree-item-padding; 16 | 17 | &:before { 18 | display: inline-block; 19 | padding: $tree-item-indicator-padding; 20 | transform-origin: 30% 50%; 21 | color: $tree-item-indicator-color; 22 | content: "–"; 23 | } 24 | } 25 | 26 | .c-tree__item--expandable { 27 | &:before { 28 | color: $tree-item-expandable-indicator-color; 29 | content: "\276F"; 30 | } 31 | 32 | .c-tree { 33 | display: none; 34 | } 35 | } 36 | 37 | .c-tree__item--expanded { 38 | &:before { 39 | transform: rotate(90deg); 40 | color: $tree-item-expanded-indicator-color; 41 | content: "\276F"; 42 | } 43 | 44 | .c-tree { 45 | display: block; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.typography.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/components.typography"; 2 | 3 | .c-text { 4 | color: $text-color; 5 | font-family: $text-font-family; 6 | font-weight: $text-font-weight; 7 | line-height: $text-line-height; 8 | } 9 | 10 | .c-text--mono { 11 | font-family: $text-font-family-mono; 12 | } 13 | 14 | .c-text--highlight { 15 | @include text--highlight; 16 | } 17 | 18 | .c-text--quiet { 19 | color: $color-quiet; 20 | } 21 | 22 | .c-text--loud { 23 | font-weight: $text-font-weight-heavy; 24 | } 25 | 26 | .c-text--help[title] { 27 | border-bottom: $help-border-bottom; 28 | cursor: help; 29 | } 30 | 31 | .c-pre { 32 | margin: 0; 33 | } 34 | 35 | .c-code { 36 | @include code; 37 | } 38 | 39 | .c-code--multiline { 40 | display: block; 41 | padding: $spacing-small $spacing-medium; 42 | border-radius: $border-radius; 43 | white-space: pre; 44 | word-wrap: normal; 45 | overflow-x: auto; 46 | } 47 | 48 | .c-kbd { 49 | @include code($keyboard-color, $keyboard-background-color); 50 | border-bottom: $keyboard-border; 51 | border-radius: $keyboard-border-radius; 52 | } 53 | 54 | .c-blockquote { 55 | @include quotation--color; 56 | display: block; 57 | margin: $quotation-margin; 58 | padding: $quotation-padding; 59 | font-family: $quotation-font-family; 60 | } 61 | 62 | .c-blockquote--brand { 63 | @include quotation--color($quotation-brand-border-color); 64 | } 65 | 66 | .c-blockquote--info { 67 | @include quotation--color($quotation-info-border-color); 68 | } 69 | 70 | .c-blockquote--warning { 71 | @include quotation--color($quotation-warning-border-color); 72 | } 73 | 74 | .c-blockquote--success { 75 | @include quotation--color($quotation-success-border-color); 76 | } 77 | 78 | .c-blockquote--error { 79 | @include quotation--color($quotation-error-border-color); 80 | } 81 | 82 | .c-blockquote__body { 83 | @include paragraph; 84 | font-size: $quotation-font-size; 85 | } 86 | 87 | .c-blockquote__footer { 88 | @include paragraph; 89 | color: $quotation-footer-color; 90 | font-style: $quotation-footer-font-style; 91 | } 92 | 93 | .c-paragraph { 94 | @include paragraph; 95 | } 96 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/generics.global.scss: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | } 4 | 5 | *, 6 | *:before, 7 | *:after { 8 | box-sizing: inherit; 9 | } 10 | 11 | body { 12 | margin: 0; 13 | } 14 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.alerts.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin alert-color($background-color: $alert-background-color, $color: $alert-color) { 4 | background-color: $background-color; 5 | color: $color; 6 | } 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.badges.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | // Frames and wells 4 | @mixin badge($background-color, $color: $badge-color, $border-color: $color) { 5 | border: $badge-border-width $badge-border-style $border-color; 6 | background-color: $background-color; 7 | color: $color; 8 | } 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.buttons.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin button-color($background-color: $button-background-color, $color: $button-color) { 4 | border: $button-border; 5 | background-color: $background-color; 6 | color: $color; 7 | 8 | &.c-button--active { 9 | background-color: darken($background-color, $color-tint); 10 | } 11 | 12 | &:not(:disabled) { 13 | &:hover { 14 | background-color: lighten($background-color, $color-tint); 15 | } 16 | 17 | &:focus { 18 | border-color: $button-focus-border-color; 19 | box-shadow: $button-focus-box-shadow; 20 | } 21 | 22 | &:active { 23 | background-color: darken($background-color, $color-tint); 24 | } 25 | } 26 | } 27 | 28 | @mixin button-ghost($color: $button-ghost-color, $color-hover: $button-ghost-hover-color) { 29 | border: $button-ghost-border-width $button-ghost-border-style $color; 30 | background-color: transparent; 31 | color: $color; 32 | 33 | &.c-button--active { 34 | border-color: darken($color, $color-tint); 35 | background-color: darken($color, $color-tint); 36 | color: $color-hover; 37 | } 38 | 39 | &:not(:disabled) { 40 | &:hover { 41 | background-color: $color; 42 | color: $color-hover; 43 | } 44 | 45 | &:focus { 46 | border-color: $button-focus-border-color; 47 | box-shadow: $button-focus-box-shadow; 48 | } 49 | 50 | &:active { 51 | border-color: darken($color, $color-tint); 52 | background-color: darken($color, $color-tint); 53 | color: $color-hover; 54 | } 55 | } 56 | } 57 | 58 | @mixin button { 59 | @include button-color; 60 | display: inline-block; 61 | max-width: 100%; 62 | margin: $button-margin; 63 | padding: $button-padding; 64 | border-radius: $button-border-radius; 65 | outline: 0; 66 | font-family: $button-font-family; 67 | font-size: $button-font-size; 68 | line-height: $button-line-height; 69 | text-align: $button-text-align; 70 | text-decoration: none; 71 | text-overflow: ellipsis; 72 | white-space: $button-white-space; 73 | cursor: pointer; 74 | overflow: hidden; 75 | vertical-align: middle; 76 | appearance: none; 77 | user-select: none; 78 | 79 | &:disabled { 80 | cursor: not-allowed; 81 | opacity: $button-disabled-opacity; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.inputs.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin label { 4 | display: block; 5 | width: 100%; 6 | padding: $label-padding; 7 | cursor: pointer; 8 | } 9 | 10 | @mixin field { 11 | display: block; 12 | width: 100%; 13 | margin: $field-margin; 14 | padding: $field-padding; 15 | border: $field-border; 16 | border-radius: $field-border-radius; 17 | outline: 0; 18 | background-color: $field-background-color; 19 | font-family: inherit; 20 | font-size: $field-font-size-medium; 21 | font-weight: $field-font-weight; 22 | resize: vertical; 23 | appearance: none; 24 | 25 | &:focus { 26 | border-color: $field-focus-border-color; 27 | box-shadow: $field-focus-box-shadow; 28 | } 29 | } 30 | 31 | @mixin label__field { 32 | @include field; 33 | margin: $label-field-margin; 34 | } 35 | 36 | @mixin disabled { 37 | color: $field-disabled-color; 38 | cursor: not-allowed; 39 | } 40 | 41 | @mixin field--disabled { 42 | @include disabled; 43 | border-color: $field-disabled-border-color; 44 | background-color: $field-disabled-background-color; 45 | } 46 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.links.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin link--color($color: $link-color) { 4 | background-color: transparent; 5 | color: $color; 6 | 7 | &:not(:disabled) { 8 | &:visited { 9 | color: darken($color, $color-tint); 10 | } 11 | 12 | &:hover { 13 | background-color: transparent; 14 | color: lighten($color, $color-tint); 15 | } 16 | 17 | &:active { 18 | background-color: transparent; 19 | color: lighten($color, $color-tint); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.lists.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin list--unstyled { 4 | padding: $list-unstyled-padding; 5 | list-style: $list-unstyled-list-style; 6 | } 7 | 8 | @mixin list--inline { 9 | padding: $list-inline-padding; 10 | } 11 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.navs.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin nav--color($background-color: $nav-background-color, $color: $nav-color) { 4 | background-color: $background-color; 5 | color: $color; 6 | } 7 | 8 | @mixin nav__item--color($background-color: $nav-item-hover-background-color, $hover-color: $nav-item-hover-color) { 9 | &:not(:disabled) { 10 | &:hover { 11 | background-color: $background-color; 12 | color: $hover-color; 13 | } 14 | 15 | &:focus { 16 | box-shadow: $box-shadow-focus; 17 | } 18 | 19 | &:active { 20 | background-color: darken($background-color, $color-tint); 21 | color: $hover-color; 22 | } 23 | } 24 | } 25 | 26 | @mixin nav__item--active($background-color: $nav-item-active-background-color, $hover-color: $nav-item-active-color) { 27 | background-color: $background-color; 28 | color: $hover-color; 29 | } 30 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.ranges.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | @import "utilities.boxing"; 3 | 4 | @mixin range__track { 5 | width: $range-width; 6 | height: $range-height; 7 | border: $range-border; 8 | border-radius: $range-border-radius; 9 | box-shadow: $range-box-shadow; 10 | cursor: pointer; 11 | } 12 | 13 | @mixin range__track--ms { 14 | border-color: transparent; 15 | background-color: transparent; 16 | color: transparent; 17 | } 18 | 19 | @mixin range__fill--ms { 20 | border: $range-border; 21 | border-radius: $range-border-radius; 22 | background-color: $range-background-color; 23 | box-shadow: $range-box-shadow; 24 | } 25 | 26 | @mixin range__thumb { 27 | width: $range-thumb-width; 28 | height: $range-thumb-height; 29 | margin: $range-thumb-margin; 30 | border: $range-thumb-border; 31 | border-radius: $range-thumb-border-radius; 32 | background-color: $range-thumb-background-color; 33 | box-shadow: $range-thumb-box-shadow; 34 | cursor: pointer; 35 | } 36 | 37 | @mixin range__thumb--focus { 38 | border-color: $range-thumb-focus-border-color; 39 | box-shadow: $range-thumb-focus-box-shadow; 40 | } 41 | 42 | @mixin range__thumb--webkit { 43 | -webkit-appearance: none; 44 | } 45 | 46 | @mixin range__thumb--active { 47 | transform: scale(1.4); 48 | } 49 | 50 | @mixin range--disabled { 51 | background-color: $range-disabled-background-color; 52 | cursor: not-allowed; 53 | } 54 | 55 | @mixin range--color($track-color: $range-background-color) { 56 | &:not(:disabled) { 57 | &::-webkit-slider-runnable-track { 58 | background-color: $track-color; 59 | } 60 | 61 | &::-moz-range-track { 62 | background-color: $track-color; 63 | } 64 | 65 | &::-ms-track { 66 | background-color: $track-color; 67 | } 68 | } 69 | } 70 | 71 | @mixin range--brand { 72 | @include range--color($range-brand-background-color); 73 | } 74 | 75 | @mixin range--info { 76 | @include range--color($range-info-background-color); 77 | } 78 | 79 | @mixin range--warning { 80 | @include range--color($range-warning-background-color); 81 | } 82 | 83 | @mixin range--success { 84 | @include range--color($range-success-background-color); 85 | } 86 | 87 | @mixin range--error { 88 | @include range--color($range-error-background-color); 89 | } 90 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.tabs.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin tab-heading--color($active-color: $tab-heading-active-box-shadow-color) { 4 | box-shadow: 0 -.2em 0 0 $active-color inset; 5 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.toggles.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | @import "objects.grid"; 3 | 4 | @mixin toggle__track--background-color($track-color: $toggle-track-background-color) { 5 | background-color: $track-color; 6 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.typography.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin text--highlight($color: $highlight-color, $background-color: $highlight-background-color) { 4 | margin: 0 -$spacing-tiny; 5 | padding: $spacing-xsmall $spacing-xsmall $spacing-tiny; 6 | background-color: $background-color; 7 | color: $color; 8 | } 9 | 10 | @mixin paragraph { 11 | display: block; 12 | margin: 0; 13 | padding: $spacing-small 0; 14 | } 15 | 16 | @mixin code($color: $code-color, $background-color: $code-background-color) { 17 | @include text--highlight($color, $background-color); 18 | display: inline; 19 | font-family: $text-font-family-mono; 20 | font-weight: $text-font-weight; 21 | } 22 | 23 | @mixin quotation--color($border-color: $quotation-border-color) { 24 | border-left: $quotation-border-width $quotation-border-style $border-color; 25 | } 26 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.containers.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | @import "tools.mediaqueries"; 3 | 4 | @mixin containers__responsive($screen-width) { 5 | @each $size, $width in $screen-limits { 6 | &--#{$size}\@#{$screen-width} { 7 | max-width: $width; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.grid.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | @import "utilities.visibility"; 3 | 4 | @mixin grid { 5 | @include display-flex; 6 | } 7 | 8 | @mixin grid--wrap { 9 | flex-wrap: wrap; 10 | } 11 | 12 | @mixin grid--top { 13 | align-items: flex-start; 14 | } 15 | 16 | @mixin grid--center { 17 | align-items: center; 18 | } 19 | 20 | @mixin grid--bottom { 21 | align-items: flex-end; 22 | } 23 | 24 | @mixin grid__cell { 25 | flex: 1; 26 | padding-right: $grid-gutter; 27 | padding-left: $grid-gutter; 28 | } 29 | 30 | @mixin grid__cell--no-gutter { 31 | padding-right: .001em; 32 | padding-left: .001em; 33 | } 34 | 35 | @mixin grid__cell--top { 36 | align-self: flex-start; 37 | } 38 | 39 | @mixin grid__cell--center { 40 | align-self: center; 41 | } 42 | 43 | @mixin grid__cell--bottom { 44 | align-self: flex-end; 45 | } 46 | 47 | @mixin grid__cell--width-fixed { 48 | flex: 0 1 auto; 49 | } 50 | 51 | @mixin grid__cell--fit { 52 | flex: 1; 53 | } 54 | 55 | @mixin grid--full { 56 | flex-wrap: wrap; 57 | } 58 | 59 | @mixin grid__cell--full { 60 | flex: 0 0 100%; 61 | max-width: 100%; 62 | margin-left: 0; 63 | } 64 | 65 | @mixin grid__cell--hidden { 66 | @include display-none; 67 | } 68 | 69 | @mixin grid__cell--visible { 70 | @include display-initial; 71 | } 72 | 73 | @mixin grid__cell--width($width) { 74 | flex: 0 0 $width; 75 | max-width: $width; 76 | } 77 | 78 | @mixin grid__cells { 79 | @each $width, $fraction in $grid-widths { 80 | &--width-#{$width} { 81 | @include grid__cell--width($fraction * 100%); 82 | } 83 | 84 | &--offset-#{$width} { 85 | margin-left: $fraction * 100%; 86 | } 87 | } 88 | } 89 | 90 | @mixin grid__responsive-cells($screen-width) { 91 | @each $width, $fraction in $grid-widths { 92 | &--hidden\@#{$screen-width} { 93 | @include grid__cell--hidden 94 | } 95 | 96 | &--visible\@#{$screen-width} { 97 | @include grid__cell--visible; 98 | } 99 | 100 | &--width-#{$width}\@#{$screen-width} { 101 | flex: 0 0 $fraction * 100%; 102 | max-width: $fraction * 100%; 103 | } 104 | 105 | &--offset-#{$width}\@#{$screen-width} { 106 | margin-left: $fraction * 100%; 107 | } 108 | 109 | &--width-fixed\@#{$screen-width} { 110 | @include grid__cell--width-fixed; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_tools.mediaqueries.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin screen--xsmall-and-up { 4 | @media (min-width: #{map-get($screen-limits, xsmall)}) { 5 | @content; 6 | } 7 | } 8 | 9 | @mixin screen--small-and-up { 10 | @media (min-width: #{map-get($screen-limits, small)}) { 11 | @content; 12 | } 13 | } 14 | 15 | @mixin screen--medium-and-up { 16 | @media (min-width: #{map-get($screen-limits, medium)}) { 17 | @content; 18 | } 19 | } 20 | 21 | @mixin screen--large-and-up { 22 | @media (min-width: #{map-get($screen-limits, large)}) { 23 | @content; 24 | } 25 | } 26 | 27 | @mixin screen--xlarge-and-up { 28 | @media (min-width: #{map-get($screen-limits, xlarge)}) { 29 | @content; 30 | } 31 | } 32 | 33 | @mixin screen--super-and-up { 34 | @media (min-width: #{map-get($screen-limits, super)}) { 35 | @content; 36 | } 37 | } 38 | 39 | @mixin screen--xsmall-only { 40 | @media (max-width: #{map-get($screen-limits, xsmall) - $screen-adjustment}) { 41 | @content; 42 | } 43 | } 44 | 45 | @mixin screen--small-only { 46 | @media (min-width: #{map-get($screen-limits, xsmall)}) and (max-width: #{map-get($screen-limits, small) - $screen-adjustment}) { 47 | @content; 48 | } 49 | } 50 | 51 | @mixin screen--medium-only { 52 | @media (min-width: #{map-get($screen-limits, small)}) and (max-width: #{map-get($screen-limits, medium) - $screen-adjustment}) { 53 | @content; 54 | } 55 | } 56 | 57 | @mixin screen--large-only { 58 | @media (min-width: #{map-get($screen-limits, medium)}) and (max-width: #{map-get($screen-limits, large) - $screen-adjustment}) { 59 | @content; 60 | } 61 | } 62 | 63 | @mixin screen--xlarge-only { 64 | @media (min-width: #{map-get($screen-limits, large)}) and (max-width: #{map-get($screen-limits, xlarge) - $screen-adjustment}) { 65 | @content; 66 | } 67 | } 68 | 69 | @mixin screen--super-only { 70 | @media (min-width: #{map-get($screen-limits, large)}) { 71 | @content; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.alignment.scss: -------------------------------------------------------------------------------- 1 | @mixin centered { 2 | text-align: center; 3 | } 4 | 5 | @mixin justified { 6 | text-align: justify; 7 | } 8 | 9 | @mixin left { 10 | text-align: left; 11 | } 12 | 13 | @mixin right { 14 | text-align: right; 15 | } 16 | 17 | @mixin center-block { 18 | position: relative; 19 | } 20 | 21 | @mixin center-block__content { 22 | position: absolute; 23 | top: 50%; 24 | left: 50%; 25 | transform: translate(-50%, -50%); 26 | } 27 | 28 | @mixin center-block__content--vertical { 29 | left: auto; 30 | transform: translateY(-50%); 31 | } 32 | 33 | @mixin center-block__content--horizontal { 34 | top: auto; 35 | transform: translateX(-50%); 36 | } 37 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.boxing.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | 3 | @mixin no-overflow { 4 | overflow: hidden; 5 | } 6 | 7 | @mixin letter-box--super { 8 | padding-top: $spacing-super; 9 | padding-bottom: $spacing-super; 10 | } 11 | 12 | @mixin letter-box--xlarge { 13 | padding-top: $spacing-xlarge; 14 | padding-bottom: $spacing-xlarge; 15 | } 16 | 17 | @mixin letter-box--large { 18 | padding-top: $spacing-large; 19 | padding-bottom: $spacing-large; 20 | } 21 | 22 | @mixin letter-box--medium { 23 | padding-top: $spacing-medium; 24 | padding-bottom: $spacing-medium; 25 | } 26 | 27 | @mixin letter-box--small { 28 | padding-top: $spacing-small; 29 | padding-bottom: $spacing-small; 30 | } 31 | 32 | @mixin letter-box--xsmall { 33 | padding-top: $spacing-xsmall; 34 | padding-bottom: $spacing-xsmall; 35 | } 36 | 37 | @mixin letter-box--tiny { 38 | padding-top: $spacing-tiny; 39 | padding-bottom: $spacing-tiny; 40 | } 41 | 42 | @mixin letter-box--none { 43 | padding-top: 0; 44 | padding-bottom: 0; 45 | } 46 | 47 | @mixin pillar-box--super { 48 | padding-right: $spacing-super; 49 | padding-left: $spacing-super; 50 | } 51 | 52 | @mixin pillar-box--xlarge { 53 | padding-right: $spacing-xlarge; 54 | padding-left: $spacing-xlarge; 55 | } 56 | 57 | @mixin pillar-box--large { 58 | padding-right: $spacing-large; 59 | padding-left: $spacing-large; 60 | } 61 | 62 | @mixin pillar-box--medium { 63 | padding-right: $spacing-medium; 64 | padding-left: $spacing-medium; 65 | } 66 | 67 | @mixin pillar-box--small { 68 | padding-right: $spacing-small; 69 | padding-left: $spacing-small; 70 | } 71 | 72 | @mixin pillar-box--xsmall { 73 | padding-right: $spacing-xsmall; 74 | padding-left: $spacing-xsmall; 75 | } 76 | 77 | @mixin pillar-box--tiny { 78 | padding-right: $spacing-tiny; 79 | padding-left: $spacing-tiny; 80 | } 81 | 82 | @mixin pillar-box--none { 83 | padding-right: 0; 84 | padding-left: 0; 85 | } 86 | 87 | @mixin window-box--super { 88 | @include letter-box--super; 89 | @include pillar-box--super; 90 | } 91 | 92 | @mixin window-box--xlarge { 93 | @include letter-box--xlarge; 94 | @include pillar-box--xlarge; 95 | } 96 | 97 | @mixin window-box--large { 98 | @include letter-box--large; 99 | @include pillar-box--large; 100 | } 101 | 102 | @mixin window-box--medium { 103 | @include letter-box--medium; 104 | @include pillar-box--medium; 105 | } 106 | 107 | @mixin window-box--small { 108 | @include letter-box--small; 109 | @include pillar-box--small; 110 | } 111 | 112 | @mixin window-box--xsmall { 113 | @include letter-box--xsmall; 114 | @include pillar-box--xsmall; 115 | } 116 | 117 | @mixin window-box--tiny { 118 | @include letter-box--tiny; 119 | @include pillar-box--tiny; 120 | } 121 | 122 | @mixin window-box--none { 123 | @include letter-box--none; 124 | @include pillar-box--none; 125 | } 126 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.visibility.scss: -------------------------------------------------------------------------------- 1 | @import "settings.global"; 2 | @import "tools.mediaqueries"; 3 | 4 | @mixin visible { 5 | visibility: visible; 6 | } 7 | 8 | @mixin invisible { 9 | visibility: hidden; 10 | } 11 | 12 | @mixin display-none { 13 | display: none; 14 | } 15 | 16 | @mixin display-initial { 17 | display: initial; 18 | } 19 | 20 | @mixin display-inline { 21 | display: inline; 22 | } 23 | 24 | @mixin display-inline-block { 25 | display: inline-block; 26 | } 27 | 28 | @mixin display-block { 29 | display: block; 30 | } 31 | 32 | @mixin display-table { 33 | display: table; 34 | } 35 | 36 | @mixin display-table-cell { 37 | display: table-cell; 38 | } 39 | 40 | @mixin display-flex { 41 | display: flex; 42 | } 43 | 44 | @mixin display-inline-flex { 45 | display: inline-flex; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.containers.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/objects.containers"; 2 | 3 | .o-container { 4 | @include screen--xsmall-and-up { 5 | @include containers__responsive(xsmall); 6 | } 7 | @include screen--small-and-up { 8 | @include containers__responsive(small); 9 | } 10 | @include screen--medium-and-up { 11 | @include containers__responsive(medium); 12 | } 13 | @include screen--large-and-up { 14 | @include containers__responsive(large); 15 | } 16 | @include screen--xlarge-and-up { 17 | @include containers__responsive(xlarge); 18 | } 19 | @include screen--super-and-up { 20 | @include containers__responsive(super); 21 | } 22 | 23 | margin: auto; 24 | @each $size, $width in $screen-limits { 25 | &--#{$size} { 26 | max-width: $width; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.drawers.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/objects.grid"; 3 | @import "mixins/utilities.boxing"; 4 | 5 | .o-drawer { 6 | position: absolute; 7 | background-color: $drawer-background-color; 8 | color: $drawer-color; 9 | z-index: $drawer-z-index; 10 | overflow-x: hidden; 11 | overflow-y: auto; 12 | -webkit-overflow-scrolling: touch; 13 | 14 | > .c-card { 15 | background-color: transparent; 16 | box-shadow: none; 17 | } 18 | 19 | &:not(.o-drawer--visible) { 20 | &.u-high, 21 | &.u-higher, 22 | &.u-highest { 23 | box-shadow: none; 24 | } 25 | } 26 | } 27 | 28 | .o-drawer--bottom, 29 | .o-drawer--top { 30 | left: 0; 31 | width: $drawer-width-horizontal; 32 | height: auto; 33 | margin-left: (100% - $drawer-width-horizontal) * 0.5; 34 | transform: translate(0, 0); 35 | } 36 | 37 | .o-drawer--bottom { 38 | top: 100%; 39 | border-radius: $drawer-border-radius $drawer-border-radius 0 0; 40 | } 41 | 42 | .o-drawer--bottom.o-drawer--visible { 43 | transform: translateY(-99%); 44 | } 45 | 46 | .o-drawer--top { 47 | bottom: 100%; 48 | border-radius: 0 0 $drawer-border-radius $drawer-border-radius; 49 | } 50 | 51 | .o-drawer--top.o-drawer--visible { 52 | transform: translateY(99%); 53 | } 54 | 55 | .o-drawer--left, 56 | .o-drawer--right { 57 | top: 0; 58 | width: $drawer-width-vertical; 59 | height: 100%; 60 | 61 | .c-card__footer--block { 62 | position: absolute; 63 | bottom: 0; 64 | width: 100%; 65 | 66 | .c-button { 67 | border-radius: 0; 68 | } 69 | } 70 | } 71 | 72 | .o-drawer--left { 73 | left: 0; 74 | transform: translateX(-100%); 75 | } 76 | 77 | .o-drawer--left.o-drawer--visible { 78 | transform: translateX(-1%); 79 | } 80 | 81 | .o-drawer--right { 82 | left: 100%; 83 | transform: translate(0, 0); 84 | } 85 | 86 | .o-drawer--right.o-drawer--visible { 87 | transform: translateX(-99%); 88 | } 89 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.forms.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/objects.grid"; 2 | @import "mixins/components.inputs"; 3 | 4 | .o-fieldset, 5 | .o-fieldset.c-list { 6 | display: block; 7 | width: $fieldset-width; 8 | margin: $fieldset-margin; 9 | padding: $fieldset-padding; 10 | border: $fieldset-border; 11 | } 12 | 13 | .o-fieldset__legend { 14 | @include label; 15 | padding: $legend-padding; 16 | } 17 | 18 | .o-form-element { 19 | position: relative; 20 | padding: $form-element-padding; 21 | 22 | .c-label:first-child { 23 | padding: $form-element-label-padding; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.grid.responsive.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/tools.mediaqueries"; 2 | @import "mixins/objects.grid"; 3 | 4 | .o-grid { 5 | @include screen--xsmall-only { 6 | &.o-grid--xsmall-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 7 | @include grid__cell--fit; 8 | } 9 | 10 | &.o-grid--xsmall-full { 11 | @include grid--full; 12 | } 13 | 14 | &.o-grid--xsmall-full > .o-grid__cell { 15 | @include grid__cell--full; 16 | } 17 | } 18 | 19 | @include screen--small-only { 20 | &.o-grid--small-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 21 | @include grid__cell--fit; 22 | } 23 | 24 | &.o-grid--small-full { 25 | @include grid--full; 26 | } 27 | 28 | &.o-grid--small-full > .o-grid__cell { 29 | @include grid__cell--full; 30 | } 31 | } 32 | 33 | @include screen--medium-only { 34 | &.o-grid--medium-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 35 | @include grid__cell--fit; 36 | } 37 | 38 | &.o-grid--medium-full { 39 | @include grid--full; 40 | } 41 | 42 | &.o-grid--medium-full > .o-grid__cell { 43 | @include grid__cell--full; 44 | } 45 | } 46 | 47 | @include screen--large-only { 48 | &.o-grid--large-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 49 | @include grid__cell--fit; 50 | } 51 | 52 | &.o-grid--large-full { 53 | @include grid--full; 54 | } 55 | 56 | &.o-grid--large-full > .o-grid__cell { 57 | @include grid__cell--full; 58 | } 59 | } 60 | 61 | @include screen--xlarge-only { 62 | &.o-grid--xlarge-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 63 | @include grid__cell--fit; 64 | } 65 | 66 | &.o-grid--xlarge-full { 67 | @include grid--full; 68 | } 69 | 70 | &.o-grid--xlarge-full > .o-grid__cell { 71 | @include grid__cell--full; 72 | } 73 | } 74 | 75 | @include screen--super-only { 76 | &.o-grid--super-fit > .o-grid__cell:not([class*="o-grid__cell--width"]) { 77 | @include grid__cell--fit; 78 | } 79 | 80 | &.o-grid--super-full { 81 | @include grid--full; 82 | } 83 | 84 | &.o-grid--super-full > .o-grid__cell { 85 | @include grid__cell--full; 86 | } 87 | } 88 | 89 | @include screen--xsmall-and-up { 90 | &__cell { 91 | @include grid__responsive-cells(xsmall); 92 | } 93 | } 94 | 95 | @include screen--small-and-up { 96 | &__cell { 97 | @include grid__responsive-cells(small); 98 | } 99 | } 100 | 101 | @include screen--medium-and-up { 102 | &__cell { 103 | @include grid__responsive-cells(medium); 104 | } 105 | } 106 | 107 | @include screen--large-and-up { 108 | &__cell { 109 | @include grid__responsive-cells(large); 110 | } 111 | } 112 | 113 | @include screen--xlarge-and-up { 114 | &__cell { 115 | @include grid__responsive-cells(xlarge); 116 | } 117 | } 118 | 119 | @include screen--super-and-up { 120 | &__cell { 121 | @include grid__responsive-cells(super); 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.grid.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/tools.mediaqueries"; 2 | @import "mixins/objects.grid"; 3 | 4 | .o-grid { 5 | @include grid; 6 | 7 | &--wrap { 8 | @include grid--wrap; 9 | } 10 | 11 | &--top { 12 | @include grid--top; 13 | } 14 | 15 | &--center { 16 | @include grid--center; 17 | } 18 | 19 | &--bottom { 20 | @include grid--bottom; 21 | } 22 | 23 | &--full { 24 | @include grid--full; 25 | 26 | > .o-grid__cell { 27 | @include grid__cell--full; 28 | } 29 | } 30 | 31 | &--no-gutter { 32 | > .o-grid__cell { 33 | @include grid__cell--no-gutter; 34 | } 35 | } 36 | 37 | &__cell { 38 | @include grid__cell; 39 | 40 | @include grid__cells; 41 | 42 | &--top { 43 | @include grid__cell--top; 44 | } 45 | 46 | &--center { 47 | @include grid__cell--center; 48 | } 49 | 50 | &--bottom { 51 | @include grid__cell--bottom; 52 | } 53 | 54 | &--no-gutter { 55 | @include grid__cell--no-gutter; 56 | } 57 | 58 | &--width-fixed { 59 | @include grid__cell--width-fixed; 60 | } 61 | 62 | &--hidden { 63 | @include grid__cell--hidden; 64 | } 65 | 66 | &--visible { 67 | @include grid__cell--visible; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.images.scss: -------------------------------------------------------------------------------- 1 | .o-image { 2 | display: block; 3 | max-width: 100%; 4 | height: auto; 5 | } 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.media.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/objects.grid"; 2 | 3 | .o-media { 4 | @include grid; 5 | } 6 | 7 | .o-media .c-heading { 8 | padding: 0; 9 | } 10 | 11 | .o-media__image, 12 | .o-media__body { 13 | @include grid__cell; 14 | @include grid__cell--no-gutter; 15 | 16 | &--top { 17 | @include grid__cell--top; 18 | } 19 | 20 | &--center { 21 | @include grid__cell--center; 22 | } 23 | 24 | &--bottom { 25 | @include grid__cell--bottom; 26 | } 27 | } 28 | 29 | .o-media__image { 30 | @include grid__cell--width-fixed; 31 | width: $media-image-width; 32 | } 33 | 34 | .o-media__body { 35 | margin-left: $media-body-margin-left; 36 | } 37 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.modals.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | @import "mixins/objects.grid"; 3 | @import "mixins/utilities.alignment"; 4 | 5 | .o-modal { 6 | display: block; 7 | position: fixed; 8 | top: 50%; 9 | left: 50%; 10 | width: $modal-width; 11 | transform: translate(-50%, -50%); 12 | border: $modal-border; 13 | border-radius: $modal-border-radius; 14 | background-color: $modal-background-color; 15 | overflow: hidden; 16 | z-index: $modal-z-index; 17 | 18 | .c-card { 19 | background-color: transparent; 20 | box-shadow: none; 21 | } 22 | 23 | .c-card__body { 24 | position: relative; 25 | } 26 | } 27 | 28 | .o-modal--ghost { 29 | background-color: $modal-ghost-background-color; 30 | color: $modal-ghost-color; 31 | 32 | .c-heading { 33 | color: $modal-ghost-heading-color; 34 | } 35 | } 36 | 37 | .o-modal--full { 38 | top: 1em; 39 | left: 1em; 40 | width: calc(100% - 2em); 41 | height: calc(100% - 2em); 42 | transform: none; 43 | 44 | .c-card__body { 45 | position: absolute; 46 | top: 2.5em; 47 | bottom: 3.5em; 48 | width: 100%; 49 | overflow-x: hidden; 50 | overflow-y: auto; 51 | } 52 | 53 | .c-card__footer { 54 | position: absolute; 55 | bottom: 0; 56 | width: 100%; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.panels.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .o-panel-container { 4 | position: relative; 5 | } 6 | 7 | .o-panel { 8 | position: absolute; 9 | top: 0; 10 | right: 0; 11 | bottom: 0; 12 | left: 0; 13 | overflow: auto; 14 | -webkit-overflow-scrolling: touch; 15 | } 16 | 17 | .o-panel--nav-top { 18 | top: $panel-nav-top; 19 | } 20 | 21 | .o-panel--nav-bottom { 22 | bottom: $panel-nav-bottom; 23 | } 24 | 25 | .c-card__body .o-panel { 26 | padding: $card-item-padding; 27 | } 28 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/themes/blaze.example.scss: -------------------------------------------------------------------------------- 1 | $border-radius: 0; 2 | // ... add more variables here ... 3 | 4 | @import "../mixins/settings.global"; 5 | @import "../blaze"; 6 | 7 | // ... add class overrides here ... 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.alignment.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/utilities.alignment"; 2 | 3 | .u-centered { 4 | @include centered; 5 | } 6 | 7 | .u-justified { 8 | @include justified; 9 | } 10 | 11 | .u-left { 12 | @include left; 13 | } 14 | 15 | .u-right { 16 | @include right; 17 | } 18 | 19 | .u-center-block { 20 | @include center-block; 21 | } 22 | 23 | .u-center-block__content, 24 | .u-absolute-center { 25 | @include center-block__content; 26 | } 27 | 28 | .u-center-block__content--vertical { 29 | @include center-block__content--vertical; 30 | } 31 | 32 | .u-center-block__content--horizontal { 33 | @include center-block__content--horizontal; 34 | } 35 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.boxing.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/utilities.boxing"; 2 | 3 | .u-no-overflow { 4 | @include no-overflow; 5 | } 6 | 7 | .u-letter-box--super { 8 | @include letter-box--super; 9 | } 10 | 11 | .u-letter-box--xlarge { 12 | @include letter-box--xlarge; 13 | } 14 | 15 | .u-letter-box--large { 16 | @include letter-box--large; 17 | } 18 | 19 | .u-letter-box--medium { 20 | @include letter-box--medium; 21 | } 22 | 23 | .u-letter-box--small { 24 | @include letter-box--small; 25 | } 26 | 27 | .u-letter-box--xsmall { 28 | @include letter-box--xsmall; 29 | } 30 | 31 | .u-letter-box--tiny { 32 | @include letter-box--tiny; 33 | } 34 | 35 | .u-letter-box--none { 36 | @include letter-box--none; 37 | } 38 | 39 | .u-pillar-box--super { 40 | @include pillar-box--super; 41 | } 42 | 43 | .u-pillar-box--xlarge { 44 | @include pillar-box--xlarge; 45 | } 46 | 47 | .u-pillar-box--large { 48 | @include pillar-box--large; 49 | } 50 | 51 | .u-pillar-box--medium { 52 | @include pillar-box--medium; 53 | } 54 | 55 | .u-pillar-box--small { 56 | @include pillar-box--small; 57 | } 58 | 59 | .u-pillar-box--xsmall { 60 | @include pillar-box--xsmall; 61 | } 62 | 63 | .u-pillar-box--tiny { 64 | @include pillar-box--tiny; 65 | } 66 | 67 | .u-pillar-box--none { 68 | @include pillar-box--none; 69 | } 70 | 71 | .u-window-box--super { 72 | @include window-box--super; 73 | } 74 | 75 | .u-window-box--xlarge { 76 | @include window-box--xlarge; 77 | } 78 | 79 | .u-window-box--large { 80 | @include window-box--large; 81 | } 82 | 83 | .u-window-box--medium { 84 | @include window-box--medium; 85 | } 86 | 87 | .u-window-box--small { 88 | @include window-box--small; 89 | } 90 | 91 | .u-window-box--xsmall { 92 | @include window-box--xsmall; 93 | } 94 | 95 | .u-window-box--tiny { 96 | @include window-box--tiny; 97 | } 98 | 99 | .u-window-box--none { 100 | @include window-box--none; 101 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.elevation.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .u-high, 4 | .u-higher, 5 | .u-highest { 6 | border: 0; 7 | } 8 | 9 | .u-high { 10 | box-shadow: $box-shadow-high; 11 | } 12 | 13 | .u-higher { 14 | box-shadow: $box-shadow-higher; 15 | } 16 | 17 | .u-highest { 18 | box-shadow: $box-shadow-highest; 19 | } 20 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.sizes.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/settings.global"; 2 | 3 | .u-super { 4 | font-size: $text-font-size-super; 5 | } 6 | 7 | .u-xlarge { 8 | font-size: $text-font-size-xlarge; 9 | } 10 | 11 | .u-large { 12 | font-size: $text-font-size-large; 13 | } 14 | 15 | .u-medium { 16 | font-size: $text-font-size-medium; 17 | } 18 | 19 | .u-small { 20 | font-size: $text-font-size-small; 21 | } 22 | 23 | .u-xsmall { 24 | font-size: $text-font-size-xsmall; 25 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.visibility.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/utilities.visibility"; 2 | 3 | .u-visible { 4 | @include visible; 5 | } 6 | 7 | .u-invisible { 8 | @include invisible; 9 | } 10 | 11 | .u-display-none { 12 | @include display-none; 13 | } 14 | 15 | .u-display-initial { 16 | @include display-initial; 17 | } 18 | 19 | .u-display-inline { 20 | @include display-inline; 21 | } 22 | 23 | .u-display-inline-block { 24 | @include display-inline-block; 25 | } 26 | 27 | .u-display-block { 28 | @include display-block; 29 | } 30 | 31 | .u-display-table { 32 | @include display-table; 33 | } 34 | 35 | .u-display-table-cell { 36 | @include display-table-cell; 37 | } 38 | 39 | .u-display-flex { 40 | @include display-flex; 41 | } 42 | 43 | .u-display-inline-flex { 44 | @include display-inline-flex; 45 | } 46 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/icomoon.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src: font-url('icomoon.eot?tb65y2'); 4 | src: font-url('icomoon.eot?tb65y2#iefix') format('embedded-opentype'), 5 | font-url('icomoon.ttf?tb65y2') format('truetype'), 6 | font-url('icomoon.woff?tb65y2') format('woff'), 7 | font-url('icomoon.svg?tb65y2#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="icon-"], [class*=" icon-"] { 13 | /* use !important to prevent issues with browser extensions that change fonts */ 14 | font-family: 'icomoon' !important; 15 | speak: none; 16 | font-style: normal; 17 | font-weight: normal; 18 | font-variant: normal; 19 | text-transform: none; 20 | line-height: 1; 21 | 22 | /* Better Font Rendering =========== */ 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; 25 | } 26 | 27 | .icon-pencil:before { 28 | content: "\e905"; 29 | } 30 | .icon-file-text2:before { 31 | content: "\e926"; 32 | } 33 | .icon-folder-open:before { 34 | content: "\e930"; 35 | } 36 | .icon-price-tag:before { 37 | content: "\e935"; 38 | } 39 | .icon-floppy-disk:before { 40 | content: "\e962"; 41 | } 42 | .icon-search:before { 43 | content: "\e986"; 44 | } 45 | .icon-cogs:before { 46 | content: "\e995"; 47 | } 48 | .icon-bin:before { 49 | content: "\e9ac"; 50 | } 51 | .icon-link:before { 52 | content: "\e9cb"; 53 | } 54 | .icon-eye:before { 55 | content: "\e9ce"; 56 | } 57 | .icon-plus:before { 58 | content: "\ea0a"; 59 | } 60 | .icon-minus:before { 61 | content: "\ea0b"; 62 | } 63 | .icon-table:before { 64 | content: "\ea70"; 65 | } 66 | .icon-share:before { 67 | content: "\ea7d"; 68 | } 69 | -------------------------------------------------------------------------------- /app/assets/stylesheets/activeadmin_blaze_theme/theme.scss: -------------------------------------------------------------------------------- 1 | // @import 'icomoon'; 2 | @import 'blaze/blaze'; 3 | 4 | @import url('https://fonts.googleapis.com/css?family=Roboto:italic,regular,bold'); 5 | 6 | @import 'variables'; 7 | @import 'base'; 8 | @import 'form'; 9 | @import 'header'; 10 | @import 'navigation'; 11 | @import 'sidebars'; 12 | @import 'tables'; 13 | @import 'contents'; 14 | @import 'footer'; 15 | -------------------------------------------------------------------------------- /bin/appraisal: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'appraisal' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("appraisal", "appraisal") 30 | -------------------------------------------------------------------------------- /bin/fasterer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'fasterer' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("fasterer", "fasterer") 30 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # This command will automatically be run when you run "rails" with Rails gems 3 | # installed from the root of your application. 4 | 5 | ENV['RAILS_ENV'] ||= 'test' 6 | 7 | ENGINE_ROOT = File.expand_path('..', __dir__) 8 | ENGINE_PATH = File.expand_path('../lib/activeadmin_blaze_theme', __dir__) 9 | APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__) 10 | 11 | # Set up gems listed in the Gemfile. 12 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 13 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 14 | 15 | require 'rails/all' 16 | require 'rails/engine/commands' 17 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'rake' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("rake", "rake") 30 | -------------------------------------------------------------------------------- /bin/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'rspec' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("rspec-core", "rspec") 30 | -------------------------------------------------------------------------------- /bin/rubocop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'rubocop' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("rubocop", "rubocop") 30 | -------------------------------------------------------------------------------- /extra/README.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | ## Releases 4 | 5 | ```sh 6 | # Update version.rb with the new version 7 | # Update the gemfiles: 8 | bin/appraisal 9 | ``` 10 | 11 | ## Testing 12 | 13 | ```sh 14 | # Running specs using a specific configuration: 15 | bin/appraisal rails60-activeadmin22 rspec 16 | # Using latest activeadmin version: 17 | bin/appraisal rails60-activeadmin rspec 18 | # See gemfiles for more configurations 19 | ``` 20 | -------------------------------------------------------------------------------- /extra/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/extra/edit.png -------------------------------------------------------------------------------- /extra/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/extra/index.png -------------------------------------------------------------------------------- /gemfiles/rails52_activeadmin20.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin", "~> 2.0.0" 6 | gem "rails", "~> 5.2.0" 7 | 8 | group :development, :test do 9 | gem "puma" 10 | gem "sassc" 11 | gem "sqlite3" 12 | gem "capybara" 13 | gem "cuprite" 14 | gem "rspec_junit_formatter" 15 | gem "rspec-rails" 16 | gem "fasterer" 17 | gem "rubocop" 18 | gem "rubocop-packaging" 19 | gem "rubocop-performance" 20 | gem "rubocop-rails" 21 | gem "rubocop-rspec" 22 | gem "pry-rails" 23 | end 24 | 25 | gemspec path: "../" 26 | -------------------------------------------------------------------------------- /gemfiles/rails60_activeadmin.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin" 6 | gem "rails", "~> 6.0.0" 7 | gem "selenium-webdriver", require: false 8 | 9 | group :development, :test do 10 | gem "puma" 11 | gem "sassc" 12 | gem "sqlite3" 13 | gem "capybara" 14 | gem "cuprite" 15 | gem "rspec_junit_formatter" 16 | gem "rspec-rails" 17 | gem "fasterer" 18 | gem "rubocop" 19 | gem "rubocop-packaging" 20 | gem "rubocop-performance" 21 | gem "rubocop-rails" 22 | gem "rubocop-rspec" 23 | gem "pry-rails" 24 | end 25 | 26 | gemspec path: "../" 27 | -------------------------------------------------------------------------------- /gemfiles/rails60_activeadmin22.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin", "~> 2.2.0" 6 | gem "rails", "~> 6.0.0" 7 | gem "selenium-webdriver", require: false 8 | 9 | group :development, :test do 10 | gem "puma" 11 | gem "sassc" 12 | gem "sqlite3" 13 | gem "capybara" 14 | gem "cuprite" 15 | gem "rspec_junit_formatter" 16 | gem "rspec-rails" 17 | gem "fasterer" 18 | gem "rubocop" 19 | gem "rubocop-packaging" 20 | gem "rubocop-performance" 21 | gem "rubocop-rails" 22 | gem "rubocop-rspec" 23 | gem "pry-rails" 24 | end 25 | 26 | gemspec path: "../" 27 | -------------------------------------------------------------------------------- /gemfiles/rails61_activeadmin.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin" 6 | gem "rails", "~> 6.1.0" 7 | 8 | group :development, :test do 9 | gem "puma" 10 | gem "sassc" 11 | gem "sqlite3" 12 | gem "capybara" 13 | gem "cuprite" 14 | gem "rspec_junit_formatter" 15 | gem "rspec-rails" 16 | gem "fasterer" 17 | gem "rubocop" 18 | gem "rubocop-packaging" 19 | gem "rubocop-performance" 20 | gem "rubocop-rails" 21 | gem "rubocop-rspec" 22 | gem "pry-rails" 23 | end 24 | 25 | gemspec path: "../" 26 | -------------------------------------------------------------------------------- /gemfiles/rails61_activeadmin29.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin", "~> 2.9.0" 6 | gem "rails", "~> 6.1.0" 7 | 8 | group :development, :test do 9 | gem "puma" 10 | gem "sassc" 11 | gem "sqlite3" 12 | gem "capybara" 13 | gem "cuprite" 14 | gem "rspec_junit_formatter" 15 | gem "rspec-rails" 16 | gem "fasterer" 17 | gem "rubocop" 18 | gem "rubocop-packaging" 19 | gem "rubocop-performance" 20 | gem "rubocop-rails" 21 | gem "rubocop-rspec" 22 | gem "pry-rails" 23 | end 24 | 25 | gemspec path: "../" 26 | -------------------------------------------------------------------------------- /gemfiles/rails70_activeadmin.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "activeadmin" 6 | gem "rails", "~> 7.0.0" 7 | gem "sprockets-rails" 8 | 9 | group :development, :test do 10 | gem "puma" 11 | gem "sassc" 12 | gem "sqlite3" 13 | gem "capybara" 14 | gem "cuprite" 15 | gem "rspec_junit_formatter" 16 | gem "rspec-rails" 17 | gem "fasterer" 18 | gem "rubocop" 19 | gem "rubocop-packaging" 20 | gem "rubocop-performance" 21 | gem "rubocop-rails" 22 | gem "rubocop-rspec" 23 | gem "pry-rails" 24 | end 25 | 26 | gemspec path: "../" 27 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // Styles 2 | import 'activeadmin_blaze_theme/app/assets/stylesheets/activeadmin_blaze_theme/theme' 3 | -------------------------------------------------------------------------------- /lib/activeadmin/views/activeadmin_form.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ActiveAdmin::Views::ActiveAdminForm.class_eval do 4 | def accordion( title, &block ) 5 | @accordion_id = @accordion_id ? ( @accordion_id + 1 ) : 1 6 | text_node tag :input, type: 'checkbox', id: "accordion-#{@accordion_id}" 7 | label title, for: "accordion-#{@accordion_id}", class: 'c-card__item c-card__item--brand' 8 | div class: 'c-card__item' do 9 | yield block 10 | end 11 | end 12 | 13 | def accordion_group( &block ) 14 | div class: 'c-card c-card--accordion u-high' do 15 | yield block 16 | end 17 | end 18 | 19 | def readonly( field, value = nil, options = {} ) 20 | field_value = value.nil? ? nil : raw(value) 21 | field_value ||= (field && object.respond_to?(field) ? object.send(field) : '') 22 | cl = 'readonly-field' 23 | cl += " #{options[:class]}" if options[:class] 24 | li class: cl do 25 | if field.present? 26 | label field, for: nil, class: 'field_label' 27 | else 28 | span ' '.html_safe, class: 'field_label' 29 | end 30 | div do 31 | span field_value, class: 'field_value' 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /lib/activeadmin_blaze_theme.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'activeadmin' 4 | require 'activeadmin/views/activeadmin_form' 5 | require 'activeadmin_blaze_theme/version' 6 | # require 'formtastic/inputs/blaze_array_input' 7 | require 'formtastic/inputs/blaze_toggle_input' 8 | 9 | module ActiveAdminBlazeTheme 10 | module Rails 11 | class Engine < ::Rails::Engine 12 | end 13 | end 14 | end 15 | 16 | ActiveAdmin::Views::IndexAsTable::IndexTableFor::TableActions.class_eval do 17 | def item(*args) 18 | cl = args[2][:class] 19 | if cl.include? 'view_link' 20 | args[0] = ' '.html_safe + args[0] 21 | args[2][:class] += ' c-button c-button--info u-xsmall' 22 | elsif cl.include? 'edit_link' 23 | args[0] = ' '.html_safe + args[0] 24 | args[2][:class] += ' c-button c-button--info u-xsmall' 25 | elsif cl.include? 'delete_link' 26 | args[0] = ' '.html_safe + args[0] 27 | args[2][:class] += ' c-button c-button--error u-xsmall' 28 | end 29 | text_node link_to(*args) 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/activeadmin_blaze_theme/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module ActiveAdminBlazeTheme 4 | VERSION = '1.1.0' 5 | end 6 | -------------------------------------------------------------------------------- /lib/formtastic/inputs/blaze_toggle_input.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Formtastic 4 | module Inputs 5 | class BlazeToggleInput < Formtastic::Inputs::BooleanInput 6 | include Formtastic::Inputs::Base 7 | 8 | # def to_html 9 | # input_wrapping do 10 | # # hidden_field_html << 11 | # label_html << 12 | # builder.check_box( method, input_html_options ) 13 | # # label_with_nested_checkbox 14 | # end 15 | # end 16 | 17 | def to_html 18 | input_wrapping do 19 | toggle_label << 20 | hidden_field_html << 21 | toggle_checkbox 22 | end 23 | end 24 | 25 | def toggle_label 26 | builder.label( 27 | method, 28 | label_text 29 | ) 30 | end 31 | 32 | def toggle_checkbox 33 | builder.label( 34 | method, 35 | label_with_embedded_checkbox, 36 | label_html_options 37 | ) 38 | end 39 | 40 | def label_html_options 41 | classes = input_html_options[:simple_checkbox] ? [] : ['c-toggle', input_html_options[:toggle_class]] 42 | super.merge(for: input_html_options[:id], class: classes - ['label']) 43 | end 44 | 45 | def label_with_embedded_checkbox 46 | check_box_html << "" << (input_html_options[:simple_checkbox] ? '' : toggle_html) # << label_text 47 | end 48 | 49 | def toggle_html 50 | template.content_tag( 51 | :div, 52 | template.content_tag(:div, '', class: 'c-toggle__handle'), 53 | class: 'c-toggle__track' 54 | ) 55 | end 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "activeadmin_blaze_theme", 3 | "version": "1.1.0", 4 | "description": "A theme for Active Admin based on Blaze CSS 3.x", 5 | "author": "Mattia Roccoberton ", 6 | "license": "MIT", 7 | "homepage": "https://github.com/blocknotes/activeadmin_blaze_theme", 8 | "main": "index.js", 9 | "files": [ 10 | "app/**/*", 11 | "index.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /spec/dummy/.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-2.7.1 2 | -------------------------------------------------------------------------------- /spec/dummy/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /spec/dummy/app/admin/authors.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ActiveAdmin.register Author do 4 | permit_params :name, 5 | :email, 6 | :age, 7 | :avatar, 8 | profile_attributes: %i[id description _destroy], 9 | posts_attributes: %i[id title description] 10 | 11 | index do 12 | selectable_column 13 | id_column 14 | column :name 15 | column :email 16 | column :created_at 17 | actions 18 | end 19 | 20 | filter :name 21 | filter :created_at 22 | 23 | show do 24 | attributes_table do 25 | row :name 26 | row :email 27 | row :age 28 | row :avatar do |record| 29 | image_tag url_for(record.avatar), style: 'max-width:800px;max-height:500px' if record.avatar.attached? 30 | end 31 | row :created_at 32 | row :updated_at 33 | row :profile 34 | row :posts 35 | end 36 | active_admin_comments 37 | end 38 | 39 | form do |f| 40 | f.inputs do 41 | f.input :name 42 | f.input :email 43 | f.input :age 44 | f.input :avatar, 45 | as: :file, 46 | hint: (object.avatar.attached? ? "Current: #{object.avatar.filename}" : nil) 47 | 48 | f.has_many :profile, allow_destroy: true do |ff| 49 | ff.input :description 50 | end 51 | 52 | f.has_many :posts do |fp| 53 | fp.input :title 54 | fp.input :description 55 | end 56 | 57 | f.actions 58 | end 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /spec/dummy/app/admin/dashboard.rb: -------------------------------------------------------------------------------- 1 | ActiveAdmin.register_page "Dashboard" do 2 | menu priority: 1, label: proc { I18n.t("active_admin.dashboard") } 3 | 4 | content title: proc { I18n.t("active_admin.dashboard") } do 5 | div class: "blank_slate_container", id: "dashboard_default_message" do 6 | span class: "blank_slate" do 7 | span I18n.t("active_admin.dashboard_welcome.welcome") 8 | small I18n.t("active_admin.dashboard_welcome.call_to_action") 9 | end 10 | end 11 | 12 | # Here is an example of a simple dashboard with columns and panels. 13 | # 14 | # columns do 15 | # column do 16 | # panel "Recent Posts" do 17 | # ul do 18 | # Post.recent(5).map do |post| 19 | # li link_to(post.title, admin_post_path(post)) 20 | # end 21 | # end 22 | # end 23 | # end 24 | 25 | # column do 26 | # panel "Info" do 27 | # para "Welcome to ActiveAdmin." 28 | # end 29 | # end 30 | # end 31 | end # content 32 | end 33 | -------------------------------------------------------------------------------- /spec/dummy/app/admin/posts.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ActiveAdmin.register Post do 4 | permit_params :author_id, :title, :description, :category, :dt, :position, :published, tag_ids: [] 5 | 6 | index do 7 | selectable_column 8 | id_column 9 | column :title 10 | column :author 11 | column :published 12 | column :created_at 13 | actions 14 | end 15 | 16 | show do 17 | attributes_table do 18 | row :author 19 | row :title 20 | row :description 21 | row :category 22 | row :dt 23 | row :position 24 | row :published 25 | row :tags 26 | row :created_at 27 | row :updated_at 28 | end 29 | active_admin_comments 30 | end 31 | 32 | form do |f| 33 | buttons = %w[bold italic underline link] 34 | f.inputs 'Post' do 35 | f.input :author 36 | f.input :title 37 | f.input :description 38 | f.input :category 39 | f.input :dt 40 | f.input :position 41 | f.input :published 42 | end 43 | 44 | f.inputs 'Tags' do 45 | f.input :tags 46 | end 47 | 48 | f.actions 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /spec/dummy/app/admin/tags.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ActiveAdmin.register Tag do 4 | end 5 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | // OFF link active_storage_db_manifest.js 4 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/app/assets/images/.keep -------------------------------------------------------------------------------- /spec/dummy/app/assets/javascripts/active_admin.js: -------------------------------------------------------------------------------- 1 | //= require active_admin/base 2 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/stylesheets/active_admin.scss: -------------------------------------------------------------------------------- 1 | @import 'active_admin/mixins'; 2 | @import 'active_admin/base'; 3 | 4 | @import 'activeadmin_blaze_theme/theme'; 5 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS 10 | * files in this directory. Styles in this file should be added after the last require_* statement. 11 | * It is generally better to create a new file per style scope. 12 | * 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /spec/dummy/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /spec/dummy/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /spec/dummy/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /spec/dummy/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /spec/dummy/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /spec/dummy/app/javascript/packs/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. JavaScript code in this file should be added after the last require_* statement. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require rails-ujs 14 | //= require activestorage 15 | //= require_tree . 16 | -------------------------------------------------------------------------------- /spec/dummy/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /spec/dummy/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: 'from@example.com' 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /spec/dummy/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationRecord < ActiveRecord::Base 4 | self.abstract_class = true 5 | 6 | scope :published, -> {} 7 | end 8 | -------------------------------------------------------------------------------- /spec/dummy/app/models/author.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Author < ApplicationRecord 4 | has_many :posts 5 | has_many :published_posts, -> { published }, class_name: 'Post' 6 | has_many :recent_posts, -> { recents }, class_name: 'Post' 7 | 8 | has_many :tags, through: :posts 9 | 10 | has_one :profile, inverse_of: :author, dependent: :destroy 11 | 12 | has_one_attached :avatar 13 | 14 | accepts_nested_attributes_for :profile, allow_destroy: true 15 | accepts_nested_attributes_for :posts, allow_destroy: true 16 | 17 | validates :email, format: { with: /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\z/i, message: 'Invalid email' } 18 | 19 | validate -> { 20 | errors.add( :base, 'Invalid age' ) if !age || age.to_i % 3 == 1 21 | } 22 | 23 | def to_s 24 | "#{name} (#{age})" 25 | end 26 | 27 | def self.ransackable_attributes(auth_object = nil) 28 | ["age", "created_at", "email", "id", "name", "updated_at"] 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /spec/dummy/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/app/models/concerns/.keep -------------------------------------------------------------------------------- /spec/dummy/app/models/post.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Post < ApplicationRecord 4 | enum state: %i[available unavailable arriving] 5 | 6 | belongs_to :author, inverse_of: :posts, autosave: true 7 | 8 | has_one :author_profile, through: :author, source: :profile 9 | 10 | has_many :post_tags, inverse_of: :post, dependent: :destroy 11 | has_many :tags, through: :post_tags 12 | 13 | validates :title, allow_blank: false, presence: true 14 | 15 | scope :published, -> { where(published: true) } 16 | scope :recents, -> { where('created_at > ?', Date.today - 8.month) } 17 | 18 | def short_title 19 | title.truncate 10 20 | end 21 | 22 | def upper_title 23 | title.upcase 24 | end 25 | 26 | def self.ransackable_associations(auth_object = nil) 27 | ["author", "author_profile", "post_tags", "tags"] 28 | end 29 | 30 | def self.ransackable_attributes(auth_object = nil) 31 | ["author_id", "category", "created_at", "description", "dt", "id", "position", "published", "title", "updated_at"] 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /spec/dummy/app/models/post_tag.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PostTag < ApplicationRecord 4 | belongs_to :post, inverse_of: :post_tags 5 | belongs_to :tag, inverse_of: :post_tags 6 | 7 | validates :post, presence: true 8 | validates :tag, presence: true 9 | 10 | def self.ransackable_attributes(auth_object = nil) 11 | ["created_at", "id", "post_id", "tag_id", "updated_at"] 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/dummy/app/models/profile.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Profile < ApplicationRecord 4 | belongs_to :author, inverse_of: :profile, touch: true 5 | 6 | def to_s 7 | description 8 | end 9 | 10 | def self.ransackable_attributes(auth_object = nil) 11 | ["author_id", "created_at", "description", "id", "updated_at"] 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/dummy/app/models/tag.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Tag < ApplicationRecord 4 | has_many :post_tags, inverse_of: :tag, dependent: :destroy 5 | has_many :posts, through: :post_tags 6 | end 7 | -------------------------------------------------------------------------------- /spec/dummy/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dummy 5 | <%= csrf_meta_tags %> 6 | <%= csp_meta_tag %> 7 | 8 | <%= stylesheet_link_tag 'application', media: 'all' %> 9 | 10 | 11 | 12 | <%= yield %> 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/dummy/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/dummy/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /spec/dummy/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /spec/dummy/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /spec/dummy/bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | 4 | # path to your application root. 5 | APP_ROOT = File.expand_path('..', __dir__) 6 | 7 | def system!(*args) 8 | system(*args) || abort("\n== Command #{args} failed ==") 9 | end 10 | 11 | FileUtils.chdir APP_ROOT do 12 | # This script is a way to setup or update your development environment automatically. 13 | # This script is idempotent, so that you can run it at anytime and get an expectable outcome. 14 | # Add necessary setup steps to this file. 15 | 16 | puts '== Installing dependencies ==' 17 | system! 'gem install bundler --conservative' 18 | system('bundle check') || system!('bundle install') 19 | 20 | # puts "\n== Copying sample files ==" 21 | # unless File.exist?('config/database.yml') 22 | # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' 23 | # end 24 | 25 | puts "\n== Preparing database ==" 26 | system! 'bin/rails db:prepare' 27 | 28 | puts "\n== Removing old logs and tempfiles ==" 29 | system! 'bin/rails log:clear tmp:clear' 30 | 31 | puts "\n== Restarting application server ==" 32 | system! 'bin/rails restart' 33 | end 34 | -------------------------------------------------------------------------------- /spec/dummy/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | 5 | run Rails.application 6 | -------------------------------------------------------------------------------- /spec/dummy/config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative 'boot' 2 | 3 | require 'rails/all' 4 | 5 | Bundler.require(*Rails.groups) 6 | 7 | module Dummy 8 | class Application < Rails::Application 9 | # Initialize configuration defaults for originally generated Rails version. 10 | config.load_defaults 6.0 if Rails::VERSION::MAJOR == 6 11 | 12 | # Settings in config/environments/* take precedence over those specified here. 13 | # Application configuration can go into files in config/initializers 14 | # -- all .rb files in that directory are automatically loaded after loading 15 | # the framework and any gems in your application. 16 | 17 | ### 18 | 19 | config.active_record.legacy_connection_handling = false if Rails::VERSION::MAJOR > 6 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/dummy/config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__) 6 | -------------------------------------------------------------------------------- /spec/dummy/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: dummy_production 11 | -------------------------------------------------------------------------------- /spec/dummy/config/database.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: sqlite3 3 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 4 | timeout: 5000 5 | 6 | test: 7 | <<: *default 8 | database: db/test.sqlite3 9 | -------------------------------------------------------------------------------- /spec/dummy/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /spec/dummy/config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports. 13 | config.consider_all_requests_local = true 14 | 15 | # Enable/disable caching. By default caching is disabled. 16 | # Run rails dev:cache to toggle caching. 17 | if Rails.root.join('tmp', 'caching-dev.txt').exist? 18 | config.action_controller.perform_caching = true 19 | config.action_controller.enable_fragment_cache_logging = true 20 | 21 | config.cache_store = :memory_store 22 | config.public_file_server.headers = { 23 | 'Cache-Control' => "public, max-age=#{2.days.to_i}" 24 | } 25 | else 26 | config.action_controller.perform_caching = false 27 | 28 | config.cache_store = :null_store 29 | end 30 | 31 | # Store uploaded files on the local file system (see config/storage.yml for options). 32 | config.active_storage.service = :local 33 | 34 | # # Don't care if the mailer can't send. 35 | # config.action_mailer.raise_delivery_errors = false 36 | 37 | # config.action_mailer.perform_caching = false 38 | 39 | # Print deprecation notices to the Rails logger. 40 | config.active_support.deprecation = :log 41 | 42 | # Raise an error on page load if there are pending migrations. 43 | config.active_record.migration_error = :page_load 44 | 45 | # Highlight code that triggered database queries in logs. 46 | config.active_record.verbose_query_logs = true 47 | 48 | # Debug mode disables concatenation and preprocessing of assets. 49 | # This option may cause significant delays in view rendering with a large 50 | # number of complex assets. 51 | config.assets.debug = true 52 | 53 | # Suppress logger output for asset requests. 54 | config.assets.quiet = true 55 | 56 | # Raises error for missing translations. 57 | # config.action_view.raise_on_missing_translations = true 58 | 59 | # Use an evented file watcher to asynchronously detect changes in source code, 60 | # routes, locales, etc. This feature depends on the listen gem. 61 | # config.file_watcher = ActiveSupport::EventedFileUpdateChecker 62 | end 63 | -------------------------------------------------------------------------------- /spec/dummy/config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] 18 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). 19 | # config.require_master_key = true 20 | 21 | # Disable serving static files from the `/public` folder by default since 22 | # Apache or NGINX already handles this. 23 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 24 | 25 | # Compress CSS using a preprocessor. 26 | # config.assets.css_compressor = :sass 27 | 28 | # Do not fallback to assets pipeline if a precompiled asset is missed. 29 | config.assets.compile = false 30 | 31 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 32 | # config.action_controller.asset_host = 'http://assets.example.com' 33 | 34 | # Specifies the header that your server uses for sending files. 35 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 36 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 37 | 38 | # Store uploaded files on the local file system (see config/storage.yml for options). 39 | config.active_storage.service = :local 40 | 41 | # Mount Action Cable outside main process or domain. 42 | # config.action_cable.mount_path = nil 43 | # config.action_cable.url = 'wss://example.com/cable' 44 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] 45 | 46 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 47 | # config.force_ssl = true 48 | 49 | # Use the lowest log level to ensure availability of diagnostic information 50 | # when problems arise. 51 | config.log_level = :debug 52 | 53 | # Prepend all log lines with the following tags. 54 | config.log_tags = [ :request_id ] 55 | 56 | # Use a different cache store in production. 57 | # config.cache_store = :mem_cache_store 58 | 59 | # Use a real queuing backend for Active Job (and separate queues per environment). 60 | # config.active_job.queue_adapter = :resque 61 | # config.active_job.queue_name_prefix = "dummy_production" 62 | 63 | # config.action_mailer.perform_caching = false 64 | 65 | # Ignore bad email addresses and do not raise email delivery errors. 66 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 67 | # config.action_mailer.raise_delivery_errors = false 68 | 69 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 70 | # the I18n.default_locale when a translation cannot be found). 71 | config.i18n.fallbacks = true 72 | 73 | # Send deprecation notices to registered listeners. 74 | config.active_support.deprecation = :notify 75 | 76 | # Use default logging formatter so that PID and timestamp are not suppressed. 77 | config.log_formatter = ::Logger::Formatter.new 78 | 79 | # Use a different logger for distributed setups. 80 | # require 'syslog/logger' 81 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 82 | 83 | if ENV["RAILS_LOG_TO_STDOUT"].present? 84 | logger = ActiveSupport::Logger.new(STDOUT) 85 | logger.formatter = config.log_formatter 86 | config.logger = ActiveSupport::TaggedLogging.new(logger) 87 | end 88 | 89 | # Do not dump schema after migrations. 90 | config.active_record.dump_schema_after_migration = false 91 | 92 | # Inserts middleware to perform automatic connection switching. 93 | # The `database_selector` hash is used to pass options to the DatabaseSelector 94 | # middleware. The `delay` is used to determine how long to wait after a write 95 | # to send a subsequent read to the primary. 96 | # 97 | # The `database_resolver` class is used by the middleware to determine which 98 | # database is appropriate to use based on the time delay. 99 | # 100 | # The `database_resolver_context` class is used by the middleware to set 101 | # timestamps for the last write to the primary. The resolver uses the context 102 | # class timestamps to determine how long to wait before reading from the 103 | # replica. 104 | # 105 | # By default Rails will store a last write timestamp in the session. The 106 | # DatabaseSelector middleware is designed as such you can define your own 107 | # strategy for connection switching and pass that into the middleware through 108 | # these configuration options. 109 | # config.active_record.database_selector = { delay: 2.seconds } 110 | # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver 111 | # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session 112 | end 113 | -------------------------------------------------------------------------------- /spec/dummy/config/environments/test.rb: -------------------------------------------------------------------------------- 1 | # The test environment is used exclusively to run your application's 2 | # test suite. You never need to work with it otherwise. Remember that 3 | # your test database is "scratch space" for the test suite and is wiped 4 | # and recreated between test runs. Don't rely on the data there! 5 | 6 | Rails.application.configure do 7 | # Settings specified here will take precedence over those in config/application.rb. 8 | 9 | config.cache_classes = false 10 | config.action_view.cache_template_loading = true 11 | 12 | # Do not eager load code on boot. This avoids loading your whole application 13 | # just for the purpose of running a single test. If you are using a tool that 14 | # preloads Rails for running tests, you may have to set it to true. 15 | config.eager_load = false 16 | 17 | # Configure public file server for tests with Cache-Control for performance. 18 | config.public_file_server.enabled = true 19 | config.public_file_server.headers = { 20 | 'Cache-Control' => "public, max-age=#{1.hour.to_i}" 21 | } 22 | 23 | # Show full error reports and disable caching. 24 | config.consider_all_requests_local = true 25 | config.action_controller.perform_caching = false 26 | config.cache_store = :null_store 27 | 28 | # Raise exceptions instead of rendering exception templates. 29 | config.action_dispatch.show_exceptions = false 30 | 31 | # Disable request forgery protection in test environment. 32 | config.action_controller.allow_forgery_protection = false 33 | 34 | # Store uploaded files on the local file system in a temporary directory. 35 | config.active_storage.service = :test 36 | 37 | # config.action_mailer.perform_caching = false 38 | 39 | # Tell Action Mailer not to deliver emails to the real world. 40 | # The :test delivery method accumulates sent emails in the 41 | # ActionMailer::Base.deliveries array. 42 | # config.action_mailer.delivery_method = :test 43 | 44 | # Print deprecation notices to the stderr. 45 | config.active_support.deprecation = :stderr 46 | 47 | # Raises error for missing translations. 48 | # config.action_view.raise_on_missing_translations = true 49 | end 50 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in the app/assets 11 | # folder are already added. 12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 13 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/content_security_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide content security policy 4 | # For further information see the following documentation 5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy 6 | 7 | # Rails.application.config.content_security_policy do |policy| 8 | # policy.default_src :self, :https 9 | # policy.font_src :self, :https, :data 10 | # policy.img_src :self, :https, :data 11 | # policy.object_src :none 12 | # policy.script_src :self, :https 13 | # policy.style_src :self, :https 14 | 15 | # # Specify URI for violation reports 16 | # # policy.report_uri "/csp-violation-report-endpoint" 17 | # end 18 | 19 | # If you are using UJS then enable automatic nonce generation 20 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } 21 | 22 | # Set the nonce only to specific directives 23 | # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) 24 | 25 | # Report CSP violations to a specified URI 26 | # For further information see the following documentation: 27 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only 28 | # Rails.application.config.content_security_policy_report_only = true 29 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /spec/dummy/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # The following keys must be escaped otherwise they will not be retrieved by 20 | # the default I18n backend: 21 | # 22 | # true, false, on, off, yes, no 23 | # 24 | # Instead, surround them with single quotes. 25 | # 26 | # en: 27 | # 'true': 'foo' 28 | # 29 | # To learn more, please read the Rails Internationalization guide 30 | # available at https://guides.rubyonrails.org/i18n.html. 31 | 32 | en: 33 | hello: "Hello world" 34 | -------------------------------------------------------------------------------- /spec/dummy/config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers: a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum; this matches the default thread size of Active Record. 6 | # 7 | max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } 8 | min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } 9 | threads min_threads_count, max_threads_count 10 | 11 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000. 12 | # 13 | port ENV.fetch("PORT") { 3000 } 14 | 15 | # Specifies the `environment` that Puma will run in. 16 | # 17 | environment ENV.fetch("RAILS_ENV") { "development" } 18 | 19 | # Specifies the `pidfile` that Puma will use. 20 | pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } 21 | 22 | # Specifies the number of `workers` to boot in clustered mode. 23 | # Workers are forked web server processes. If using threads and workers together 24 | # the concurrency of the application would be max `threads` * `workers`. 25 | # Workers do not work on JRuby or Windows (both of which do not support 26 | # processes). 27 | # 28 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 29 | 30 | # Use the `preload_app!` method when specifying a `workers` number. 31 | # This directive tells Puma to first boot the application and load code 32 | # before forking the application. This takes advantage of Copy On Write 33 | # process behavior so workers use less memory. 34 | # 35 | # preload_app! 36 | 37 | # Allow puma to be restarted by `rails restart` command. 38 | plugin :tmp_restart 39 | -------------------------------------------------------------------------------- /spec/dummy/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | ActiveAdmin.routes(self) 3 | 4 | root to: redirect('/admin') 5 | end 6 | -------------------------------------------------------------------------------- /spec/dummy/config/spring.rb: -------------------------------------------------------------------------------- 1 | Spring.watch( 2 | ".ruby-version", 3 | ".rbenv-vars", 4 | "tmp/restart.txt", 5 | "tmp/caching-dev.txt" 6 | ) 7 | -------------------------------------------------------------------------------- /spec/dummy/config/storage.yml: -------------------------------------------------------------------------------- 1 | test: 2 | service: Disk 3 | root: <%= Rails.root.join("tmp/storage") %> 4 | 5 | local: 6 | service: Disk 7 | root: <%= Rails.root.join("storage") %> 8 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20170806125915_create_active_storage_tables.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20170806125915) 2 | class CreateActiveStorageTables < ActiveRecord::Migration[5.2] 3 | def change 4 | create_table :active_storage_blobs do |t| 5 | t.string :key, null: false 6 | t.string :filename, null: false 7 | t.string :content_type 8 | t.text :metadata 9 | t.bigint :byte_size, null: false 10 | t.string :checksum, null: false 11 | t.datetime :created_at, null: false 12 | 13 | t.index [ :key ], unique: true 14 | end 15 | 16 | create_table :active_storage_attachments do |t| 17 | t.string :name, null: false 18 | t.references :record, null: false, polymorphic: true, index: false 19 | t.references :blob, null: false 20 | 21 | t.datetime :created_at, null: false 22 | 23 | t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true 24 | t.foreign_key :active_storage_blobs, column: :blob_id 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180101010101_create_active_admin_comments.rb: -------------------------------------------------------------------------------- 1 | class CreateActiveAdminComments < ActiveRecord::Migration[6.0] 2 | def self.up 3 | create_table :active_admin_comments do |t| 4 | t.string :namespace 5 | t.text :body 6 | t.references :resource, polymorphic: true 7 | t.references :author, polymorphic: true 8 | t.timestamps 9 | end 10 | add_index :active_admin_comments, [:namespace] 11 | end 12 | 13 | def self.down 14 | drop_table :active_admin_comments 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180607053251_create_authors.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateAuthors < ActiveRecord::Migration[5.2] 4 | def change 5 | create_table :authors do |t| 6 | t.string :name 7 | t.integer :age 8 | t.string :email 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180607053254_create_profiles.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateProfiles < ActiveRecord::Migration[5.2] 4 | def change 5 | create_table :profiles do |t| 6 | t.text :description 7 | t.belongs_to :author, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180607053255_create_tags.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateTags < ActiveRecord::Migration[5.2] 4 | def change 5 | create_table :tags do |t| 6 | t.string :name 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180607053257_create_post_tags.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePostTags < ActiveRecord::Migration[5.2] 4 | def change 5 | create_table :post_tags do |t| 6 | t.belongs_to :post, foreign_key: true 7 | t.belongs_to :tag, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/dummy/db/migrate/20180607053739_create_posts.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePosts < ActiveRecord::Migration[5.2] 4 | def change 5 | create_table :posts do |t| 6 | t.string :title 7 | t.text :description 8 | t.belongs_to :author, foreign_key: true 9 | t.string :category 10 | t.datetime :dt 11 | t.float :position 12 | t.boolean :published 13 | 14 | t.timestamps 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/dummy/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is auto-generated from the current state of the database. Instead 2 | # of editing this file, please use the migrations feature of Active Record to 3 | # incrementally modify your database, and then regenerate this schema definition. 4 | # 5 | # This file is the source Rails uses to define your schema when running `bin/rails 6 | # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to 7 | # be faster and is potentially less error prone than running all of your 8 | # migrations from scratch. Old migrations may fail to apply correctly if those 9 | # migrations use external dependencies or application code. 10 | # 11 | # It's strongly recommended that you check this file into your version control system. 12 | 13 | ActiveRecord::Schema.define(version: 2018_06_07_053739) do 14 | 15 | create_table "active_admin_comments", force: :cascade do |t| 16 | t.string "namespace" 17 | t.text "body" 18 | t.string "resource_type" 19 | t.bigint "resource_id" 20 | t.string "author_type" 21 | t.bigint "author_id" 22 | t.datetime "created_at", precision: 6, null: false 23 | t.datetime "updated_at", precision: 6, null: false 24 | t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id" 25 | t.index ["namespace"], name: "index_active_admin_comments_on_namespace" 26 | t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id" 27 | end 28 | 29 | create_table "active_storage_attachments", force: :cascade do |t| 30 | t.string "name", null: false 31 | t.string "record_type", null: false 32 | t.integer "record_id", null: false 33 | t.integer "blob_id", null: false 34 | t.datetime "created_at", null: false 35 | t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" 36 | t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true 37 | end 38 | 39 | create_table "active_storage_blobs", force: :cascade do |t| 40 | t.string "key", null: false 41 | t.string "filename", null: false 42 | t.string "content_type" 43 | t.text "metadata" 44 | t.bigint "byte_size", null: false 45 | t.string "checksum", null: false 46 | t.datetime "created_at", null: false 47 | t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true 48 | end 49 | 50 | create_table "authors", force: :cascade do |t| 51 | t.string "name" 52 | t.integer "age" 53 | t.string "email" 54 | t.datetime "created_at", null: false 55 | t.datetime "updated_at", null: false 56 | end 57 | 58 | create_table "post_tags", force: :cascade do |t| 59 | t.integer "post_id" 60 | t.integer "tag_id" 61 | t.datetime "created_at", null: false 62 | t.datetime "updated_at", null: false 63 | t.index ["post_id"], name: "index_post_tags_on_post_id" 64 | t.index ["tag_id"], name: "index_post_tags_on_tag_id" 65 | end 66 | 67 | create_table "posts", force: :cascade do |t| 68 | t.string "title" 69 | t.text "description" 70 | t.integer "author_id" 71 | t.string "category" 72 | t.datetime "dt" 73 | t.float "position" 74 | t.boolean "published" 75 | t.datetime "created_at", null: false 76 | t.datetime "updated_at", null: false 77 | t.index ["author_id"], name: "index_posts_on_author_id" 78 | end 79 | 80 | create_table "profiles", force: :cascade do |t| 81 | t.text "description" 82 | t.integer "author_id" 83 | t.datetime "created_at", null: false 84 | t.datetime "updated_at", null: false 85 | t.index ["author_id"], name: "index_profiles_on_author_id" 86 | end 87 | 88 | create_table "tags", force: :cascade do |t| 89 | t.string "name" 90 | t.datetime "created_at", null: false 91 | t.datetime "updated_at", null: false 92 | end 93 | 94 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" 95 | add_foreign_key "post_tags", "posts" 96 | add_foreign_key "post_tags", "tags" 97 | add_foreign_key "posts", "authors" 98 | add_foreign_key "profiles", "authors" 99 | end 100 | -------------------------------------------------------------------------------- /spec/dummy/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | puts 'Seeds:' 4 | 5 | puts 'Tags...' 6 | (11..16).each do |i| 7 | Tag.find_or_create_by!(name: "Tag #{i}") 8 | end 9 | 10 | puts 'Authors...' 11 | (11..20).each do |i| 12 | age = 21 + 3 * (i - 10) 13 | attrs = { name: "Author #{i}", age: age, email: "some@email#{i}.com" } 14 | Author.find_or_create_by!(attrs) do |author| 15 | author.profile = Profile.new(description: "Profile description for Author #{i}") if (i % 3).zero? 16 | end 17 | end 18 | 19 | puts 'Posts...' 20 | authors = Author.pluck(:id) 21 | tags = Tag.where.not(name: 'A test tag').pluck(:id) 22 | (11..40).each do |i| 23 | attrs = { 24 | title: "Post #{i}", 25 | author_id: authors.sample, 26 | position: rand(100), 27 | created_at: Time.now - rand(3600).seconds 28 | } 29 | attrs[:category] = 'news' if (i % 4).zero? 30 | attrs[:dt] = Time.now - rand(30).days if (i % 3).zero? 31 | 32 | Post.find_or_create_by!(title: "Post #{i}") do |post| 33 | post.assign_attributes(attrs) 34 | post.tags = Tag.where(id: tags.sample(2)) if (i % 2).zero? 35 | end 36 | end 37 | 38 | Author.find_or_create_by!(name: 'A test author', email: 'aaa@bbb.ccc', age: 30) 39 | Tag.find_or_create_by!(name: 'A test tag') 40 | 41 | puts 'done.' 42 | -------------------------------------------------------------------------------- /spec/dummy/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/lib/assets/.keep -------------------------------------------------------------------------------- /spec/dummy/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /spec/dummy/public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /spec/dummy/public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /spec/dummy/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/public/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /spec/dummy/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/public/apple-touch-icon.png -------------------------------------------------------------------------------- /spec/dummy/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blocknotes/activeadmin_blaze_theme/d729757f66b22246fc10b98a29c6eebe2ca41da6/spec/dummy/public/favicon.ico -------------------------------------------------------------------------------- /spec/rails_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | ENV['RAILS_ENV'] = 'test' 6 | 7 | require File.expand_path('dummy/config/environment.rb', __dir__) 8 | 9 | abort('The Rails environment is running in production mode!') if Rails.env.production? 10 | 11 | require 'rspec/rails' 12 | require 'capybara/rails' 13 | 14 | Dir[File.expand_path('support/**/*.rb', __dir__)].sort.each { |f| require f } 15 | 16 | # Force deprecations to raise an exception. 17 | ActiveSupport::Deprecation.behavior = :raise 18 | 19 | # Checks for pending migrations and applies them before tests are run. 20 | # If you are not using ActiveRecord, you can remove these lines. 21 | begin 22 | ActiveRecord::Migration.maintain_test_schema! 23 | rescue ActiveRecord::PendingMigrationError => e 24 | puts e.to_s.strip 25 | exit 1 26 | end 27 | 28 | RSpec.configure do |config| 29 | config.fixture_path = "#{::Rails.root}/spec/fixtures" 30 | config.infer_spec_type_from_file_location! 31 | config.filter_rails_from_backtrace! 32 | 33 | config.use_transactional_fixtures = true 34 | config.use_instantiated_fixtures = false 35 | config.render_views = false 36 | 37 | config.before(:suite) do 38 | intro = ('-' * 80) 39 | intro << "\n" 40 | intro << "- Ruby: #{RUBY_VERSION}\n" 41 | intro << "- Rails: #{Rails.version}\n" 42 | intro << "- ActiveAdmin: #{ActiveAdmin::VERSION}\n" 43 | intro << ('-' * 80) 44 | 45 | RSpec.configuration.reporter.message(intro) 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | RSpec.configure do |config| 4 | config.disable_monkey_patching! 5 | config.filter_run focus: true 6 | config.filter_run_excluding changes_filesystem: true 7 | config.run_all_when_everything_filtered = true 8 | 9 | config.color = true 10 | config.tty = true 11 | 12 | config.example_status_persistence_file_path = '.rspec_failures' 13 | config.order = :random 14 | config.shared_context_metadata_behavior = :apply_to_host_groups 15 | 16 | config.expect_with :rspec do |expectations| 17 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true 18 | end 19 | 20 | config.mock_with :rspec do |mocks| 21 | mocks.verify_partial_doubles = true 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/support/capybara.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Capybara.server = :puma 4 | Capybara.default_driver = Capybara.javascript_driver = :cuprite 5 | 6 | RSpec.configure do |config| 7 | # Make sure this hook runs before others 8 | config.prepend_before(:each, type: :system) do 9 | # Use JS driver always 10 | driven_by Capybara.javascript_driver 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/support/capybara_cuprite.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'capybara/cuprite' 4 | 5 | Capybara.register_driver(:cuprite) do |app| 6 | browser_options = {}.tap do |opts| 7 | opts['no-sandbox'] = nil if ENV['CI'] 8 | end 9 | 10 | Capybara::Cuprite::Driver.new( 11 | app, 12 | **{ 13 | window_size: [1600, 1280], 14 | # See additional options for Dockerized environment in the respective section of this article 15 | browser_options: browser_options, 16 | # Increase Chrome startup wait time (required for stable CI builds) 17 | process_timeout: 15, 18 | # The number of seconds we'll wait for a response when communicating with browser. Default is 5 19 | timeout: 15, 20 | # Enable debugging capabilities 21 | inspector: true, 22 | # Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value 23 | headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false]) 24 | } 25 | ) 26 | end 27 | -------------------------------------------------------------------------------- /spec/system/theme_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | RSpec.describe 'Theme', type: :system do 4 | it 'applies the theme styles' do 5 | visit '/admin/posts' 6 | 7 | expect(page).to have_css('body.active_admin', style: { 'font-size': '12px' }) 8 | expect(page).to have_css('body.active_admin a', text: /new post/i, style: { 'background-image': 'none' }) 9 | expect(page).to have_css('body.active_admin #header', style: { 'background-image': 'none' }) 10 | expect(page).to have_css('body.active_admin #title_bar', style: { 'box-shadow': 'none' }) 11 | expect(page).to have_css('body.active_admin #main_content', style: { padding: '25px 20px' }) 12 | expect(page).to have_css('body.active_admin #active_admin_content', style: { display: 'flex' }) 13 | expect(page).to have_css('body.active_admin #footer', style: { position: 'absolute' }) 14 | end 15 | end 16 | --------------------------------------------------------------------------------