navbar and some corrections
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 28 Nov 2017 18:02:05 +0000 (19:02 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 28 Nov 2017 18:02:05 +0000 (19:02 +0100)
django_simple/todo/templates/about.html [new file with mode: 0644]
django_simple/todo/templates/base.html
django_simple/todo/templates/contact.html [new file with mode: 0644]
django_simple/todo/templates/details.html
django_simple/todo/templates/details1.html
django_simple/todo/templates/tutorial.html [new file with mode: 0644]
django_simple/urls.py
static/style.css

diff --git a/django_simple/todo/templates/about.html b/django_simple/todo/templates/about.html
new file mode 100644 (file)
index 0000000..deaf0a7
--- /dev/null
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% load i18n lazysignup_tags %}
+{% block content %}
+
+              <br>
+              UNRES server version 28.11.2017 
+
+
+{% endblock %}
\ No newline at end of file
index 310cfef..9633269 100644 (file)
 </head>
 <body>
 
-<div class="col-sm-6 col-sm-offset-3">
-       
-       <div class="page-header">
+<nav class="navbar navbar-default navbar-fixed-top">
+  <div class="container-fluid">
+    <div class="navbar-header">
         {% if not user|is_lazy_user %}
-         <h1><a href="/">UNRES server</a> <small> (beta version with debug)</small></h1>
+      <a class="navbar-brand" href="/">UNRES server</a>
          {% else %}
-          <h1>UNRES server <small> (beta version with debug)</small></h1>          
+      <a class="navbar-brand">UNRES server</a>
          {% endif %}
-              Lab. of Simul. of Polym. & Lab. of Mol. Model, Faculty of Chemistry, University of Gdansk
-              <br>
-              Ver.20.11.2017 <span class="fa fa-envelope-o"></span> 
-              cezary.czaplewski<span class="fa fa-at"></span>ug.edu.pl
+    </div>
+    <ul class="nav navbar-nav" >
+      <li><a href="/tutorial">Tutorial</a></li>
+      <li><a href="/about">About</a></li>
+      <li><a href="/contact">Contact</a></li>
+    </ul>
+    <div class="nav navbar-nav navbar-right" style="padding-top:5px">
+       {% if not user.is_anonymous %}
+                {% if user|is_lazy_user %}
+                 <strong>Return to job submission page&nbsp;</strong>&nbsp;
+                  <a href="/logout" title="next job"><span class="fa fa-sign-out"></span></a>
+                  &nbsp;&nbsp;
+                {% else %}
+                 <strong>Logged as:&nbsp;</strong> {{user}} &nbsp;                       
+                 <a href="/logout" title="Log out"><span class="fa fa-sign-out"></span></a>
+                 &nbsp;&nbsp;
+                {% endif %}    
+       {% endif %}
+    </div>
+  </div>
+</nav>
+<p>
+<div class="col-sm-6 col-sm-offset-3">
+       
+       <div class="page-header">
 
                <div class="user-name">
-                       {% if not user.is_anonymous %}
-
-                         {% if user|is_lazy_user %}
-                         <strong>Return to job submission page&nbsp;</strong>&nbsp;
-                          <a href="/logout" title="next job"><span class="fa fa-sign-out"></span></a>
-                         {% else %}
-                               <strong>Logged as:&nbsp;</strong> {{user}} &nbsp;                         
-                               <a href="/logout" title="Log out"><span class="fa fa-sign-out"></span></a>
-                         {% endif %}   
-                       {% endif %}
                </div>
 <!--
                {% if user|is_lazy_user %}
diff --git a/django_simple/todo/templates/contact.html b/django_simple/todo/templates/contact.html
new file mode 100644 (file)
index 0000000..e956eba
--- /dev/null
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% load i18n lazysignup_tags %}
+{% block content %}
+
+              Lab. of Simul. of Polym. & Lab. of Mol. Model, Faculty of Chemistry, University of Gdansk
+              <br>
+              <span class="fa fa-envelope-o"></span> 
+              cezary.czaplewski<span class="fa fa-at"></span>ug.edu.pl
+
+
+{% endblock %}
\ No newline at end of file
index cdba6d4..5c3e43c 100644 (file)
@@ -58,7 +58,7 @@ Created {{ task.created_date  }}
 <div>
     <fieldset class="majorpoints">
     <legend class="majorpointslegend"
