not too bad
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 2 Dec 2012 14:26:18 +0000 (15:26 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 2 Dec 2012 14:26:18 +0000 (15:26 +0100)
Makefile
myslice/static/css/mymenu.css
myslice/static/css/myslice.css
myslice/templates/logo.html [deleted file]
myslice/templates/mymenu.html
myslice/templates/myslice.html
myslice/urls.py
slice/views.py

index eb8ec41..02d4ada 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,13 @@ all:
 force:
 
 #################### compute emacs tags
+# list files under git but exclude third-party stuff like bootstrap and jquery
+myfiles: force
+       @git ls-files | egrep -v 'insert_above/|/bootstrap/|/jquery/'
+
 # in general it's right to rely on the contents as reported by git
 tags: force
-       git ls-files | xargs etags
+       $(MAKE) myfiles | xargs etags
 
 # however sometimes we have stuff not yet added, so in this case
 ftags: force
index 06e3781..08db827 100644 (file)
@@ -1,23 +1,11 @@
-ul#mymenu { display: block; }
-ul#mymenu>li { display: block; 
-              float: left;
-              padding: 5px;
+#menu_ul {
+    position: absolute;
+    left: 0px;
+    margin: 15px;
 }
-
-/*
-div.mymenu {
-    position: fixed; 
-    display: block;
-    padding:0;
-    margin:0;
-    top: 10px;
-    right: 10px; 
-    background-color: #abc;
+#menu_logo {
+    position: absolute;
+    right:0px;
+    margin: 15px;
 }
 
-ul.mymenu {
-    list-style-type: none;
-    margin: 0;
-    padding: 0;
-}
-*/
index 84d376a..0862ecf 100644 (file)
@@ -1,32 +1,26 @@
 #header {
     position: fixed; 
     display: block;
-    margin:0;
+    margin:0px;
     top: 0px;
     left: 0px;
     right: 0px; 
     height: 60px;
-    background-color: #f8f8f8;
+/*    background-color: #f8f8f8; */
+    background-color: #ccc;
 }
 
-#column-wrap {
-    margin-top: 60px;
-    display: table;
-    table-layout: fixed;
-    border-collapse: collapse;
-}
-#content-main, #content-related {
-    display: table-cell;
-    position: static;
-    padding: 10px;
-}
 #content-main {
-    width: 100%;
+    margin: 60 200 0 0;
+    padding: 0;
 }
 #content-related {
-    width: 200px;
-}
-
-img.logo {
-    right:0px;
+    margin-top: 60;
+    padding: 0;
+    width: 200;
+    position: fixed;
+    display: block;
+    right: 0px;
+    top: 0px;
+    background-color: #d0d0f8;
 }
diff --git a/myslice/templates/logo.html b/myslice/templates/logo.html
deleted file mode 100644 (file)
index ff3ed50..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<a href="/"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>
index 66c8153..b4e531a 100644 (file)
@@ -1,10 +1,7 @@
 {% insert_str prelude "js/mymenu.js" %}
 {% insert_str prelude "css/mymenu.css" %}
-{# this shows how to add raw js or css code #}
-{# {% insert prelude_js %} "some script useful for mymenu" {% endinsert %} #}
-{# use the prelude_css container for css style #}
 
-<div class="nav nav-pills">
+<ul class="nav nav-pills" id='menu_ul'>
 {% for d in menu_items %}
   {% if d.active %}
   <li class='active'> <a href="{{ d.href }}"> {{ d.label }} </a> </li>
@@ -13,4 +10,3 @@
   {% endif %}
   {% endfor %}
 </ul>
-</div>
index fc9d3c9..f316c6e 100644 (file)
@@ -9,7 +9,7 @@
 {% insert_str prelude "bootstrap/js/bootstrap.js" %}
 {% insert_str prelude "bootstrap/css/bootstrap.css" %}
 <script type="text/javascript">
-{# In case we need to add raw js code #}
+{# In case we need to add raw js code - use {% insert prelude_js %} ... {% endinsert %} #}
 {% container prelude_js %}
 </script>
 <style type="text/css">
 
     <div id='header'>
     {% block header %}
+      <a id='menu_logo' href="/"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>
       {% include 'mymenu.html' %}
-      {% include 'logo.html' %}
     {% endblock header %}
     </div>
 
-    {% block column_wrap %}
-    <div id='column-wrap'>
     <div id='content-main'>
       {% block content_main %}
       "The main content area (set block 'content_main')"
@@ -47,8 +45,6 @@
       "The related content area (set block 'related_main')"
       {% endblock content_related %}
     </div>
-    </div>
-    {% endblock column_wrap %}
 
 </div>
 {% endblock container %}
index 6e431ca..e1dd5e5 100644 (file)
@@ -19,6 +19,7 @@ urlpatterns = patterns(
 
     # Uncomment the next line to enable the admin:
     # url(r'^admin/', include(admin.site.urls)),
+    (r'^/?$', 'slice.views.fake_slice_view'),
     (r'^login/?$', 'auth.views.login_user'),
     (r'^slice/?$', 'slice.views.fake_slice_view'),
     (r'^slice/(?P<name>\w+)/?$', 'slice.views.fake_slice_view'),
index c9fcca8..463ff84 100644 (file)
@@ -13,7 +13,7 @@ def fake_slice_view (request, name=None):
                                             'content_main' : lorem,
                                             'menu_items' : 
                                             [ { 'label':'Sample', 'href': '/sample/'},
-                                              { 'label':'Slice', 'href': '/other/', 'active':True},
+                                              { 'label':'Slice', 'href': '/slice/', 'active':True},
                                               ]},
                               context_instance=RequestContext(request))