diff options
-rw-r--r-- | chimere_example_static/chimere/css/extra-styles.css | 65 | ||||
-rw-r--r-- | templates/chimere/blocks/actions.html | 6 | ||||
-rw-r--r-- | templates/chimere/blocks/welcome.html | 62 | ||||
-rw-r--r-- | templates/chimere/main_map.html | 15 |
4 files changed, 118 insertions, 30 deletions
diff --git a/chimere_example_static/chimere/css/extra-styles.css b/chimere_example_static/chimere/css/extra-styles.css index f5d4c3c..73bc7d2 100644 --- a/chimere_example_static/chimere/css/extra-styles.css +++ b/chimere_example_static/chimere/css/extra-styles.css @@ -3,10 +3,29 @@ margin-top:40px; } +h2, h3 { + color: #449506; + background-color: transparent; +} + +.modal-backdrop.in { + opacity: 0.1; +} + #footer a, #footer a:link, #footer a:visited{ color:#327E04; } +#welcome{ + background-color:transparent; +} + +@media (min-width: 1000px) { + .modal-lg { + width: 900px; + } +} + .control_image { vertical-align: -1px; } @@ -19,6 +38,11 @@ input{ margin-top:5px; } +.nav.navbar-nav >li > a{ + padding-top:15px; + padding-bottom:15px; +} + .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { background-color: #327E04; @@ -138,8 +162,14 @@ a:hover, a:focus { top: 125px; } +a#welcome_button{ + padding:0 10px; + margin:0; +} + span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, -#categories-lnk, #search-lnk, .fa-chimere-action{ +#categories-lnk, #search-lnk, .fa-chimere-action, #news-lnk a, +.nav-pills > li#news-lnk > a > .fa{ font-variant: small-caps; font-size: 1.1em; margin-left: 0.3em; @@ -148,6 +178,10 @@ span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, font-weight:normal; } +.nav > li > a, #simple_button{ + padding:10px; +} + #areas-div{ line-height: 32px; } @@ -157,16 +191,20 @@ span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, padding: 0px; } -#permalink-lnk, #simple_button{ +#news-lnk, #permalink-lnk, #simple_button{ line-height: 42px; } -#permalink-lnk{ - padding: 0px 0px 0px 1em; +#news-lnk, #permalink-lnk{ + padding: 0px 0px 0px 10px; } -#simple_button{ - padding: 10px 15px; +#news-lnk .lbl{ + padding: 0px 0px 0px 0.5em; +} + +#permalink, #simple_button-lnk lbl{ + padding: 0 0.8em; } #areas-div{ @@ -218,11 +256,6 @@ span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, display:none; } -#permalink, -#simple_button-lnk lbl{ - padding: 0 0.8em; -} - @media (min-width: 1552px) { #maps-lnk label, #contact-lnk .lbl, @@ -247,15 +280,18 @@ span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, } @media (max-width: 767px) { - #simple_button-lnk .lbl, #maps-lnk label, #contact-lnk .lbl, #rss-lnk .lbl{ + #news-lnk .lbl, #simple_button-lnk .lbl, #maps-lnk label, #contact-lnk .lbl, + #rss-lnk .lbl{ display:inline-block; } .selection-sep{ width: 80%; border-bottom: 1px solid #CCC; margin: 0 0 0.5em 0; + display:block; + clear:both; } - + #news-lnk .lbl, #permalink-lnk, #simple_button{ line-height: 50px; @@ -266,6 +302,9 @@ span#permalink, .navbar-nav .lbl, #areas-div label, #permalink, #simple_button, #detail{ padding-top:50px; } + #categories-lnk{ + clear:both; + } } .show-hide-panel{ diff --git a/templates/chimere/blocks/actions.html b/templates/chimere/blocks/actions.html index 1aaf5c2..302c232 100644 --- a/templates/chimere/blocks/actions.html +++ b/templates/chimere/blocks/actions.html @@ -27,8 +27,9 @@ <li id='maps-lnk'><span class='fa fa-chimere-action fa-chimere-maps'></span>{% display_areas %}</li> <li id='permalink-lnk'><span class='fa fa-chimere-action fa-bookmark'></span><span id='permalink'></span></li> <li>{% routing %}</li> - <li>{% display_welcome %}</li> - <li>{% display_news news_visible %}</li> + <li id='news-lnk'> + <a data-toggle='modal' data-target="#welcome" href='#' id='welcome_button'><span class='fa fa-chimere-action fa-newspaper-o'></span><span class='lbl'>{% trans "News"%}</span></a> + </li> <li id="simple_button-lnk"><a id='simple_button' href='{% url chimere:simple_index area_name_slash %}'><span class='fa fa-chimere-action fa-simplybuilt'></span><span class='lbl'> {% trans "Simple map" %}</span></a></li> {% endif %} <li class='selection-sep'> </li> @@ -52,4 +53,3 @@ </div> </div> - diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html new file mode 100644 index 0000000..95d6402 --- /dev/null +++ b/templates/chimere/blocks/welcome.html @@ -0,0 +1,62 @@ +{% load i18n sanitize chimere_tags %} +{% if news_lst or welcome_message %} +<script type='text/javascript'> +$(function(){ + $('#welcome div.media-player').jmeEmbedControls(); + $('#welcome video').each(function(index){$(this).pause()}); + $('#welcome audio').each(function(index){$(this).pause()}); + {% if display %}$('#welcome').modal('show');{%endif%} +}); +</script> + +<div class="modal fade" id="welcome" tabindex="-1" role="dialog" aria-labelledby="welcome-label" aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="welcome-label">{% trans "Upcoming events" %}</h4> + </div> + <div class="modal-body"> + <div id='news_content'> + {% if welcome_message %} + <div id='welcome_message'> + {{welcome_message|safe}} + </div> + {% endif %} + <div class='news'> + {% if news_lst %}{% for news in news_lst %} + <div class='info'> + {% if news.title %} + <h3>{{news.title}} – {{ news.date }}</h3> + <p>{{news.content|safe}}</p> + {% else %} + <h3>{{news.name}} – {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h3> + {% if news.default_pictures or news.default_pictures or news.default_multimedia_items%} + <div class='small-gallery'> + {% for picture in news.default_pictures %} + {% multimedia_render picture %} + {%endfor%} + {% for multimedia_item in news.default_multimedia_items %} + {% multimedia_render multimedia_item %} + {%endfor%} + </div> + {%endif%} + {% if news.description %} + <p class='description'>{{news.description|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}</p> + {% endif %} + {% for property in news.getProperties %} + <p class='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe }}</p> + {% endfor %} + <p class='marker_link'><a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a></p> + {% endif %} + </div> + {%endfor%}{% endif %} + <div class='info'> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +{% endif %} diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html index caad4b4..fd11546 100644 --- a/templates/chimere/main_map.html +++ b/templates/chimere/main_map.html @@ -12,6 +12,7 @@ {% endblock %} {% block message_edit %}{% endblock %} {% block sidebar %} +{% display_welcome %} <div class='show-hide-panel' id='hide-panel'><span class='fa fa-arrow-circle-right'></span></div> <div class='show-hide-panel' id='show-panel'><span class='fa fa-arrow-circle-left'></span></div> <div id='panel' class='navbar-default'> @@ -23,20 +24,6 @@ <script type='text/javascript'> $(function(){$('#category_description').dialog({'autoOpen':false});}); </script> -{%comment%} - <div id='utils-div' class='panel panel-default'> - <div class='panel-body' class="btn-group-vertical"> - {% routing %} - {% display_welcome %} - {% display_news news_visible %} - - <button id='permalink' type="button" class="btn btn-default"></button> - <button id='simple_button' type='button' class="btn btn-default" href='{% url chimere:simple_index area_name_slash %}'>{% trans "Simple map" %}</button> - <div id='permalink' class='ui-widget ui-button ui-state-default ui-corner-all'></div> - <a id='simple_button' class="btn btn-default" href='{% url chimere:simple_index area_name_slash %}'>{% trans "Simple map" %}</a> - </div> - </div> -{%endcomment%} <div id='detail'></div> {% endblock %} {% block search_box %} {% endblock %} |