← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~huwshimi/maas/design-integration into lp:maas

 

Huw Wilkins has proposed merging lp:~huwshimi/maas/design-integration into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~huwshimi/maas/design-integration/+merge/92417

This branch adds an initial design, including the base layout and some form styling amongst other things. I have modified a couple of templates to add titles and better inheritance.
-- 
https://code.launchpad.net/~huwshimi/maas/design-integration/+merge/92417
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~huwshimi/maas/design-integration into lp:maas.
=== modified file 'src/maasserver/static/css/base.css'
--- src/maasserver/static/css/base.css	2012-01-24 06:28:39 +0000
+++ src/maasserver/static/css/base.css	2012-02-10 06:33:19 +0000
@@ -0,0 +1,7 @@
+html, body {
+    margin: 0;
+    padding: 0;
+    }
+body {
+    background: #2C001E url(../img/bg_dots.png) repeat top left;
+    }

=== modified file 'src/maasserver/static/css/components/flash_messages.css'
--- src/maasserver/static/css/components/flash_messages.css	2012-02-03 06:43:27 +0000
+++ src/maasserver/static/css/components/flash_messages.css	2012-02-10 06:33:19 +0000
@@ -4,12 +4,22 @@
     }
 #flash-messages li {
     list-style: none;
-    padding: 5px 20px;
-    border-radius: 6px;
-    box-shadow: 1px 1px 1px rgba(0,0,0,.2);
+    padding: 8px 20px;
+    margin: 0 10px;
+    box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
     font-weight: bold;
+    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
     color: #FFF;
-    margin: 5px 10px;
+    }
+#flash-messages li:first-child {
+    -webkit-box-shadow: inset 0 2px 2px 0 rgba(0,0,0,0.4);
+    box-shadow: inset 0 2px 2px 0 rgba(0,0,0,0.4);
+    }
+#flash-messages li:last-child {
+    margin-bottom: 5px;
+    -moz-border-radius: 0 0 6px 6px;
+    -webkit-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
     }
 #flash-messages li.info {
     background-color: #19B6EE;

=== modified file 'src/maasserver/static/css/forms.css'
--- src/maasserver/static/css/forms.css	2012-01-24 06:28:39 +0000
+++ src/maasserver/static/css/forms.css	2012-02-10 06:33:19 +0000
@@ -1,3 +1,62 @@
+form ul {
+    list-style: none;
+    margin: 0;
+    padding: 0;
+    }
+form li {
+    margin-bottom: 8px;
+    }
+form li.form-submit {
+    padding: 8px 0 0 0;
+    margin-bottom: 0;
+    }
 label {
     display: block;
+    margin-bottom: 4px;
+    }
+textarea,
+input[type="password"],
+input[type="text"] {
+    width: 350px;
+    padding: 4px;
+    border: 1px solid #999;
+    font-size: 13px;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    border-radius: 2px;
+    background: #FFF;
+    }
+textarea:focus,
+input[type="password"]:focus,
+input[type="text"]:focus {
+    border-color: #000;
+    }
+button,
+input[type="submit"] {
+    padding: 6px 30px;
+    color: #fff;
+    border-width: 1px 0 0 0;
+    border-style: solid;
+    border-color: #f4a68b;
+    background-color: #DD4814;
+    background-image: linear-gradient(bottom, rgb(199,66,18) 0%, rgb(221,74,20) 100%);
+    background-image: -o-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(221,74,20) 100%);
+    background-image: -moz-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(221,74,20) 100%);
+    background-image: -webkit-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(221,74,20) 100%);
+    background-image: -ms-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(221,74,20) 100%);
+    -webkit-box-shadow: 0 0 2px 0 #333;
+    box-shadow: 0 0 2px 0 #333;
+    -moz-border-radius: 14px;
+    -webkit-border-radius: 14px;
+    border-radius: 14px;
+    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
+    font-size: 14px;
+    }
+button:hover,
+input[type="submit"]:hover {
+    background-image: linear-gradient(bottom, rgb(199,66,18) 0%, rgb(236,94,43) 100%);
+    background-image: -o-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(236,94,43) 100%);
+    background-image: -moz-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(236,94,43) 100%);
+    background-image: -webkit-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(236,94,43) 100%);
+    background-image: -ms-linear-gradient(bottom, rgb(199,66,18) 0%, rgb(236,94,43) 100%);
     }

=== modified file 'src/maasserver/static/css/layout.css'
--- src/maasserver/static/css/layout.css	2012-01-27 08:52:59 +0000
+++ src/maasserver/static/css/layout.css	2012-02-10 06:33:19 +0000
@@ -1,13 +1,12 @@
 /******************************************************************************
     Page
 */
