From 8d0ec17c6daf2c95235846b50d31718357c34f7f Mon Sep 17 00:00:00 2001 From: Fabian Faessler Date: Sat, 28 Sep 2013 22:56:59 +0200 Subject: [PATCH 1/2] added awesome front page --- nsupdate/main/views.py | 1 + nsupdate/nsupdate/templates/base.html | 47 +++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/nsupdate/main/views.py b/nsupdate/main/views.py index f7a43a9..5ca3917 100644 --- a/nsupdate/main/views.py +++ b/nsupdate/main/views.py @@ -20,6 +20,7 @@ class HomeView(TemplateView): def get_context_data(self, *args, **kwargs): context = super(HomeView, self).get_context_data(*args, **kwargs) + context.update(create_context(self.request)) context['nav_home'] = True return context diff --git a/nsupdate/nsupdate/templates/base.html b/nsupdate/nsupdate/templates/base.html index 3a06a02..8e0e5f5 100644 --- a/nsupdate/nsupdate/templates/base.html +++ b/nsupdate/nsupdate/templates/base.html @@ -10,6 +10,8 @@ {% block title %}nsupdate.info{% endblock %} + + @@ -51,9 +53,48 @@
{% block content %} -

Heyho!

-

Welcome to the base template. Extend this template in all other - templates and override the content block

+
+
+

+

World wide web

+

+ nsupdate.info is an open-source DynDNS service with IPv4 and IPv6 support. +

+
+
+

+

Awesomeness

+

+ Powered by python, the magical pony django and a stupid three columned icon landing page. +

+
+
+

+

Lies

+

+ nsupdate.info is winner of the Django-Dash 2013 with the highest score in the history of the competition. +

+
+
+
+
+
+ {% if session.ipv4 and session.ipv6 %} +

We think this are your IPs:

+ {% elif session.ipv4 or session.ipv6 %} +

We think this is your IP:

+ {% endif %} + + {% if session.ipv4 %} +

{{session.ipv4}}

+ {% elif session.ipv6 %} +

{{session.ipv6}}

+ {% else %} +

HeyHo!

+ {% endif %} +
+
+ {% endblock %}
From 4c38bd4a1de3de34a6504770c2be70086b3ed8ed Mon Sep 17 00:00:00 2001 From: Fabian Faessler Date: Sat, 28 Sep 2013 23:13:36 +0200 Subject: [PATCH 2/2] added footer --- nsupdate/nsupdate/static/css/nsupdate.css | 23 +++++++++++++++++++++++ nsupdate/nsupdate/templates/base.html | 17 +++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/nsupdate/nsupdate/static/css/nsupdate.css b/nsupdate/nsupdate/static/css/nsupdate.css index f151011..9192f19 100644 --- a/nsupdate/nsupdate/static/css/nsupdate.css +++ b/nsupdate/nsupdate/static/css/nsupdate.css @@ -1,3 +1,26 @@ +html, body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ +} + +.wrap { + min-height: 100%; + height: auto !important; + height: 100%; + /* Negative indent footer by its height */ + margin: 0 auto -120px; + /* Pad bottom by footer height */ + padding: 0 0 60px; +} + .content { margin-top: 70px; } + +.footer { + height: 50px; + padding: 15px; + background-color: #ddd; +} + + diff --git a/nsupdate/nsupdate/templates/base.html b/nsupdate/nsupdate/templates/base.html index 8e0e5f5..cc9a7fc 100644 --- a/nsupdate/nsupdate/templates/base.html +++ b/nsupdate/nsupdate/templates/base.html @@ -50,8 +50,8 @@ - -
+ +
{% block content %}
@@ -98,6 +98,19 @@ {% endblock %}
+ +