A map is added to the main page

This commit is contained in:
echarp 2019-06-16 17:08:56 +02:00
parent 3c5f9b803b
commit 934aaf4c9a
5 changed files with 28 additions and 25 deletions

View File

@ -1,22 +1,21 @@
#map
height: 60em
box-shadow: 0 0 1em SteelBlue
height: 20em
transition: none
padding-left: 4em
list-style-type: none
*
/* Popup are better displayed with this: */
max-width: initial
&.event, &.orga
height: 20em
li
a
display: inline-block
.awesome-marker
display: inline-block !important
position: relative !important
body.maps #map
height: 60em
body.events.index #map
margin-bottom: 3em
// Left align the map controls placed in the top right corner
section.leaflet-control-layers-list label

View File

@ -5,7 +5,7 @@ img.favicon
form#orga_search
font-size: larger
margin-top: 1em
margin-top: 0.2em
margin-bottom: 1em
label
display: none

View File

@ -1,3 +1,6 @@
- unless params[:year] || params[:start_date] || params[:iframe]
= render '/maps/events'
- if params[:year]
%header.calendar-header.year
= link_to year: params[:year].to_i - 1 do

View File

@ -0,0 +1,18 @@
%ul.list#map
%li
= link_to maps_path format: :json do
.awesome-marker.awesome-marker-icon-blue
%i.icon-white.fa.fa-calendar
- if params[:future] == 'false'
= Event.model_name.human
- else
= t '.future'
- cs = %w[blue red darkred orange green darkgreen purple darkpuple cadetblue]
- idx = 1
- Kind.all.each do |kind|
%li
= link_to map_path kind.name, format: :json do
.awesome-marker{ class: "awesome-marker-icon-#{cs[idx % cs.length]}" }
%i.icon-white.fa{ class: "fa-#{kind.icon}" }
= Kind.human_attribute_name "name_#{kind.name}"
- idx += 1

View File

@ -2,21 +2,4 @@
%em.fa.fa-map
= title t '.title'
%ul.list#map
%li
= link_to maps_path format: :json do
.awesome-marker.awesome-marker-icon-blue
%i.icon-white.fa.fa-calendar
- if params[:future] == 'false'
= Event.model_name.human
- else
= t '.future'
- cs = %w[blue red darkred orange green darkgreen purple darkpuple cadetblue]
- idx = 1
- Kind.all.each do |kind|
%li
= link_to map_path kind.name, format: :json do
.awesome-marker{ class: "awesome-marker-icon-#{cs[idx % cs.length]}" }
%i.icon-white.fa{ class: "fa-#{kind.icon}" }
= Kind.human_attribute_name "name_#{kind.name}"
- idx += 1
= render 'events'