fixing menues (mobile mostly)

This commit is contained in:
Torsten 2023-01-21 20:25:58 +02:00
parent 0360afc762
commit d3c23cdd74
10 changed files with 37 additions and 22 deletions

View File

@ -11,12 +11,8 @@
* It is generally better to create a new file per style scope.
*
*= require_self
*= require merged/tailwind_styles
*/
#thredded--container{
max-width: 60rem;
}
.prose{
color: inherit;
--tw-prose-bullets: #6b7280;
}

View File

@ -25,4 +25,23 @@ module ApplicationHelper
image_tag(image , alt: someone.name , class: classes )
end
def main_menu
[["/retreats" , "Retreats"], ["/studios" , "Studios"],
["/makerspace" , "Makerspace"],["/coworking" , "Coworking"],
["/about" , "About"], ]
end
def member_memu
items =[["/forum" ,"Forum"] , [main_app.member_path(current_member) , "Settings"]]
if current_member.admin? and !Rails.env.production?
items << [merged.pages_path(), "CMS" ]
end
items
end
def mobile_menu
if current_member
member_memu
else
[main_app.member_session_path, "Login"]
end
end
end

View File

@ -21,6 +21,7 @@ class Entity < ApplicationRecord
end
def self.response(path = "")
return "" if Rails.env.development?
host = Rails.application.credentials.weather_dev
host = Rails.application.credentials.weather_pro if Rails.env.production?
token = Rails.application.credentials.weather_token

View File

@ -21,7 +21,7 @@
%p.font-medium.text-gray-900 Main
%nav.mt-6{"aria-label" => "Footer Navigation - Services"}
%ul.space-y-4.text-sm
-[:restreats , :studios , :makerspace , :coworking].each do |main|
-[:retreats , :studios , :makerspace , :coworking].each do |main|
%li
%a.text-gray-700.transition.hover:opacity-75{:href => "/#{main}"}
=main.capitalize
@ -75,7 +75,7 @@
.pt-8.mt-8.border-t.border-gray-100
.grid.grid-cols-1.gap-8.lg:grid-cols-2
%p.text-xs.text-left.text-gray-500
2020-22. Osuuskunta Hub Feenix. All rights reserved.
2020-23. Osuuskunta Hub Feenix. All rights reserved.
%nav{"aria-label" => "Footer Navigation - Support"}
%ul.flex.flex-wrap.justify-start.gap-4.text-xs.lg:justify-end
%li

View File

@ -4,9 +4,9 @@
= image_tag("feenix_lintu.webp" , class: "h-20")
%span.ml-2.text-xl.font-bold.tracking-wide.text-gray-800.uppercase Hub Feenix
%ul.flex.items-center.hidden.space-x-8.lg:flex
- [:retreats , :studios , :makerspace , :coworking, :about].each do |link|
- main_menu.each do |link , text|
%li
%a.font-medium.tracking-wide.text-gray-700.transition-colors.duration-400.hover:text-cyan-800{"aria-label" => "Our product", :href => "/#{link}", :title => link.capitalize}= link.capitalize
%a.font-medium.tracking-wide.text-gray-700.transition-colors.duration-400.hover:text-cyan-800{"aria-label" => "Our product", :href => link, :title => text}= text
%li
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
= image_tag("fb.webp" , class: "h-10 rounded-md")

View File

@ -1,13 +1,8 @@
#menu-dropdown.hidden.absolute.right-0.z-10.mt-4.w-36.origin-top-right.rounded-md.border.border-gray-100.bg-white.shadow-lg{:role => "menu"}
.p-2
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => "/forum", :role => "menuitem"}
Forum
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => main_app.member_path(current_member), :role => "menuitem"}
Settings
- unless Rails.env.production?
- if current_member.admin?
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => merged.pages_path(), :role => "menuitem"}
CMS
- 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"}

View File

@ -11,9 +11,14 @@
%path{:d => "M19.7,4.3c-0.4-0.4-1-0.4-1.4,0L12,10.6L5.7,4.3c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l6.3,6.3l-6.3,6.3 c-0.4,0.4-0.4,1,0,1.4C4.5,19.9,4.7,20,5,20s0.5-0.1,0.7-0.3l6.3-6.3l6.3,6.3c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3 c0.4-0.4,0.4-1,0-1.4L13.4,12l6.3-6.3C20.1,5.3,20.1,4.7,19.7,4.3z", :fill => "currentColor"}
%nav
%ul.space-y-6.px-20
- [:retreats , :studios , :makerspace , :coworking, :about].each do |link|
- main_menu.each do |link , text|
%li
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => link.capitalize}= link.capitalize
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
%li
%hr
- mobile_menu.each do |link , text|
%li
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
:javascript
var drop_hidden = true;
function menu_on() {

View File

@ -5,7 +5,6 @@
Settings and profiles
%h4.text-xl.mt-4.md:text-2xl
View and edit your profiles, and change settings
.grid.grid-cols-1.mx-8.gap-8.md:grid-cols-2.mx-12.gap-12.lg:grid-cols-3.mx-16.gap-16
.flex.flex-col.justify-between
%h3.text-2xl.bg-gray-200.p-4.text-center Settings

View File

@ -58,7 +58,7 @@ Rails.application.configure do
config.active_record.verbose_query_logs = true
# Suppress logger output for asset requests.
config.assets.quiet = true
config.assets.quiet = false
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true

View File

@ -12,7 +12,7 @@ Rails.application.routes.draw do
mount Thredded::Engine => '/forum'
mount Merged::Engine => "/merged"
mount Merged::Engine => "/merged" unless Rails.env.production?
get "/news/:id" , to: "merged/view#page" , id: :id , as: :view_blog
get ":id" , to: "merged/view#page" , id: :id , as: :view_page