améliorations
This commit is contained in:
parent
a179089ffc
commit
c35320a1ac
@ -7,7 +7,32 @@
|
|||||||
|
|
||||||
@import "redactor";
|
@import "redactor";
|
||||||
|
|
||||||
|
@import "public/top";
|
||||||
|
|
||||||
|
.top{
|
||||||
|
font-family:"Museo sans";
|
||||||
|
font-weight:300;
|
||||||
|
position:relative;
|
||||||
|
background:rgba(31,31,31,1);
|
||||||
|
}
|
||||||
|
#forum_nav{
|
||||||
|
|
||||||
|
background:rgba(116,180,55,1);
|
||||||
|
border:0;
|
||||||
|
color:white;
|
||||||
|
a{
|
||||||
|
|
||||||
|
color:white;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
color:#0088cc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dropdown-menu a{
|
||||||
|
|
||||||
|
color:#262626;
|
||||||
|
}
|
||||||
|
}
|
||||||
#main{
|
#main{
|
||||||
min-height:600px;
|
min-height:600px;
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
@import "fontawesome/font-awesome";
|
@import "fontawesome/font-awesome";
|
||||||
|
|
||||||
|
@import "public/top";
|
||||||
|
|
||||||
|
|
||||||
.observer-et-photographier-la-faune-sans-deranger{
|
.observer-et-photographier-la-faune-sans-deranger{
|
||||||
.couv{
|
.couv{
|
||||||
@ -245,71 +247,6 @@ margin:auto;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.top{
|
|
||||||
#logo{
|
|
||||||
width:185px;
|
|
||||||
position:absolute;
|
|
||||||
bottom:0;
|
|
||||||
left:40px;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
min-height:90px;
|
|
||||||
width:100%;
|
|
||||||
|
|
||||||
margin:auto;
|
|
||||||
|
|
||||||
|
|
||||||
position:fixed;
|
|
||||||
top:0px;
|
|
||||||
right:0;
|
|
||||||
left:0;
|
|
||||||
background:rgba(0,0,0,0.7);
|
|
||||||
z-index:3;
|
|
||||||
|
|
||||||
#menu{
|
|
||||||
margin-right:40px;
|
|
||||||
margin-bottom:14px;
|
|
||||||
font-size:14px;
|
|
||||||
text-align:right;
|
|
||||||
text-transform:uppercase;
|
|
||||||
position:absolute;
|
|
||||||
right:0;
|
|
||||||
bottom:0;
|
|
||||||
|
|
||||||
a{
|
|
||||||
|
|
||||||
margin:0;
|
|
||||||
|
|
||||||
display: inline-block;
|
|
||||||
color:white;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
|
|
||||||
padding: 2px 10px;
|
|
||||||
|
|
||||||
margin-right:5px;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
&:hover, &.active{
|
|
||||||
|
|
||||||
color:rgba(116,180,55,1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child{
|
|
||||||
margin-right:0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -754,3 +691,35 @@ article{
|
|||||||
color:rgba(115,115,115,1);
|
color:rgba(115,115,115,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event_mini_link{
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
text-decoration:none !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.event_mini{
|
||||||
|
|
||||||
|
margin-bottom:15px;
|
||||||
|
img{
|
||||||
|
float:left;
|
||||||
|
width:120px;
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date{
|
||||||
|
font-size:1em;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
|
||||||
|
color:rgba(106,148,54,1);
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
color:black;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} }
|
||||||
|
92
app/assets/stylesheets/public/top.css.scss
Normal file
92
app/assets/stylesheets/public/top.css.scss
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
.top{
|
||||||
|
#logo{
|
||||||
|
width:185px;
|
||||||
|
position:absolute;
|
||||||
|
bottom:0;
|
||||||
|
left:40px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
min-height:90px;
|
||||||
|
width:100%;
|
||||||
|
|
||||||
|
margin:auto;
|
||||||
|
|
||||||
|
|
||||||
|
position:fixed;
|
||||||
|
top:0px;
|
||||||
|
right:0;
|
||||||
|
left:0;
|
||||||
|
background:rgba(0,0,0,0.7);
|
||||||
|
z-index:3;
|
||||||
|
|
||||||
|
#menu{
|
||||||
|
margin-right:40px;
|
||||||
|
margin-bottom:14px;
|
||||||
|
font-size:14px;
|
||||||
|
text-align:right;
|
||||||
|
text-transform:uppercase;
|
||||||
|
position:absolute;
|
||||||
|
right:0;
|
||||||
|
bottom:0;
|
||||||
|
|
||||||
|
a{
|
||||||
|
|
||||||
|
margin:0;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
color:white;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
|
||||||
|
padding: 2px 10px;
|
||||||
|
|
||||||
|
margin-right:5px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&:hover, &.active{
|
||||||
|
|
||||||
|
color:rgba(116,180,55,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child{
|
||||||
|
margin-right:0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#personnal_menu{
|
||||||
|
a{
|
||||||
|
|
||||||
|
margin:0;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
color:white;
|
||||||
|
opacity:0.5;
|
||||||
|
font-size:0.9em;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
|
||||||
|
padding: 2px 10px;
|
||||||
|
|
||||||
|
margin-right:5px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&:hover, &.active{
|
||||||
|
opacity:1;
|
||||||
|
color:rgba(116,180,55,1);
|
||||||
|
}
|
||||||
|
position:absolute;
|
||||||
|
top:15px;
|
||||||
|
right:35px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class Forum::AuthsController < ApplicationController
|
class Forum::AuthsController < ApplicationController
|
||||||
layout "connexion"
|
layout "public"
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@forum = true
|
@forum = true
|
||||||
|
@ -10,7 +10,7 @@ class Forum::ForumCategoriesController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@category = ForumCategory.find(params[:id])
|
@category = ForumCategory.find(params[:id])
|
||||||
|
@forum_topics = @category.forum_topics.where(:enabled => true).all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
=image_tag("logo.png", :style => "width:200px;display:block;margin:auto;margin-bottom:2em;")
|
%h1 Se connecter au forum
|
||||||
|
|
||||||
%h1 Se connecter
|
|
||||||
|
|
||||||
= form_tag forum_auths_path do
|
= form_tag forum_auths_path do
|
||||||
%p
|
%p
|
||||||
|
17
app/views/forum/forum_categories/show.html.haml
Normal file
17
app/views/forum/forum_categories/show.html.haml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
=link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right"
|
||||||
|
|
||||||
|
%h1=@category.title
|
||||||
|
%table.table.table-striped.table-hover
|
||||||
|
%tr.transparent
|
||||||
|
%th Fil de discussion
|
||||||
|
%th{:style => "width:150px;"} Catégorie
|
||||||
|
%th Réponses
|
||||||
|
%th Lancé
|
||||||
|
%th Activité
|
||||||
|
|
||||||
|
-if moderator?
|
||||||
|
%th{:style => "width:50px;"}
|
||||||
|
=render @forum_topics
|
||||||
|
|
||||||
|
|
||||||
|
=link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right"
|
@ -1,6 +1,7 @@
|
|||||||
%tr.topic#topic{:id => forum_topic.id}
|
%tr.topic#topic{:id => forum_topic.id}
|
||||||
%td=link_to forum_topic.title, [:forum, forum_topic]
|
%td=link_to forum_topic.title, [:forum, forum_topic]
|
||||||
%td{:style => "width:160px;"}=forum_topic.category.title if forum_topic.category
|
%td{:style => "width:160px;"}
|
||||||
|
=link_to forum_topic.category.title, [:forum, forum_topic.category] if forum_topic.category
|
||||||
%td{:style => "width:100px;"}
|
%td{:style => "width:100px;"}
|
||||||
=forum_topic.forum_messages.count - 1
|
=forum_topic.forum_messages.count - 1
|
||||||
%br
|
%br
|
||||||
|
@ -15,8 +15,10 @@
|
|||||||
|
|
||||||
|
|
||||||
%body.admin
|
%body.admin
|
||||||
|
|
||||||
|
=render :partial => "public/shared/top"
|
||||||
-if current_fuser
|
-if current_fuser
|
||||||
%nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation", :style => "border-radius:0;"}
|
%nav#forum_nav.navbar.navbar-default.navbar-inverse{role: "navigation", :style => "border-radius:0;"}
|
||||||
.container-fluid
|
.container-fluid
|
||||||
/ Brand and toggle get grouped for better mobile display
|
/ Brand and toggle get grouped for better mobile display
|
||||||
.navbar-header
|
.navbar-header
|
||||||
|
@ -49,20 +49,12 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
.top
|
=render :partial => "public/shared/top"
|
||||||
|
|
||||||
=link_to image_tag("/logo_pic_vert_w.png", :id => "logo"), "/"
|
|
||||||
|
|
||||||
#menu
|
|
||||||
|
|
||||||
-MenuItem.where(:parent_id => nil, :enabled => true, :visible => true).order(:position).each do |menu_item|
|
|
||||||
-description = ""
|
|
||||||
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
|
|
||||||
=link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-if !@no_sidebar
|
||||||
#main
|
#main
|
||||||
#corps{:class => (@menu_item.slug if @menu_item)}
|
#corps{:class => (@menu_item.slug if @menu_item)}
|
||||||
|
|
||||||
@ -107,12 +99,15 @@
|
|||||||
.main_section_title
|
.main_section_title
|
||||||
=link_to "Prochainement +", "/agenda.html"
|
=link_to "Prochainement +", "/agenda.html"
|
||||||
|
|
||||||
|
-@side_events = Event.where(' (start_at > ?) or (stop_at > ?)',Time.now,Time.now).order(:start_at).limit(5)
|
||||||
=#render Event.recents.limit(2)
|
=render :partial => "public/events/event_mini", :collection => @side_events, :as => :event
|
||||||
|
|
||||||
=yield :sidebar
|
=yield :sidebar
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
-else
|
||||||
|
#main
|
||||||
|
=yield
|
||||||
|
|
||||||
|
|
||||||
.bottom
|
.bottom
|
||||||
|
13
app/views/public/events/_event_mini.html.haml
Normal file
13
app/views/public/events/_event_mini.html.haml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
=link_to public_event_path(event), :class => "event_mini_link" do
|
||||||
|
.event_mini
|
||||||
|
.image=image_tag event.image_file.file.square.url if event.image_file
|
||||||
|
%p.date
|
||||||
|
=raw event_human_date(event)
|
||||||
|
%h2=event.title
|
||||||
|
|
||||||
|
.clear
|
||||||
|
|
||||||
|
|
||||||
|
|
11
app/views/public/shared/_top.html.haml
Normal file
11
app/views/public/shared/_top.html.haml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.top
|
||||||
|
|
||||||
|
=link_to image_tag("/logo_pic_vert_w.png", :id => "logo"), "/"
|
||||||
|
#personnal_menu
|
||||||
|
=link_to "Accès au forum »", "/forum"
|
||||||
|
#menu
|
||||||
|
|
||||||
|
-MenuItem.where(:parent_id => nil, :enabled => true, :visible => true).order(:position).each do |menu_item|
|
||||||
|
-description = ""
|
||||||
|
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
|
||||||
|
=link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s
|
@ -251,7 +251,7 @@ Survey::Application.routes.draw do
|
|||||||
get '*url.:f' => 'public/menu_items#redirect', :f => "html"
|
get '*url.:f' => 'public/menu_items#redirect', :f => "html"
|
||||||
|
|
||||||
|
|
||||||
root 'public/menu_items#show' ,:constraints => {:domain => ["lepicvert.org"]}
|
root 'public/menu_items#show' ,:constraints => {:domain => ["lepicvert.org","localhost"]}
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user