realms-wiki/realms/templates/layout.html

157 lines
5.3 KiB
HTML
Raw Normal View History

2013-09-26 16:51:15 +03:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
2013-10-03 17:58:07 +03:00
<title>Realms</title>
2013-09-26 16:51:15 +03:00
<link href="/static/css/bootstrap/spacelab.css" rel="stylesheet">
2013-09-26 16:51:15 +03:00
<link href="/static/css/font-awesome.min.css" rel="stylesheet">
2013-10-08 22:47:49 +03:00
<link href="/static/js/highlight/styles/github.css" rel="stylesheet">
2013-10-01 07:10:10 +03:00
<link href="/static/css/style.css" rel="stylesheet">
2013-09-26 16:51:15 +03:00
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="/static/js/html5shiv.js"></script>
<script src="/static/js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
2013-10-03 17:58:07 +03:00
<div class="navbar navbar-inverse navbar-fixed-top">
2013-09-26 16:51:15 +03:00
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
2013-10-03 17:58:07 +03:00
<a class="navbar-brand" href="/">Realms</a>
2013-09-26 16:51:15 +03:00
</div>
2013-10-03 17:58:07 +03:00
<div class="navbar-collapse collapse navbar-inverse-collapse">
2013-09-26 16:51:15 +03:00
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" role="menu" data-toggle="dropdown">Wiki
<i class="icon-caret-down"></i></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Page Options</li>
<li><a href="/create/">Create Page</a></li>
{% if name %}
<li><a href="/edit/{{ name }}">Edit Page</a></li>
<li><a href="/history/{{ name }}">History</a></li>
{% endif %}
<li class="divider"></li>
<li class="dropdown-header">Site Options</li>
<li><a href="/_new/">Create New Wiki</a></li>
</ul>
</li>
2013-10-03 17:58:07 +03:00
{% if session.get('user') %}
<li class="dropdown user-avatar">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span>
<img src="{{ session['user'].get('avatar') }}" class="menu-avatar">
2013-10-03 17:58:07 +03:00
<span>{{ session['user'].get('username') }} <i class="icon-caret-down"></i></span>
</span>
</a>
<ul class="dropdown-menu">
<li><a href="/account">Account</a></li>
<li><a href="/logout">Logout</a></li>
</ul>
</li>
{% else %}
<li><a href="/login"><i class="icon-user"></i> Login</a></li>
<li><a href="/register"><i class="icon-pencil"></i> Register</a></li>
2013-10-02 04:50:48 +03:00
{% endif %}
2013-09-26 16:51:15 +03:00
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- Page Menu -->
2013-10-03 17:58:07 +03:00
<div class="container">
<div id="main-body">
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
{% for category, message in messages %}
{% if category == 'message' %}
{% set category = "info" %}
{% endif %}
<div class='alert alert-{{ category }}'>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block body %}{% endblock %}
</div>
</div>
2013-09-26 16:51:15 +03:00
2013-10-01 07:10:10 +03:00
<script src="/static/js/jquery-1.10.2.min.js"></script>
2013-10-08 00:52:12 +03:00
<script src="/static/js/underscore.js"></script>
2013-09-26 16:51:15 +03:00
<script src="/static/js/bootstrap.min.js"></script>
2013-10-08 00:52:12 +03:00
<!--<script src="/static/js/marked.js"></script>-->
<script src="/static/js/handlebars.js"></script>
<script src="/static/js/showdown/showdown.js"></script>
<script src="/static/js/html-sanitizer-minified.js"></script>
<script src="/static/js/showdown/wmd.js"></script>
2013-10-08 22:47:49 +03:00
<script src="/static/js/highlight/highlight.pack.js"></script>
2013-10-01 07:10:10 +03:00
<script>
2013-10-08 00:52:12 +03:00
/*
2013-10-02 04:50:48 +03:00
marked.setOptions({
gfm: true,
tables: true,
pedantic: false,
sanitize: false,
smartLists: true,
smartypants: false,
langPrefix: 'lang-'
});
2013-10-08 00:52:12 +03:00
*/
2013-10-08 22:47:49 +03:00
hljs.initHighlightingOnLoad();
// Markdown Renderer
2013-10-08 00:52:12 +03:00
MDR = {
doc: null,
callback: WMD,
convert: function(md, sanitize){
this.doc = this.callback(md);
md = this.doc.html;
if (sanitize) {
md = html_sanitize(md);
}
md = this.hook(md);
return md;
},
hook: function(md) {
if (!this.doc.metadata) {
return md;
}
try {
var template = Handlebars.compile(md);
return template(this.doc.metadata);
} catch(e) {
return md;
}
}
};
2013-10-01 07:10:10 +03:00
</script>
2013-10-02 04:50:48 +03:00
{% block js %}{% endblock %}
2013-09-26 16:51:15 +03:00
</body>
</html>