aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriit Laes <plaes@plaes.org>2010-08-07 12:37:06 +0300
committerPriit Laes <plaes@plaes.org>2010-08-07 12:43:35 +0300
commit6b5aaf1cde07f95f2c5d19e9159e208722b46af5 (patch)
tree4e7fabe432602014ee8d66b86054c8acf1a66ea5
parentGah.. we cannot really "protect" dashboard view ;) (diff)
downloadgsoc2010-grumpy-6b5aaf1cde07f95f2c5d19e9159e208722b46af5.tar.gz
gsoc2010-grumpy-6b5aaf1cde07f95f2c5d19e9159e208722b46af5.tar.bz2
gsoc2010-grumpy-6b5aaf1cde07f95f2c5d19e9159e208722b46af5.zip
Added some basic style
-rw-r--r--grumpy/static/css/style.css23
-rw-r--r--grumpy/templates/_userinfo.html10
-rw-r--r--grumpy/templates/layout.html13
3 files changed, 38 insertions, 8 deletions
diff --git a/grumpy/static/css/style.css b/grumpy/static/css/style.css
new file mode 100644
index 0000000..a78ed27
--- /dev/null
+++ b/grumpy/static/css/style.css
@@ -0,0 +1,23 @@
+body {
+ margin: 0;
+}
+
+#page {
+ margin: 0 auto;
+ width: 780px;
+}
+
+#usernav {
+ float: right;
+}
+
+#menu {
+ clear: both;
+}
+
+ul.usernav li {
+ list-style-type: none;
+ display: inline;
+ margin: 0;
+ padding: 0 0 0 10px;
+}
diff --git a/grumpy/templates/_userinfo.html b/grumpy/templates/_userinfo.html
index 7f5ac0e..28d391e 100644
--- a/grumpy/templates/_userinfo.html
+++ b/grumpy/templates/_userinfo.html
@@ -1,9 +1,13 @@
-{% macro show_box(g) -%}
+{% macro show_usernav(g) -%}
+<div id="usernav">
+<ul class="usernav">
{% if g.user -%}
-<ul>
<li><a href="{{ url_for('dashboard') }}">{{ g.user.email.split('@')[0] | e }}</a>
<li><a href="{{ url_for('account') }}">Account</a>
<li><a href="{{ url_for('logout') }}">Log out</a>
+{% else %}
+<li><a href="{{ url_for('login') }}">Login</a></li>
+{% endif %}
</ul>
{% if g.user.regtoken -%}
<span class="warning">
@@ -12,5 +16,5 @@ Until the account has been confirmed, You won't receive
notifications and cannot add packages to your watch list.
</span>
{% endif -%}{# g.user.regtoken #}
-{% endif -%}{# g.user #}
+</div>
{% endmacro -%}
diff --git a/grumpy/templates/layout.html b/grumpy/templates/layout.html
index 2395577..e4870c8 100644
--- a/grumpy/templates/layout.html
+++ b/grumpy/templates/layout.html
@@ -3,14 +3,16 @@
<!doctype html>
<head>
<title>{% block title %}Welcome{% endblock %} | Grumpy</title>
+{{ importer.load_css('style') }}
{% block script %}
{% endblock %}
</head>
-{{ userinfo.show_box(g) }}
-<div class=menu>
+<div id=page>
+{{ userinfo.show_usernav(g) }}
+<h1><a href="{{ url_for('dashboard') }}">Gentoo Grumpy</a></h1>
+<div id=menu>
<ul>
{% if not g.user %}
- <li><a href="{{ url_for('login') }}">Login</a></li>
{% endif %}
<li><a href="{{ url_for('index') }}">Browse Portage</a></li>
</ul>
@@ -28,7 +30,8 @@
<div class=body>
{% block body %}{% endblock %}
</div>
-<div class=foot>
-Project Grumpy
+ <div class=foot>
+ Project Grumpy
+ </div>
</div>
</div>