├── log └── .keep ├── storage └── .keep ├── tmp ├── .keep └── pids │ └── .keep ├── vendor └── .keep ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── test ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep ├── system │ └── .keep ├── controllers │ └── .keep ├── fixtures │ ├── .keep │ └── files │ │ └── .keep ├── integration │ └── .keep ├── application_system_test_case.rb ├── channels │ └── application_cable │ │ └── connection_test.rb └── test_helper.rb ├── app ├── assets │ ├── images │ │ ├── .keep │ │ ├── favicon.ico │ │ ├── logo │ │ │ ├── matestack_logo_orange.png │ │ │ └── matestack_logo_symbol.png │ │ └── menu │ │ │ ├── burger.svg │ │ │ ├── close.svg │ │ │ └── arrow.svg │ ├── config │ │ └── manifest.js │ ├── fonts │ │ └── geometrica │ │ │ ├── 3AB51B_0_0.eot │ │ │ ├── 3AB51B_0_0.ttf │ │ │ ├── 3AB51B_0_0.woff │ │ │ ├── 3AB51B_0_0.woff2 │ │ │ └── 3AB51B_0_0.svg │ └── stylesheets │ │ ├── rouge.scss.erb │ │ └── application.scss ├── models │ ├── concerns │ │ └── .keep │ └── application_record.rb ├── controllers │ ├── concerns │ │ └── .keep │ ├── application_controller.rb │ └── docs_app_controller.rb ├── views │ └── layouts │ │ ├── mailer.text.erb │ │ ├── mailer.html.erb │ │ └── application.html.erb ├── helpers │ └── application_helper.rb ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── mailers │ └── application_mailer.rb ├── lib │ └── rouge_render.rb ├── matestack │ ├── docs │ │ ├── pages │ │ │ ├── guides.rb │ │ │ ├── core │ │ │ │ ├── start.rb │ │ │ │ ├── api.rb │ │ │ │ ├── reactive_apps.rb │ │ │ │ ├── ui_components.rb │ │ │ │ └── reactive_components.rb │ │ │ ├── base_api.rb │ │ │ ├── components_api.rb │ │ │ └── base.rb │ │ └── app.rb │ └── components │ │ ├── toc │ │ ├── toc.rb │ │ ├── toc.scss │ │ └── toc.js │ │ ├── footer.scss │ │ ├── registry.rb │ │ ├── footer.rb │ │ ├── md.rb │ │ ├── md.scss │ │ ├── sidebar.scss │ │ ├── header.js │ │ ├── header.scss │ │ ├── header.rb │ │ └── sidebar.rb ├── javascript │ ├── channels │ │ ├── index.js │ │ └── consumer.js │ ├── css │ │ ├── custom-components.scss │ │ ├── animation.scss │ │ └── custom-bootstrap.scss │ └── packs │ │ └── application.js └── jobs │ └── application_job.rb ├── .browserslistrc ├── .ruby-version ├── public ├── apple-touch-icon.png ├── apple-touch-icon-precomposed.png ├── favicon.ico ├── docs │ └── images │ │ ├── concept.png │ │ ├── coming_soon.png │ │ └── demo_screenshot.png ├── robots.txt ├── 500.html ├── 422.html └── 404.html ├── Dockerfile.dev ├── Dockerfile.release ├── create_env.sh ├── config ├── secrets.yml ├── webpack │ ├── environment.js │ ├── test.js │ ├── production.js │ └── development.js ├── spring.rb ├── environment.rb ├── initializers │ ├── mime_types.rb │ ├── filter_parameter_logging.rb │ ├── application_controller_renderer.rb │ ├── cookies_serializer.rb │ ├── backtrace_silencers.rb │ ├── wrap_parameters.rb │ ├── assets.rb │ ├── inflections.rb │ └── content_security_policy.rb ├── boot.rb ├── cable.yml ├── database.yml ├── application.rb ├── locales │ └── en.yml ├── routes.rb ├── storage.yml ├── puma.rb ├── environments │ ├── test.rb │ ├── development.rb │ └── production.rb └── webpacker.yml ├── config.ru ├── dbauth.sh ├── Rakefile ├── bin ├── rake ├── rails ├── yarn ├── webpack ├── webpack-dev-server ├── spring ├── setup └── bundle ├── README.md ├── postcss.config.js ├── db ├── seeds.rb └── schema.rb ├── package.json ├── docker-compose.production.yml ├── .gitignore ├── docker-compose.yml ├── babel.config.js ├── Gemfile ├── .gitlab-ci.yml └── Gemfile.lock /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/system/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/pids/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-2.6.5 2 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/files/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /Dockerfile.dev: -------------------------------------------------------------------------------- 1 | FROM registry.gitlab.com/basemate-ops/workflow/dev:latest -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /Dockerfile.release: -------------------------------------------------------------------------------- 1 | FROM registry.gitlab.com/basemate-ops/workflow/release:latest 2 | -------------------------------------------------------------------------------- /create_env.sh: -------------------------------------------------------------------------------- 1 | echo "" >> ./.env 2 | echo "SECRET_KEY_BASE=$SECRET_KEY_BASE" >> ./.env 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | -------------------------------------------------------------------------------- /config/secrets.yml: -------------------------------------------------------------------------------- 1 | production: 2 | secret_key_base: <%= ENV.fetch("SECRET_KEY_BASE") { "" } %> 3 | -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /config/webpack/environment.js: -------------------------------------------------------------------------------- 1 | const { environment } = require('@rails/webpacker') 2 | 3 | module.exports = environment 4 | -------------------------------------------------------------------------------- /public/docs/images/concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/public/docs/images/concept.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /public/docs/images/coming_soon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/public/docs/images/coming_soon.png -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | Spring.watch( 2 | ".ruby-version", 3 | ".rbenv-vars", 4 | "tmp/restart.txt", 5 | "tmp/caching-dev.txt" 6 | ) 7 | -------------------------------------------------------------------------------- /public/docs/images/demo_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/public/docs/images/demo_screenshot.png -------------------------------------------------------------------------------- /app/assets/fonts/geometrica/3AB51B_0_0.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/fonts/geometrica/3AB51B_0_0.eot -------------------------------------------------------------------------------- /app/assets/fonts/geometrica/3AB51B_0_0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/fonts/geometrica/3AB51B_0_0.ttf -------------------------------------------------------------------------------- /app/assets/fonts/geometrica/3AB51B_0_0.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/fonts/geometrica/3AB51B_0_0.woff -------------------------------------------------------------------------------- /app/assets/fonts/geometrica/3AB51B_0_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/fonts/geometrica/3AB51B_0_0.woff2 -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: 'from@example.com' 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /app/assets/images/logo/matestack_logo_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/images/logo/matestack_logo_orange.png -------------------------------------------------------------------------------- /app/assets/images/logo/matestack_logo_symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matestack/matestack-docs/HEAD/app/assets/images/logo/matestack_logo_symbol.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | include Matestack::Ui::Core::ApplicationHelper 3 | include Components::Registry 4 | end 5 | -------------------------------------------------------------------------------- /config/webpack/test.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /config/webpack/production.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'production' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /app/lib/rouge_render.rb: -------------------------------------------------------------------------------- 1 | require 'redcarpet' 2 | require 'rouge' 3 | require 'rouge/plugins/redcarpet' 4 | 5 | class RougeRender < Redcarpet::Render::HTML 6 | include Rouge::Plugins::Redcarpet 7 | end 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/webpack/development.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 5 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/guides.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Guides < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/guides/#{@file}?ref=#{@branch}" 5 | @sub_title = "Guides" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /dbauth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ ! -f ./.env ] 3 | then 4 | POSTGRES_USER="postgres" 5 | POSTGRES_PASSWORD=$(openssl rand -base64 16) 6 | echo "POSTGRES_USER=$POSTGRES_USER" >> ./.env 7 | echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> ./.env 8 | fi 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/core/start.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Core::Start < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/start/#{@file}?ref=#{@branch}" 5 | @sub_title = "Start" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /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: matestack_docs_production 11 | -------------------------------------------------------------------------------- /app/javascript/channels/index.js: -------------------------------------------------------------------------------- 1 | // Load all the channels within this directory and all subdirectories. 2 | // Channel files must be named *_channel.js. 3 | 4 | const channels = require.context('.', true, /_channel\.js$/) 5 | channels.keys().forEach(channels) 6 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/core/api.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Core::Api < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/api/100-components/#{@file}?ref=#{@branch}" 5 | @sub_title = "API" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Matestack::UI::Core Documentation App 2 | 3 | This documentation app is built using the Matestack::Ui::Core itself. Dive into the code to see how a real `matestack` app looks like! 4 | 5 | The documentation application runs [here](https://docs.matestack.io). 6 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/base_api.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::BaseApi < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/api/000-base/#{@file}?ref=#{@branch}" 5 | @sub_title = "Base API Documentation" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/matestack/components/toc/toc.rb: -------------------------------------------------------------------------------- 1 | class Components::Toc::Toc < Matestack::Ui::VueJsComponent 2 | 3 | vue_js_component_name "components-toc" 4 | 5 | def response 6 | div class: "components-toc" do 7 | div id: "toc" 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /app/javascript/css/custom-components.scss: -------------------------------------------------------------------------------- 1 | @import "../../matestack/components/footer"; 2 | @import "../../matestack/components/header"; 3 | @import "../../matestack/components/sidebar"; 4 | @import "../../matestack/components/md"; 5 | @import "../../matestack/components/toc/toc"; 6 | -------------------------------------------------------------------------------- /app/matestack/components/footer.scss: -------------------------------------------------------------------------------- 1 | footer { 2 | margin-top: 200px; 3 | background-color: $m_light_grey; 4 | bottom: 0; 5 | width: 100%; 6 | padding: 1rem 0; 7 | p { 8 | font-size: 1rem; 9 | color: $m_grey; 10 | margin-bottom: 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/core/reactive_apps.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Core::ReactiveApps < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/reactive_apps/#{@file}?ref=#{@branch}" 5 | @sub_title = "Reactive apps" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/core/ui_components.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Core::UiComponents < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/ui_components/#{@file}?ref=#{@branch}" 5 | @sub_title = "UI components" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/components_api.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::ComponentsApi < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/api/100-components/#{@file}?ref=#{@branch}" 5 | @sub_title = "Components API Documentation" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-import'), 4 | require('postcss-flexbugs-fixes'), 5 | require('postcss-preset-env')({ 6 | autoprefixer: { 7 | flexbox: 'no-2009' 8 | }, 9 | stage: 3 10 | }) 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/core/reactive_components.rb: -------------------------------------------------------------------------------- 1 | class Docs::Pages::Core::ReactiveComponents < Docs::Pages::Base 2 | def prepare 3 | super 4 | @github_api_md_path = "#{@github_base_url}/docs/reactive_components/#{@file}?ref=#{@branch}" 5 | @sub_title = "Reactive components" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | APP_PATH = File.expand_path('../config/application', __dir__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /app/javascript/channels/consumer.js: -------------------------------------------------------------------------------- 1 | // Action Cable provides the framework to deal with WebSockets in Rails. 2 | // You can generate new channels where WebSocket features live using the `rails generate channel` command. 3 | 4 | import { createConsumer } from "@rails/actioncable" 5 | 6 | export default createConsumer() 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /app/matestack/components/registry.rb: -------------------------------------------------------------------------------- 1 | module Components::Registry 2 | 3 | Matestack::Ui::Core::Component::Registry.register_components( 4 | docs_footer: Components::Footer, 5 | docs_header: Components::Header, 6 | docs_sidebar: Components::Sidebar, 7 | docs_md: Components::Md, 8 | toc: Components::Toc::Toc 9 | ) 10 | 11 | end 12 | -------------------------------------------------------------------------------- /bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | begin 5 | exec "yarnpkg", *ARGV 6 | rescue Errno::ENOENT 7 | $stderr.puts "Yarn executable was not detected in the system." 8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 9 | exit 1 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) 7 | # Character.create(name: 'Luke', movie: movies.first) 8 | -------------------------------------------------------------------------------- /app/matestack/docs/app.rb: -------------------------------------------------------------------------------- 1 | class Docs::App < Matestack::Ui::App 2 | 3 | def response 4 | docs_header 5 | main class: 'pt-5' do 6 | docs_sidebar currentPage: context[:request].path 7 | yield_page slots: { loading_state: loading_state_element } 8 | end 9 | # docs_footer 10 | end 11 | 12 | def loading_state_element 13 | slot do 14 | div class: 'bouncing-loader' 15 | end 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require_relative '../config/environment' 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bin/webpack: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" 4 | ENV["NODE_ENV"] ||= "development" 5 | 6 | require "pathname" 7 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 8 | Pathname.new(__FILE__).realpath) 9 | 10 | require "bundler/setup" 11 | 12 | require "webpacker" 13 | require "webpacker/webpack_runner" 14 | 15 | APP_ROOT = File.expand_path("..", __dir__) 16 | Dir.chdir(APP_ROOT) do 17 | Webpacker::WebpackRunner.run(ARGV) 18 | end 19 | -------------------------------------------------------------------------------- /bin/webpack-dev-server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" 4 | ENV["NODE_ENV"] ||= "development" 5 | 6 | require "pathname" 7 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 8 | Pathname.new(__FILE__).realpath) 9 | 10 | require "bundler/setup" 11 | 12 | require "webpacker" 13 | require "webpacker/dev_server_runner" 14 | 15 | APP_ROOT = File.expand_path("..", __dir__) 16 | Dir.chdir(APP_ROOT) do 17 | Webpacker::DevServerRunner.run(ARGV) 18 | end 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "matestack_docs", 3 | "private": true, 4 | "dependencies": { 5 | "@rails/actioncable": "^6.0.0", 6 | "@rails/activestorage": "^6.0.0", 7 | "@rails/ujs": "^6.0.0", 8 | "@rails/webpacker": "4.2.2", 9 | "bootstrap": "^4.5.0", 10 | "jquery": "^3.5.1", 11 | "matestack-ui-core": "https://github.com/matestack/matestack-ui-core#v1.3.0", 12 | "turbolinks": "^5.2.0" 13 | }, 14 | "version": "0.1.0", 15 | "devDependencies": { 16 | "webpack-dev-server": "^3.11.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: postgresql 3 | encoding: unicode 4 | host: postgres 5 | username: <%= ENV.fetch("POSTGRES_USER") { "postgres" } %> 6 | password: <%= ENV.fetch("POSTGRES_PASSWORD") { "postgres" } %> 7 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 8 | 9 | test: 10 | <<: *default 11 | database: test 12 | 13 | development: 14 | <<: *default 15 | database: development 16 | 17 | staging: 18 | <<: *default 19 | database: staging 20 | 21 | production: 22 | <<: *default 23 | database: production 24 | -------------------------------------------------------------------------------- /app/controllers/docs_app_controller.rb: -------------------------------------------------------------------------------- 1 | class DocsAppController < ApplicationController 2 | matestack_app Docs::App 3 | 4 | def core_start 5 | render Docs::Pages::Core::Start 6 | end 7 | 8 | def core_ui_components 9 | render Docs::Pages::Core::UiComponents 10 | end 11 | 12 | def core_reactive_components 13 | render Docs::Pages::Core::ReactiveComponents 14 | end 15 | 16 | def core_reactive_apps 17 | render Docs::Pages::Core::ReactiveApps 18 | end 19 | 20 | def core_api 21 | render Docs::Pages::Core::Api 22 | end 23 | 24 | 25 | end 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads Spring without using Bundler, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | unless defined?(Spring) 7 | require 'rubygems' 8 | require 'bundler' 9 | 10 | lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) 11 | spring = lockfile.specs.detect { |spec| spec.name == 'spring' } 12 | if spring 13 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path 14 | gem 'spring', spring.version 15 | require 'spring/binstub' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/matestack/components/toc/toc.scss: -------------------------------------------------------------------------------- 1 | .components-toc { 2 | #toc{ 3 | border-left: 1px solid #eee; 4 | font-size: 14px; 5 | position: absolute; 6 | background-color: white; 7 | top: 215px; 8 | max-height: calc(100vh - 120px); 9 | overflow-y: auto; 10 | .toc-title{ 11 | margin-left: 14px; 12 | } 13 | ul { 14 | line-height: 25px; 15 | list-style-type: none; 16 | margin-left: -25px; 17 | } 18 | a { 19 | color: grey; 20 | 21 | &.active{ 22 | color: #EE3B23; 23 | font-weight: bold; 24 | } 25 | } 26 | 27 | &.sticky{ 28 | position: fixed; 29 | top: 80px; 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /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 | # Add Yarn node_modules folder to the asset load path. 9 | Rails.application.config.assets.paths << Rails.root.join('node_modules') 10 | 11 | # Precompile additional assets. 12 | # application.js, application.css, and all non-JS/CSS in the app/assets 13 | # folder are already added. 14 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 15 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Matestack Documentation 8 | <%= csrf_meta_tags %> 9 | <%= csp_meta_tag %> 10 | 11 | <%= stylesheet_link_tag 'application', media: 'all' %> 12 | <%= stylesheet_pack_tag 'application', media: 'all' %> 13 | <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> 14 | <%= favicon_link_tag asset_path('favicon.ico') %> 15 | 16 | 17 | 18 |
19 | <%= yield %> 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative 'boot' 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module MatestackDocs 10 | class Application < Rails::Application 11 | # Initialize configuration defaults for originally generated Rails version. 12 | config.load_defaults 6.0 13 | 14 | # Settings in config/environments/* take precedence over those specified here. 15 | # Application configuration can go into files in config/initializers 16 | # -- all .rb files in that directory are automatically loaded after loading 17 | # the framework and any gems in your application. 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/assets/stylesheets/rouge.scss.erb: -------------------------------------------------------------------------------- 1 | <% require 'rouge' %> 2 | <%= Rouge::Themes::Github.new.render %> 3 | div.highlight { 4 | margin-bottom: 20px; 5 | 6 | @media only screen and (max-width: 600px) { 7 | overflow: scroll; 8 | font-size: 10px; 9 | } 10 | 11 | @media only screen and (max-width: 400px) { 12 | overflow: scroll; 13 | font-size: 9px; 14 | } 15 | } 16 | 17 | pre.highlight { 18 | display: block; 19 | white-space: pre-wrap; 20 | padding: 2rem 1.5rem; 21 | margin: 0; 22 | 23 | code { 24 | background: none; 25 | padding: 0; 26 | white-space: pre-wrap; 27 | } 28 | } 29 | 30 | code { 31 | background: #eaecf3; 32 | padding: 3px 6px; 33 | white-space: nowrap; 34 | border-radius: 5px 35 | } 36 | 37 | .n { 38 | color: #ea2f0e; 39 | } 40 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.scss: -------------------------------------------------------------------------------- 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, or any plugin's 6 | * 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_self 14 | */ 15 | 16 | @import "./rouge"; 17 | 18 | -------------------------------------------------------------------------------- /app/matestack/components/footer.rb: -------------------------------------------------------------------------------- 1 | class Components::Footer < Matestack::Ui::StaticComponent 2 | 3 | def response 4 | footer class: 'footer' do 5 | div class: 'container' do 6 | div class: 'row' do 7 | div class: 'col-md-12 text-center' do 8 | paragraph do 9 | plain 'Released under the ' 10 | link path: 'https://opensource.org/licenses/MIT', text: 'MIT License' 11 | end 12 | paragraph text: "© #{Time.now.year} Matestack GmbH" 13 | paragraph do 14 | link path: 'https://matestack.io/imprint', text: 'Privacy & Legal' 15 | plain ' | ' 16 | link path: 'https://matestack.io#sponsor', text: 'Support' 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /app/assets/images/menu/burger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 2 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docker-compose.production.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | 4 | postgres: 5 | image: registry.gitlab.com/basemate-ops/workflow/postgres 6 | expose: 7 | - 5432 8 | volumes: 9 | - data-volume:/var/lib/postgresql/data 10 | environment: 11 | POSTGRES_DB: "production" 12 | env_file: 13 | - ./.env 14 | 15 | rails: 16 | image: registry.gitlab.com/matestack/matestack-docs 17 | ports: 18 | - "3001:3000" 19 | links: 20 | - postgres 21 | environment: 22 | RAILS_ENV: "production" 23 | POSTGRES_DB: "production" 24 | SECRET_KEY_BASE: $SECRET_KEY_BASE 25 | GITHUB_USERNAME: $GITHUB_USERNAME 26 | GITHUB_PERSONAL_ACCESS_TOKEN: $GITHUB_PERSONAL_ACCESS_TOKEN 27 | env_file: 28 | - ./.env 29 | command: "bundle exec rails server --binding 0.0.0.0 --port 3000" 30 | 31 | volumes: 32 | data-volume: 33 | -------------------------------------------------------------------------------- /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 `rails 6 | # db:schema:load`. When creating a new database, `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: 0) do 14 | 15 | # These are extensions that must be enabled in order to support this database 16 | enable_extension "plpgsql" 17 | 18 | end 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore all logfiles and tempfiles. 11 | /log/* 12 | /tmp/* 13 | !/log/.keep 14 | !/tmp/.keep 15 | 16 | # Ignore pidfiles, but keep the directory. 17 | /tmp/pids/* 18 | !/tmp/pids/ 19 | !/tmp/pids/.keep 20 | 21 | # Ignore uploaded files in development. 22 | /storage/* 23 | !/storage/.keep 24 | 25 | /public/assets 26 | .byebug_history 27 | 28 | # Ignore master key for decrypting credentials and more. 29 | /config/master.key 30 | 31 | /public/packs 32 | /public/packs-test 33 | /node_modules 34 | /yarn-error.log 35 | yarn-debug.log* 36 | .yarn-integrity 37 | 38 | .env 39 | -------------------------------------------------------------------------------- /app/assets/images/menu/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 3 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | 4 | postgres: 5 | image: registry.gitlab.com/basemate-ops/workflow/postgres 6 | expose: 7 | - 5432 8 | volumes: 9 | - data-volume:/var/lib/postgresql/data 10 | environment: 11 | POSTGRES_USER: postgres 12 | POSTGRES_PASSWORD: postgres 13 | POSTGRES_DB: development 14 | 15 | rails: 16 | build: 17 | context: . 18 | dockerfile: ./Dockerfile.dev 19 | ports: 20 | - "3000:3000" 21 | links: 22 | - postgres 23 | environment: 24 | RAILS_ENV: "development" 25 | POSTGRES_DB: "development" 26 | GITHUB_USERNAME: $GITHUB_USERNAME 27 | GITHUB_PERSONAL_ACCESS_TOKEN: $GITHUB_PERSONAL_ACCESS_TOKEN 28 | volumes: 29 | - ./:/app 30 | - gem-volume:/usr/local/bundle 31 | - node-volume:/app/node_modules 32 | command: "bundle exec rails server --binding 0.0.0.0 --port 3000" 33 | 34 | volumes: 35 | data-volume: 36 | gem-volume: 37 | node-volume: 38 | -------------------------------------------------------------------------------- /app/assets/images/menu/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 3 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/javascript/packs/application.js: -------------------------------------------------------------------------------- 1 | // This file is automatically compiled by Webpack, along with any other files 2 | // present in this directory. You're encouraged to place your actual application logic in 3 | // a relevant structure within app/javascript and only use these pack files to reference 4 | // that code so it'll be compiled. 5 | 6 | require("@rails/ujs").start() 7 | require("@rails/activestorage").start() 8 | require("channels") 9 | 10 | import 'css/custom-bootstrap' 11 | import 'css/animation' 12 | 13 | // Uncomment to copy all static images under ../images to the output folder and reference 14 | // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) 15 | // or the `imagePath` JavaScript helper below. 16 | // 17 | // const images = require.context('../images', true) 18 | // const imagePath = (name) => images(name, true) 19 | 20 | import MatestackUiCore from 'matestack-ui-core' 21 | import '../../matestack/components/header' 22 | import '../../matestack/components/toc/toc' 23 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | 3 | root :to => redirect('/docs/start/README.md') 4 | 5 | scope :docs do 6 | get '/guides/*key', :to => redirect('/docs/start/README.md') #redirect former guides path 7 | get '/api/(000-)base/*key', :to => redirect('/docs/start/README.md') # redirect former base api path 8 | get '/api/(100-)components/*key', :to => redirect('/docs/api/%{key}.md') # redirect former component api path 9 | 10 | 11 | get '/start/*key', to: 'docs_app#core_start', as: 'core_start' 12 | get '/ui_components/*key', to: 'docs_app#core_ui_components', as: 'core_ui_components' 13 | get '/reactive_components/*key', to: 'docs_app#core_reactive_components', as: 'core_reactive_components' 14 | get '/reactive_apps/*key', to: 'docs_app#core_reactive_apps', as: 'core_reactive_apps' 15 | get '/api/*key', to: 'docs_app#core_api', as: 'core_api' 16 | 17 | scope :addons do 18 | get 'start/*key', to: 'docs_app#addons', as: 'addons_start' 19 | end 20 | 21 | end 22 | 23 | 24 | end 25 | -------------------------------------------------------------------------------- /app/matestack/components/md.rb: -------------------------------------------------------------------------------- 1 | require 'rest-client' 2 | 3 | class Components::Md < Matestack::Ui::StaticComponent 4 | 5 | def response 6 | div class: "markdown-content", attributes: { "v-pre": true } do 7 | plain parsed_markdown.html_safe 8 | end 9 | end 10 | 11 | def parsed_markdown 12 | if @options[:remote] == true 13 | result = ::Rails.cache.fetch("components_md_remote_#{options[:path]}", expires_in: 5.minutes) do 14 | Base64.decode64(JSON.parse(RestClient.get(@options[:path]))['content']) 15 | end 16 | @md = result 17 | else 18 | @md = File.read("#{::Rails.root}/app/#{@options[:path]}.md") 19 | end 20 | 21 | begin 22 | if options[:lang].present? 23 | @md.prepend("```#{options[:lang]} \n") 24 | @md.concat("\n ```") 25 | end 26 | rescue => e 27 | raise e 28 | end 29 | 30 | renderer = RougeRender.new(with_toc_data: true) 31 | parser = Redcarpet::Markdown.new(renderer, fenced_code_blocks: true) 32 | parser.render(@md.encode('utf-8', invalid: :replace, undef: :replace, replace: '_')) 33 | end 34 | 35 | end 36 | -------------------------------------------------------------------------------- /app/javascript/css/animation.scss: -------------------------------------------------------------------------------- 1 | //ANIMATIONS 2 | 3 | .matestack-page-container{ 4 | .loading-state-element-wrapper{ 5 | position: fixed; 6 | height: 40px; 7 | width: 40px; 8 | left: calc(50vw - 20px); 9 | top: calc(50vh - 20px); 10 | opacity: 0; 11 | overflow: hidden; 12 | transition: opacity 0.3s ease-in-out; 13 | 14 | &.loading { 15 | opacity: 1; 16 | } 17 | 18 | .bouncing-loader{ 19 | width: 60px; 20 | height: 60px; 21 | position: fixed; 22 | top: 50%; 23 | margin-top: -30px; 24 | left: 50%; 25 | margin-left: 100px; 26 | border-radius: 30px; 27 | background: #ff3b14; 28 | animation: bounce 0.7s ease-in-out infinite; 29 | } 30 | } 31 | 32 | .matestack-page-wrapper { 33 | opacity: 1; 34 | transition: opacity 0.2s ease-in-out; 35 | 36 | &.loading { 37 | opacity: 0; 38 | } 39 | } 40 | } 41 | 42 | @keyframes bounce { 43 | 0%{ 44 | transform: scale(0.7); 45 | opacity: 0.7 46 | } 47 | 75%{ 48 | transform: scale(0.5); 49 | opacity: 1 50 | } 51 | 100%{ 52 | transform: scale(0.7); 53 | opacity: 0.7 54 | } 55 | } -------------------------------------------------------------------------------- /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 | # Install JavaScript dependencies 21 | # system('bin/yarn') 22 | 23 | # puts "\n== Copying sample files ==" 24 | # unless File.exist?('config/database.yml') 25 | # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' 26 | # end 27 | 28 | puts "\n== Preparing database ==" 29 | system! 'bin/rails db:prepare' 30 | 31 | puts "\n== Removing old logs and tempfiles ==" 32 | system! 'bin/rails log:clear tmp:clear' 33 | 34 | puts "\n== Restarting application server ==" 35 | system! 'bin/rails restart' 36 | end 37 | -------------------------------------------------------------------------------- /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 | 9 | # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) 10 | # amazon: 11 | # service: S3 12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> 13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> 14 | # region: us-east-1 15 | # bucket: your_own_bucket 16 | 17 | # Remember not to checkin your GCS keyfile to a repository 18 | # google: 19 | # service: GCS 20 | # project: your_project 21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> 22 | # bucket: your_own_bucket 23 | 24 | # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) 25 | # microsoft: 26 | # service: AzureStorage 27 | # storage_account_name: your_account_name 28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> 29 | # container: your_container_name 30 | 31 | # mirror: 32 | # service: Mirror 33 | # primary: local 34 | # mirrors: [ amazon, google, microsoft ] 35 | -------------------------------------------------------------------------------- /app/matestack/components/md.scss: -------------------------------------------------------------------------------- 1 | .markdown-content { 2 | margin-top: 40px; 3 | 4 | ol{ 5 | padding-inline-start: 20px; 6 | } 7 | 8 | ol > li { 9 | a { 10 | display: inline-block; 11 | padding: 0.2rem 0.1rem; 12 | font-size: 1.2rem; 13 | font-weight: bold; 14 | } 15 | } 16 | 17 | h1 { 18 | margin-top: 6rem; 19 | margin-bottom: 5rem; 20 | font-size: 2rem; 21 | line-height: 2rem; 22 | } 23 | 24 | h2, h3, h4, h5, h6 { 25 | padding-top: 3.5rem; 26 | margin-top: -2.5rem; 27 | } 28 | 29 | h2 { 30 | font-size: 1.5rem; 31 | line-height: 2.5rem; 32 | padding-top: 4.5rem; 33 | margin-bottom: 0.75rem; 34 | } 35 | 36 | h3 { 37 | font-size: 1.25rem; 38 | line-height: 2rem; 39 | margin-bottom: 0.75rem; 40 | } 41 | 42 | h4 { 43 | font-size: 1rem; 44 | line-height: 1.75rem; 45 | margin-bottom: 0.75rem; 46 | } 47 | 48 | h5 { 49 | font-size: 0.825rem; 50 | line-height: 1.25rem; 51 | margin-bottom: 0.75rem; 52 | } 53 | 54 | h6 { 55 | font-size: 0.75rem; 56 | line-height: 1.25rem; 57 | margin-bottom: 0.75rem; 58 | } 59 | 60 | // img { 61 | // width: 100%; 62 | // } 63 | 64 | .highlight.html{ 65 | span.err { 66 | color: inherit; 67 | background: inherit; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/matestack/docs/pages/base.rb: -------------------------------------------------------------------------------- 1 | require 'rest-client' 2 | 3 | class Docs::Pages::Base < Matestack::Ui::Page 4 | 5 | def prepare 6 | # Final TODO: change branch to master 7 | # Final TODO: change line below to call GitHub API like in sidebar (?) 8 | @github_base_url = "https://#{ENV['GITHUB_USERNAME']}:#{ENV['GITHUB_PERSONAL_ACCESS_TOKEN']}@api.github.com/repos/matestack/matestack-ui-core/contents" 9 | @branch = 'master' 10 | case context[:params][:format] 11 | when 'md' 12 | @file = context[:params][:key] + '.md' 13 | when 'rb' 14 | @file = context[:params][:key] + '.rb' 15 | @md_language_wrapper = 'ruby' 16 | else 17 | @file = context[:params][:key] + '/README.md' 18 | end 19 | @github_api_md_path = nil 20 | @sub_title = nil 21 | end 22 | 23 | def response 24 | hero 25 | content 26 | end 27 | 28 | def hero 29 | div class: 'hero' 30 | end 31 | 32 | def content 33 | section id: 'content' do 34 | div class: 'container-fluid' do 35 | div class: 'row py-4 px-5' do 36 | div class: 'col-md-12 col-xl-9' do 37 | docs_md path: @github_api_md_path, remote: true, lang: @md_language_wrapper 38 | end 39 | div class: 'col-3 d-none d-xl-flex' do 40 | async rerender_on: "page_loaded", id: "toc-list" do 41 | toc 42 | end 43 | end 44 | end 45 | end 46 | end 47 | end 48 | 49 | end 50 | -------------------------------------------------------------------------------- /app/matestack/components/sidebar.scss: -------------------------------------------------------------------------------- 1 | .sidebar { 2 | height: calc(100vh - 56px); 3 | width: 260px; /* 0 width - change this with JavaScript */ 4 | // padding-right: 15px; 5 | position: fixed !important; /* Stay in place */ 6 | z-index: 1; /* Stay on top */ 7 | top: 56px; 8 | left: 0; 9 | overflow-x: hidden; /* Disable horizontal scroll */ 10 | transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ 11 | } 12 | 13 | .sidebar-sticky.menu { 14 | padding-bottom: 2rem; 15 | } 16 | 17 | .links-btn { 18 | margin: 0px; 19 | padding: 0px; 20 | border: none; 21 | text-align: left; 22 | } 23 | 24 | #sidebar { 25 | .list-group-item { 26 | border: none; 27 | border-left: 3px solid transparent; 28 | background-color: $m_dark; 29 | } 30 | 31 | .list-group-item-action { 32 | color: $m_light_grey; 33 | } 34 | 35 | .list-group-item-action:hover, .list-group-item-action:focus { 36 | color: $m_light_grey; 37 | background-color: $m_dark_grey; 38 | } 39 | 40 | ul a { 41 | font-family: "Nunito Sans"; 42 | font-weight: 300; 43 | } 44 | 45 | .list-group-item.active { 46 | border-left: 3px solid $m_orange; 47 | background-color: $m_dark_grey; 48 | } 49 | } 50 | 51 | .sidebar.closed { 52 | margin-left: -280px; 53 | } 54 | .sidebar.open { 55 | margin-left: 0px; 56 | } 57 | 58 | @media (max-width: $medium_screen) { 59 | .sidebar { 60 | margin-left: -280px; 61 | } 62 | .sidebar.open { 63 | margin-left: 0px; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /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 | # # If you are using webpack-dev-server then specify webpack-dev-server host 15 | # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? 16 | 17 | # # Specify URI for violation reports 18 | # # policy.report_uri "/csp-violation-report-endpoint" 19 | # end 20 | 21 | # If you are using UJS then enable automatic nonce generation 22 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } 23 | 24 | # Set the nonce only to specific directives 25 | # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) 26 | 27 | # Report CSP violations to a specified URI 28 | # For further information see the following documentation: 29 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only 30 | # Rails.application.config.content_security_policy_report_only = true 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | var validEnv = ['development', 'test', 'production'] 3 | var currentEnv = api.env() 4 | var isDevelopmentEnv = api.env('development') 5 | var isProductionEnv = api.env('production') 6 | var isTestEnv = api.env('test') 7 | 8 | if (!validEnv.includes(currentEnv)) { 9 | throw new Error( 10 | 'Please specify a valid `NODE_ENV` or ' + 11 | '`BABEL_ENV` environment variables. Valid values are "development", ' + 12 | '"test", and "production". Instead, received: ' + 13 | JSON.stringify(currentEnv) + 14 | '.' 15 | ) 16 | } 17 | 18 | return { 19 | presets: [ 20 | isTestEnv && [ 21 | '@babel/preset-env', 22 | { 23 | targets: { 24 | node: 'current' 25 | } 26 | } 27 | ], 28 | (isProductionEnv || isDevelopmentEnv) && [ 29 | '@babel/preset-env', 30 | { 31 | forceAllTransforms: true, 32 | useBuiltIns: 'entry', 33 | corejs: 3, 34 | modules: false, 35 | exclude: ['transform-typeof-symbol'] 36 | } 37 | ] 38 | ].filter(Boolean), 39 | plugins: [ 40 | 'babel-plugin-macros', 41 | '@babel/plugin-syntax-dynamic-import', 42 | isTestEnv && 'babel-plugin-dynamic-import-node', 43 | '@babel/plugin-transform-destructuring', 44 | [ 45 | '@babel/plugin-proposal-class-properties', 46 | { 47 | loose: true 48 | } 49 | ], 50 | [ 51 | '@babel/plugin-proposal-object-rest-spread', 52 | { 53 | useBuiltIns: true 54 | } 55 | ], 56 | [ 57 | '@babel/plugin-transform-runtime', 58 | { 59 | helpers: false, 60 | regenerator: true, 61 | corejs: false 62 | } 63 | ], 64 | [ 65 | '@babel/plugin-transform-regenerator', 66 | { 67 | async: false 68 | } 69 | ] 70 | ].filter(Boolean) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/matestack/components/header.js: -------------------------------------------------------------------------------- 1 | MatestackUiCore.Vue.component('components-header', { 2 | mixins: [MatestackUiCore.componentMixin], 3 | data: function(){ 4 | return { 5 | sidebarOpen: false, 6 | expanded: false, 7 | showHeaderShadow: false 8 | } 9 | }, 10 | methods: { 11 | sidebarToggle: function() { 12 | var sidebarElement = document.getElementById("sidebar"); 13 | if (sidebarElement.classList.contains("closed")) { 14 | this.openSideBar(); 15 | } else { 16 | this.closeSideBar(); 17 | } 18 | }, 19 | openSideBar: function(){ 20 | var sidebarElement = document.getElementById("sidebar"); 21 | var contentElement = document.getElementsByClassName("matestack-page-root")[0]; 22 | this.sidebarOpen = true; 23 | contentElement.classList.remove("sidebar-closed") 24 | sidebarElement.classList.remove("closed") 25 | sidebarElement.classList.add("open") 26 | }, 27 | closeSideBar: function(){ 28 | var sidebarElement = document.getElementById("sidebar"); 29 | var contentElement = document.getElementsByClassName("matestack-page-root")[0]; 30 | this.sidebarOpen = false; 31 | contentElement.classList.add("sidebar-closed") 32 | sidebarElement.classList.add("closed") 33 | sidebarElement.classList.remove("open") 34 | }, 35 | resizeCallback: function(){ 36 | if (window.innerWidth <= 768){ 37 | this.closeSideBar(); 38 | } else { 39 | this.openSideBar(); 40 | } 41 | } 42 | }, 43 | mounted: function(){ 44 | if (window.innerWidth <= 768){ 45 | this.sidebarOpen = true; 46 | } 47 | window.addEventListener('resize', this.resizeCallback); 48 | var self = this; 49 | MatestackUiCore.matestackEventHub.$on("page_loaded", function(){ 50 | if (window.innerWidth <= 768){ 51 | self.closeSideBar(); 52 | } 53 | }) 54 | MatestackUiCore.matestackEventHub.$on("page_loading_triggered", function(){ 55 | if (window.innerWidth <= 768){ 56 | self.closeSideBar(); 57 | } 58 | }) 59 | } 60 | }); 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/webpacker.yml: -------------------------------------------------------------------------------- 1 | # Note: You must restart bin/webpack-dev-server for changes to take effect 2 | 3 | default: &default 4 | source_path: app/javascript 5 | source_entry_path: packs 6 | public_root_path: public 7 | public_output_path: packs 8 | cache_path: tmp/cache/webpacker 9 | check_yarn_integrity: false 10 | webpack_compile_output: true 11 | 12 | # Additional paths webpack should lookup modules 13 | # ['app/assets', 'engine/foo/app/assets'] 14 | resolved_paths: [] 15 | 16 | # Reload manifest.json on all requests so we reload latest compiled packs 17 | cache_manifest: false 18 | 19 | # Extract and emit a css file 20 | extract_css: false 21 | 22 | static_assets_extensions: 23 | - .jpg 24 | - .jpeg 25 | - .png 26 | - .gif 27 | - .tiff 28 | - .ico 29 | - .svg 30 | - .eot 31 | - .otf 32 | - .ttf 33 | - .woff 34 | - .woff2 35 | 36 | extensions: 37 | - .mjs 38 | - .js 39 | - .sass 40 | - .scss 41 | - .css 42 | - .module.sass 43 | - .module.scss 44 | - .module.css 45 | - .png 46 | - .svg 47 | - .gif 48 | - .jpeg 49 | - .jpg 50 | 51 | development: 52 | <<: *default 53 | compile: true 54 | 55 | # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules 56 | check_yarn_integrity: true 57 | 58 | # Reference: https://webpack.js.org/configuration/dev-server/ 59 | dev_server: 60 | https: false 61 | host: localhost 62 | port: 3035 63 | public: localhost:3035 64 | hmr: false 65 | # Inline should be set to true if using HMR 66 | inline: true 67 | overlay: true 68 | compress: true 69 | disable_host_check: true 70 | use_local_ip: false 71 | quiet: false 72 | pretty: false 73 | headers: 74 | 'Access-Control-Allow-Origin': '*' 75 | watch_options: 76 | ignored: '**/node_modules/**' 77 | 78 | 79 | test: 80 | <<: *default 81 | compile: true 82 | 83 | # Compile test packs to a separate directory 84 | public_output_path: packs-test 85 | 86 | production: 87 | <<: *default 88 | 89 | # Production depends on precompilation of packs prior to booting for performance. 90 | compile: false 91 | 92 | # Extract and emit a css file 93 | extract_css: true 94 | 95 | # Cache manifest.json for performance 96 | cache_manifest: true 97 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 | 4 | ruby '2.6.5' 5 | 6 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7 | gem 'rails', '~> 6.0.3', '>= 6.0.3.2' 8 | # Use postgresql as the database for Active Record 9 | gem 'pg', '>= 0.18', '< 2.0' 10 | # Use Puma as the app server 11 | gem 'puma', '~> 4.1' 12 | # Use SCSS for stylesheets 13 | gem 'sass-rails', '>= 6' 14 | # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 15 | gem 'webpacker', '~> 4.0' 16 | # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 17 | # gem 'turbolinks', '~> 5' 18 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 19 | gem 'jbuilder', '~> 2.7' 20 | # Use Redis adapter to run Action Cable in production 21 | # gem 'redis', '~> 4.0' 22 | # Use Active Model has_secure_password 23 | # gem 'bcrypt', '~> 3.1.7' 24 | 25 | # Use Active Storage variant 26 | # gem 'image_processing', '~> 1.2' 27 | 28 | gem 'matestack-ui-core', '~> 1.1' 29 | 30 | # for calling Github API 31 | gem 'rest-client' 32 | 33 | # for markdown usage 34 | gem 'redcarpet' 35 | 36 | # for syntax highlighting 37 | gem 'rouge' 38 | 39 | # Reduces boot times through caching; required in config/boot.rb 40 | gem 'bootsnap', '>= 1.4.2', require: false 41 | 42 | group :development, :test do 43 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console 44 | gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 45 | end 46 | 47 | group :development do 48 | # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 49 | gem 'web-console', '>= 3.3.0' 50 | gem 'listen', '~> 3.2' 51 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 52 | gem 'spring' 53 | gem 'spring-watcher-listen', '~> 2.0.0' 54 | end 55 | 56 | group :test do 57 | # Adds support for Capybara system testing and selenium driver 58 | gem 'capybara', '>= 2.15' 59 | gem 'selenium-webdriver' 60 | # Easy installation and use of web drivers to run system tests with browsers 61 | gem 'webdrivers' 62 | end 63 | 64 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 65 | gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 66 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/javascript/css/custom-bootstrap.scss: -------------------------------------------------------------------------------- 1 | // Styleguide Color Palette 2 | $m_orange: #ff3b14; 3 | $m_dark: #1b1d35; 4 | $m_dark_grey: #323349; 5 | $m_grey: #606171; 6 | $m_lighter_grey: #EE3B23; 7 | $m_light_grey: #e8e8eb; 8 | $m_bright: #f4f4f5; 9 | $m_white: #ffffff; 10 | 11 | $small_screen: 576px; 12 | $medium_screen: 768px; 13 | $big_screen: 992px; 14 | 15 | @import "~bootstrap/scss/functions"; 16 | @import "~bootstrap/scss/variables"; 17 | 18 | $theme-colors: ( 19 | "primary": $m_orange, 20 | "dark": $m_dark 21 | ); 22 | 23 | $link-color: $m_orange; 24 | $link-hover-color: darken($link-color, 15%); 25 | 26 | @import "~bootstrap/scss/bootstrap"; 27 | 28 | .matestack_page_content { 29 | overflow-x: hidden; 30 | } 31 | 32 | body { 33 | background-color: $m_white; 34 | } 35 | 36 | .hero { 37 | position: absolute; 38 | width: 100%; 39 | height: 200px; 40 | background-color: $m_light_grey; 41 | } 42 | 43 | @font-face { 44 | font-family: 'Geometrica'; 45 | src: url('../../assets/fonts/geometrica/3AB51B_0_0.eot'); 46 | src: url('../../assets/fonts/geometrica/3AB51B_0_0.eot?#iefix') format('embedded-opentype'), 47 | url('../../assets/fonts/geometrica/3AB51B_0_0.woff2') format('woff2'), 48 | url('../../assets/fonts/geometrica/3AB51B_0_0.woff') format('woff'), 49 | url('../../assets/fonts/geometrica/3AB51B_0_0.ttf') format('truetype'), 50 | url('../../assets/fonts/geometrica/3AB51B_0_0.svg#wf') format('svg'); 51 | } 52 | 53 | @import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,700;1,900&display=swap'); 54 | 55 | html, body, p { 56 | font-family: 'Nunito Sans'; 57 | } 58 | 59 | .matestack-page-root{ 60 | margin-left: 260px; 61 | 62 | &.sidebar-closed{ 63 | margin-left: 0px; 64 | } 65 | position: relative; 66 | @media (max-width: $medium_screen) { 67 | margin-left: 0px; 68 | } 69 | } 70 | 71 | h1, h2, h3, h4, h5 { 72 | font-family: 'Geometrica'; 73 | color: $m_dark; 74 | } 75 | 76 | h1 { 77 | font-size: 64px; 78 | line-height: 85px; 79 | } 80 | 81 | h2 { 82 | font-size: 38px; 83 | line-height: 68px; 84 | } 85 | 86 | h3 { 87 | font-size: 18px; 88 | line-height: 34px; 89 | } 90 | 91 | h4 { 92 | font-size: 16px; 93 | } 94 | 95 | h5 { 96 | font-size: 12px; 97 | } 98 | 99 | p { 100 | font-size: 18px; 101 | color: $m_grey; 102 | } 103 | 104 | @media (max-width: $small_screen) { 105 | h2 { 106 | font-size: 30px; 107 | line-height: 58px; 108 | } 109 | } 110 | 111 | 112 | 113 | @import "./custom-components"; 114 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - release 3 | - deploy-production 4 | 5 | before_script: 6 | - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY 7 | 8 | variables: 9 | CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest 10 | 11 | release: 12 | stage: release 13 | script: 14 | - chmod +x create_env.sh 15 | - "sh ./create_env.sh" 16 | - docker build --pull -t $CONTAINER_RELEASE_IMAGE ./ -f ./Dockerfile.release 17 | - docker push $CONTAINER_RELEASE_IMAGE 18 | only: 19 | - develop 20 | - master 21 | tags: 22 | - build #shared runner on shared machine 23 | 24 | deploy-production-de: 25 | stage: deploy-production 26 | only: 27 | - master 28 | script: 29 | - docker pull $CONTAINER_RELEASE_IMAGE 30 | - chmod +x dbauth.sh 31 | - "sh ./dbauth.sh" 32 | - docker-compose -f docker-compose.production.yml up -d postgres 33 | - docker-compose -f docker-compose.production.yml exec -d postgres sh /usr/bin/setpw.sh 34 | - sleep 10 #make sure postgres container is ready 35 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:create 36 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:migrate 37 | - docker-compose -f docker-compose.production.yml up -d rails 38 | tags: 39 | - production-do-de-1 40 | 41 | deploy-production-us: 42 | stage: deploy-production 43 | only: 44 | - master 45 | script: 46 | - docker pull $CONTAINER_RELEASE_IMAGE 47 | - chmod +x dbauth.sh 48 | - "sh ./dbauth.sh" 49 | - docker-compose -f docker-compose.production.yml up -d postgres 50 | - docker-compose -f docker-compose.production.yml exec -d postgres sh /usr/bin/setpw.sh 51 | - sleep 10 #make sure postgres container is ready 52 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:create 53 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:migrate 54 | - docker-compose -f docker-compose.production.yml up -d rails 55 | tags: 56 | - production-do-us-1 57 | 58 | deploy-production-singapore-1: 59 | stage: deploy-production 60 | only: 61 | - master 62 | script: 63 | - docker pull $CONTAINER_RELEASE_IMAGE 64 | - chmod +x dbauth.sh 65 | - "sh ./dbauth.sh" 66 | - docker-compose -f docker-compose.production.yml up -d postgres 67 | - docker-compose -f docker-compose.production.yml exec -d postgres sh /usr/bin/setpw.sh 68 | - sleep 10 #make sure postgres container is ready 69 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:create 70 | - docker-compose -f docker-compose.production.yml run --rm rails bundle exec rake db:migrate 71 | - docker-compose -f docker-compose.production.yml up -d rails 72 | tags: 73 | - production-do-singapore-1 74 | -------------------------------------------------------------------------------- /app/matestack/components/header.scss: -------------------------------------------------------------------------------- 1 | header { 2 | background: white; 3 | align-items: center; 4 | .hide-below-xxl{ 5 | display: none; 6 | @media (min-width: 1400px) { 7 | display: inline; 8 | } 9 | } 10 | .navbar { 11 | margin: 0px; 12 | border: 0px; 13 | padding-left: 1em !important; 14 | padding-right: 1em !important; 15 | 16 | // -webkit-box-shadow: 0 6px 6px -6px #999; 17 | // -moz-box-shadow: 0 6px 6px -6px #999; 18 | // box-shadow: 0 6px 6px -6px #999; 19 | box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); 20 | 21 | .navbar-toggler { 22 | border: none; 23 | &:focus{ 24 | outline: none; 25 | } 26 | } 27 | } 28 | .navbar-brand { 29 | margin-right: 0; 30 | } 31 | .navbar-brand img { 32 | max-width: 170px; 33 | height: auto; 34 | margin-left: 0px; 35 | margin-bottom: 4px; 36 | } 37 | .symbol { 38 | width: 44px; 39 | } 40 | .nav-item { 41 | margin-left: 17px; 42 | } 43 | .nav-link { 44 | font-family: "Geometrica"; 45 | color: $m_dark; 46 | font-size: 9px; 47 | letter-spacing: 1.14px; 48 | line-height: 28px; 49 | text-align: center; 50 | border-bottom: 4px solid transparent; 51 | border-radius: 0px; 52 | } 53 | .nav-pills .nav-link.active { 54 | background-color: transparent; 55 | color: $m_dark; 56 | border-bottom: 4px solid $m_orange; 57 | border-radius: 0px; 58 | } 59 | .nav-pills .nav-link.intro { 60 | background-color: transparent; 61 | color: black; 62 | &:hover{ 63 | color: black; 64 | } 65 | 66 | } 67 | .nav-pills .nav-link.highlight { 68 | background-color: $m_orange; 69 | color: white; 70 | // border-bottom: 4px solid $m_orange; 71 | border-radius: 4px; 72 | padding-bottom: 0px; 73 | padding-top: 5px; 74 | // margin-top: -8px; 75 | @media (min-width: 1200px) { 76 | margin-top: -8px!important; 77 | margin-bottom: 0px!important; 78 | } 79 | } 80 | .navbar-toggler { 81 | box-sizing: border-box; 82 | color: $m_dark; 83 | margin-bottom: 6px; 84 | .right-closed { 85 | display: block; 86 | width: 33px; 87 | } 88 | .right-open { 89 | display: none; 90 | width: 25px; 91 | margin: 0 4px; 92 | } 93 | .left-closed { 94 | width: 15px; 95 | margin: 0 6px; 96 | } 97 | } 98 | .expanded-toggler { 99 | .left-closed { 100 | transform: rotate(180deg); 101 | } 102 | .right-closed { 103 | display: none; 104 | } 105 | .right-open { 106 | display: block; 107 | } 108 | } 109 | .navbar-nav li a:hover { 110 | color: black; 111 | } 112 | } 113 | 114 | @media (max-width: 50em) { 115 | header .nav-item { 116 | text-align: center !important; 117 | margin-left: 0; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'bundle' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "rubygems" 12 | 13 | m = Module.new do 14 | module_function 15 | 16 | def invoked_as_script? 17 | File.expand_path($0) == File.expand_path(__FILE__) 18 | end 19 | 20 | def env_var_version 21 | ENV["BUNDLER_VERSION"] 22 | end 23 | 24 | def cli_arg_version 25 | return unless invoked_as_script? # don't want to hijack other binstubs 26 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` 27 | bundler_version = nil 28 | update_index = nil 29 | ARGV.each_with_index do |a, i| 30 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN 31 | bundler_version = a 32 | end 33 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ 34 | bundler_version = $1 || ">= 0.a" 35 | update_index = i 36 | end 37 | bundler_version 38 | end 39 | 40 | def gemfile 41 | gemfile = ENV["BUNDLE_GEMFILE"] 42 | return gemfile if gemfile && !gemfile.empty? 43 | 44 | File.expand_path("../../Gemfile", __FILE__) 45 | end 46 | 47 | def lockfile 48 | lockfile = 49 | case File.basename(gemfile) 50 | when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) 51 | else "#{gemfile}.lock" 52 | end 53 | File.expand_path(lockfile) 54 | end 55 | 56 | def lockfile_version 57 | return unless File.file?(lockfile) 58 | lockfile_contents = File.read(lockfile) 59 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ 60 | Regexp.last_match(1) 61 | end 62 | 63 | def bundler_version 64 | @bundler_version ||= begin 65 | env_var_version || cli_arg_version || 66 | lockfile_version || "#{Gem::Requirement.default}.a" 67 | end 68 | end 69 | 70 | def load_bundler! 71 | ENV["BUNDLE_GEMFILE"] ||= gemfile 72 | 73 | # must dup string for RG < 1.8 compatibility 74 | activate_bundler(bundler_version.dup) 75 | end 76 | 77 | def activate_bundler(bundler_version) 78 | if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0") 79 | bundler_version = "< 2" 80 | end 81 | gem_error = activation_error_handling do 82 | gem "bundler", bundler_version 83 | end 84 | return if gem_error.nil? 85 | require_error = activation_error_handling do 86 | require "bundler/version" 87 | end 88 | return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION)) 89 | warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`" 90 | exit 42 91 | end 92 | 93 | def activation_error_handling 94 | yield 95 | nil 96 | rescue StandardError, LoadError => e 97 | e 98 | end 99 | end 100 | 101 | m.load_bundler! 102 | 103 | if m.invoked_as_script? 104 | load Gem.bin_path("bundler", "bundle") 105 | end 106 | -------------------------------------------------------------------------------- /app/matestack/components/header.rb: -------------------------------------------------------------------------------- 1 | class Components::Header < Matestack::Ui::DynamicComponent 2 | 3 | def response 4 | header do 5 | nav id: 'custom-shared-navbar', class: 'navbar navbar-expand-xl fixed-top navbar-light bg-white my-0 pb-0' do 6 | button class: 'navbar-toggler', type: 'button', attributes: {"v-bind:class": "{ \"expanded-toggler\": sidebarOpen }", "@click": "sidebarToggle"} do 7 | img path: 'menu/arrow.svg', class: 'left-closed' 8 | end 9 | link class: 'navbar-brand my-0 p-0', path: "https://matestack.io" do 10 | img alt: 'matestack high quality software, simply delivered', path: 'logo/matestack_logo_orange.png', class: 'd-none d-sm-block' 11 | img alt: 'matestack high quality software, simply delivered', path: 'logo/matestack_logo_symbol.png', class: 'symbol d-block d-sm-none' 12 | end 13 | button class: 'navbar-toggler', type: 'button', attributes: {"v-bind:class": "{ \"expanded-toggler\": expanded }", "@click": "expanded = !expanded"} do 14 | img path: 'menu/burger.svg', class: 'right-closed' 15 | img path: 'menu/close.svg', class: 'right-open' 16 | end 17 | div id: 'navbarSupportedContent', class: 'collapse navbar-collapse', attributes: {"v-bind:class": "{ \"show\": expanded }"} do 18 | ul class: 'navbar-nav nav-pills ml-auto align-items-center' do 19 | li class: 'nav-item hide-below-xxl' do 20 | span class: "nav-link intro", 21 | text: 'matestack-ui-core | UI in pure Ruby:'.upcase 22 | end 23 | li class: 'nav-item' do 24 | link class: "nav-link #{active_class(:start)}", 25 | path: :core_start_path, 26 | params: { key: 'README.md' }, 27 | text: 'Start'.upcase 28 | end 29 | li class: 'nav-item' do 30 | link class: "nav-link #{active_class(:ui_components)}", 31 | path: :core_ui_components_path, 32 | params: { key: 'README.md' }, 33 | text: 'UI components'.upcase 34 | end 35 | li class: 'nav-item' do 36 | link class: "nav-link #{active_class(:reactive_components)}", 37 | path: :core_reactive_components_path, 38 | params: { key: 'README.md' }, 39 | text: 'Reactive components'.upcase 40 | end 41 | li class: 'nav-item' do 42 | link class: "nav-link #{active_class(:reactive_apps)}", 43 | path: :core_reactive_apps_path, 44 | params: { key: 'README.md' }, 45 | text: 'Reactive Apps'.upcase 46 | end 47 | li class: 'nav-item' do 48 | link class: "nav-link #{active_class(:api)}", 49 | path: :core_api_path, 50 | params: { key: 'README.md' }, 51 | text: 'API'.upcase 52 | end 53 | li class: 'nav-item' do 54 | link class: "nav-link highlight px-2 my-4 #{active_class(:components)}", 55 | path: "https://matestack.io/addons", 56 | target: "_blank", 57 | text: 'Matestack UI Addon'.upcase 58 | end 59 | 60 | # TODO: Add button links for "sponsor"/"book us" 61 | end 62 | end 63 | end 64 | end 65 | end 66 | 67 | private 68 | 69 | def active_class(param) 70 | current_path = context[:request].fullpath 71 | case param 72 | when :start 73 | return 'active' if current_path.starts_with?('/docs/start') 74 | when :ui_components 75 | return 'active' if current_path.starts_with?('/docs/ui_components') 76 | when :reactive_components 77 | return 'active' if current_path.starts_with?('/docs/reactive_components') 78 | when :reactive_apps 79 | return 'active' if current_path.starts_with?('/docs/reactive_apps') 80 | when :api 81 | return 'active' if current_path.starts_with?('/docs/api') 82 | else 83 | return nil 84 | end 85 | end 86 | 87 | end 88 | -------------------------------------------------------------------------------- /app/matestack/components/sidebar.rb: -------------------------------------------------------------------------------- 1 | class Components::Sidebar < Matestack::Ui::StaticComponent 2 | 3 | def generate_nav_data path, type="dir" 4 | @tree = ::Rails.cache.fetch("base_remote_#{path}", expires_in: 5.minutes) do 5 | JSON.parse(RestClient.get(@github_component_docs_path).body) 6 | end 7 | if @tree 8 | @tree.each do |item| 9 | if item["type"] == type 10 | @file_doc_links << item 11 | end 12 | end 13 | end 14 | @file_doc_links.sort_by! { |item| item['name'].scan(/\d+/).first.to_i } 15 | end 16 | 17 | def prepare 18 | @file_doc_links = [] 19 | @tree = nil 20 | 21 | @branch = 'master' 22 | # TODO: line below references master branch, so links below need update down the row 23 | @github_base_api_url = "https://#{ENV['GITHUB_USERNAME']}:#{ENV['GITHUB_PERSONAL_ACCESS_TOKEN']}@api.github.com/repos/basemate/matestack-ui-core/contents" 24 | @current_page = @options[:currentPage] 25 | @current_path = @current_page.gsub('.md', '').gsub('.rb', '') 26 | 27 | # TODO: Refactor below to work fine with new doc/api/guides structure! (esp. add /docs/ prefix to @github_component_docs_path) 28 | case @current_path 29 | when core_start_path 30 | @github_component_docs_path = "#{@github_base_api_url}/docs/start?ref=#{@branch}" 31 | generate_nav_data(@current_path) 32 | when core_ui_components_path 33 | @github_component_docs_path = "#{@github_base_api_url}/docs/ui_components?ref=#{@branch}" 34 | generate_nav_data(@current_path) 35 | when core_reactive_components_path 36 | @github_component_docs_path = "#{@github_base_api_url}/docs/reactive_components?ref=#{@branch}" 37 | generate_nav_data(@current_path) 38 | when core_reactive_apps_path 39 | @github_component_docs_path = "#{@github_base_api_url}/docs/reactive_apps?ref=#{@branch}" 40 | generate_nav_data(@current_path) 41 | when core_api_path 42 | @github_component_docs_path = "#{@github_base_api_url}/docs/api/100-components?ref=#{@branch}" 43 | generate_nav_data(@current_path, "file") 44 | end 45 | end 46 | 47 | def response 48 | div id: 'custom-sidebar', class: 'container-fluid' do 49 | nav id: 'sidebar', class: 'bg-dark sidebar' do 50 | div class: 'sidebar-sticky menu' do 51 | ul id: 'listGroup', class: 'list-group list-group-flush' do 52 | case @current_path 53 | when core_start_path 54 | side_title 'start' 55 | @file_doc_links.each do |item| 56 | transition_link :core_start_path, { key: "#{item['name']}" }, item['name'].split("-").last.humanize.camelcase.gsub(".md", "") unless item['name'] == 'README.md' 57 | end 58 | when core_ui_components_path 59 | side_title 'UI components' 60 | @file_doc_links.each do |item| 61 | transition_link :core_ui_components_path, { key: "#{item['name']}" }, item['name'].split("-").last.humanize.camelcase.gsub(".md", "") unless item['name'] == 'README.md' 62 | end 63 | when core_reactive_components_path 64 | side_title 'Reactive components' 65 | @file_doc_links.each do |item| 66 | transition_link :core_reactive_components_path, { key: "#{item['name']}" }, item['name'].split("-").last.humanize.camelcase.gsub(".md", "") unless item['name'] == 'README.md' 67 | end 68 | when core_reactive_apps_path 69 | side_title 'Reactive apps' 70 | @file_doc_links.each do |item| 71 | transition_link :core_reactive_apps_path, { key: "#{item['name']}" }, item['name'].split("-").last.humanize.camelcase.gsub(".md", "") unless item['name'] == 'README.md' 72 | end 73 | when core_api_path 74 | side_title 'Components API' 75 | @file_doc_links.each do |item| 76 | transition_link :core_api_path, { key: item['name'], }, item['name'].gsub(".md", "") unless item['name'] == 'README.md' 77 | end 78 | end 79 | end 80 | end 81 | end 82 | end 83 | end 84 | 85 | private 86 | 87 | def side_title text 88 | link path: "https://github.com/matestack/matestack-ui-core", target: "_blank", class: "pt-4 text-decoration-none" do 89 | small class: 'list-group-item-heading text-white ml-2 pl-3 my-3 pt-4 text-monospace font-weight-light', text: "matestack-ui-core v1.3.2" 90 | end 91 | heading size: 5, class: 'list-group-item-heading text-white ml-2 pl-3 my-3 pt-4 pb-3', text: text.upcase 92 | end 93 | 94 | def transition_link path, params, text 95 | button class: "links-btn" do 96 | transition path: path, params: params, text: text.camelcase, class: "list-group-item list-group-item-action", delay: 300 97 | end 98 | end 99 | 100 | end 101 | -------------------------------------------------------------------------------- /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 = true 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 = "matestack_docs_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 | -------------------------------------------------------------------------------- /app/matestack/components/toc/toc.js: -------------------------------------------------------------------------------- 1 | import jQuery from "jquery"; 2 | 3 | // https://github.com/ghiculescu/jekyll-table-of-contents 4 | (function($){ 5 | $.fn.toc = function(options) { 6 | var defaults = { 7 | noBackToTopLinks: false, 8 | title: 'Jump to...', 9 | minimumHeaders: 1, 10 | headers: 'h1, h2, h3, h4, h5, h6', 11 | listType: 'ol', // values: [ol|ul] 12 | showEffect: 'show', // values: [show|slideDown|fadeIn|none] 13 | showSpeed: 'slow', // set to 0 to deactivate effect 14 | classes: { list: '', 15 | item: '' 16 | } 17 | }, 18 | settings = $.extend(defaults, options); 19 | 20 | function fixedEncodeURIComponent (str) { 21 | return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { 22 | return '%' + c.charCodeAt(0).toString(16); 23 | }); 24 | } 25 | 26 | function createLink (header) { 27 | var innerText = (header.textContent === undefined) ? header.innerText : header.textContent; 28 | return "" + innerText + ""; 29 | } 30 | 31 | var headers = $(settings.headers).filter(function() { 32 | // get all headers with an ID 33 | var previousSiblingName = $(this).prev().attr( "name" ); 34 | if (!this.id && previousSiblingName) { 35 | this.id = $(this).attr( "id", previousSiblingName.replace(/\./g, "-") ); 36 | } 37 | return this.id; 38 | }), output = $(this); 39 | if (!headers.length || headers.length < settings.minimumHeaders || !output.length) { 40 | $(this).hide(); 41 | return; 42 | } 43 | 44 | if (0 === settings.showSpeed) { 45 | settings.showEffect = 'none'; 46 | } 47 | 48 | var render = { 49 | show: function() { output.hide().html(html).show(settings.showSpeed); }, 50 | slideDown: function() { output.hide().html(html).slideDown(settings.showSpeed); }, 51 | fadeIn: function() { output.hide().html(html).fadeIn(settings.showSpeed); }, 52 | none: function() { output.html(html); } 53 | }; 54 | 55 | var get_level = function(ele) { return parseInt(ele.nodeName.replace("H", ""), 10); }; 56 | var highest_level = headers.map(function(_, ele) { return get_level(ele); }).get().sort()[0]; 57 | var return_to_top = ' '; 58 | 59 | var level = get_level(headers[0]), 60 | this_level, 61 | html = settings.title + " <" +settings.listType + " class=\"" + settings.classes.list +"\">"; 62 | headers.on('click', function() { 63 | if (!settings.noBackToTopLinks) { 64 | window.location.hash = this.id; 65 | } 66 | }) 67 | .addClass('clickable-header') 68 | .each(function(_, header) { 69 | this_level = get_level(header); 70 | if (!settings.noBackToTopLinks && this_level === highest_level) { 71 | $(header).addClass('top-level-header').after(return_to_top); 72 | } 73 | if (this_level === level) // same level as before; same indenting 74 | html += "
  • " + createLink(header); 75 | else if (this_level <= level){ // higher level than before; end parent ol 76 | for(var i = this_level; i < level; i++) { 77 | html += "
  • " 78 | } 79 | html += "
  • " + createLink(header); 80 | } 81 | else if (this_level > level) { // lower level than before; expand the previous to contain a ol 82 | for(i = this_level; i > level; i--) { 83 | html += "<" + settings.listType + " class=\"" + settings.classes.list +"\">" + 84 | "
  • " 85 | } 86 | html += createLink(header); 87 | } 88 | level = this_level; // update for the next one 89 | }); 90 | html += ""; 91 | if (!settings.noBackToTopLinks) { 92 | $(document).on('click', '.back-to-top', function() { 93 | $(window).scrollTop(0); 94 | window.location.hash = ''; 95 | }); 96 | } 97 | 98 | render[settings.showEffect](); 99 | }; 100 | })(jQuery); 101 | 102 | 103 | MatestackUiCore.Vue.component('components-toc', { 104 | mixins: [MatestackUiCore.componentMixin], 105 | data: function(){ 106 | return { 107 | offsetTop: undefined, 108 | sections: {}, 109 | } 110 | }, 111 | methods: { 112 | handleScroll (event){ 113 | const self = this; 114 | // sticky navigation 115 | if (window.pageYOffset >= this.offsetTop){ 116 | document.querySelector('.components-toc #toc').classList.add('sticky') 117 | } 118 | else { 119 | document.querySelector('.components-toc #toc').classList.remove('sticky') 120 | } 121 | // scroll spy 122 | var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop 123 | for(var i in self.sections) { 124 | if(self.sections[i] <= scrollPosition + 50) { 125 | if(document.querySelector('.components-toc .active')) { 126 | document.querySelector('.components-toc .active').classList.remove('active'); 127 | } 128 | if(document.querySelector('.components-toc a[href*=' + i + ']')) { 129 | document.querySelector('.components-toc a[href*=' + i + ']').classList.add('active'); 130 | } 131 | } 132 | } 133 | } 134 | }, 135 | mounted(){ 136 | const self = this; 137 | // setTimeout(function () { 138 | jQuery('#toc').toc({ 139 | title: 'On this page:

    ', 140 | listType: 'ul', 141 | headers: 'h2, h3, h4', 142 | showEffect: 'none' 143 | }); 144 | // }, 100); 145 | this.offsetTop = document.querySelector('.components-toc #toc').offsetTop; 146 | window.addEventListener('scroll', this.handleScroll); 147 | var section = document.querySelectorAll( 148 | '.markdown-content h2, .markdown-content h3, .markdown-content h4, .markdown-content h5, .markdown-content h6' 149 | ) 150 | Array.prototype.forEach.call(section, function(e) { 151 | self.sections[e.id] = e.offsetTop; 152 | }); 153 | }, 154 | }); 155 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actioncable (6.0.3.4) 5 | actionpack (= 6.0.3.4) 6 | nio4r (~> 2.0) 7 | websocket-driver (>= 0.6.1) 8 | actionmailbox (6.0.3.4) 9 | actionpack (= 6.0.3.4) 10 | activejob (= 6.0.3.4) 11 | activerecord (= 6.0.3.4) 12 | activestorage (= 6.0.3.4) 13 | activesupport (= 6.0.3.4) 14 | mail (>= 2.7.1) 15 | actionmailer (6.0.3.4) 16 | actionpack (= 6.0.3.4) 17 | actionview (= 6.0.3.4) 18 | activejob (= 6.0.3.4) 19 | mail (~> 2.5, >= 2.5.4) 20 | rails-dom-testing (~> 2.0) 21 | actionpack (6.0.3.4) 22 | actionview (= 6.0.3.4) 23 | activesupport (= 6.0.3.4) 24 | rack (~> 2.0, >= 2.0.8) 25 | rack-test (>= 0.6.3) 26 | rails-dom-testing (~> 2.0) 27 | rails-html-sanitizer (~> 1.0, >= 1.2.0) 28 | actiontext (6.0.3.4) 29 | actionpack (= 6.0.3.4) 30 | activerecord (= 6.0.3.4) 31 | activestorage (= 6.0.3.4) 32 | activesupport (= 6.0.3.4) 33 | nokogiri (>= 1.8.5) 34 | actionview (6.0.3.4) 35 | activesupport (= 6.0.3.4) 36 | builder (~> 3.1) 37 | erubi (~> 1.4) 38 | rails-dom-testing (~> 2.0) 39 | rails-html-sanitizer (~> 1.1, >= 1.2.0) 40 | activejob (6.0.3.4) 41 | activesupport (= 6.0.3.4) 42 | globalid (>= 0.3.6) 43 | activemodel (6.0.3.4) 44 | activesupport (= 6.0.3.4) 45 | activerecord (6.0.3.4) 46 | activemodel (= 6.0.3.4) 47 | activesupport (= 6.0.3.4) 48 | activestorage (6.0.3.4) 49 | actionpack (= 6.0.3.4) 50 | activejob (= 6.0.3.4) 51 | activerecord (= 6.0.3.4) 52 | marcel (~> 0.3.1) 53 | activesupport (6.0.3.4) 54 | concurrent-ruby (~> 1.0, >= 1.0.2) 55 | i18n (>= 0.7, < 2) 56 | minitest (~> 5.1) 57 | tzinfo (~> 1.1) 58 | zeitwerk (~> 2.2, >= 2.2.2) 59 | addressable (2.7.0) 60 | public_suffix (>= 2.0.2, < 5.0) 61 | bindex (0.8.1) 62 | bootsnap (1.4.7) 63 | msgpack (~> 1.0) 64 | builder (3.2.4) 65 | byebug (11.1.3) 66 | capybara (3.33.0) 67 | addressable 68 | mini_mime (>= 0.1.3) 69 | nokogiri (~> 1.8) 70 | rack (>= 1.6.0) 71 | rack-test (>= 0.6.3) 72 | regexp_parser (~> 1.5) 73 | xpath (~> 3.2) 74 | cells (4.1.7) 75 | declarative-builder (< 0.2.0) 76 | declarative-option (< 0.2.0) 77 | tilt (>= 1.4, < 3) 78 | uber (< 0.2.0) 79 | cells-haml (0.0.10) 80 | cells (>= 4.0.1, <= 6.0.0) 81 | haml (>= 4.1.0.beta.1) 82 | cells-rails (0.1.3) 83 | actionpack (>= 5.0) 84 | cells (>= 4.1.6, < 5.0.0) 85 | childprocess (3.0.0) 86 | concurrent-ruby (1.1.7) 87 | crass (1.0.6) 88 | declarative-builder (0.1.0) 89 | declarative-option (< 0.2.0) 90 | declarative-option (0.1.0) 91 | domain_name (0.5.20190701) 92 | unf (>= 0.0.5, < 1.0.0) 93 | erubi (1.10.0) 94 | ffi (1.13.1) 95 | globalid (0.4.2) 96 | activesupport (>= 4.2.0) 97 | haml (5.2.1) 98 | temple (>= 0.8.0) 99 | tilt 100 | http-accept (1.7.0) 101 | http-cookie (1.0.3) 102 | domain_name (~> 0.5) 103 | i18n (1.8.5) 104 | concurrent-ruby (~> 1.0) 105 | jbuilder (2.10.0) 106 | activesupport (>= 5.0.0) 107 | listen (3.2.1) 108 | rb-fsevent (~> 0.10, >= 0.10.3) 109 | rb-inotify (~> 0.9, >= 0.9.10) 110 | loofah (2.8.0) 111 | crass (~> 1.0.2) 112 | nokogiri (>= 1.5.9) 113 | mail (2.7.1) 114 | mini_mime (>= 0.1.1) 115 | marcel (0.3.3) 116 | mimemagic (~> 0.3.2) 117 | matestack-ui-core (1.3.0) 118 | cells-haml 119 | cells-rails 120 | haml 121 | rails (>= 5.0) 122 | trailblazer-cells 123 | method_source (1.0.0) 124 | mime-types (3.3.1) 125 | mime-types-data (~> 3.2015) 126 | mime-types-data (3.2020.0512) 127 | mimemagic (0.3.5) 128 | mini_mime (1.0.2) 129 | mini_portile2 (2.4.0) 130 | minitest (5.14.2) 131 | msgpack (1.3.3) 132 | netrc (0.11.0) 133 | nio4r (2.5.4) 134 | nokogiri (1.10.10) 135 | mini_portile2 (~> 2.4.0) 136 | pg (1.2.3) 137 | public_suffix (4.0.5) 138 | puma (4.3.5) 139 | nio4r (~> 2.0) 140 | rack (2.2.3) 141 | rack-proxy (0.6.5) 142 | rack 143 | rack-test (1.1.0) 144 | rack (>= 1.0, < 3) 145 | rails (6.0.3.4) 146 | actioncable (= 6.0.3.4) 147 | actionmailbox (= 6.0.3.4) 148 | actionmailer (= 6.0.3.4) 149 | actionpack (= 6.0.3.4) 150 | actiontext (= 6.0.3.4) 151 | actionview (= 6.0.3.4) 152 | activejob (= 6.0.3.4) 153 | activemodel (= 6.0.3.4) 154 | activerecord (= 6.0.3.4) 155 | activestorage (= 6.0.3.4) 156 | activesupport (= 6.0.3.4) 157 | bundler (>= 1.3.0) 158 | railties (= 6.0.3.4) 159 | sprockets-rails (>= 2.0.0) 160 | rails-dom-testing (2.0.3) 161 | activesupport (>= 4.2.0) 162 | nokogiri (>= 1.6) 163 | rails-html-sanitizer (1.3.0) 164 | loofah (~> 2.3) 165 | railties (6.0.3.4) 166 | actionpack (= 6.0.3.4) 167 | activesupport (= 6.0.3.4) 168 | method_source 169 | rake (>= 0.8.7) 170 | thor (>= 0.20.3, < 2.0) 171 | rake (13.0.3) 172 | rb-fsevent (0.10.4) 173 | rb-inotify (0.10.1) 174 | ffi (~> 1.0) 175 | redcarpet (3.5.0) 176 | regexp_parser (1.7.1) 177 | rest-client (2.1.0) 178 | http-accept (>= 1.7.0, < 2.0) 179 | http-cookie (>= 1.0.2, < 2.0) 180 | mime-types (>= 1.16, < 4.0) 181 | netrc (~> 0.8) 182 | rouge (3.21.0) 183 | rubyzip (2.3.0) 184 | sass-rails (6.0.0) 185 | sassc-rails (~> 2.1, >= 2.1.1) 186 | sassc (2.4.0) 187 | ffi (~> 1.9) 188 | sassc-rails (2.1.2) 189 | railties (>= 4.0.0) 190 | sassc (>= 2.0) 191 | sprockets (> 3.0) 192 | sprockets-rails 193 | tilt 194 | selenium-webdriver (3.142.7) 195 | childprocess (>= 0.5, < 4.0) 196 | rubyzip (>= 1.2.2) 197 | spring (2.1.0) 198 | spring-watcher-listen (2.0.1) 199 | listen (>= 2.7, < 4.0) 200 | spring (>= 1.2, < 3.0) 201 | sprockets (4.0.2) 202 | concurrent-ruby (~> 1.0) 203 | rack (> 1, < 3) 204 | sprockets-rails (3.2.2) 205 | actionpack (>= 4.0) 206 | activesupport (>= 4.0) 207 | sprockets (>= 3.0.0) 208 | temple (0.8.2) 209 | thor (1.0.1) 210 | thread_safe (0.3.6) 211 | tilt (2.0.10) 212 | trailblazer-cells (0.0.3) 213 | cells (>= 4.1.0.rc1, < 5.0.0) 214 | tzinfo (1.2.9) 215 | thread_safe (~> 0.1) 216 | uber (0.1.0) 217 | unf (0.1.4) 218 | unf_ext 219 | unf_ext (0.0.7.7) 220 | web-console (4.0.4) 221 | actionview (>= 6.0.0) 222 | activemodel (>= 6.0.0) 223 | bindex (>= 0.4.0) 224 | railties (>= 6.0.0) 225 | webdrivers (4.4.1) 226 | nokogiri (~> 1.6) 227 | rubyzip (>= 1.3.0) 228 | selenium-webdriver (>= 3.0, < 4.0) 229 | webpacker (4.2.2) 230 | activesupport (>= 4.2) 231 | rack-proxy (>= 0.6.1) 232 | railties (>= 4.2) 233 | websocket-driver (0.7.3) 234 | websocket-extensions (>= 0.1.0) 235 | websocket-extensions (0.1.5) 236 | xpath (3.2.0) 237 | nokogiri (~> 1.8) 238 | zeitwerk (2.4.2) 239 | 240 | PLATFORMS 241 | ruby 242 | 243 | DEPENDENCIES 244 | bootsnap (>= 1.4.2) 245 | byebug 246 | capybara (>= 2.15) 247 | jbuilder (~> 2.7) 248 | listen (~> 3.2) 249 | matestack-ui-core (~> 1.1) 250 | pg (>= 0.18, < 2.0) 251 | puma (~> 4.1) 252 | rails (~> 6.0.3, >= 6.0.3.2) 253 | redcarpet 254 | rest-client 255 | rouge 256 | sass-rails (>= 6) 257 | selenium-webdriver 258 | spring 259 | spring-watcher-listen (~> 2.0.0) 260 | tzinfo-data 261 | web-console (>= 3.3.0) 262 | webdrivers 263 | webpacker (~> 4.0) 264 | 265 | RUBY VERSION 266 | ruby 2.6.5p114 267 | 268 | BUNDLED WITH 269 | 1.17.3 270 | -------------------------------------------------------------------------------- /app/assets/fonts/geometrica/3AB51B_0_0.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | This is a Webfont from MyFonts. Full information about this font: 4 | https://www.myfonts.com/fonts/latinotype/geometrica/ 5 | Copyright © 2017 by Pedro Gonzalez. All rights reserved. 6 | 7 | 14 | 15 | 16 | 17 | 18 | 20 | 22 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 44 | 45 | 47 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 59 | 60 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 78 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 97 | 99 | 100 | 102 | 104 | 105 | 107 | 108 | 109 | 110 | 111 | 112 | 114 | 115 | 116 | 118 | 120 | 121 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 132 | 133 | 135 | 137 | 138 | 139 | 140 | 142 | 143 | 144 | 147 | 148 | 150 | 152 | 153 | 154 | 155 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 169 | 170 | 171 | 173 | 175 | 177 | 178 | 179 | 180 | 182 | 184 | 186 | 187 | 189 | 190 | 191 | 192 | 194 | 195 | 196 | 197 | 199 | 200 | 202 | 204 | 206 | 208 | 210 | 212 | 213 | 215 | 216 | 217 | 218 | 220 | 221 | 222 | 225 | 227 | 229 | 231 | 233 | 235 | 238 | 240 | 242 | 244 | 246 | 248 | 250 | 251 | 252 | 253 | 255 | 257 | 259 | 261 | 263 | 265 | 267 | 269 | 270 | 272 | 273 | 274 | 275 | 277 | 278 | 280 | 282 | 283 | 285 | 286 | 288 | 290 | 292 | 294 | 296 | 298 | 300 | 302 | 304 | 306 | 308 | 309 | 311 | 312 | 314 | 315 | 317 | 319 | 321 | 322 | 324 | 326 | 328 | 330 | 332 | 334 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 345 | 346 | 347 | 348 | 350 | 352 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 369 | 371 | 372 | 373 | 375 | 376 | 378 | 380 | 382 | 384 | 386 | 387 | 389 | 391 | 392 | 394 | 396 | 398 | 399 | 401 | 403 | 405 | 407 | 409 | 411 | 412 | 414 | 415 | 417 | 418 | 419 | 421 | 423 | 424 | 425 | 427 | 429 | 431 | 433 | 435 | 437 | 438 | 439 | 440 | 441 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 452 | 454 | 456 | 457 | 460 | 462 | 464 | 467 | 469 | 470 | 472 | 473 | 474 | 475 | 476 | 477 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 491 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 514 | 516 | 518 | 519 | 520 | 522 | 524 | 525 | 526 | 527 | 528 | 529 | 531 | 533 | 535 | 536 | 537 | 538 | 540 | 543 | 544 | 545 | 546 | 547 | 549 | 551 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 564 | 565 | 566 | 567 | 568 | 570 | 571 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 595 | 597 | 598 | 599 | 600 | 601 | --------------------------------------------------------------------------------