make archive pages pretty

This commit is contained in:
Lorin Werthen 2016-08-02 18:31:40 +02:00
parent afc8126c71
commit 295fedae80
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
8 changed files with 34 additions and 51 deletions

View file

@ -16,6 +16,9 @@ gem 'w3c_validators'
# ical files # ical files
gem 'icalendar' gem 'icalendar'
# Autoprefixing for class
gem 'autoprefixer-rails'
group :development do group :development do
gem 'adsf' gem 'adsf'
gem 'guard-nanoc' gem 'guard-nanoc'

View file

@ -3,6 +3,8 @@ GEM
specs: specs:
adsf (1.2.1) adsf (1.2.1)
rack (>= 1.0.0) rack (>= 1.0.0)
autoprefixer-rails (6.3.7)
execjs
builder (3.2.2) builder (3.2.2)
coderay (1.1.1) coderay (1.1.1)
coffee-script (2.4.1) coffee-script (2.4.1)
@ -77,6 +79,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
adsf adsf
autoprefixer-rails
builder builder
coffee-script coffee-script
guard-nanoc guard-nanoc

2
Rules
View file

@ -114,6 +114,8 @@ compile '/assets/scripts/**/*.coffee' do
filter :coffeescript filter :coffeescript
end end
ignore '/assets/stylesheets/includes/**/*'
compile '/assets/stylesheets/**/*.scss' do compile '/assets/stylesheets/**/*.scss' do
filter :sass, syntax: :scss filter :sass, syntax: :scss
end end

View file

@ -7,48 +7,5 @@ $link-visited: $orange;
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700); @import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700);
$family-sans-serif: 'Open Sans', sans-serif; $family-sans-serif: 'Open Sans', sans-serif;
@import "old";
@import "../../../node_modules/bulma/bulma"; @import "../../../node_modules/bulma/bulma";
@import "includes/old";
.fa-inline {
font-size: inherit;
vertical-align: inherit;
}
// Issue 27 archive list styling
.archive_list {
list-style-type: none;
font-family: family-sans-serif;
}
.archive_list > li {
display: inline-block;
position: relative;
padding: 2em;
border: 2px solid darkgrey;
border-radius: 8px;
font-size: 2em;
font-weight:bold;
}
.archive_list > li:hover{
border-color: rgb(66,66,66);
}
.archive_list > li:first-child{
margin-left:15%;
margin-right:25%; // momenteel hard-coded, betere opl zou dynamische herberekening zijn om meer future-proof te zijn
}
.archive_list_ref{
border: 2px solid darkgrey;
}
.archive_list_item{
font-family: family-sans-serif;
}

View file

@ -1,10 +1,19 @@
<% posts_in_year(item[:academic_year]).each do |post| %> <% posts_in_year(item[:academic_year]).each do |post| %>
<a class="archive_list_ref" href="<%= relative_path_to(post) %>"> <a href="<%= relative_path_to(post) %>">
<div class= "archive_list_item"> <div class="box">
<%= post[:title] %> <article class="media">
</div> <figure class="media-left">
<div class="archive_list_item"> <p class="image is-64x64">
<%= excerptize(post.reps[:text].compiled_content, length: 50) %> <img src="<%= post[:banner] %>">
</p>
</figure>
<div class="media-content">
<div class="content">
<h2><%= post[:title] %></h2>
<%= excerptize(post.reps[:text].compiled_content, length: 200) %>
</div>
</div>
</article>
</div> </div>
</a> </a>
<% end %> <% end %>

View file

@ -5,7 +5,7 @@
<meta property="og:url" content="<%= url_for(item) %>" /> <meta property="og:url" content="<%= url_for(item) %>" />
<% end %> <% end %>
<section class="hero is-medium is-danger"> <section class="hero is-medium is-info">
<div class="hero-head"> <div class="hero-head">
<%= render '/partials/_navbar.*' %> <%= render '/partials/_navbar.*' %>
</div> </div>

View file

@ -0,0 +1,9 @@
class AutoprefixerFilter < Nanoc::Filter
require 'autoprefixer-rails'
identifier :autoprefixer
def run(content, _params = {})
AutoprefixerRails.process(content).css
end
end