Browse Source

Fix for 2019

master
aeris 3 years ago
parent
commit
128b4209d4
  1. 1
      Gemfile
  2. 132
      Gemfile.lock
  3. 2
      bin/middleman
  4. 24
      source/index.html.erb
  5. 3
      source/index.ics.erb
  6. 4
      source/javascripts/site.js.coffee
  7. 4
      source/stylesheets/site.css.scss

1
Gemfile

@ -4,6 +4,7 @@ gem 'middleman', '~> 4.2'
gem 'middleman-autoprefixer'
gem 'middleman-livereload'
gem 'middleman-sprockets'
gem 'sass'
gem 'bootstrap-sass'
gem 'awesome_print'

132
Gemfile.lock

@ -1,56 +1,54 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (5.0.7)
actionpack (= 5.0.7)
actionview (= 5.0.7)
activejob (= 5.0.7)
actionmailer (5.0.7.2)
actionpack (= 5.0.7.2)
actionview (= 5.0.7.2)
activejob (= 5.0.7.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.7)
actionview (= 5.0.7)
activesupport (= 5.0.7)
actionpack (5.0.7.2)
actionview (= 5.0.7.2)
activesupport (= 5.0.7.2)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.7)
activesupport (= 5.0.7)
actionview (5.0.7.2)
activesupport (= 5.0.7.2)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.7)
activesupport (= 5.0.7)
activejob (5.0.7.2)
activesupport (= 5.0.7.2)
globalid (>= 0.3.6)
activesupport (5.0.7)
activesupport (5.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
autoprefixer-rails (8.6.2)
autoprefixer-rails (9.5.1)
execjs
awesome_print (1.8.0)
backports (3.11.3)
backports (3.13.0)
betterlorem (0.1.2)
bootstrap-sass (3.3.7)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
sassc (>= 2.0.0)
builder (3.2.3)
byebug (10.0.2)
byebug (11.0.1)
coderay (1.1.2)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.5)
contracts (0.13.0)
crass (1.0.4)
dotenv (2.4.0)
dotenv (2.7.2)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
@ -58,48 +56,49 @@ GEM
eventmachine (1.2.7)
execjs (2.7.0)
fast_blank (1.0.0)
fastimage (2.1.3)
ffi (1.9.25)
globalid (0.4.1)
fastimage (2.1.5)
ffi (1.10.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
haml (5.0.4)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.5.7)
hashie (3.6.0)
http_parser.rb (0.6.0)
i18n (0.7.0)
icalendar (2.4.1)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
icalendar (2.5.3)
ice_cube (~> 0.16)
ice_cube (0.16.3)
kramdown (1.17.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.2.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
memoist (0.16.0)
method_source (0.9.0)
middleman (4.2.1)
method_source (0.9.2)
middleman (4.3.3)
coffee-script (~> 2.2)
compass-import-once (= 1.0.5)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-cli (= 4.2.1)
middleman-core (= 4.2.1)
sass (>= 3.4.0, < 4.0)
middleman-autoprefixer (2.9.0)
autoprefixer-rails (~> 8.0)
middleman-cli (= 4.3.3)
middleman-core (= 4.3.3)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
middleman-cli (4.2.1)
middleman-cli (4.3.3)
thor (>= 0.17.0, < 2.0)
middleman-core (4.2.1)
middleman-core (4.3.3)
activesupport (>= 4.2, < 5.1)
addressable (~> 2.3)
backports (~> 3.6)
bundler (~> 1.1)
bundler
contracts (~> 0.13.0)
dotenv
erubis
@ -108,15 +107,15 @@ GEM
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
i18n (~> 0.7.0)
i18n (~> 0.9.0)
listen (~> 3.0.0)
memoist (~> 0.14)
padrino-helpers (~> 0.13.0)
parallel
rack (>= 1.4.5, < 3)
sass (>= 3.4)
sassc (~> 2.0)
servolux
tilt (~> 2.0)
tilt (~> 2.0.9)
uglifier (~> 3.0)
middleman-livereload (3.4.6)
em-websocket (~> 0.5.1)
@ -125,26 +124,26 @@ GEM
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
nokogiri (1.10.2)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
parallel (1.12.1)
pry (0.11.3)
parallel (1.17.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.6.0)
byebug (~> 10.0)
pry-byebug (3.7.0)
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (3.0.2)
rack (2.0.5)
public_suffix (3.0.3)
rack (2.0.7)
rack-livereload (0.3.17)
rack
rack-test (0.6.3)
@ -154,19 +153,27 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rb-inotify (0.10.0)
ffi (~> 1.0)
redcarpet (3.4.0)
sass (3.4.25)
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.0.1)
ffi (~> 1.9)
rake
servolux (0.13.0)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
temple (0.8.0)
thor (0.20.0)
temple (0.8.1)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.8)
tilt (2.0.9)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (3.2.0)
@ -187,8 +194,9 @@ DEPENDENCIES
middleman-sprockets
pry-byebug
redcarpet
sass
tzinfo-data
wdm
BUNDLED WITH
1.16.2
1.17.2

