diff --git a/app/assets/stylesheets/maps.sass b/app/assets/stylesheets/maps.sass index ecf8118a..a50eea3b 100644 --- a/app/assets/stylesheets/maps.sass +++ b/app/assets/stylesheets/maps.sass @@ -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 diff --git a/app/assets/stylesheets/orgas.sass b/app/assets/stylesheets/orgas.sass index 2215ccf6..a7a5b3a4 100644 --- a/app/assets/stylesheets/orgas.sass +++ b/app/assets/stylesheets/orgas.sass @@ -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 diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index f1d559f6..7bff7f75 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -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 diff --git a/app/views/maps/_events.html.haml b/app/views/maps/_events.html.haml new file mode 100644 index 00000000..b52a2b61 --- /dev/null +++ b/app/views/maps/_events.html.haml @@ -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 diff --git a/app/views/maps/index.html.haml b/app/views/maps/index.html.haml index 010f5ed9..31488160 100644 --- a/app/views/maps/index.html.haml +++ b/app/views/maps/index.html.haml @@ -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'