From c4296b59a7f9d667d295f9c37b71f7849b818fb3 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 28 Jan 2025 22:47:15 +0100 Subject: Big overhaul patch and style changes --- app/views/content/_featured_articles.html.erb | 33 +++++++++++++++++++--- app/views/content/_main_navigation.html.erb | 8 +++++- .../public/no_date_and_author.html.erb | 4 +-- .../no_title_abstract_date_and_author.html.erb | 4 +-- .../public/standard_template.html.erb | 4 +-- .../page_templates/public/title_only.html.erb | 4 +-- .../custom/page_templates/public/update.html.erb | 4 +-- app/views/custom/partials/_article.html.erb | 4 +-- .../custom/partials/_no_date_and_author.html.erb | 4 +-- app/views/layouts/application.html.erb | 17 ++++++----- app/views/layouts/pages.html.erb | 2 ++ app/views/nodes/edit.html.erb | 2 +- app/views/rss/recent_changes.xml.builder | 8 +++--- app/views/rss/updates.rdf.builder | 18 ++++++------ app/views/rss/updates.xml.builder | 7 +++-- app/views/search/_search_result.html.erb | 6 ++-- 16 files changed, 81 insertions(+), 48 deletions(-) (limited to 'app/views') diff --git a/app/views/content/_featured_articles.html.erb b/app/views/content/_featured_articles.html.erb index 75e2e1d..0220abb 100644 --- a/app/views/content/_featured_articles.html.erb +++ b/app/views/content/_featured_articles.html.erb @@ -1,5 +1,14 @@ diff --git a/app/views/content/_main_navigation.html.erb b/app/views/content/_main_navigation.html.erb index 67d4ecc..a984512 100644 --- a/app/views/content/_main_navigation.html.erb +++ b/app/views/content/_main_navigation.html.erb @@ -3,5 +3,11 @@ <% menu_items.each do |item| %>
  • <%= link_to_path item.title, item.path %>
  • <% end %> +
  • + <%= language_selector %> +
  • +
  • + +
  • - \ No newline at end of file + diff --git a/app/views/custom/page_templates/public/no_date_and_author.html.erb b/app/views/custom/page_templates/public/no_date_and_author.html.erb index b019805..fa39e54 100644 --- a/app/views/custom/page_templates/public/no_date_and_author.html.erb +++ b/app/views/custom/page_templates/public/no_date_and_author.html.erb @@ -1,8 +1,8 @@ -
    +

    <%= @page.title %>

    <%= sanitize( @page.abstract ) %>

    <%= headline_image %>
    <%= aggregate?(@page.body) %>
    -<%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file +<%= will_paginate(@content_collection) if @content_collection %> diff --git a/app/views/custom/page_templates/public/no_title_abstract_date_and_author.html.erb b/app/views/custom/page_templates/public/no_title_abstract_date_and_author.html.erb index 83cbff6..64e2a7c 100644 --- a/app/views/custom/page_templates/public/no_title_abstract_date_and_author.html.erb +++ b/app/views/custom/page_templates/public/no_title_abstract_date_and_author.html.erb @@ -1,6 +1,6 @@ -
    +
    <%= headline_image %>
    <%= aggregate?(@page.body) %>
    -<%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file +<%= will_paginate(@content_collection) if @content_collection %> diff --git a/app/views/custom/page_templates/public/standard_template.html.erb b/app/views/custom/page_templates/public/standard_template.html.erb index 8000af5..bbc8cd0 100644 --- a/app/views/custom/page_templates/public/standard_template.html.erb +++ b/app/views/custom/page_templates/public/standard_template.html.erb @@ -1,8 +1,8 @@ -
    +

    <%= @page.title %>

    <%= sanitize( @page.abstract )%>

    <%= headline_image %>
    <%= aggregate?(@page.body) %>
    -<%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file +<%= will_paginate(@content_collection) if @content_collection %> diff --git a/app/views/custom/page_templates/public/title_only.html.erb b/app/views/custom/page_templates/public/title_only.html.erb index 09c7455..42fe9a6 100644 --- a/app/views/custom/page_templates/public/title_only.html.erb +++ b/app/views/custom/page_templates/public/title_only.html.erb @@ -1,7 +1,7 @@ -
    +

    <%= @page.title %>

    <%= headline_image %>
    <%= aggregate?(@page.body) %>
    -<%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file +<%= will_paginate(@content_collection) if @content_collection %> diff --git a/app/views/custom/page_templates/public/update.html.erb b/app/views/custom/page_templates/public/update.html.erb index 5ea277a..d5995ac 100644 --- a/app/views/custom/page_templates/public/update.html.erb +++ b/app/views/custom/page_templates/public/update.html.erb @@ -1,4 +1,4 @@ -
    +

    <%= @page.title %>

    <%= date_for_page @page %>, <%= @page.user.try(:login) %>

    <%= sanitize( @page.abstract )%>

    @@ -6,4 +6,4 @@
    <%= aggregate?(@page.body) %>
    -<%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file +<%= will_paginate(@content_collection) if @content_collection %> diff --git a/app/views/custom/partials/_article.html.erb b/app/views/custom/partials/_article.html.erb index 433c31c..b738ac7 100644 --- a/app/views/custom/partials/_article.html.erb +++ b/app/views/custom/partials/_article.html.erb @@ -1,7 +1,7 @@ -
    +

    <%= link_to_path page.title, page.node.unique_name %>

    <%= date_for_page page %>, <%= author_for_page page %>

    <%= page.abstract %> <%= link_to_path t(:more), page.node.unique_name %>

    -
    \ No newline at end of file +
    diff --git a/app/views/custom/partials/_no_date_and_author.html.erb b/app/views/custom/partials/_no_date_and_author.html.erb index 61d6aac..fed02ac 100644 --- a/app/views/custom/partials/_no_date_and_author.html.erb +++ b/app/views/custom/partials/_no_date_and_author.html.erb @@ -1,4 +1,4 @@ -
    +

    <%= link_to page.title, content_path(page.node.unique_path) %>

    <%= page.abstract %>

    -
    \ No newline at end of file +
    diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 3c95d75..e6efccf 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,6 +4,11 @@ + + + + + <%= page_title %> <%= stylesheet_link_tag "ccc" %> @@ -16,7 +21,7 @@ <%= auto_discovery_link_tag(:rss, {:locale => :de, :controller => "rss", :action => "updates", :format => :rdf}) %> - +
    - \ No newline at end of file + diff --git a/app/views/layouts/pages.html.erb b/app/views/layouts/pages.html.erb index 327e0eb..70ceece 100644 --- a/app/views/layouts/pages.html.erb +++ b/app/views/layouts/pages.html.erb @@ -4,6 +4,8 @@ + + Pages: <%= controller.action_name %> <%= stylesheet_link_tag 'scaffold' %> diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 8e27d0f..b9260d2 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -107,4 +107,4 @@ <% end %> <% end %> -
    \ No newline at end of file +
    diff --git a/app/views/rss/recent_changes.xml.builder b/app/views/rss/recent_changes.xml.builder index c3b3ec9..cce3b5d 100644 --- a/app/views/rss/recent_changes.xml.builder +++ b/app/views/rss/recent_changes.xml.builder @@ -2,19 +2,19 @@ xml.instruct! xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do xml.title("CCC.de Recent Change") - xml.link(:href => "http://www.ccc.de/") + xml.link(:href => "https://www.ccc.de/") xml.link(:rel => "self", :href => "/rss/updates.xml") xml.updated(@items.first.updated_at.xmlschema) xml.author do xml.name("Chaos Computer Club e.V.") end - xml.id("http://www.ccc.de/") + xml.id("https://www.ccc.de/") @items.each do |item| xml.entry do xml.title(item.title) xml.link( - :href => "http://www.ccc.de/#{item.node.unique_path}", + :href => "https://www.ccc.de/#{item.node.unique_path}", :rel => "alternate" ) xml.id(content_url_helper(item.node.unique_path)) @@ -26,4 +26,4 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do end -end \ No newline at end of file +end diff --git a/app/views/rss/updates.rdf.builder b/app/views/rss/updates.rdf.builder index 00b6242..cc63201 100644 --- a/app/views/rss/updates.rdf.builder +++ b/app/views/rss/updates.rdf.builder @@ -2,26 +2,26 @@ xml.instruct! xml.tag!("rdf:RDF", "xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns" => "http://purl.org/rss/1.0/") do xml.tag!( "rdf:Description", "rdf:about" => "http://www.w3.org/TR/rdf-syntax-grammar", "dc:title"=>"RDF/XML Syntax Specification (Revised)") - xml.channel do + xml.channel( "rdf:about" => "https://www.ccc.de/de/rss/updates.xml" ) do xml.title("Chaos Computer Club: Updates") - xml.link("http://www.ccc.de") + xml.link("https://www.ccc.de") xml.description("Kabelsalat ist gesund.") xml.tag!("dc:date", @items.first.published_at.xmlschema) end - - xml.image( "rdf:about" => "http://www.ccc.de/images/chaosknoten.gif") do + + xml.image( "rdf:about" => "https://www.ccc.de/images/chaosknoten.gif") do xml.title("Chaos Computer Club (Chaosknoten)") - xml.link("http://www.ccc.de") - xml.url("http://www.ccc.de/images/chaosknoten.gif") + xml.link("https://www.ccc.de") + xml.url("https://www.ccc.de/images/chaosknoten.gif") end - + @items.each do |item| xml.item("rdf:about" => content_url(:page_path => item.node.unique_path)) do xml.title(item.title) xml.link(content_url(:page_path => item.node.unique_path)) xml.description(item.abstract) - xml.tag!("dc:creator", item.user.login) + xml.tag!("dc:creator", (item.user ? item.user.login : "CCC")) xml.tag!("dc:date", item.published_at.xmlschema) end end -end \ No newline at end of file +end diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index c09c9c9..6afcd56 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder @@ -2,13 +2,13 @@ xml.instruct! xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do xml.title("Chaos Computer Club Updates") - xml.link(:href => "http://www.ccc.de/") + xml.link(:href => "https://www.ccc.de/") xml.link(:rel => "self", :href => "#{@host}/rss/updates") xml.updated(@items.first.published_at.xmlschema) xml.author do xml.name("Chaos Computer Club e.V.") end - xml.id("#{@host}/rss/updates") + xml.id("https://www.ccc.de/rss/updates") @items.each do |item| xml.entry do @@ -21,6 +21,7 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do xml.id(content_url(:page_path => item.node.feed_id)) xml.updated(item.updated_at.xmlschema) xml.published(item.published_at.xmlschema) + xml.summary(item.abstract) xml.content(:type => "xhtml") do xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") end @@ -28,4 +29,4 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do end -end \ No newline at end of file +end diff --git a/app/views/search/_search_result.html.erb b/app/views/search/_search_result.html.erb index 14898a2..6cd01f8 100644 --- a/app/views/search/_search_result.html.erb +++ b/app/views/search/_search_result.html.erb @@ -1,6 +1,6 @@ -<% if node.head %> -
    +<% if node and node.head %> +

    <%= link_to node.head.title, content_path(node.unique_path) %>

    <%= node.head.abstract %>

    -<% end %> \ No newline at end of file +<% end %> -- cgit v1.3