améliorations

This commit is contained in:
Nicolas Bally 2015-11-22 13:46:41 +01:00
parent a179089ffc
commit c35320a1ac
13 changed files with 245 additions and 122 deletions

View File

@ -7,7 +7,32 @@
@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{
min-height:600px;

View File

@ -3,6 +3,8 @@
@import "fontawesome/font-awesome";
@import "public/top";
.observer-et-photographier-la-faune-sans-deranger{
.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);
}
}
.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;
} }

View 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;
}
}
}

View File

@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
class Forum::AuthsController < ApplicationController
layout "connexion"
layout "public"
def new
@forum = true

View File

@ -10,7 +10,7 @@ class Forum::ForumCategoriesController < ApplicationController
def show
@category = ForumCategory.find(params[:id])
@forum_topics = @category.forum_topics.where(:enabled => true).all
end

View File

@ -1,6 +1,4 @@
=image_tag("logo.png", :style => "width:200px;display:block;margin:auto;margin-bottom:2em;")
%h1 Se connecter
%h1 Se connecter au forum
= form_tag forum_auths_path do
%p

View 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"

View File

@ -1,6 +1,7 @@
%tr.topic#topic{:id => forum_topic.id}
%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;"}
=forum_topic.forum_messages.count - 1
%br

View File

@ -15,8 +15,10 @@
%body.admin
=render :partial => "public/shared/top"
-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
/ Brand and toggle get grouped for better mobile display
.navbar-header

View File

@ -49,20 +49,12 @@
</ul>
.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
=render :partial => "public/shared/top"
-if !@no_sidebar
#main
#corps{:class => (@menu_item.slug if @menu_item)}
@ -107,12 +99,15 @@
.main_section_title
=link_to "Prochainement +", "/agenda.html"
=#render Event.recents.limit(2)
-@side_events = Event.where(' (start_at > ?) or (stop_at > ?)',Time.now,Time.now).order(:start_at).limit(5)
=render :partial => "public/events/event_mini", :collection => @side_events, :as => :event
=yield :sidebar
.clear
-else
#main
=yield
.bottom

View 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

View 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

View File

@ -251,7 +251,7 @@ Survey::Application.routes.draw do
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