2
bin/middleman

@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("../bundle", __FILE__)
if File.file?(bundle_binstub)
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.

24
source/index.html.erb

@ -3,7 +3,8 @@
render = Redcarpet::Render::HTML
markdown = Redcarpet::Markdown.new render, autolink: true
planning = YAML.load File.read File.join Middleman::Application.root, 'config/current.yml'
planning = YAML.load(File.read File.join Middleman::Application.root, 'config/current.yml')
.deep_symbolize_keys
def parse_time(time)
hour, min = time.split ':'
@ -42,19 +43,17 @@
</g>
</svg>
<% end %>
<div class="giggity">
<!--div class="giggity">
<%= image_tag 'giggity.png', alt: 'Giggity', title: 'Giggity', class: 'logo' %>
<%= image_tag 'qrcode.png', class: 'qrcode hidden' %>
</div>
</div-->
</th>
<% planning.each do |day, events| %>
<%=
n = events.size
attributes = n == 1 ? nil : { colspan: n }
content_tag :th, attributes do
content = I18n.l day, format: '%A %d %B'
content += '<br/>Journée spéciale protection des données personnelles' if day == Date.new(2018, 6, 29)
content
I18n.l day, format: '%A %d %B'
end
%>
<% end %>
@ -64,7 +63,7 @@
<% events.each do |location, _| %>
<td>
<%= case location
<%= case location.to_sym
when :cinema
'Salle cinéma'
when :hall
@ -90,10 +89,13 @@
</ul>
</th>
<% planning.each do |_, events| %>
<% events.each do |_, events| %>
<% events.each do |_, events|
events ||= []
events.sort! { |a, b| parse_time(a[:from]) <=> parse_time(b[:from]) }
%>
<td>
<ul>
<% (events || []).each do |event| %>
<% events.each do |event| %>
<%
from, to = event[:from], event[:to]
duration = parse_time(to) - parse_time(from)
@ -134,7 +136,7 @@
<li>
<span class="workshop">&nbsp;</span> Atelier
</li>
<li>
<!-- <li>
<span class="round-table">&nbsp;</span> Table ronde
</li>
<li>
@ -142,7 +144,7 @@
</li>
<li>
<span class="young">&nbsp;</span> Animations
</li>
</li> -->
<li>
<span class="misc">&nbsp;</span> Divers
</li>

3
source/index.ics.erb

@ -7,7 +7,8 @@
Icalendar::Values::DateTime.new date
end
planning = YAML.load File.read File.join Middleman::Application.root, 'config/current.yml'
planning = YAML.load(File.read File.join Middleman::Application.root, 'config/current.yml')
.deep_symbolize_keys
cal = Icalendar::Calendar.new
cal.append_custom_property 'NAME', 'PSES 2018'

4
source/javascripts/site.js.coffee

@ -32,8 +32,8 @@ class TimeTable
top
position: (times, element) ->
from = @parse_time element.dataset.from
to = @parse_time element.dataset.to
from = @parse_time(element.dataset.from)
to = @parse_time(element.dataset.to) - 5
including_from = @find_including times, from
including_to = @find_including times, to

4
source/stylesheets/site.css.scss

@ -97,7 +97,7 @@ table.timetable {
li {
padding: 10px;
cursor: pointer;
text-align: justify;
// text-align: justify;
overflow: hidden;
&.half {
@ -212,7 +212,7 @@ ul.legend {
.header {
height: 100%;
padding: 10px;
text-align: justify;
// text-align: justify;
}
.body {

Loading…
Cancel
Save