Semifinal version

This commit is contained in:
Sebastian 2013-11-27 23:10:45 +01:00
parent f4231c9c28
commit 856343bffd
9 changed files with 107 additions and 9 deletions

View File

@ -7,11 +7,15 @@ from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
from views import HomeView
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'past3d.views.home', name='home'),
# url(r'^past3d/', include('past3d.foo.urls')),
url(r'^$', HomeView.as_view(), name='home'),
url(r'^users/', include('users.urls')),
url(r'^3d/', include('pastebin.urls')),

7
past3d/views.py Normal file
View File

@ -0,0 +1,7 @@
from django.views.generic.base import TemplateView
from pastebin.views import LastesGeometriesMixin
class HomeView(TemplateView, LastesGeometriesMixin):
template_name = 'home.html'

View File

@ -1,5 +1,5 @@
<div class="textcontainer">
<h2><i class="icon-upload-alt"></i> Latest uploads</h2>
<h2><i class="icon-upload-alt"></i> Latest pastes</h2>
<ul class="uploads-list">
{% for geometry in latest_geometries %}
<li>

View File

@ -3,6 +3,7 @@ from django.views.generic.detail import DetailView
from django.core.urlresolvers import reverse
from django.views.generic.base import ContextMixin
from django.core.exceptions import PermissionDenied
from django.views.generic.base import TemplateView
from forms import GeometryForm, AnonymousGeometryForm

View File

@ -43,10 +43,15 @@
background-color: #eee;
padding-top: 4px;
padding-left: 4px; }
.textcontainer a {
text-decoration: none;
color: #1947D1; }
.textcontainer a:visited {
color: #4C5B89; }
.textcontainer a:hover {
color: #7E98E5; }
.textcontainer .uploads-list {
list-style: none; }
.textcontainer .uploads-list a {
text-decoration: none; }
.textcontainer .pure-form label {
font-weight: bold;
border-bottom: 1px solid #ccc; }

View File

@ -10,6 +10,8 @@
margin-bottom: 0 px;
}
@mixin gridcontainer {
margin: {
top: 4px;
@ -58,12 +60,23 @@
left: 4px;
}
a {
text-decoration: none;
color: #1947D1;
&:visited {
color: #4C5B89;
}
&:hover {
color: #7E98E5;
}
}
.uploads-list {
list-style: none;
a {
text-decoration: none;
}
}
.pure-form {

View File

@ -17,10 +17,10 @@
<body>
<div id="header">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<a href="#" class="pure-menu-heading">past3d</a>
<a href="{% url 'home' %}" class="pure-menu-heading">past3d</a>
<ul>
<li ><a href="#">Home</a></li>
<li ><a href="{% url 'home' %}">Home</a></li>
<li><a href="{% url 'geometry_create' %}">New Paste</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'user_update' user_id=user.pk %}">Account</a></li>

68
templates/home.html Normal file
View File

@ -0,0 +1,68 @@
{% extends "base.html" %}
{% block title %} Welcome to pat3d {% endblock %}
{% block headeraddons %}
{% endblock %}
{% block content %}
<div id="content">
<h1>Welcome to past3d</h1>
<div class="pure-g-r">
<div class="pure-u-2-3">
<div class="textcontainer">
<h2>What ?</h2>
Past3d is similar to
<a href="http://en.wikipedia.org/wiki/Pastebin">a pastebin</a>
or
<a href="http://en.wikipedia.org/wiki/Image_hosting_service">a image hoster</a>.
Instead of hosting your config file, ssh private keys or funny cat photos,
it can host your <b>3D models</b>.<br/>
Even more impotant: <b>Using WebGL it can view the model directly in your browser.</b>
<h2>Features</h2>
<ul>
<li>Supports Binary and ASCII STL</li>
<li>Renders Geometries in any browser capable of webGL</li>
<li>Public an private pastes</li>
<li>Simple to use</li>
<li>No registration required</li>
<li>Registred users can delete their uploaded models at any time</li>
<li>Models uploaded by registred user stay online indefinitely</li>
</ul>
<i>Private</i> only means that past3d will not show the link to anyone else.
Whereas a public paste can be shown at various places on this site,
e.g. the Latest Uploads sidebar.
<br/>
<br/>
Also note that as an unregistered user your models will only stay online for a limited time span (up to one month maximum).<br/>
<br/>
Using a special licence for your models is not required,
but you can specify anything you like in the description field.
<h2>Want to try it out ?</h2>
Simply clickt the <a href="{% url 'geometry_create' %}">New paste</a> button on top of
this page.<br/>
As an unregistered user your models will only stay online for a limited time span.<br/>
So you might want to <a href="{% url 'signup' %}">register</a> first.
Registered users can upload models that stay online forever (well... let's say for a long time if nothing goes terribly wrong).<br/>
<h2>Want to roll your own ?</h2>
past3d is completly open source.<br/>
Just head over to <a href="https://github.com/LongHairedHacker/past3d">github</a>,
download the latest version und start your own 3D enabled pastebin.
All you need is server running python and django.<br/>
Also if you think this site misses an important feature,
fork the repo implement the feature and send me a pull request.</br>
</div>
</div>
<div class="pure-u-1-3">
{% include 'pastebin/latest_geometries.html' %}
</div>
</div>
</div>
{% endblock %}

View File

@ -23,7 +23,7 @@
You should have received an email containg password reset link.
<br/>
<br/>
<a class="pure-button button-green" href="/todo/">Okay</a>
<a class="pure-button button-green" href="{% url 'home' %}">Okay</a>
</div>
</div>
<div class="pure-u-1-3">