Compare commits

..

3 commits
master ... Quiz

Author SHA1 Message Date
nvdghins
60b9aa2b6e vraag tot aanpassing engage 2020-09-13 13:38:42 +02:00
ajuvercr
8fc305ccc5 fix quiz indentation 2020-09-13 11:04:01 +02:00
nvdghins
2f4c2e3b16 interesses groeperen en politiek aanpassen 2020-09-13 00:59:14 +02:00
399 changed files with 1156 additions and 4598 deletions

3
.gitignore vendored
View file

@ -10,6 +10,3 @@ tmp/nanoc/
crash.log
.idea/
.sass-cache/

View file

@ -1 +1 @@
2.7.1
2.7.0

View file

@ -1,32 +0,0 @@
# ------- Build -------
FROM ruby:2.7.1-alpine3.11 AS build
RUN apk add build-base
RUN mkdir -p /app
WORKDIR /app
COPY Gemfile .
COPY Gemfile.lock .
RUN bundle config set deployment 'true'
RUN bundle config set without 'development'
RUN bundle install
COPY content content/
COPY layouts layouts/
COPY lib lib/
COPY Guardfile .
COPY Rules .
COPY nanoc.yaml .
RUN bundle exec nanoc
# ------- Release -------
FROM nginx:latest AS release
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/output /usr/share/nginx/html
ENTRYPOINT ["nginx", "-g", "daemon off;"]

View file

@ -3,19 +3,18 @@ source 'https://rubygems.org'
gem 'adsf'
gem 'autoprefixer-rails'
gem 'byebug'
gem 'htmlcompressor'
gem 'kramdown'
gem 'mini_racer'
gem 'nanoc'
gem 'pdfkit'
gem 'sass'
gem 'nokogiri'
gem 'sassc'
gem 'slim'
gem 'sass'
group :nanoc do
gem 'guard-nanoc'
gem 'guard-livereload'
end
group :development do
gem 'byebug'
end

View file

