├── application_helper.rb ├── postcss.config.js ├── templates ├── _navbar_basic.html.erb ├── _flashes.html.erb └── _navbar.html.erb ├── README.md ├── basic.rb └── template.rb /application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | def render_svg(name, styles: "fill-current text-gray-400", title: nil) # class is reserverd word in method, so styles 3 | filename = "#{name}.svg" 4 | title ||= name.underscore.humanize 5 | inline_svg_tag(filename, aria: true, nocomment: true, title: title, class: styles) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require("tailwindcss")("./app/javascript/stylesheets/tailwind.config.js"), 4 | require("postcss-import"), 5 | require("postcss-flexbugs-fixes"), 6 | require("postcss-preset-env")({ 7 | autoprefixer: { 8 | flexbox: "no-2009", 9 | }, 10 | stage: 3, 11 | }), 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /templates/_navbar_basic.html.erb: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /templates/_flashes.html.erb: -------------------------------------------------------------------------------- 1 | <% if notice %> 2 | 3 |
9 | <%= notice[:title] %> 10 |
11 | <% if notice[:content] %> 12 |13 | <%= notice[:content] %> 14 |
15 | <% end %> 16 |