Skip to content

Commit

Permalink
Merge branch 'designer' of github.com:OPORA/publicwhip-lviv into desi…
Browse files Browse the repository at this point in the history
…gner
  • Loading branch information
root committed Jul 19, 2017
2 parents 5fcf396 + ecdc54c commit a0efce3
Show file tree
Hide file tree
Showing 14 changed files with 222 additions and 163 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/errors.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
54 changes: 54 additions & 0 deletions app/assets/stylesheets/errors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Place all the styles related to the errors controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
//header{
// background: none;
// background-color: #000;
// height: 42px;
// min-height: auto;
//}
//#logo p{
// color: #282828;
//}
//#logo .first-word{
// color: #009FE2;
//}
//#navbarCollapse{
// background-color: #000;
//}
//.navbar-inverse .navbar-nav .nav-link{
// line-height: 28px;
// font-size: 14px;
// height: 3.51%;
//}
//.navbar {
// padding: 0 0 0 15rem;
//}
#first-block .notfound h1{
color: #252525;
font-size:24px;
line-height: 24px;
font-family: GothaProBol;
}
#first-block .notfound p{
color: #009FE2;
font-size:72px;
line-height: 150px;
font-family: GothaProMed;
}
#first-block .errors h1{
color: #252525;
font-size:24px;
line-height: 24px;
font-family: GothaProBol;
padding-top: 80px;
padding-bottom: 35px;
}
#first-block .errors p{
font-size:18px;
line-height: 28px;
font-family: GothaProMed;
}
#first-block.container.center-justified {
padding-top: 150px;
}
13 changes: 13 additions & 0 deletions app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class ErrorsController < ApplicationController
def not_found
render :status => 404
end

def unacceptable
render :status => 422
end

def internal_error
render :status => 500
end
end
2 changes: 2 additions & 0 deletions app/helpers/errors_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ErrorsHelper
end
72 changes: 64 additions & 8 deletions app/views/about/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,68 @@
<% content_for :title, 'Про проект— Вони голосують для тебе' %>
<div class="jumbotron">
<div class="container">
<h1>Про проект</h1>
<p>Забудь, що говорять політики. Справжню вагу мають лише їхні дії. Слідкуй за тим, як депутати голосують і
дізнавайся про їхню справжню позицію щодо питань, які впливають на нас усіх.</p>
<style>
#first-block h1{
color: #252525;
font-size:24px;
line-height: 24px;
font-family: GothaProBol;
}
#first-block h2 {
font-family: GothaProMed;
font-size: 18px;
line-height:18px;
}
#first-block h2::before{
border-top: 4px solid #000;
content: "";
margin: 0 auto;
position: absolute;
left: 0;
right: 0;
width: 10%;
top: 90px;
}
.update-data p:nth-child(2), .rada-date p:nth-child(2){
color: #949393;
}
#first-block [class*="col-12"]{
padding: 50px 0 50px 0;
}
.team, .how-help{
background-color: #F5F5F5;
}
</style>
<div id="first-block" class="container">

<div class="col-12 about">
<h1 class="text-uppercase center-justified">Про проект</h1>

<div>

</div>

</div>
</div>
<div class="container">
<%= render 'about/index' %>

<div class="col-12 team">
<h2 class="text-uppercase center-justified">Команда</h2>


</div>

<div class="col-12 partners">
<h2 class="text-uppercase center-justified">Партнери</h2>

<div>текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст текст</div>

</div>

<div class="col-12 how-help">
<h2 class="text-uppercase center-justified">Як допомогти</h2>

<div>текст</div>

</div>



</div>

16 changes: 16 additions & 0 deletions app/views/errors/internal_error.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div id="first-block" class="container center-justified">

<a id="logo" class="col-4 navbar-brand text-uppercase logo" href="/">
<p><i class="fa fa-circle fa-stack-1x"></i>
<span class="first-word">Lviv</span>.Rada4You.org</p>
</a>

<div class="errors">
<h1 class="text-uppercase">технічні роботи</h1>

<p>Перепрошуємо за тимчасові незручності.</p>
<p>Ми повернемося до вас за ХХ годин.</p>

</div>

</div>
11 changes: 11 additions & 0 deletions app/views/errors/not_found.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="first-block" class="container">

<div class="notfound center-justified">
<h1 class="text-uppercase">сторінка не знайдена</h1>

