Adjust home and process index styles

This commit is contained in:
Martín González
2017-01-12 10:54:39 +01:00
parent a2a61341fe
commit 203bc740ac
7 changed files with 115 additions and 82 deletions

View File

@@ -9,7 +9,7 @@
// -----------------
.brand-heading {
background: $brand;
margin-bottom: 2rem;
margin-bottom: 5rem;
.column {
padding-top: 10rem;
@@ -58,7 +58,7 @@
// 03. Legislation cards
// -----------------
.legislation {
margin: 0 0 4rem 0;
margin: 0 0 5rem 0;
background: white;
border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5;

View File

@@ -34,6 +34,8 @@
font-weight: 700;
}
$epigraph-font-size: rem-calc(15);
// 02. Hero
// -----------------
.legislation-hero {
@@ -63,7 +65,9 @@
#debate-info {
display: none;
margin-top: 1rem;
margin-top: 3rem;
padding-top: 4rem;
border-top: 1px solid darken($border, 10%);
@include breakpoint(medium) {
margin-bottom: 2rem;
@@ -80,6 +84,7 @@
}
p {
font-size: $base-font-size;
@include breakpoint(medium) {
margin-left: 25%;
}
@@ -97,7 +102,7 @@
}
.center .button {
background: #004A83;
background: $brand;
margin-bottom: 0;
}
@@ -113,6 +118,14 @@
.description {
margin-bottom: 1rem;
p {
font-size: $epigraph-font-size;
}
h4 {
font-size: $base-font-size;
}
@include breakpoint(medium) {
margin-bottom: 0;
}
@@ -146,60 +159,74 @@
.legislation-process-categories {
position: relative;
svg {
position: absolute;
top: 1.5rem;
left: 0;
.legislation-process-list {
border-bottom: 1px solid $medium-gray;
margin: 0 1rem 1rem 1rem;
@include breakpoint(medium) {
transform: rotate(-8deg);
top: 0.75rem;
}
}
ul {
padding-top: 4rem;
list-style: none;
margin-left: 0;
padding-left: 0;
border-bottom: 1px solid $medium-gray;
li {
cursor: pointer;
margin-left: 0;
display: inline-block;
margin-bottom: 1rem;
margin-right: 1rem;
}
@media (min-width: 950px) {
margin-right: 0;
margin-left: 3rem;
margin-bottom: 0;
ul {
max-width: 75rem;
margin-left: auto;
margin-right: auto;
list-style: none;
padding-top: 4rem;
padding-left: 0;
margin-bottom: 0;
@include breakpoint(medium) {
padding-left: 1rem;
}
a,
h4 {
color: #6D6D6D;
margin-bottom: 0;
svg {
position: absolute;
top: 1.5rem;
@include breakpoint(medium) {
transform: rotate(-8deg);
top: 0.75rem;
}
}
a {
&:hover, &:active {
text-decoration: none;
li {
cursor: pointer;
display: inline-block;
margin: 0 1rem 1rem 0;
&:first-of-type {
margin-left: 0;
}
p {
margin-bottom: 0;
@media (min-width: 950px) {
margin: 0 0 0 3rem;
}
@include breakpoint(medium) {
margin-bottom: 1rem;
a,
h4 {
color: #6D6D6D;
margin-bottom: 0;
}
a {
&:hover, &:active {
text-decoration: none;
}
p {
margin-bottom: 0;
@include breakpoint(medium) {
margin-bottom: 1rem;
}
}
}
}
}
.active {
border-bottom: 2px solid $brand;
.active {
border-bottom: 2px solid $brand;
}
}
}
}

View File

@@ -1,29 +1,32 @@
<nav class="legislation-process-categories">
<%= render 'legislation/processes/key_dates_svg' %>
<ul>
<li <%= "class=active" if phase == :debate %>>
<%= link_to process do %>
<h4><%= t('legislation.processes.shared.debate_dates') %></h4>
<p><%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :draft_publication %>>
<%= link_to legislation_process_draft_publication_path(process) do %>
<h4><%= t('legislation.processes.shared.draft_publication_date') %></h4>
<p><%= format_date(process.draft_publication_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :allegations %>>
<%= link_to legislation_process_allegations_path(process) do %>
<h4><%= t('legislation.processes.shared.allegations_dates') %></h4>
<p><%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :final_version_publication %>>
<%= link_to legislation_process_final_version_publication_path(process) do %>
<h4><%= t('legislation.processes.shared.final_publication_date') %></h4>
<p><%= format_date(process.final_publication_date) %></p>
<% end %>
</li>
</ul>
<div class="legislation-process-list">
<ul>
<%= render 'legislation/processes/key_dates_svg' %>
<li <%= "class=active" if phase == :debate %>>
<%= link_to process do %>
<h4><%= t('legislation.processes.shared.debate_dates') %></h4>
<p><%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :draft_publication %>>
<%= link_to legislation_process_draft_publication_path(process) do %>
<h4><%= t('legislation.processes.shared.draft_publication_date') %></h4>
<p><%= format_date(process.draft_publication_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :allegations %>>
<%= link_to legislation_process_allegations_path(process) do %>
<h4><%= t('legislation.processes.shared.allegations_dates') %></h4>
<p><%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %></p>
<% end %>
</li>
<li <%= "class=active" if phase == :final_version_publication %>>
<%= link_to legislation_process_final_version_publication_path(process) do %>
<h4><%= t('legislation.processes.shared.final_publication_date') %></h4>
<p><%= format_date(process.final_publication_date) %></p>
<% end %>
</li>
</ul>
</div>
</nav>

View File

@@ -3,7 +3,6 @@
<div class="small-12 medium-8 column">
<div class="legislation-text">
<h3><%= link_to process.title, process %></h3>
<%= markdown(first_paragraph(process.description)) %>
</div>
</div>
@@ -12,6 +11,10 @@
<span class="icon-comments"></span>&nbsp; <%= t('.see_latest_comments') %>
<% end %>
</div>
<div class="small-12 medium-11 column end">
<%= markdown(first_paragraph(process.description)) %>
</div>
</div>
<div class="column row">

View File

@@ -2,9 +2,9 @@
<%= render 'legislation/processes/header', process: @process, header: :full %>
<div class="row">
<%= render 'legislation/processes/key_dates', process: @process, phase: @phase %>
<%= render 'legislation/processes/key_dates', process: @process, phase: @phase %>
<div class="row">
<div class="debate-chooser">
<div class="row">
<p><%= t(".empty") %></p>

View File

@@ -2,9 +2,9 @@
<%= render 'legislation/processes/header', process: @process, header: :full %>
<div class="row">
<%= render 'legislation/processes/key_dates', process: @process, phase: @phase %>
<%= render 'legislation/processes/key_dates', process: @process, phase: @phase %>
<div class="row">
<div class="debate-chooser">
<div class="row">
<div class="debate-draft">

View File

@@ -2,9 +2,9 @@
<%= render 'legislation/processes/header', process: @process, header: :full %>
<div class="row">
<%= render 'key_dates', process: @process, phase: :debate %>
<%= render 'key_dates', process: @process, phase: :debate %>
<div class="row">
<div class="debate-chooser">
<div class="row">
<%= render 'debate', process: @process %>