Move Ressource and Navigation links from the side boxes to the footer
authorJuliette Belin <juliette.belin@logilab.fr>
Wed, 15 Feb 2017 11:22:40 +0100
changeset 115 459438591fbe
parent 114 921a3041c3ed
child 116 b68f990bd936
Move Ressource and Navigation links from the side boxes to the footer
data/cubes.sherpa.css
views/templates.py
views/templates/maintemplate.jinja2
--- a/data/cubes.sherpa.css	Tue Feb 14 19:43:19 2017 +0100
+++ b/data/cubes.sherpa.css	Wed Feb 15 11:22:40 2017 +0100
@@ -494,12 +494,57 @@
   background-color: #0d4e96;
   font-size: 1.25em;
   color: #fff;
+  overflow: hidden;
+  padding: 2em;
 }
 
 #pagefooter a{
   color: #fff;
 }
 
+#pagefooter h3 {
+  text-align: left;
+  font-family: 'lovelo';
+}
+#pagefooter .links {
+  overflow: hidden;
+  display: inline-block;
+}
+
+#pagefooter .links > div {
+  padding-left: 2em;
+}
+
+#pagefooter .links a {
+  display: block;
+  text-align: left;
+  line-height: 2em;
+}
+
+#pagefooter a:hover {
+  text-decoration: underline;
+}
+
+#pagefooter #sherpa-resources {
+  float: left;
+  padding-right: 4em;
+  border-left: 1px solid transparent;
+  border-right: 1px solid transparent;
+}
+
+#pagefooter #sherpa-navigation {
+  float: left;
+  margin-top: 2em;
+}
+
+#pagefooter  #copyright{
+  margin-top: 3em;
+  padding: 1.5em 0 1.5em 0;
+  border-top: 1px solid white;
+  border-bottom: 1px solid white;
+  clear: both;
+}
+
 /*media queries */
 
 .page-content {
@@ -516,6 +561,18 @@
   }
 }
 
+@media(min-width: 760px){
+  #pagefooter #sherpa-navigation {
+    float: left;
+    margin-top: auto;
+  }
+
+  #pagefooter #sherpa-resources {
+    border-right: 1px solid white;
+    border-left: 1px solid white;
+  }
+}
+
 /* XXX remove me once seda > 0.6.1 is released */
 .cw-table-primary-entity td {
   width: 67%;
--- a/views/templates.py	Tue Feb 14 19:43:19 2017 +0100
+++ b/views/templates.py	Wed Feb 15 11:22:40 2017 +0100
@@ -86,6 +86,14 @@
             'right_header_component': right_header_component,
             'left_boxes': left_boxes_html,
             'side_box': {
+                'goTo_links': [
+                    {'url': url('SEDAArchiveUnit'),
+                     'label': u"Unités d'archive"},
+                    {'url': url('SEDAArchiveTransfer'),
+                     'label': 'Profils SEDA'}
+                ],
+            },
+            'footer': {
                 'resources': [
                     {'url': url('shema_seda'),
                      'label': u'Schéma du SEDA 2.0'},
@@ -96,25 +104,15 @@
                     {'url': url('documentation_technique'),
                      'label': 'Documentation technique'},
                 ],
-                'goTo_links': [
-                    {'url': url('SEDAArchiveUnit'),
-                     'label': u"Unités d'archive"},
-                    {'url': url('SEDAArchiveTransfer'),
-                     'label': 'Profils SEDA'}
-                ],
                 'navigation_Link': [
                     {'url': url('project'),
-                     'label': 'Le projet Sherpa'},
+                     'label': u'Sherpa, un générateur de profils'},
                     {'url': url('utilisation'),
-                     'label': "Mode d'emploi"},
+                     'label': "Pour commencer"},
                     {'url': url('seda'),
                      'label': "Le SEDA"},
                 ]
             },
-            'footer': {
-                'copyright': '### copyright ###',
-                'contact': 'mailto:#'
-            },
         })
         ctx.update(getattr(view, 'template_context', lambda: {})())
 
--- a/views/templates/maintemplate.jinja2	Tue Feb 14 19:43:19 2017 +0100
+++ b/views/templates/maintemplate.jinja2	Wed Feb 15 11:22:40 2017 +0100
@@ -34,28 +34,12 @@
         </div>
         <div class="panel-body">
           <ul class="list-unstyled">
-            {% for page in side_box.navigation_Link %}
-            <li class="facetvalue"><a href='{{ page.url }}'> {{ page.label }}</a></li>
-            {% endfor %}
-            <hr />
             {% for page in side_box.goTo_links %}
             <li class="facetvalue"><a href='{{ page.url }}'> {{ page.label }}</a></li>
             {% endfor %}
           </ul>
         </div>
       </div>
-      <div class="panel panel-default contextFreeBox facet_filterbox" id="facet_filterbox">
-        <div class="panel-heading">
-          <div class="panel-title">Resources</div>
-        </div>
-        <div class="panel-body">
-          <ul class="list-unstyled">
-            {% for resource in side_box.resources %}
-            <li class="facetvalue"><a href='{{ resource.url }}'> {{ resource.label }}</a></li>
-            {% endfor %}
-          </ul>
-        </div>
-      </div>
       {{ left_boxes }}
     </aside>
     <div class="col-md-10 page-content">
@@ -64,9 +48,23 @@
   </div>
   <div class="container-fluid">
     <footer role="contentinfo" id="pagefooter">
+      <section class="links">
+        <div id="sherpa-resources">
+        <h3>Ressources</h3>
+        {% for resource in footer.resources %}
+          <a href='{{ resource.url }}'> {{ resource.label }}</a>
+        {% endfor %}
+        </div>
+        <div id="sherpa-navigation">
+        <h3>Navigation</h3>
+        {% for page in footer.navigation_Link %}
+          <a href='{{ page.url }}'> {{ page.label }}</a>
+        {% endfor %}
+        </div>
+      </section>
       <div id="copyright">
-        <span>{{ footer.copyright }}</span> |
-        <span><a href="{{ footer.contact.url }}">contact</a></span>
+        <span>copyright</span> |
+        <span><a href="">contact</a></span>
       </div>
     </footer>
   </div>