all pages changed to use Bootstrap

This commit is contained in:
Nicholas Matlaga 2017-07-13 17:41:54 -04:00 committed by Griatch
parent 0a4102fa54
commit 01a340b818
10 changed files with 99 additions and 55 deletions

View file

@ -7,5 +7,9 @@
{% endblock %} {% endblock %}
{% block content %} {% 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 %} {% endblock %}

View file

@ -6,5 +6,9 @@
{% endblock %} {% endblock %}
{% block content %} {% 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 %} {% endblock %}

View file

@ -17,6 +17,11 @@
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="{% static "website/css/app.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 %} {% block header_ext %}
{% endblock %} {% endblock %}
@ -25,7 +30,7 @@
<body> <body>
<div id="top"><a href="#main-content" class="sr-only sr-only-focusable">Skip to main content.</a></div> <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"> <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> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -33,11 +38,12 @@
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img class="navbar-brand-logo" src="{% static "website/images/evennia_logo.png" %}" /> <img class="navbar-brand-logo" src="{% static "website/images/evennia_logo.png" %}" />
{{ game_name }} {{ game_name }}
<br /><small class="text-muted">{{game_slogan}}</small> <br /><small>{{game_slogan}}</small>
</a> </a>
<div class="collapse navbar-collapse" id="menu-content"> <div class="collapse navbar-collapse" id="menu-content">
<ul class="navbar-nav"> <ul class="navbar-nav">
{% block nabvar_left %}
<li> <li>
<a class="nav-link" href="/">Home</a> <a class="nav-link" href="/">Home</a>
</li> </li>
@ -47,8 +53,12 @@
{% if webclient_enabled %} {% if webclient_enabled %}
<li><a class="nav-link" href="{% url 'webclient:index' %}">Play Online</a></li> <li><a class="nav-link" href="{% url 'webclient:index' %}">Play Online</a></li>
{% endif %} {% endif %}
{% endblock %}
</ul> </ul>
<ul class="nav navbar-nav ml-auto w-120 justify-content-end"> <ul class="nav navbar-nav ml-auto w-120 justify-content-end">
{% block navbar_right %}
{% endblock %}
{% block navbar_user %}
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link">Logged in as {{user.username}}</a> <a class="nav-link">Logged in as {{user.username}}</a>
@ -64,6 +74,7 @@
<a class="nav-link" href="{% url 'to_be_implemented' %}">Register</a> <a class="nav-link" href="{% url 'to_be_implemented' %}">Register</a>
</li> </li>
{% endif %} {% endif %}
{% endblock %}
</ul> </ul>
</div> </div>
</nav> </nav>

View file

@ -1,22 +1,26 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<h1>Admin</h1> <div class="row">
Welcome to the Evennia Admin Page. Here, you can edit many facets of players, characters, and other parts of the game. <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> <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. 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> <h2><a href="{% url "admin:objects_objectdb_changelist" %}">Objects</a></h2>
Objects include everything from characters to rooms to exits. Objects include everything from characters to rooms to exits.
<h2><a href="{% url "admin:scripts_scriptdb_changelist" %}">Scripts</a></h2> <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. 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> <h2><a href="{% url "admin:comms_channeldb_changelist" %}">Channels</a></h2>
Channels are used for player communications. 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>. <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> 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 %} {% endblock content %}

View file

@ -7,6 +7,10 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1 id="alt-layout">{{flatpage.title}}</h1> <div class="row">
<div class="col">
<h1>{{flatpage.title}}</h1>
</div>
</div>
{{flatpage.content}} {{flatpage.content}}
{% endblock %} {% endblock %}

View file

@ -46,7 +46,7 @@
<hr /> <hr />
<div class="row"> <div class="row">
<div class="card-deck"> <div class="card-deck">
<div class="card card-outline-secondary"> <div class="card card-outline-secondary text-center">
<h3 class="card-header">Players</h3> <h3 class="card-header">Players</h3>
<div class="card-block" <div class="card-block"
<p> <p>
@ -56,7 +56,7 @@
</div> </div>
<div class="card card-outline-secondary"> <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"> <div class="card-block">
<ul> <ul>
{% for player in players_connected_recent %} {% for player in players_connected_recent %}
@ -67,7 +67,7 @@
</div> </div>
<div class="card card-outline-secondary"> <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"> <div class="card-block">
<ul> <ul>
<li>{{num_players_registered}} players (+ {{num_characters}} characters)</li> <li>{{num_players_registered}} players (+ {{num_characters}} characters)</li>

View file

@ -5,6 +5,10 @@ Logged Out
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1 id="alt-layout">Logged Out</h1> <div class="row">
<p>You have been logged out.</p> <div class="col">
<h1 id="alt-layout">Logged Out</h1>
<p>You have been logged out.</p>
</div>
</div>
{% endblock %} {% endblock %}

View file

@ -5,28 +5,34 @@ Login
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1 id="alt-layout">Login</h1> {% load addclass %}
{% 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="."> <div class="row">
{% csrf_token %} <div class="col">
<table> <h1>Login</h1>
<tr> {% if user.is_authenticated %}
<td><label for="id_username">Username:</label></td> <p>You are already logged in!</p>
<td>{{ form.username }}</td> {% else %}
</tr> {% if form.has_errors %}
<tr> <p>Your username and password didn't match. Please try again.</p>
<td><label for="id_password">Password:</label></td> {% endif %}
<td>{{ form.password }}</td>
</tr> <form method="post" action=".">
</table> {% csrf_token %}
<input type="submit" value="Login" /> <div class="form-group">
<input type="hidden" name="next" value="{{ next }}" /> <label for="id_username">Username:</label>
</form> {{ 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 %} {% endif %}
{% endblock %} {% endblock %}

View file

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