move screenshots to own view, remove features from home view (features are in docs, don't duplicate)

remove links to individual static screenshots, they break the slideshow

fix spacing on home view, so footer is at bottom
This commit is contained in:
Thomas Waldmann 2013-10-27 11:28:40 +01:00
parent 26e819e013
commit 9125c8072a
5 changed files with 50 additions and 51 deletions

View File

@ -12,6 +12,12 @@
client) can update a hostname, so you don't need to know or find client) can update a hostname, so you don't need to know or find
out your current IP address. out your current IP address.
</p> </p>
<h2>Screenshots?</h2>
<p>
We made some
<a href="{% url 'screenshots' %}">screenshots</a>
for you so you can see what you get without having to create an account first.
</p>
<h2>Why another one?</h2> <h2>Why another one?</h2>
<p> <p>
We wanted a simple, usable, secure and free dynamic dns service. We wanted a simple, usable, secure and free dynamic dns service.

View File

@ -2,10 +2,9 @@
{% load bootstrap %} {% load bootstrap %}
{% load static %} {% load static %}
{% block header %} {% block content %}
<div class="container">
<div class="jumbotron"> <div class="jumbotron">
<div class="container">
<h4>Your IP(s):</h4> <h4>Your IP(s):</h4>
{% if request.session.ipv4 %} {% if request.session.ipv4 %}
<h1>{{request.session.ipv4}}</h1> <h1>{{request.session.ipv4}}</h1>
@ -16,12 +15,7 @@
<p> <p>
nsupdate.info - the Dynamic DNS service you waited for. nsupdate.info - the Dynamic DNS service you waited for.
</p> </p>
</div> </div>
</div>
{% endblock %}
{% block content %}
<div class="row"> <div class="row">
<div class="col-sm-4" style="text-align: center"> <div class="col-sm-4" style="text-align: center">
@ -51,44 +45,5 @@
</p> </p>
</div> </div>
</div> </div>
<hr> </div>
<div class="row">
<div class="col-lg-3">
<div class="well well-sm">
<h3>Features</h3>
<p>
<i class="icon icon-ok"></i> Easy to use<br>
<i class="icon icon-ok"></i> IP v4 and v6 support<br>
<i class="icon icon-ok"></i> No spam, no nagging, no crap<br>
<i class="icon icon-ok"></i> Free and Open-Source<br>
</p>
</div>
</div>
<div class="col-lg-9">
<div class="well well-sm">
<h3>Screenshots</h3>
<a id="screenshot_link" href="{% static 'screenshots/overview.png' %}">
<img id="screenshot_image" src="{% static 'screenshots/overview.png' %}" class="img-responsive" alt="Responsive image">
</a>
<script>
var idx = 0;
var images = ["{% static 'screenshots/hostview.png' %}",
"{% static 'screenshots/help.png' %}",
"{% static 'screenshots/overview.png' %}",
"{% static 'screenshots/generatesecret.png' %}"];
setInterval(function(){
$('#screenshot_link').attr('href', images[idx]);
$('#screenshot_image').attr('src', images[idx]);
idx += 1;
if(idx >= images.length) {
idx = 0;
}
}, 5000);
</script>
</div>
</div>
</div>
<hr>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% load bootstrap %}
{% load static %}
{% block content %}
<div class="row">
<div class="col-lg-12">
<div class="well well-sm">
<h3>Screenshots</h3>
<img id="screenshot_image" src="{% static 'screenshots/overview.png' %}" class="img-responsive" alt="Responsive image">
<script>
var idx = 0;
var images = ["{% static 'screenshots/hostview.png' %}",
"{% static 'screenshots/help.png' %}",
"{% static 'screenshots/overview.png' %}",
"{% static 'screenshots/generatesecret.png' %}"];
setInterval(function(){
$('#screenshot_image').attr('src', images[idx]);
idx += 1;
if(idx >= images.length) {
idx = 0;
}
}, 5000);
</script>
</div>
</div>
</div>
{% endblock %}

View File

@ -3,7 +3,7 @@ from django.views.generic import TemplateView
from .views import ( from .views import (
HomeView, OverviewView, HostView, DeleteHostView, AboutView, HelpView, GenerateSecretView, HomeView, OverviewView, HostView, DeleteHostView, AboutView, HelpView, GenerateSecretView,
RobotsTxtView, DomainOverwievView, DeleteDomainView) RobotsTxtView, DomainOverwievView, DeleteDomainView, ScreenshotsView)
from ..api.views import ( from ..api.views import (
MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView) MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView)
@ -15,6 +15,7 @@ urlpatterns = patterns(
url(r'^legal/$', url(r'^legal/$',
TemplateView.as_view(template_name='main/legal.html'), name="legal"), TemplateView.as_view(template_name='main/legal.html'), name="legal"),
url(r'^help/$', HelpView.as_view(), name="help"), url(r'^help/$', HelpView.as_view(), name="help"),
url(r'^screenshots/$', ScreenshotsView.as_view(), name="screenshots"),
url(r'^overview/$', OverviewView.as_view(), name='overview'), url(r'^overview/$', OverviewView.as_view(), name='overview'),
url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'), url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'),
url(r'^generate_secret/(?P<pk>\d+)/$', GenerateSecretView.as_view(), name='generate_secret_view'), url(r'^generate_secret/(?P<pk>\d+)/$', GenerateSecretView.as_view(), name='generate_secret_view'),

View File

@ -76,6 +76,15 @@ class HelpView(TemplateView):
return context return context
class ScreenshotsView(TemplateView):
template_name = "main/screenshots.html"
def get_context_data(self, *args, **kwargs):
context = super(ScreenshotsView, self).get_context_data(*args, **kwargs)
context['nav_help'] = True
return context
class OverviewView(CreateView): class OverviewView(CreateView):
model = Host model = Host
template_name = "main/overview.html" template_name = "main/overview.html"