/category/templates/category/Category_detail.html

https://github.com/mci/mpatlas · HTML · 108 lines · 84 code · 19 blank · 5 comment · 0 complexity · de54cbab4025dbab7ddb28a15a05726e MD5 · raw file

  1. {% extends "base.html" %}
  2. {% load static %}
  3. {% load cms_tags sekizai_tags i18n %}
  4. {% block title %}{{ campaign.name }}{% endblock %}
  5. {% block base_head_extra %}
  6. {% comment %}
  7. <link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.3/dist/leaflet.css" />
  8. <!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.ie.css" /><![endif]-->
  9. {% endcomment %}
  10. <link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.3/dist/leaflet.css" />
  11. <!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.ie.css" /><![endif]-->
  12. <link href='{{ STATIC_URL }}css/leaflet.label.css' rel='stylesheet' />
  13. <link rel="stylesheet" href="https://libs.cartocdn.com/cartodb.js/v3/3.12/themes/css/cartodb.css" />
  14. <!-- <link href="{{ STATIC_URL }}css/sitedetail.css" media="screen" rel="stylesheet" type="text/css" /> -->
  15. <link href="{{ STATIC_URL }}css/map.css" media="screen" rel="stylesheet" type="text/css" />
  16. <!--[if lte IE 8]><link href="{{ STATIC_URL }}css/map_ie.css" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
  17. <style>
  18. /*#leafletmap { position:absolute; top:0; bottom:0; width:100%; left:0; right:0; z-index:0;}*/
  19. #member-list {
  20. /*position:absolute;*/
  21. /*top:0; right:0; width:200px;*/
  22. /*bottom:0;*/
  23. /*overflow-x:auto;*/
  24. /*background:#fff;*/
  25. margin:0;
  26. padding:5px;
  27. }
  28. #member-list li {
  29. padding:2px;
  30. margin:0;
  31. list-style-type:none;
  32. }
  33. #member-list li:hover {
  34. background: #cee7ff;
  35. }
  36. .tag {
  37. padding:2px 4px;
  38. background-color: #ccc;
  39. border-radius: 4px;
  40. }
  41. </style>
  42. <script type="text/javascript">
  43. System.import('{% static "js" %}/categorydetail').then(function(CategoryDetail) {
  44. $(function() {
  45. window['categorydetail'] = new CategoryDetail.CategoryDetail($('#leafletmap'));
  46. });
  47. });
  48. </script>
  49. {% endblock %}
  50. {% block base_body_content %}
  51. <div id="leafletmap" style="position:absolute; top:0; bottom:0; left:0; right:0; z-index:0;"></div>
  52. <div style="z-index:2; padding-left:60px; padding-top:1px; position:relative; background-color:#fff; background-color:rgba(255,255,255,0.7);">
  53. <h6 style="color:#666; text-transform:uppercase; margin-right:20px; padding-bottom:0; margin-bottom:0;">Category</h6>
  54. <p class="heading" style="margin:0px; padding:0; font-size:32px; line-height:38px;color:#de744a;">
  55. {{ category.name }}
  56. </p>
  57. <h5 style="color:#666;">{% if category.details.summary %}
  58. {{ category.details.summary|safe }}
  59. {% endif %}</h5>
  60. </div>
  61. <div id="leftcol" style="position:absolute; top:0; bottom:0; width:34%; min-width:350px; margin-top:120px;">
  62. <div class="sidebar_item_title">Description</div>
  63. <div class="sidebar_item_content" style="background-color:rgba(255,255,255,0.7); height:90%; width:100%; overflow-y:auto; padding-left:34px;">
  64. {% if category.details.description %}
  65. <p>
  66. {{ category.details.description|safe }}
  67. </p>
  68. <div style="clear:both;"></div>
  69. {% endif %}
  70. </div>
  71. </div>
  72. <div id="rightcol" style="position:absolute; top:0; bottom:0; right:0; width:25%; min-width:200px; margin-top:120px;">
  73. <div class="sidebar_item_title">Protected Areas & Campaigns</div>
  74. <div class="sidebar_item_content" style="width:100%; background-color:rgba(255,255,255,0.7); height:90%; overflow:auto;">
  75. <!-- List of MPAs here with boundaries -->
  76. <ul id="member-list">
  77. {% comment %}
  78. {% for campaign in member_campaigns %}
  79. <li><a href="{{ campaign.get_absolute_url }}">{{ campaign.name }} <span class="tag">campaign</span></a></li>
  80. {% endfor %}
  81. {% for mpa in member_mpas %}
  82. <li><a href="{{ mpa.get_absolute_url }}">{{ mpa.name }} {{ mpa.designation }} - {{ mpa.country }}</a></li>
  83. {% endfor %}
  84. {% endcomment %}
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="clear"></div>
  89. {% endblock %}