-
-#page{
+.center-page-wrapper {
     text-align: center;
     margin: 0 auto;
     width: 976px;
 	}
-#wrapper {
+.center-page-content {
     text-align: left;
     }
 
@@ -15,42 +14,91 @@
 /******************************************************************************
     Header
 */
-
-#user-nav {
-    float: right;
-    padding: 5px 10px 5px 0;
-    }
-#user-nav a {
-    color: #333;
-    }
-#user-nav li {
-    float: right;
-    padding-right: 15px;
-    }
-#header {
+#header-wrapper {
+    /* Need to set relative so the box shadow appears over content divs */
+    position: relative;
+    min-height: 64px;
     background-color: #dd4814;
-    border-radius: 0 0 8px 8px;
-    clear: both;
+    -webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
+    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
     }
 #header a,
 #header {
     color: #fff;
+    text-decoration: none;
     }
 #header h1 {
-    float: right;
-    font-size: 24px;
-    margin: 15px 30px;
+    float: left;
+    font-size: 18px;
+    margin: 15px 30px 0 20px;
+    }
+#header h1 img {
+    margin-right: 7px;
     }
 #main-nav {
-    margin-left: 20px;
+    float: right;
+    margin-right: 20px;
+    font-size: 14px;
     }
 #main-nav li {
     float: left;
-    padding: 24px 15px;
+    padding: 23px 15px;
     }
 #main-nav li.active {
-    background-color: #B83A10;
-    }
+    background-color: #B83A11;
+    }
+#user-nav {
+    float: left;
+    }
+#user-nav li {
+    float: left;
+    padding: 25px 15px 0 15px;
+    }
+
+
+/******************************************************************************
+    Header search
+*/
+#header-search {
+    float: right;
+    margin: 24px 20px 0 0;
+    }
+#header-search input {
+    margin: 0;
+    }
+#header-search input[type="text"] {
+    width: 240px;
+    padding: 6px 15px;
+    border: none;
+    color: #aea79f;
+    -moz-border-radius: 14px 0 0 14px;
+    -webkit-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+    }
+#header-search input[type="submit"] {
+    padding: 5px 20px 6px 20px;
+    border-left: 1px solid #481e3d;
+    border-top-color: #743062;
+    -moz-border-radius: 0 14px 14px 0;
+    -webkit-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+    background: #5E2750 url(../img/header_search_icon.png) no-repeat center center;
+    background-image: url(../img/header_search_icon.png), linear-gradient(bottom, rgb(80,33,68) 0%, rgb(94,39,80) 100%);
+    background-image: url(../img/header_search_icon.png), -o-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(94,39,80) 100%);
+    background-image: url(../img/header_search_icon.png), -moz-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(94,39,80) 100%);
+    background-image: url(../img/header_search_icon.png), -webkit-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(94,39,80) 100%);
+    background-image: url(../img/header_search_icon.png), -ms-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(94,39,80) 100%);
+    }
+#header-search input[type="submit"]:hover {
+    background-image: url(../img/header_search_icon.png), linear-gradient(bottom, rgb(80,33,68) 0%, rgb(117,49,100) 100%);
+    background-image: url(../img/header_search_icon.png), -o-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(117,49,100) 100%);
+    background-image: url(../img/header_search_icon.png), -moz-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(117,49,100) 100%);
+    background-image: url(../img/header_search_icon.png), -webkit-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(117,49,100) 100%);
+    background-image: url(../img/header_search_icon.png), -ms-linear-gradient(bottom, rgb(80,33,68) 0%, rgb(117,49,100) 100%);
+    }
+
 
 /******************************************************************************
     Content
@@ -59,14 +107,48 @@
 #body {
     background-color: #2C001E;
     clear: both;
-    padding-bottom: 20px;
+    }
+#page-title {
+    font-size: 36px;
+    color: #fff;
+    margin: 0 20px;
+    padding: 20px 0;
     }
 #content {
-    margin: 10px;
     padding: 20px;
-    background-color: #AEA79F;
+    background-color: #fff;
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    border-radius: 4px;
     }
 #login-logout {
     width: 300px;
     margin:0px auto;
     }
+
+
+/******************************************************************************
+    Modifier: modal-content
+*/
+.modal-content #body {
+    background-color: transparent;
+    }
+.modal-content #content {
+    margin-top: 20px;
+    }
+
+
+/******************************************************************************
+    Modifier: login
+*/
+.login #content {
+    padding: 30px 40px;
+    width: 360px;
+    margin: 100px auto;
+    -webkit-box-shadow: 0 0 15px 0 rgba(0,0,0,1);
+    box-shadow: 0 0 15px 0 rgba(0,0,0,1);
+    }
+.login #content h2:first-child {
+    margin: 0 0 20px 0;
+    }
+

