merged
This commit is contained in:
@ -2,7 +2,9 @@ class StoriesController < ApplicationController
|
||||
before_action :set_story, only: %i[ show edit update destroy ]
|
||||
|
||||
def index
|
||||
@stories = Story.all.page params[:page]
|
||||
@q = Story.ransack(params[:q])
|
||||
@q.sorts = 'created_at desc' if @q.sorts.empty?
|
||||
@stories = @q.result(distinct: true).page( params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -9,27 +9,33 @@
|
||||
%nav.mt-6{"aria-label" => "Footer Navigation - Services"}
|
||||
%ul.space-y-4.text-sm
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/local"}
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/local_area"}
|
||||
Local Area
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/helsinki"}
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/helsinki_turku"}
|
||||
Helsinki & Turkku
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/other_sites"}
|
||||
Other Sites
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/in_summer"}
|
||||
In Summer
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/in_winter"}
|
||||
In Winter
|
||||
.col-span-2.sm:col-span-1
|
||||
%p.font-medium.text-gray-900 Information
|
||||
%nav.mt-6{"aria-label" => "Footer Navigation - Hub Feenix"}
|
||||
%ul.space-y-4.text-sm
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/info"}
|
||||
Info
|
||||
Living @ Feenix Info
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/the_deal"}
|
||||
About Volunteeing
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/arriving"}
|
||||
Arriving
|
||||
Getting here
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/about"}
|
||||
About
|
||||
About Hub Feenix
|
||||
.col-span-2.sm:col-span-1
|
||||
%p.font-medium.text-gray-900 People
|
||||
%nav.mt-6{"aria-label" => "Footer Navigation - Hub Feenix"}
|
||||
|
@ -32,7 +32,7 @@
|
||||
- if false
|
||||
%script{:src => "https://cdn.tailwindcss.com"}
|
||||
|
||||
%body.max-w-screen-2xl.xl:mx-auto
|
||||
%body.xl:mx-auto{class: "max-w-[1920px]"}
|
||||
= render "layouts/header"
|
||||
= render "layouts/messages"
|
||||
= yield
|
||||
|
@ -1,4 +1,10 @@
|
||||
= paginate @stories
|
||||
|
||||
.flex.justify-end
|
||||
= sort_link(@q, :happened ,class: 'flex flex-nowrap text-md')
|
||||
.border-r-4.mx-4
|
||||
= sort_link(@q, :created_at , class: 'flex flex-nowrap text-md')
|
||||
|
||||
- @stories.each do |story|
|
||||
= render_story(story)
|
||||
|
||||
|
Reference in New Issue
Block a user