From 7a1f4f44ad9e355997cbf0ec9bbe82cd36b2a7f1 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Sun, 14 Dec 2014 01:28:39 +0100 Subject: [PATCH] more planet templating --- app/assets/stylesheets/planet.css.scss | 15 +++++++++++ app/controllers/planet_controller.rb | 1 + app/views/layouts/application.html.erb | 1 + app/views/planet/index.html.erb | 37 ++++++++++++++++++++------ config/locales/en.yml | 12 +++++++-- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/planet.css.scss b/app/assets/stylesheets/planet.css.scss index 6346359..d63e5bd 100644 --- a/app/assets/stylesheets/planet.css.scss +++ b/app/assets/stylesheets/planet.css.scss @@ -3,3 +3,18 @@ max-width: 100%; } } + +.planet-page { + .col-md-3 { + padding-top: 30px; + + h4 { + font-weight: normal; + margin-top: 35px; + } + + ul { + padding-left: 20px; + } + } +} diff --git a/app/controllers/planet_controller.rb b/app/controllers/planet_controller.rb index 03abc1e..1d67b90 100644 --- a/app/controllers/planet_controller.rb +++ b/app/controllers/planet_controller.rb @@ -5,6 +5,7 @@ class PlanetController < ApplicationController def index @entries = Planet::Models::Entry.order(:published_at => :desc) .paginate(:page => params[:page], :per_page => 10) + @subscriptions = Planet::Models::Feed.order(:title => :asc) end def feed diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 364beb9..1f39e6b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,6 +8,7 @@ <%= auto_discovery_link_tag :atom, news_feed_url(subdomain: 'blog'), {:title => t('newsfeed')} %> + <%= auto_discovery_link_tag :atom, planet_feed_url(subdomain: 'planet'), {:title => t('planet_feed')} %> <%= stylesheet_link_tag 'application', :media => 'all' %> <%= javascript_include_tag 'application' %> <%= csrf_meta_tags %> diff --git a/app/views/planet/index.html.erb b/app/views/planet/index.html.erb index 398ea03..3aec661 100644 --- a/app/views/planet/index.html.erb +++ b/app/views/planet/index.html.erb @@ -1,19 +1,23 @@ <%- content_for :page_title do %> <%= t 'pages.planet.menu_title' %> <% end %> +<% content_for :wrapper_class, 'planet-page' %> -