Implement the new design
This commit is contained in:
@@ -1,94 +1,8 @@
|
||||
{%load static %}
|
||||
{% load cache %}
|
||||
{% load flatpages %}
|
||||
{% get_static_prefix as STATIC_PREFIX %}
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}Caminus{%endblock%} - Caminus</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/text.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/960.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/main.css"/>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper" class="container_12">
|
||||
<div class="grid_4">
|
||||
<div id="title" class="header-box">
|
||||
<a href="/">
|
||||
<img src="{{ STATIC_PREFIX }}images/logo.png"/>
|
||||
<h1>Caminus</h1>
|
||||
</a>
|
||||
<div class="slogan">{{ quote }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
<div id="epicenter" class="header-box">
|
||||
{% if user.is_authenticated %}
|
||||
<h2 class="title">{{user.username}}</h2>
|
||||
<ul>
|
||||
<li><a href="{% url user_profile %}">Profile</a></li>
|
||||
<li><a href="{% url profiles.views.logout %}">Logout</a></li>
|
||||
{% if user.is_staff %}
|
||||
<li><a href="{% url admin:index %}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h2 class="title">Login</h2>
|
||||
<p>Welcome! Do you have an invite? <a href="{% url profiles.views.claimInvite %}">Claim it!</a><p>
|
||||
<form method="POST" action="{%url profiles.views.login %}">
|
||||
{%csrf_token%}
|
||||
{{login_form.as_p}}
|
||||
<input type="submit" value="Login"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
<div id="statbox" class="header-box">
|
||||
<h2 class="title">World Status</h2>
|
||||
<h3>Online Players</h3>
|
||||
<ul>
|
||||
{% if onlinePlayers %}
|
||||
{% for player in onlinePlayers %}
|
||||
<li>{{player}}</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li><em>Nobody...</em></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="{%url forums.views.index%}">Forums</a></li>
|
||||
<li><a href="{% url petition.views.create %}">Create Petition</a></li>
|
||||
<li><a href="http://{{minecraftHost}}/map/">Live Map</a></li>
|
||||
{% get_flatpages '/' as pages %}
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br style="clear:both"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="content">
|
||||
<h1>{%block sectiontitle %}Caminus{%endblock%}</h1>
|
||||
{% block breadcrumb %}{% endblock %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="footer">
|
||||
<p>©2012 Team Caminus. All Rights Reserved.</p>
|
||||
<p><a href="http://github.com/tdfischer/caminus/commit/{{app_version}}">Running {{app_version}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% extends 'base_full.html' %}
|
||||
|
||||
{% block main %}
|
||||
<div class="grid_8">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock main %}
|
||||
|
101
templates/base_full.html
Normal file
101
templates/base_full.html
Normal file
@@ -0,0 +1,101 @@
|
||||
{%load static %}
|
||||
{% load cache %}
|
||||
{% load flatpages %}
|
||||
{% get_static_prefix as STATIC_PREFIX %}
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}Caminus{%endblock%} - Caminus</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/text.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/960.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}/css/main.css"/>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper" class="container_12">
|
||||
<div id="header">
|
||||
<div class="grid_4">
|
||||
<div id="title" class="stat-box">
|
||||
<a href="/">
|
||||
<img src="{{ STATIC_PREFIX }}images/logo.png"/>
|
||||
<h1>Caminus</h1>
|
||||
</a>
|
||||
<div id="slogan">{{ quote }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_8">
|
||||
<div id="epicenter" class="stat-box">
|
||||
{% if user.is_authenticated %}
|
||||
<h2 class="title">{{user.username}}</h2>
|
||||
<ul>
|
||||
<li><a href="{% url user_profile %}">Profile</a></li>
|
||||
<li><a href="{% url profiles.views.logout %}">Logout</a></li>
|
||||
{% if user.is_staff %}
|
||||
<li><a href="{% url admin:index %}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h2 class="title">Login</h2>
|
||||
<p>Welcome! Do you have an invite? <a href="{% url profiles.views.claimInvite %}">Claim it!</a><p>
|
||||
<form method="POST" action="{%url profiles.views.login %}">
|
||||
{%csrf_token%}
|
||||
{{login_form.as_p}}
|
||||
<input type="submit" value="Login"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
<div id="nav">
|
||||
<div class="title">
|
||||
<h1>{%block sectiontitle %}Caminus{%endblock%}</h1>
|
||||
<p>{% block breadcrumb %}{% endblock %}</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="{%url forums.views.index%}">Forums</a></li>
|
||||
<li><a href="{% url petition.views.create %}">Create Petition</a></li>
|
||||
<li><a href="http://{{minecraftServer.hostname}}/map/">Live Map</a></li>
|
||||
{% get_flatpages '/' as pages %}
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br style="clear:both"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="content">
|
||||
{% block main %}
|
||||
{% endblock main %}
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
<div id="statbox" class="stat-box">
|
||||
<h2 class="title">World Status</h2>
|
||||
{% for server in minecraft_servers %}
|
||||
<h3>{{server.hostname}}:{{server.port}}</h3>
|
||||
<ul>
|
||||
{% if server.online_players %}
|
||||
{% for player in server.online_players%}
|
||||
<li>{{player}}</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li><em>Nobody...</em></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
<div id="footer">
|
||||
<p>©2012 Team Caminus. All Rights Reserved.</p>
|
||||
<p><a href="http://github.com/tdfischer/caminus/commit/{{app_version}}">Running {{app_version}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
11
templates/base_simple.html
Normal file
11
templates/base_simple.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block main %}
|
||||
<div class="grid_8">
|
||||
<div class="item">
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
<br style="clear:both"/>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main %}
|
@@ -1,4 +1,4 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'news_base.html' %}
|
||||
{% load static %}
|
||||
{% load markup %}
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
|
||||
{% block content %}
|
||||
{% for post in items.object_list %}
|
||||
<div class='item'>
|
||||
<h2><a href="{{post.get_absolute_url}}">{{post.title}}</a></h2>
|
||||
<div class="byline">By {{post.author}}</div>
|
||||
<div class="content">
|
||||
{{post.body|truncatewords:"45"|markdown}}
|
||||
</div>
|
||||
<div class="commentcount"><a href="{{post.get_absolute_url}}">{{post.comments.all|length}} comment{{post.comments.all|length|pluralize}} »</a></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% get_static_prefix as STATIC_PREFIX %}
|
||||
|
@@ -1,15 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'news_base.html' %}
|
||||
{% load markup %}
|
||||
{% load mptt_tags %}
|
||||
|
||||
{% block title %}News - {{item.title}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2><a href="{{post.get_absolute_url}}">{{post.title}}</a></h2>
|
||||
<div class="item">
|
||||
<h2><a href="{{post.get_absolute_url}}">{{item.title}}</a></h2>
|
||||
<div class="byline">By {{item.author}}</div>
|
||||
<div class="content">
|
||||
{{item.body|markdown}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="comments">
|
||||
<h3>Comments</h3>
|
||||
{% recursetree item.comments %}
|
||||
|
3
templates/news_base.html
Normal file
3
templates/news_base.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "base.html" %}
|
||||
{% block sectiontitle %}News{% endblock %}
|
||||
|
@@ -1,18 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}New Petition{% endblock %}
|
||||
{% block sectiontitle%}Petitions{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
<p>Creating a petition notifies the administration. Possible uses:</p>
|
||||
<ul>
|
||||
<li>Abusive player</li>
|
||||
<li>Server bug</li>
|
||||
<li>Feature request</li>
|
||||
</ul>
|
||||
<p>To create a petition, fill out the following form and click 'submit':</p>
|
||||
<form method="POST" action="{% url petition.views.create %}">
|
||||
{% csrf_token %}
|
||||
{{form.as_p}}
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
3
templates/profile_base.html
Normal file
3
templates/profile_base.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "base.html" %}
|
||||
{% block sectiontitle %}Profile{% endblock %}
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "profile_base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
<form method="POST" action="{%url profiles.views.edit %}">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block sectiontitle %}Invites{% endblock %}
|
||||
|
||||
{% block title %}Invites{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
<p>Your Invites:</p>
|
||||
<table id='invite-table'>
|
||||
<tr class="header">
|
||||
@@ -44,4 +46,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,4 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Login{%endblock %}
|
||||
{% block sectiontitle %}Login{% endblock %}
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
{% include 'profiles/_login_form.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "profile_base.html" %}
|
||||
{%block title%}Your Profile{%endblock%}
|
||||
|
||||
{%block content %}
|
||||
<div class="item">
|
||||
<p>Welcome, {{ user.username }}</p>
|
||||
|
||||
<a href="{%url profiles.views.edit %}">Edit profile</a>
|
||||
<a href="{%url profiles.views.invites %}">Invites</a>
|
||||
</div>
|
||||
{%endblock%}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'base_simple.html' %}
|
||||
|
||||
{% block title %}Invite{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>To invite a friend to Caminus, simply share them this code, or link to this page:</p>
|
||||
<div id="invite-code">
|
||||
<p>Code</p>
|
||||
<input type="text" value="{{invite.code}}" onClick="this.select()"/>
|
||||
<br />
|
||||
<p>Link</p>
|
||||
<input type="text" value="http://{{site_url}}{{ invite.get_absolute_url }}" onClick="this.select()"/>
|
||||
</div>
|
||||
<p>To invite a friend to Caminus, simply share them this code, or link to this page:</p>
|
||||
<div id="invite-code">
|
||||
<p>Code</p>
|
||||
<input type="text" value="{{invite.code}}" onClick="this.select()"/>
|
||||
<br />
|
||||
<p>Link</p>
|
||||
<input type="text" value="http://{{site_url}}{{ invite.get_absolute_url }}" onClick="this.select()"/>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user