<p>404</p>

<div class="col-12"><%= link_to "<h4 class='text-uppercase text-center'>повернутись на головну <i class='fa fa-arrow-circle-right' aria-hidden='true'></i></h4>".html_safe, root_path %></div>
</div>

</div>
2 changes: 2 additions & 0 deletions app/views/errors/unacceptable.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Errors#unacceptable</h1>
<p>Find me in app/views/errors/unacceptable.html.erb</p>
49 changes: 27 additions & 22 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,27 @@
}
.navbar {
padding: 0 0 0 15rem;
=
}
#first-block .notfound h1{

color: #252525;
font-size:24px;
line-height: 24px;
font-family: GothaProBol;
}
#first-block .notfound p{
color: #009FE2;
font-size:72px;
line-height: 150px;
.fa-inverse {
color: #E5E5E5;
font-size: 12px;
}
.update-data p:nth-child(2), .rada-date p:nth-child(2){
color: #949393;
}
</style>
<% end %>
</head>
<body>
<% unless request.path == "/500" %>
<header class="container-fluid">
<nav class="navbar navbar-toggleable-md navbar-light mb-4">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
Expand Down Expand Up @@ -131,30 +137,31 @@

</header>
<% if controller.controller_path != "home" %>
<%= link_to "<p><i class='fa fa-circle fa-stack-1x'></i><span class='first-word'>Lviv</span>.Rada4You.org</p>".html_safe, root_path, class: "navbar-brand text-uppercase logo", id: "logo" %>

<div id="info" class="row">
<div class="col-12">
<div class="col-2 update-data pull-right pull-2">
<div id="info" class="row">
<div class="col-12">
<%= link_to "<p><i class='fa fa-circle fa-stack-1x'></i><span class='first-word'>Lviv</span>.Rada4You.org</p>".html_safe, root_path, class: "col-4 navbar-brand text-uppercase logo", id: "logo" %>
<% if controller.controller_path != "errors" %>
<div class="col-3 update-data pull-right pull-3">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-clock-o fa-stack-1x fa-inverse" aria-hidden="true"></i>
</span>
<p class="text-uppercase">Оновлення даних</p>
<p><%= last_update_rada %></p>
</div>
<div class="col-2 rada-date pull-right push-2">
<p class="text-uppercase">Оновлення даних</p>
<p><%= last_update_rada %></p>
</div>
<div class="col-3 rada-date pull-right push-3">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-clock-o fa-stack-1x fa-inverse" aria-hidden="true"></i>
</span>
<p class="text-uppercase">Засідання облради</p>
<p><%= last_sessions_rada() %></p>
<p class="text-uppercase">Засідання облради</p>
<p><%= last_sessions_rada() %></p>
</div>
<% end %>
</div>
</div>
</div>
</div>
<% end %>
<% end %>
<%= yield %>
<% unless request.path == "/500" %>
<footer>
<div class="container">
<div class="col-12"><p class="text-uppercase text-center title">Проект Громадянської мережі <%= link_to "ОПОРА", "http://oporaua.org", target: "_blank" %></p></div>
Expand Down Expand Up @@ -183,7 +190,7 @@
</div>

</footer>

<% end %>
<!-- Modal search -->
<div id="ModalSearch" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
Expand All @@ -210,8 +217,6 @@
</div>
</div>
</div>


<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module PublicwhipLviv
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.1
config.exceptions_app = self.routes

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
Expand Down
10 changes: 10 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Rails.application.routes.draw do
get 'errors/not_found'

get 'errors/unacceptable'

get 'errors/internal_error'

get 'sumisne-holosuvannia' => 'sumisne_holosuvannia#init', as: :sumisne_holosuvannia
get 'sumisne-holosuvannia/api' => 'sumisne_holosuvannia#api', as: :sumisne_holosuvannia_api

Expand All @@ -21,6 +27,10 @@
get 'search_mp' => 'home#search_mp', as: :search_mp
get 'search' => 'home#search', as: :search
get 'home/index'
get "/404", :to => "errors#not_found"
get "/422", :to => "errors#unacceptable"
get "/500", :to => "errors#internal_error"


# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
Expand Down
67 changes: 0 additions & 67 deletions public/404.html

This file was deleted.

Loading

0 comments on commit a0efce3

Please sign in to comment.