@ -5,28 +5,28 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
adsf (1.4.3)
rack (>= 1.0.0, < 3.0.0)
autoprefixer-rails (9.8.6.3)
autoprefixer-rails (9.7.4)
execjs
byebug (11.1.3)
coderay (1.1.3)
byebug (11.1.1)
coderay (1.1.2)
colored (1.2)
concurrent-ruby (1.1.7)
concurrent-ruby (1.1.6)
cri (2.15.10)
ddmemoize (1.0.0)
ddmetrics (~> 1.0)
ref (~> 2.0)
ddmetrics (1.0.1)
ddplugin (1.0.2)
diff-lcs (1.4.4)
diff-lcs (1.3)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
equatable (0.6.1)
eventmachine (1.2.7)
execjs (2.7.0)
ffi (1.13.1)
ffi (1.12.2)
formatador (0.2.5)
guard (2.16.2)
guard (2.16.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
@ -41,48 +41,39 @@ GEM
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
guard-nanoc (2.1.9)
guard-nanoc (2.1.7)
guard (~> 2.8)
guard-compat (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.14)
nanoc-core (~> 4.11, >= 4.11.14)
nanoc (>= 4.11.13, < 5.0)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
htmlcompressor (0.4.0)
http_parser.rb (0.6.0)
json_schema (0.20.9)
kramdown (2.3.0)
rexml
libv8 (8.4.255.0)
json_schema (0.20.8)
kramdown (2.1.0)
libv8 (7.3.492.27.1)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.7)
method_source (1.0.0)
mini_portile2 (2.4.0)
mini_racer (0.3.1)
libv8 (~> 8.4.255)
multi_json (1.15.0)
nanoc (4.11.18)
lumberjack (1.2.4)
method_source (0.9.2)
mini_racer (0.2.9)
libv8 (>= 6.9.411)
multi_json (1.14.1)
nanoc (4.11.14)
addressable (~> 2.5)
colored (~> 1.2)
nanoc-checking (~> 1.0)
nanoc-cli (= 4.11.18)
nanoc-core (= 4.11.18)
nanoc-deploying (~> 1.0)
nanoc-cli (= 4.11.14)
nanoc-core (= 4.11.14)
parallel (~> 1.12)
tty-command (~> 0.8)
tty-which (~> 0.4)
nanoc-checking (1.0.0)
nanoc-cli (~> 4.11, >= 4.11.15)
nanoc-core (~> 4.11, >= 4.11.15)
nanoc-cli (4.11.18)
nanoc-cli (4.11.14)
cri (~> 2.15)
diff-lcs (~> 1.3)
nanoc-core (= 4.11.18)
nanoc-core (= 4.11.14)
zeitwerk (~> 2.1)
nanoc-core (4.11.18)
concurrent-ruby (~> 1.1)
nanoc-core (4.11.14)
ddmemoize (~> 1.0)
ddmetrics (~> 1.0)
ddplugin (~> 1.0)
@ -92,53 +83,46 @@ GEM
tomlrb (~> 1.2)
tty-platform (~> 0.2)
zeitwerk (~> 2.1)
nanoc-deploying (1.0.0)
nanoc-checking (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.15)
nanoc-core (~> 4.11, >= 4.11.15)
nenv (0.3.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.19.2)
pastel (0.7.4)
parallel (1.19.1)
pastel (0.7.3)
equatable (~> 0.6)
tty-color (~> 0.5)
pdfkit (0.8.4.3.2)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.5)
rack (2.2.3)
rb-fsevent (0.10.4)
pdfkit (0.8.4.1)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
rack (2.2.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
ref (2.0.0)
rexml (3.2.4)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
sassc (2.2.1)
ffi (~> 1.9)
shellany (0.0.1)
slim (4.1.0)
slim (4.0.1)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
slow_enumerator_tools (1.1.0)
temple (0.8.2)
thor (1.0.1)
tilt (2.0.10)
tomlrb (1.3.0)
tty-color (0.5.2)
tomlrb (1.2.9)
tty-color (0.5.1)
tty-command (0.9.0)
pastel (~> 0.7.0)
tty-platform (0.3.0)
tty-which (0.4.2)
zeitwerk (2.4.0)
zeitwerk (2.2.2)
PLATFORMS
ruby
@ -153,7 +137,6 @@ DEPENDENCIES
kramdown
mini_racer
nanoc
nokogiri
pdfkit
sass
sassc

View file

@ -1,11 +1,2 @@
.PHONY: live build setup
live:
bundle exec nanoc live
build:
bundle exec nanoc
setup:
which bundle || { { gem install bundler && which bundle; } || echo 'Could not find `bundle`.'" Make sure the directory with the Ruby's gem executables is in your PATH. (Typically ~/.gem/ruby/*/bin)" && false; }
bundle install
nanoc

View file

@ -3,24 +3,6 @@ Durf Doen 2.0
## Setup instructions
1. Install Ruby, preferably the version specified in `.ruby-version`
2. Install bundler (`gem install bundler`)
3. Install other dependencies (`bundle install`)
4. Build and serve the site (`bundle exec nanoc live`)
To build the artefacts for production: `bundle exec nanoc`
### Setup on windows
This is very flaky, but it might help to
- Of course only install Ruby 2.6
- Change `gem 'mini_racer'` to `gem 'mini_racer', platforms: :ruby` in Gemfile
- Follow this GitHub page https://github.com/eakmotion/therubyracer_for_windows
- Edit this file `C:\Ruby26-x64\lib\ruby\gems\2.6.0\gems\eventmachine-1.2.7-x64-mingw32\lib`, adding `require 'em pure_ruby'` and a newline to the top of the file
- After all this, on my machine, it still throws an exception, but the live reloading works, until it doesn't (most of the time after a failed compile)
### Optional setup via Docker
You can run the code in a separated Docker environment. It compiles the code and serves the files via nginx.
docker build --tag durfdoen2 . && docker run --publish 8080:80 --detach --name dd durfdoen2
1. Install bundler (`gem install bundler`)
2. Install other gems (`bundle install`)
3. Build and serve the site (`bundle exec nanoc live`)

57
Rules
View file

@ -1,32 +1,23 @@
#!/usr/bin/env ruby
preprocess do
# Fetch a list of theme names from all items and construct items from them
themas = @items.map { |i| i[:themas] }.flatten.uniq.compact
themas.each do |thema|
content = ''
attributes = {
identifier: thema,
naam: thema.downcase
}
identifier = "/themas/#{thema}"
@items.create(content, attributes, identifier)
end
end
compile '/{verenigingen,projecten,konventen}/*.md' do
compile '/verenigingen/*.md' do
filter :kramdown
layout '/detail.*'
layout '/vereniging.*'
layout '/default.*'
layout '/base.*'
write ext: 'html'
end
compile '/themas/*' do
layout '/thema.*'
compile '/events/*.md' do
filter :kramdown
layout '/event.*'
layout '/default.*'
write ext: 'html'
end
compile '/konventen/*.md' do
filter :kramdown
layout '/konvent.*'
layout '/default.*'
layout '/base.*'
write ext: 'html'
end
@ -34,7 +25,6 @@ compile '/homepage.md' do
filter :kramdown
layout '/homepage.*'
layout '/default.*'
layout '/base.*'
write '/index.html'
end
@ -42,33 +32,29 @@ compile '/faq/*' do
filter :kramdown
end
compile '/faq.erb' do
filter :erb
layout '/default.*'
write '/faq/index.html'
end
compile '/verenigingen.md' do
filter :kramdown
layout '/verenigingen.*'
layout '/default.*'
layout '/base.*'
write '/verenigingen/index.html'
write ext: 'html'
end
compile '/quiz.md' do
filter :kramdown
layout '/quiz.*'
layout '/default.*'
layout '/base.*'
write '/quiz/index.html'
end
compile '/search.html.erb' do
filter :erb
layout '/default.*'
layout '/base.*'
write ext: 'html'
end
compile '/*.md' do
filter :kramdown
layout '/default.*'
layout '/base.*'
write ext: 'html'
end
@ -80,9 +66,7 @@ end
compile '/*.erb' do
filter :erb
layout '/default.*'
layout '/base.*'
write item.identifier.without_ext + '/index.html'
write item.identifier.without_ext
end
layout '/**/*', :erb
@ -91,3 +75,4 @@ layout '/**/*', :erb
compile '/**/*' do
write item.identifier.to_s
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,16 +0,0 @@
window.addEventListener('load', function() {
let options = document.getElementsByClassName('randomVerenigingWrapper');
let selected = Array.from(options).map(x => ({ x, r: Math.random() + -0.5 * x.hasAttribute('data-iszeus')}))
.sort((a, b) => a.r - b.r)
.map(a => a.x)
.slice(0, 3)
.map(x => ({ x, r: Math.random()}))
.sort((a, b) => a.r - b.r)
.map(a => a.x);
let destination = document.getElementById("display_repo");
for (node of selected) {
node.getElementsByTagName("img")[0].setAttribute("loading", "eager");
destination.prepend(node);
}
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 874 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 565 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Some files were not shown because too many files have changed in this diff Show more