Browse Source

Giggity

master
aeris 3 years ago
parent
commit
570a3feabe
  1. 1
      .gitignore
  2. 15
      Makefile
  3. 2
      config.rb
  4. 8
      giggity.json
  5. BIN
      giggity.png
  6. BIN
      source/images/qrcode.png
  7. 11
      source/index.ics.erb

1
.gitignore

@ -2,4 +2,5 @@
.cache
.DS_Store
.sass-cache
source/images/qrencode.png
build/

15
Makefile

@ -0,0 +1,15 @@
.DEFAULT_GOAL := deploy
.PHONY: build deploy qrcode
export MM_ENV := production
RSYNC := rsync --progress -ahxvAHX
source/images/qrcode.png: giggity.json
gzip -9 < "$<" | qrencode -8t png -o "$@"
qrcode: source/images/qrcode.png
build: qrcode
middleman build
deploy: qrcode
middleman deploy

2
config.rb

@ -7,7 +7,7 @@ end
configure :build do
# set :relative_links, true
# activate :relative_assets
activate :relative_assets
activate :minify_css
activate :minify_javascript
end

8
giggity.json

@ -1,9 +1,9 @@
{
"version": 2018042900,
"version": 2019050500,
"url": "https://programme.passageenseine.fr/index.ics",
"title": "PSES 2018",
"start": "2018-06-28",
"end": "2018-07-01",
"title": "PSES 2019",
"start": "2019-06-27",
"end": "2019-06-30",
"metadata": {
"icon": "https://passageenseine.fr/logo.png",
"links": [

BIN
giggity.png

Before

Width: 183  |  Height: 183  |  Size: 909 B

BIN
source/images/qrcode.png

Before

Width: 183  |  Height: 183  |  Size: 909 B

11
source/index.ics.erb

@ -7,11 +7,12 @@
Icalendar::Values::DateTime.new date
end
planning = YAML.load(File.read File.join Middleman::Application.root, 'config/current.yml')
.deep_symbolize_keys
planning = File.join Middleman::Application.root, 'config/current.yml'
planning = YAML.load_file(planning).deep_symbolize_keys
cal = Icalendar::Calendar.new
cal.append_custom_property 'NAME', 'PSES 2018'
# cal.x_wr_calname 'PSES 2019'
cal.append_custom_property 'NAME', 'PSES 2019'
LOCATIONS = {
cinema: 'Salle cinéma',
@ -27,8 +28,10 @@
title = event[:title]
cal.event do |e|
from = merge day, from
e.uid = "urn:sha1:#{Digest::SHA1.hexdigest title}"
e.dtstart = merge day, from
e.dtstart = from
e.dtstamp = from
e.dtend = merge day, to
e.organizer = Icalendar::Values::CalAddress.new nil, cn: event[:author]
e.summary = title

Loading…
Cancel
Save