adding thredded forums

This commit is contained in:
2022-12-31 22:01:51 +02:00
parent 292a51ad3c
commit ae293e3395
10 changed files with 828 additions and 2 deletions

View File

@ -12,3 +12,6 @@
*
*= require_self
*/
#thredded--container{
max-width: 60rem;
}

View File

@ -6,6 +6,9 @@ class Member < ApplicationRecord
mount_uploader :picture, PictureUploader
def admin
true
end
def admin?
true
end

View File

@ -1,6 +1,6 @@
#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 => "#", :role => "menuitem"}
%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"}
Profile

View File

@ -0,0 +1,23 @@
!!!
%html
%head
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%title
Forum #{yield :thredded_page_title}
%meta{:content => "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0", :name => "viewport"}/
= stylesheet_link_tag "tailwind"
= stylesheet_link_tag 'thredded', 'data-turbolinks-track': 'reload'
= stylesheet_link_tag "application"
= csrf_meta_tag
= csp_meta_tag
= javascript_include_tag 'thredded', |
async: !Rails.application.config.assets.debug, |
defer: true, |
'data-turbolinks-track': 'reload' |
= RailsGravatar.prefetch_dns_tag
%meta{:content => "width=device-width, initial-scale=1, user-scalable=no", :name => "viewport"}/
%body
= render "layouts/header"
= render "layouts/messages"
= yield
= render "layouts/footer"