A map is added to the main page
This commit is contained in:
parent
3c5f9b803b
commit
934aaf4c9a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
18
app/views/maps/_events.html.haml
Normal file
18
app/views/maps/_events.html.haml
Normal 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
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user