Skip to content

Commit

Permalink
all pages changed to use Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
aliceafterall committed Jul 14, 2017
1 parent b84980b commit 88574c9
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 55 deletions.
Empty file.
6 changes: 5 additions & 1 deletion evennia/web/website/templates/website/404.html
Expand Up @@ -7,5 +7,9 @@
{% endblock %}

{% block content %}
<h1>Error 404 - Page not found</h1>
<div class="row">
<div class="col">
<h1>Error 404 - Page not found</h1>
</div>
</div>
{% endblock %}
6 changes: 5 additions & 1 deletion evennia/web/website/templates/website/500.html
Expand Up @@ -6,5 +6,9 @@
{% endblock %}

{% block content %}
<h1>Error 500 - A Server Error was encountered.</h1>
<div class="row">
<div class="col">
<h1>Error 500 - A Server Error was encountered.</h1>
</div>
</div>
{% endblock %}
15 changes: 13 additions & 2 deletions evennia/web/website/templates/website/base.html
Expand Up @@ -17,6 +17,11 @@
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="{% static "website/css/app.css" %}">

{% comment %}
Allows for loading custom styles without overriding the base site styles
{% endcomment %}
<link rel="stylesheet" type="text/css" href="{% static "website/css/custom.css" %}">

{% block header_ext %}
{% endblock %}

Expand All @@ -25,19 +30,20 @@
<body>
<div id="top"><a href="#main-content" class="sr-only sr-only-focusable">Skip to main content.</a></div>

<nav class="navbar navbar-toggleable-sm navbar-light bg-faded">
<nav class="navbar navbar-light bg-faded navbar-toggleable-sm">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#menu-content" aria-controls="menu-content" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<a class="navbar-brand" href="/">
<img class="navbar-brand-logo" src="{% static "website/images/evennia_logo.png" %}" />
{{ game_name }}
<br /><small class="text-muted">{{game_slogan}}</small>
<br /><small>{{game_slogan}}</small>
</a>

<div class="collapse navbar-collapse" id="menu-content">
<ul class="navbar-nav">
{% block nabvar_left %}
<li>
<a class="nav-link" href="/">Home</a>
</li>
Expand All @@ -47,8 +53,12 @@
{% if webclient_enabled %}
<li><a class="nav-link" href="{% url 'webclient:index' %}">Play Online</a></li>
{% endif %}
{% endblock %}
</ul>
<ul class="nav navbar-nav ml-auto w-120 justify-content-end">
{% block navbar_right %}
{% endblock %}
{% block navbar_user %}
{% if user.is_authenticated %}
<li class="nav-item">
<a class="nav-link">Logged in as {{user.username}}</a>
Expand All @@ -64,6 +74,7 @@
<a class="nav-link" href="{% url 'to_be_implemented' %}">Register</a>
</li>
{% endif %}
{% endblock %}
</ul>
</div>
</nav>
Expand Down
32 changes: 18 additions & 14 deletions evennia/web/website/templates/website/evennia_admin.html
@@ -1,22 +1,26 @@
{% extends "base.html" %}
{% block content %}
<h1>Admin</h1>
Welcome to the Evennia Admin Page. Here, you can edit many facets of players, characters, and other parts of the game.
<div class="row">
<div class="col">
<h1>Admin</h1>
Welcome to the Evennia Admin Page. Here, you can edit many facets of players, characters, and other parts of the game.

<h2><a href="{% url "admin:players_playerdb_changelist" %}">Players</a></h2>
Players are user accounts. Players can have several characters under them. A user's login and password information can be changed here.
<h2><a href="{% url "admin:players_playerdb_changelist" %}">Players</a></h2>
Players are user accounts. Players can have several characters under them. A user's login and password information can be changed here.

<h2><a href="{% url "admin:objects_objectdb_changelist" %}">Objects</a></h2>
Objects include everything from characters to rooms to exits.
<h2><a href="{% url "admin:objects_objectdb_changelist" %}">Objects</a></h2>
Objects include everything from characters to rooms to exits.

<h2><a href="{% url "admin:scripts_scriptdb_changelist" %}">Scripts</a></h2>
Scripts are meta objects used to store game information, handle special functionality or perform timed actions.
<h2><a href="{% url "admin:scripts_scriptdb_changelist" %}">Scripts</a></h2>
Scripts are meta objects used to store game information, handle special functionality or perform timed actions.

<h2><a href="{% url "admin:comms_channeldb_changelist" %}">Channels</a></h2>
Channels are used for player communications.
<h2><a href="{% url "admin:comms_channeldb_changelist" %}">Channels</a></h2>
Channels are used for player communications.

