From f4c7b0edda7012db13bf704e716cf5aca44c8ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garci=CC=81a=20Cabeza?= Date: Sun, 26 Jul 2015 23:13:13 +0200 Subject: [PATCH] Includes first styles for header and debates --- app/assets/stylesheets/debates.scss | 126 +++++++++++++++++--- app/views/debates/_debate.html.erb | 23 ++-- app/views/debates/index.html.erb | 17 +-- app/views/devise/menu/_login_items.html.erb | 25 ++-- app/views/layouts/_header.html.erb | 27 +++-- app/views/layouts/application.html.erb | 42 ++++--- 6 files changed, 187 insertions(+), 73 deletions(-) diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index f4665655f..7fd35c790 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -4,6 +4,7 @@ // 02. Global styles // 03. Header // 04. Footer +// 05. Debates // 01. Variables @@ -12,32 +13,129 @@ $font-family-sans-serif: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; $line-height: rem-calc(24); +$brand: #0077B9; +$debates: #008CCF; +$header-color: #292B33; +$text-color: #919399; + // 02. Global styles // - - - - - - - - - - - - - - - - - - - - - - - - - +body { + font-family: $font-family-sans-serif; + font-weight: 300; + p { + font-weight: 300; + } +} - -// 02. Header +// 03. Header // - - - - - - - - - - - - - - - - - - - - - - - - - header { - background: url('https://static.pexels.com/photos/2752/city-sunny-people-street-large.jpg'); - background-position: 50% 50%; - background-size: cover; - min-height: $line-height*20; + background: url('home-header-bg.jpg'); + background-position: 50% 50%; + background-size: cover; + min-height: $line-height*20; } .contain-to-grid { - background: none; + background: none; +} + +.top-bar { + background: white; + color: $header-color; + height: $line-height*4; + + .name h1 a { + color: black; + font-family: 'Lato'; + font-size: rem-calc(36); + font-weight: lighter; + line-height: $line-height*4; + padding-left: 0; + white-space: nowrap; + + span { + color: $brand; + font-size: rem-calc(24); + font-weight: normal; + } + + img { + margin-right: $line-height/2; + } + } +} + +.top-bar-section li:not(.has-form) a:not(.button) { + background: white; + color: $brand; + line-height: $line-height*4; } .top-links { - color: white; - font-size: rem-calc(14); - padding: $header-line-height/2+em 0; + color: white; + font-size: rem-calc(14); + padding: $header-line-height/2+em 0; + + a { + color: white; + } +} + +// 04. Footer +// - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +// 05. Debates +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.debates-index { + margin-top: $line-height; +} + +.debate { + + .panel { + + .fi-comment-quotes { + color: $debates; + font-size: rem-calc(36); + line-height: $line-height; + } + + .label { + margin-top: $line-height/4; + } + + h3 a { + clear: both; + color: $header-color; + display: block; + font-size: rem-calc(16); + } + + p { + color: $text-color; + font-size: rem-calc(13); + } + } +} + + + + + + + + + + + - a { - color: white; - } -} \ No newline at end of file diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index d6c899bbe..045c2b1cd 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -1,12 +1,13 @@ -
-

<%= link_to debate.title, debate %>

-

<%= debate.description %>

+
+ +
+ + Debate + +

<%= link_to debate.title, debate %>

+

<%= debate.description %>

+

Creado el: <%= l debate.created_at.to_date %> por: <%= debate.author.name %>

-

- Creado el: <%= l debate.created_at.to_date %> - por: <%= debate.author.name %> -

- -

<%= render 'shared/tags', debate: debate %>

-
-



\ No newline at end of file +

<%= render 'shared/tags', debate: debate %>

+
+
\ No newline at end of file diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 50ac86a50..5581e21ea 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -1,10 +1,11 @@ -

Debates sobre Madrid

+<%#= link_to 'New Debate', new_debate_path, :class => 'button radius right' %> -
- <%= render @debates %> -
+
+
+ <%= render @debates %> +
+
-<%= render 'shared/tag_cloud' %> - -

-<%= link_to 'New Debate', new_debate_path %> + diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb index 797656f94..167d3e87e 100644 --- a/app/views/devise/menu/_login_items.html.erb +++ b/app/views/devise/menu/_login_items.html.erb @@ -1,11 +1,14 @@ -
- <% if user_signed_in? %> -
  • - <%= link_to('Logout', destroy_user_session_path, method: :delete) %> -
  • - <% else %> -
  • - <%= link_to('Login', new_user_session_path) %> -
  • - <% end %> -
    \ No newline at end of file + \ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 2991ef65b..d41a28bb6 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -5,26 +5,27 @@
    Portal de Transparencia | Datos abiertos
    - +
    \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 71b8f2805..9ea4a817f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,22 +1,32 @@ - - - + + + - <%= content_for?(:title) ? yield(:title) : "Participación" %> + <%= content_for?(:title) ? yield(:title) : "Participación" %> - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "vendor/modernizr" %> - <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> - - -

    <%= notice %>

    -

    <%= alert %>

    + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "vendor/modernizr" %> + <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + + <%= render 'layouts/header' %> + + <% if notice %> +

    <%= notice %>

    + <% end %> - <%= render 'devise/menu/login_items' %> - - <%= yield %> - + <% if alert %> +

    <%= alert %>

    + <% end %> + +
    +
    + <%= yield %> +
    +
    + \ No newline at end of file