add merged routes and smaller fixes

This commit is contained in:
Torsten 2023-10-23 20:12:16 +03:00
parent d7730c19ad
commit f1476560a6
13 changed files with 79 additions and 18 deletions

View File

@ -19,8 +19,8 @@ gem "sassc-rails"
gem "haml-rails", "~> 2.0"
gem 'html2haml'
#gem "merged" , git: "https://github.com/FeenixMakers/merged"
gem "merged" , path: "../merged"
gem "merged" , git: "https://github.com/FeenixMakers/merged"
#gem "merged" , path: "../merged"
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

View File

@ -1,5 +1,6 @@
PATH
remote: ../merged
GIT
remote: https://github.com/FeenixMakers/merged
revision: 60808aee26454387264ac148deb7017952bc841c
specs:
merged (0.1.0)
active_hash

View File

@ -3,11 +3,6 @@
- member_memu.each do |link , text|
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => link, :role => "menuitem"}
=text
= form_tag( main_app.destroy_member_session_path , {method: :delete } ) do
%button.flex.w-full.items-center.gap-2.rounded-lg.px-4.py-2.text-sm.text-blue-700.hover:bg-red-50{:role => "menuitem", :type => "submit"}
%svg.h-4.w-4{:fill => "none", :stroke => "currentColor", "stroke-width" => "2", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
%path{:d => "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16", "stroke-linecap" => "round", "stroke-linejoin" => "round"}
Sign out
:javascript
var drop_hidden = true;

View File

@ -21,15 +21,6 @@
%li
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
= text
-if(current_member)
= form_tag( main_app.destroy_member_session_path , {method: :delete ,class: "text-center"}) do
%button.w-full.items-center.gap-2.rounded-lg.px-4.py-2.text-sm.text-blue-700.hover:bg-red-50{:role => "menuitem", :type => "submit"}
%svg.h-4.w-4{:fill => "none", :stroke => "currentColor", "stroke-width" => "2", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
%path{:d => "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16", "stroke-linecap" => "round", "stroke-linejoin" => "round"}
Sign out
-else
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => main_app.member_session_path, :title => "Log in or Sign up"}
Login
:javascript
var drop_hidden = true;
function menu_on() {

View File

@ -0,0 +1,66 @@
require "merged"
# directory inside /app/assets/images where YOUR images are kept
# if you change this and add own styles, you will still need a merged directory
# for the previews (card_preview and section_preview)
Merged.images_dir = "merged"
# directory where data and styles are kept
# Notice that the data is ALWAYS inside a merged directory,
# so in the default case Rails.root/merged/*.yml
Merged.data_dir = "."
# text colors, keys are options shown to user, values what gets replaced
Merged.text_color = { "white" => "text-white",
"none" => "",
"light_blue" => "text-cyan-100",
"light_gray" => "text-gray-100",
"solid_blue" => "text-cyan-700",
"solid_red" => "text-orange-800",
"solid_green" => "text-green-700",
"solid_petrol" => "text-teal-700",
"solid_indigo" => "text-indigo-800",
"solid_black" => "text-slate-800",
}
# margin option, keys are options shown to user, values what gets replaced
Merged.margin = { "none" => "m-0",
"small" => " m-2 md:m-4 lg:6 xl:m-8",
"medium" => "m-5 md:m-8 lg:10 xl:m-14",
"large" => " m-8 md:m-12 lg:16 xl:m-20",}
# background colors
Merged.background = {"white" => "bg-white",
"none" => "",
"light_blue" => "bg-cyan-100",
"light_gray" => "bg-gray-100",
"light_orange" => "bg-orange-50",
"solid_blue" => "bg-cyan-700 text-white",
"solid_red" => "bg-amber-600 text-white",
"solid_green" => "bg-green-700 text-white",
"solid_petrol" => "bg-teal-700 text-white",
"solid_indigo" => "bg-cyan-900 text-white",
"solid_black" => "bg-slate-900 text-white", }
# shade options
Merged.shade_color = {"white_25" => "bg-white/25",
"none" => "",
"black_25" => "bg-black/25",
"light_blue_25" => "bg-cyan-100/25",
"light_red_25" => "bg-orange-300/25",
"solid_blue_25" => "bg-cyan-700/25",
"solid_red_25" => "bg-orange-800/25", }
# amount of text columns
Merged.text_columns = {
"3" => "columns-1 md:columns-2 lg:columns-3",
"4" => "columns-1 md:columns-2 lg:columns-3 xl:columns-4",
"2" => "columns-1 md:columns-2" }
Merged.columns = { "1" => "grid-cols-1",
"2" => "grid-cols-1 md:grid-cols-2" ,
"3" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
"4" => "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
"5" => "grid-cols-1 md:grid-cols-3 lg:grid-cols-5",
"6" => "grid-cols-2 md:grid-cols-4 lg:grid-cols-6", }

View File

@ -1,6 +1,7 @@
Rails.application.routes.draw do
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
merged_routes( root: true )
# Defines the root path route ("/")
# root "articles#index"
end

1
merged/card_styles.yml Normal file
View File

@ -0,0 +1 @@
--- []

1
merged/cards.yml Normal file
View File

@ -0,0 +1 @@
--- []

View File

@ -0,0 +1 @@
--- []

1
merged/page_styles.yml Normal file
View File

@ -0,0 +1 @@
--- []

1
merged/pages.yml Normal file
View File

@ -0,0 +1 @@
--- []

View File

@ -0,0 +1 @@
--- []

1
merged/sections.yml Normal file
View File

@ -0,0 +1 @@
--- []