-    style="background-color:#d3d3d3;cursor: pointer;">Expand input parameters</legend>
+    style="background-color:#d3d3d3;cursor: pointer;">Show input parameters</legend>
     <div class="hiders" style="display:none" >
 
                        <li class="list-group-item task-item">
@@ -572,10 +572,10 @@ Created {{ task.created_date  }}
 <script>
 $('.majorpoints').click(function(){
     $(this).find('.hiders').toggle();
-    if($(this).find('.majorpointslegend').text()=='Expand input parameters'){
-        $(this).find('.majorpointslegend').text('Colapse input parameters');
+    if($(this).find('.majorpointslegend').text()=='Show input parameters'){
+        $(this).find('.majorpointslegend').text('Hide input parameters');
     }else{
-        $(this).find('.majorpointslegend').text('Expand input parameters');
+        $(this).find('.majorpointslegend').text('Show input parameters');
     }    
 });
 </script>
index 6bd4909..519ab0d 100644 (file)
@@ -58,7 +58,7 @@ Created {{ task.created_date  }}
 <div>
     <fieldset class="majorpoints">
     <legend class="majorpointslegend"
-    style="background-color:#d3d3d3;cursor: pointer;">Expand input parameters</legend>
+    style="background-color:#d3d3d3;cursor: pointer;">Show input parameters</legend>
     <div class="hiders" style="display:none" >
 
                        <li class="list-group-item task-item">
@@ -577,10 +577,10 @@ Regular user cannot use this link.
 <script>
 $('.majorpoints').click(function(){
     $(this).find('.hiders').toggle();
-    if($(this).find('.majorpointslegend').text()=='Expand input parameters'){
-        $(this).find('.majorpointslegend').text('Colapse input parameters');
+    if($(this).find('.majorpointslegend').text()=='Show input parameters'){
+        $(this).find('.majorpointslegend').text('Hide input parameters');
     }else{
-        $(this).find('.majorpointslegend').text('Expand input parameters');
+        $(this).find('.majorpointslegend').text('Show input parameters');
     }    
 });
 </script>
diff --git a/django_simple/todo/templates/tutorial.html b/django_simple/todo/templates/tutorial.html
new file mode 100644 (file)
index 0000000..e751b08
--- /dev/null
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+
+{% load i18n lazysignup_tags %}
+{% block content %}
+
+Tutorial
+
+{% endblock %}
\ No newline at end of file
index d764184..8b07775 100644 (file)
@@ -4,7 +4,7 @@ from django.contrib import admin
 from django_simple.authentication import urls as authentication_urls 
 from django_simple.todo import urls as todo_urls 
 from django_simple.directory import urls as directory_urls
-
+from django.views.generic import TemplateView
 
 urlpatterns = [
        url(r'^', include(todo_urls)),
@@ -13,4 +13,14 @@ urlpatterns = [
         url(r'^admin/', include(admin.site.urls)),
         url(r'^accounts/', include('registration.backends.hmac.urls')),
         url(r'^convert/', include('lazysignup.urls')),
+        url(r'^about', 
+            TemplateView.as_view(template_name='about.html'),
+                name='about'),
+        url(r'^contact', 
+            TemplateView.as_view(template_name='contact.html'),
+                name='contact'),
+        url(r'^tutorial', 
+            TemplateView.as_view(template_name='tutorial.html'),
+                name='tutorial'),
+
 ]
index 016864b..776f423 100644 (file)
@@ -23,3 +23,9 @@
     }
 
 fieldset.inlineLabels ul {list-style:none}
+
+.navbar-nav > li > a, .navbar-brand {
+    padding-top:5px !important; padding-bottom:0 !important;
+    height: 30px;
+}
+.navbar {min-height:30px !important;}