From f2fe2ac6a490aaf9ce7a4db37632b9b09e68880c Mon Sep 17 00:00:00 2001 From: Joerg Reichert Date: Sat, 31 Mar 2018 17:22:42 +0200 Subject: [PATCH] 22: impressum page --- app/assets/stylesheets/application.css.scss | 5 ++++ app/controllers/application_controller.rb | 4 +++ app/views/application/glossary.html.slim | 14 ++++++++++ app/views/application/impressum.html.slim | 30 +++++++++++++++++++++ app/views/layouts/application.html.slim | 7 ++++- config/routes.rb | 1 + 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 app/views/application/glossary.html.slim create mode 100644 app/views/application/impressum.html.slim diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 9767c7c..e2b144a 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -17,3 +17,8 @@ @import 'foundation_and_overrides'; @import 'objects/search-result'; + +.left {float:left} +.right {float:right} +.clear {clear:both} +.header_indent{ padding-left: 20px } \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 29af4b4..315c86f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,5 +11,9 @@ class ApplicationController < ActionController::Base !!current_user end + def impressum + render action: "impressum" + end + helper_method :current_user, :signed_in? end diff --git a/app/views/application/glossary.html.slim b/app/views/application/glossary.html.slim new file mode 100644 index 0000000..e66d827 --- /dev/null +++ b/app/views/application/glossary.html.slim @@ -0,0 +1,14 @@ +doctype html +html + head + title Stadtratmonitor Leipzig - Glossar + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true + = javascript_include_tag 'vendor/modernizr' + = csrf_meta_tags + + body + .row + .small-12.columns + .clearfix + h1[id="title" class="left"] = 'Glossar' + diff --git a/app/views/application/impressum.html.slim b/app/views/application/impressum.html.slim new file mode 100644 index 0000000..dcb15fd --- /dev/null +++ b/app/views/application/impressum.html.slim @@ -0,0 +1,30 @@ +doctype html +html + head + title Stadtratmonitor Leipzig - Impressum + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true + = javascript_include_tag 'vendor/modernizr' + = csrf_meta_tags + + body + .row + .small-12.columns + .clearfix + h3#title = 'Impressum' + h5#content = 'Inhalt' + div + | Im Rahmen unseres wöchentlichen Treffens im OKLab Leipzig haben wir + einen Aufsatz auf das offizielle Leipziger Ratsinformationssystem + entwickelt, welcher dieses besser durchsuchbar machen soll. + h5#programming = 'Programmierung' + ul + li = link_to 'Andreas Haller', 'https://github.com/ahx' + li = link_to 'Lars Mai', 'https://github.com/lhm' + li = link_to 'Jörg Reichert ', 'https://github.com/joergreichert' + h5#sources = 'Quellen' + ul + li = link_to 'Web Anwendung Source Code', 'https://github.com/CodeforLeipzig/stadtratmonitor' + li = link_to 'Scraper Source Code', 'https://github.com/jrlover/city_council_leipzig_recent_papers' + li = link_to 'Scraper Ausführung', 'https://morph.io/jrlover/city_council_leipzig_recent_papers' + li = link_to 'Leipziger Ratsinformationssystem (Quelle)', 'https://ratsinfo.leipzig.de/' + li = link_to 'Impressum unserer Organisation Code for Germany (das auch für dieses Seite gelten soll)', 'https://codefor.de/impressum/' diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 375f103..6633d7c 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -11,7 +11,12 @@ html .row .small-12.columns .clearfix - h1#title = 'Stadtratmonitor Leipzig' + h1[id="title" class="left"] = link_to 'Stadtratmonitor Leipzig', search_path + div(class="right") + div(class="left") = link_to 'Suche', search_path + div(class="right header_indent") = link_to 'Impressum', impressum_url + div(class="clear") + div(class="clear") - flash.each do |name, msg| = content_tag :div, msg, class: name = yield diff --git a/config/routes.rb b/config/routes.rb index 9f519cc..8aa6ebe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,7 @@ Rails.application.routes.draw do root :to => 'search#index', as: :search post '/import' => 'import#new_papers_callback' + get '/impressum' => 'application#impressum', as: :impressum # Example of regular route: # get 'products/:id' => 'catalog#view'