base.html redone with bootstrap

This commit is contained in:
Nicholas Matlaga 2017-07-13 13:05:43 -04:00 committed by Griatch
parent c43059c75f
commit eb8d8c8b6f
2 changed files with 107 additions and 75 deletions

View file

@ -20,4 +20,44 @@
.headerLinks {
position: static;
}
}
/* If you for some reason need to override the default sizing model,
for instance, if you're using a Google Maps widget, you may need
to use the following code, see:
http://v4-alpha.getbootstrap.com/getting-started/introduction/#box-sizing */
/*
.selector-for-some-widget {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
*/
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 30px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 30px;
line-height: 30px; /* Vertically center the text there */
background-color: #f5f5f5;
}
.navbar-brand-logo {
height: 50px;
width: 50px;
}
.footer {
background-color: lightgrey;
}

View file

@ -1,20 +1,19 @@
{% load staticfiles %}<!DOCTYPE HTML>
<html>
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="author" content="haran" />
<meta name="generator" content="haran" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="author" content="Evennia Contributors" />
<meta name="generator" content="Evennia" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% if sidebar %}
<link rel="stylesheet" type="text/css" href="{% static "website/css/prosimii-screen-alt.css" %}" media="screen" title="Prosimii (Sidebar)" />
{% else %}
<link rel="stylesheet" type="text/css" href="{% static "website/css/prosimii-screen.css" %}" media="screen" title="Prosimii" />
{% endif %}
<link rel="stylesheet alternative" type="text/css" href="{% static "website/css/prosimii-print.css" %}" media="screen" title="Print Preview" />
<link rel="stylesheet" type="text/css" href="{% static "website/css/prosimii-print.css" %}" media="print" />
<link rel="icon" type="image/x-icon" href="/static/website/images/evennia_logo.png" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> <!-- Custom styles -->
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="{% static "website/css/app.css" %}">
@ -23,75 +22,68 @@
<title>{{game_name}} - {% if flatpage %}{{flatpage.title}}{% else %}{% block titleblock %}{{page_title}}{% endblock %}{% endif %}</title>
</head>
<body>
<!-- For non-visual user agents: -->
<div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">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>
<!-- ##### Header ##### -->
<nav class="navbar navbar-toggleable-sm navbar-light bg-faded">
<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>
<div id="header">
<div class="superHeader">
<!--span>Sites:</span-->
<a href="http://evennia.com" title="The Python-based MUD server">Evennia.com</a>
</div>
<a class="navbar-brand" href="/">
<img class="navbar-brand-logo" src="{% static "website/images/evennia_logo.png" %}" />
{{ game_name }}
<br /><small>{{game_slogan}}</small>
</a>
<div class="midHeader">
<img src="{% static "website/images/evennia_logo.png" %}" align='left'/> <h1 class="headerTitle" lang="la">{{game_name}}</h1>
<div class="headerSubTitle" title="Slogan">
<!-- Insert a slogan here if you want -->
{{game_slogan}} &nbsp;
<div class="collapse navbar-collapse" id="menu-content">
<ul class="navbar-nav">
<li>
<a class="nav-link" href="/">Home</a>
</li>
<li><a class="nav-link" href="https://github.com/evennia/evennia/wiki/Evennia-Introduction/">About</a></li>
<li><a class="nav-link" href="https://github.com/evennia/evennia/wiki">Documentation</a></li>
<li><a class="nav-link" href="{% url 'admin:index' %}">Admin Interface</a></li>
{% if webclient_enabled %}
<li><a class="nav-link" href="{% url 'webclient:index' %}">Play Online</a></li>
{% endif %}
</ul>
<ul class="nav navbar-nav ml-auto w-120 justify-content-end">
{% if user.is_authenticated %}
<li class="nav-item">
<a class="nav-link">Logged in as {{user.username}}</a>
</li>
<li>
<a class="nav-link" href="{% url 'logout' %}">Log Out</a>
</li>
{% else %}
<li>
<a class="nav-link" href="{% url 'login' %}">Log In</a>
</li>
<li>
<a class="nav-link" href="{% url 'to_be_implemented' %}">Register</a>
</li>
{% endif %}
</ul>
</div>
</nav>
<br class="doNotDisplay doNotPrint" />
<div class="container" id="main-copy">
{% block content %}
{% endblock %}
</div>
<div class="headerLinks">
<span class="doNotDisplay">Tools:</span>
{% if user.is_authenticated %}
<a href="{% url 'logout' %}">Log Out &laquo;</a>
<span class="doNotDisplay">|</span>
Logged in as {{user.username}} &laquo;
{% else %}
<a href="{% url 'login' %}">Log In &laquo;</a>
<span class="doNotDisplay">|</span>
<a href="{% url 'to_be_implemented' %}">Register &laquo;</a>
{% endif %}
<footer class="footer">
{% block footer %}
<div class="container">
<span class="text-muted">Powered by <a href="http://evennia.com">Evennia.</a></span>
</div>
</div>
{% endblock %}
</footer>
<div class="subHeader">
<!--span class="doNotDisplay">Navigation:</span-->
<a href="/">Home</a> |
<a href="https://github.com/evennia/evennia/wiki/Evennia-Introduction/">About</a> |
<a href="https://github.com/evennia/evennia/wiki">Documentation</a> |
<a href="{% url 'admin:index' %}">Admin Interface</a>
{% if webclient_enabled %}
| <a href="{% url 'webclient:index' %}">Play Online</a>
{% endif %}
</div>
</div>
<!-- ##### Side Menu ##### -->
{% block sidebar %}{% endblock %}
<!-- ##### Main Copy ##### -->
<div id="main-copy">
{% block content %}
{% endblock %}
</div>
<!-- ##### Footer ##### -->
<div id="footer">
<span class="doNotPrint">
Template design by
<a href="http://www.oswd.org/designs/search/designer/id/3013/"
title="Other designs by haran">haran</a>.
Powered by
<a href="http://evennia.com">Evennia.</a>
<br />
</span>
</div>
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
</html>