=== modified file 'src/maasserver/static/css/typography.css'
--- src/maasserver/static/css/typography.css	2012-02-03 04:37:29 +0000
+++ src/maasserver/static/css/typography.css	2012-02-10 06:33:19 +0000
@@ -1,10 +1,8 @@
 body {
     font-family: Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
-    font-size: 12px;
+    font-size: 13px;
     line-height: 18px;
     color: #333;
-    margin: 0;
-    padding: 0;
     }
 h1, h2, h3, h4, h5, h6 {
     font-weight: normal;

=== added file 'src/maasserver/static/img/bg_dots.png'
Binary files src/maasserver/static/img/bg_dots.png	1970-01-01 00:00:00 +0000 and src/maasserver/static/img/bg_dots.png	2012-02-10 06:33:19 +0000 differ
=== added file 'src/maasserver/static/img/header_search_icon.png'
Binary files src/maasserver/static/img/header_search_icon.png	1970-01-01 00:00:00 +0000 and src/maasserver/static/img/header_search_icon.png	2012-02-10 06:33:19 +0000 differ
=== added file 'src/maasserver/static/img/ubuntu_logo_header.png'
Binary files src/maasserver/static/img/ubuntu_logo_header.png	1970-01-01 00:00:00 +0000 and src/maasserver/static/img/ubuntu_logo_header.png	2012-02-10 06:33:19 +0000 differ
=== modified file 'src/maasserver/static/js/node_add.js'
--- src/maasserver/static/js/node_add.js	2012-02-03 14:39:50 +0000
+++ src/maasserver/static/js/node_add.js	2012-02-10 06:33:19 +0000
@@ -268,5 +268,5 @@
     module._add_node_singleton.render();
 };
 
-}, '0.1', {'requires': ['io', 'node', 'overlay', 'event', 'event-custom']}
+}, '0.1', {'requires': ['io', 'node', 'overlay', 'event', 'event-custom', 'transition']}
 );

=== modified file 'src/maasserver/templates/maasserver/base.html'
--- src/maasserver/templates/maasserver/base.html	2012-02-03 06:43:27 +0000
+++ src/maasserver/templates/maasserver/base.html	2012-02-10 06:33:19 +0000
@@ -5,39 +5,55 @@
     <meta http-equiv="Content-Language" content="en-us" />
     <link rel="stylesheet" href="{{ STATIC_URL }}css/import.css" />
     <link rel="stylesheet" href="{{ STATIC_URL }}css/ubuntu-webfonts.css" />
-    <title>{% block title %}MaaS{% endblock %}</title>
+    <title>{% block title %}{% endblock %} | MaaS Cluster</title>
     {% block js-conf %}{% include "maasserver/js-conf.html" %}{% endblock %}
     {% block head %}{% endblock %}
 </head>
-<body>
+<body class="{% block layout-modifiers %}{% endblock %}">
   {% block html_includes %}{% endblock %}
-  <div id="page">
-    <div id="wrapper">
-    {% block user-nav %}
-      {% include "maasserver/user-nav.html" %}
-    {% endblock %}
-    <div id="body">
-      <div id="header">
-      {% block header %}
-        <ul id="main-nav" class="nav">
-          <li class="{% block nav-active-index %}{% endblock %}">
-            <a href="{% url 'index' %}">Dashboard</a>
-          </li>
-          <li class="{% block nav-active-node-list %}{% endblock %}">
-            <a href="{% url 'node-list' %}">Nodes</a>
-         </li>
-        </ul>
-        <h1>MaaS Cluster</h1>
+  <div id="header-wrapper">
+    <div class="center-page-wrapper">
+      <div id="header" class="center-page-content">
+        {% block header %}
+          <h1>
+            <a href="{% url 'index' %}" title="Return to dashboard"><img src="{{ STATIC_URL }}img/ubuntu_logo_header.png" alt="Ubuntu logo">
+              MaaS Cluster</a>
+          </h1>
+          {% if user.is_authenticated %}
+            {% block user-nav %}
+              {% include "maasserver/user-nav.html" %}
+            {% endblock %}
+            <ul id="main-nav" class="nav">
+              <li class="{% block nav-active-index %}{% endblock %}">
+                <a href="{% url 'index' %}">Dashboard</a>
+              </li>
+              <li class="{% block nav-active-node-list %}{% endblock %}">
+                <a href="{% url 'node-list' %}">Nodes</a>
+             </li>
+            </ul>
+          {% endif %}
+        {% endblock %}
         <div class="clear"></div>
-      {% endblock %}
       </div>
+    </div>
+  </div>
+  <div class="center-page-wrapper">
+    <div class="center-page-content">
+    <div id="body">
       <ul id="flash-messages">
         {% if messages %}
           {% for message in messages %}
