Linux presentation day and libre-en-fete images used as tag name

This commit is contained in:
echarp 2019-04-19 17:13:32 +02:00
parent 2a35b91cb4
commit bf313073f9
5 changed files with 31 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -5,6 +5,12 @@
%a(href='https://www.libre-en-fete.net') %a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete', = image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',
style: 'vertical-align: middle' style: 'vertical-align: middle'
- elsif @event.tags.any? { |t| t.name.include? 'linux-presentation-day' }
Cet événement s'inscrit dans le cadre de
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
%h2 %h2
- if @event.locality? - if @event.locality?

View File

@ -17,7 +17,7 @@
= csrf_meta_tags = csrf_meta_tags
- sub = request.domain ? request.domain.split('.')[0] : '' - sub = request.domain ? request.domain.split('.')[0] : ''
%body{ class: [sub, controller_name, action_name] } %body{ class: [sub, controller_name, action_name, params[:tag]] }
%header.top %header.top
= image_tag 'baby_gnu_adl.png', alt: '', class: :logo = image_tag 'baby_gnu_adl.png', alt: '', class: :logo

View File

@ -2,6 +2,16 @@
.digest .digest
- if params[:tag].present? - if params[:tag].present?
%span.tag %span.tag
- if params[:tag].include? 'libre-en-fete'
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60',
alt: 'Libre en Fete', style: 'vertical-align: middle'
- elsif params[:tag].include? 'linux-presentation-day'
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
- else
%em.fa.fa-tag %em.fa.fa-tag
= params[:tag] = params[:tag]
%a(href="?tag=") %a(href="?tag=")

View File

@ -1,3 +1,15 @@
- if params[:id].include? 'libre-en-fete'
Ces événements s'inscrivent dans le cadre de
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',
style: 'vertical-align: middle'
- elsif params[:id].include? 'linux-presentation-day'
Ces événements s'inscrivent dans le cadre de
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
%h2 %h2
%em.fa.fa-tag %em.fa.fa-tag
= title params[:id] = title params[:id]
@ -65,8 +77,6 @@
= link_to event do = link_to event do
- if event.locality? - if event.locality?
%em.locality.fa-li.fa.fa-globe %em.locality.fa-li.fa.fa-globe
- elsif event.tags.any? { |t| t.name.include? 'libre-en-fete' }
= image_tag 'lef-small.png', alt: 'LEF', width: 16, height: 16
%em.city{ title: event.address }= event.city %em.city{ title: event.address }= event.city
= event.title = event.title
.date= display_date event .date= display_date event