<h2><a href="{% url "admin:help_helpentry_changelist" %}">Help Topics</a></h2>
<h2><a href="{% url "admin:help_helpentry_changelist" %}">Help Topics</a></h2>

<p>If you are an advanced user who needs access to the raw Django Admin, it is available <a href="{% url "django_admin" %}">here</a>.
You can make this the default my changing <code>EVENNIA_ADMIN</code> to <code>False</code> in <code>settings.py</code> and reload.</p>
{% endblock content %}
<p>If you are an advanced user who needs access to the raw Django Admin, it is available <a href="{% url "django_admin" %}">here</a>.
You can make this the default my changing <code>EVENNIA_ADMIN</code> to <code>False</code> in <code>settings.py</code> and reload.</p>
</div>
</div>
{% endblock content %}
6 changes: 5 additions & 1 deletion evennia/web/website/templates/website/flatpages/default.html
Expand Up @@ -7,6 +7,10 @@
{% endblock %}

{% block content %}
<h1 id="alt-layout">{{flatpage.title}}</h1>
<div class="row">
<div class="col">
<h1>{{flatpage.title}}</h1>
</div>
</div>
{{flatpage.content}}
{% endblock %}
6 changes: 3 additions & 3 deletions evennia/web/website/templates/website/index.html
Expand Up @@ -46,7 +46,7 @@ <h2>Evennia</h2>
<hr />
<div class="row">
<div class="card-deck">
<div class="card card-outline-secondary">
<div class="card card-outline-secondary text-center">
<h3 class="card-header">Players</h3>
<div class="card-block"
<p>
Expand All @@ -56,7 +56,7 @@ <h3 class="card-header">Players</h3>
</div>

<div class="card card-outline-secondary">
<h3 class="card-header">Recently Connected</h3>
<h3 class="card-header text-center">Recently Connected</h3>
<div class="card-block">
<ul>
{% for player in players_connected_recent %}
Expand All @@ -67,7 +67,7 @@ <h3 class="card-header">Recently Connected</h3>
</div>

<div class="card card-outline-secondary">
<h3 class="card-header">Database Stats</h3>
<h3 class="card-header text-center">Database Stats</h3>
<div class="card-block">
<ul>
<li>{{num_players_registered}} players (+ {{num_characters}} characters)</li>
Expand Down
Expand Up @@ -5,6 +5,10 @@
{% endblock %}

{% block content %}
<h1 id="alt-layout">Logged Out</h1>
<p>You have been logged out.</p>
<div class="row">
<div class="col">
<h1 id="alt-layout">Logged Out</h1>
<p>You have been logged out.</p>
</div>
</div>
{% endblock %}
50 changes: 28 additions & 22 deletions evennia/web/website/templates/website/registration/login.html
Expand Up @@ -5,28 +5,34 @@
{% endblock %}

{% block content %}
<h1 id="alt-layout">Login</h1>
{% if user.is_authenticated %}
<p>You are already logged in!</p>
{% else %}
{% if form.has_errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
{% load addclass %}

<form method="post" action=".">
{% csrf_token %}
<table>
<tr>
<td><label for="id_username">Username:</label></td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td><label for="id_password">Password:</label></td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="Login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<div class="row">
<div class="col">
<h1>Login</h1>
{% if user.is_authenticated %}
<p>You are already logged in!</p>
{% else %}
{% if form.has_errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

<form method="post" action=".">
{% csrf_token %}
<div class="form-group">
<label for="id_username">Username:</label>
{{ form.username | addclass:"form-control" }}
</div>
<div class="form-group">
<label for="id_password">Password:</label>
{{ form.password | addclass:"form-control" }}
</div>
<div class="form-group">
<input class="form-control" type="submit" value="Login" />
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}
25 changes: 16 additions & 9 deletions evennia/web/website/templates/website/tbi.html
Expand Up @@ -7,12 +7,19 @@
{% endblock %}

{% block content %}
<h1 id="alt-layout">To Be Implemented...</h1>
<p>
This feature has yet to be implemented, but rest assured that it will be!
<br />
<br />
<br />
Eventually...
</p>
{% endblock %}
<hr />
<div class="row">
<div class="col">
<div class="card text-center">
<h1 class="card-header">To Be Implemented...</h1>
<div class="card-block">
This feature has yet to be implemented, but rest assured that it will be!
<br />
<br />
<br />
Eventually...
</div>
</div>
</div>
</div>
{% endblock %}

0 comments on commit 88574c9

Please sign in to comment.