-            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>
+              {{ message }}</li>
           {% endfor %}
         {% endif %}
       </ul>
+      {% if user.is_authenticated %}
+        <form action="" method="get" id="header-search">
+          <input type="text" name="query" value="Search nodes"><input type="submit" value="">
+        </form>
+        <h1 id="page-title">{% block page-title %}{% endblock %}</h1>
+      {% endif %}
       <div id="content">{% block content %}{% endblock %}</div>
     </div>
   </div>

=== modified file 'src/maasserver/templates/maasserver/index.html'
--- src/maasserver/templates/maasserver/index.html	2012-02-03 14:39:50 +0000
+++ src/maasserver/templates/maasserver/index.html	2012-02-10 06:33:19 +0000
@@ -1,6 +1,8 @@
 {% extends "maasserver/base.html" %}
 
 {% block nav-active-index %}active{% endblock %}
+{% block title %}Dashboard{% endblock %}
+{% block page-title %}Dashboard{% endblock %}
 
 {% block html_includes %}{% include "maasserver/snippets.html" %}
 {% endblock %}

=== modified file 'src/maasserver/templates/maasserver/node_form.html'
--- src/maasserver/templates/maasserver/node_form.html	2012-01-24 08:36:41 +0000
+++ src/maasserver/templates/maasserver/node_form.html	2012-02-10 06:33:19 +0000
@@ -1,6 +1,7 @@
 {% extends "maasserver/base.html" %}
 
 {% block nav-active-nodes %}active{% endblock %}
+{% block page-title %}Add node{% endblock %}
 
 {% block content %}
   <h2>Add node to this cluster</h2>

=== modified file 'src/maasserver/templates/maasserver/node_list.html'
--- src/maasserver/templates/maasserver/node_list.html	2012-02-02 09:06:18 +0000
+++ src/maasserver/templates/maasserver/node_list.html	2012-02-10 06:33:19 +0000
@@ -1,6 +1,8 @@
 {% extends "maasserver/base.html" %}
 
 {% block nav-active-node-list %}active{% endblock %}
+{% block title %}Nodes{% endblock %}
+{% block page-title %}Nodes{% endblock %}
 
 {% block html_includes %}{% include "maasserver/snippets.html" %}
 {% endblock %}

=== modified file 'src/maasserver/templates/maasserver/user-nav.html'
--- src/maasserver/templates/maasserver/user-nav.html	2012-01-25 13:33:25 +0000
+++ src/maasserver/templates/maasserver/user-nav.html	2012-02-10 06:33:19 +0000
@@ -1,8 +1,5 @@
 <ul id="user-nav" class="nav">
-  {% if user.is_authenticated %}
+    <li><a href="">{{ user.username }}</a></li>
+    <li><a href="">Keys</a></li>
     <li><a href="{% url 'logout' %}">Logout</a></li>
-    <li>{{ user.username }}</li>
-  {% else %}
-    <li><a href="{% url 'login' %}">Login</a></li>
-  {% endif %}
 </ul>

=== modified file 'src/maasserver/templates/registration/login.html'
--- src/maasserver/templates/registration/login.html	2012-02-03 04:37:29 +0000
+++ src/maasserver/templates/registration/login.html	2012-02-10 06:33:19 +0000
@@ -1,24 +1,31 @@
 {% extends "maasserver/base.html" %}
 
-{% block header %}
-<ul id="main-nav" class="nav">
-  <h1>MaaS Cluster</h1>
-  <div class="clear"></div>
-</ul>
-{% endblock %}
+{% block title %}Login{% endblock %}
+{% block layout-modifiers %}modal-content login{% endblock %}
+
+{% block head %}
+  <script type="text/javascript">
+  <!--
+  YUI().use('node', function (Y) {
+    Y.on('load', function() {
+      Y.one('input[type=text]').focus();
+    });
+  });
+  // -->
+  </script>
+{% endblock %}
 
 {% block content %}
-<div id="login-logout">
-
-<h2>Login</h2>
-{% if form.errors %}
-  <p>Your username and password didn't match. Please try again.</p>
-{% endif %}
-
-<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
-  {{ form.as_p }}
-  <input type="submit" value="login" />
-  <input type="hidden" name="next" value="{{ next }}" />
-</form>
-</div>
+  <h2>Login</h2>
+  {% if form.errors %}
+    <p>Your username and password didn't match. Please try again.</p>
+  {% endif %}
+
+  <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
+    <input type="hidden" name="next" value="{{ next }}" />
+    <ul>
+      {{ form.as_ul }}
+      <li class="form-submit"><input type="submit" value="Login" /></li>
+    </ul>
+  </form>
 {% endblock %}


Follow ups