forked from jogordo/DnD_Archive
7 changed files with 141 additions and 115 deletions
-
47app/routes.py
-
17app/static/style.css
-
13app/templates/base.html
-
94app/templates/index.html
-
48app/templates/listing.html
-
21app/templates/macros.html
-
16app/templates/table.html
@ -0,0 +1,13 @@ |
|||
{% import "macros.html" as macros %} |
|||
<html> |
|||
<head> |
|||
<meta charset='utf-8'> |
|||
<link rel="stylesheet" type="text/css" href="/static/style.css"> |
|||
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed" rel="stylesheet"> |
|||
<title>{% block title %}COSI D&D Archive{% endblock %}</title> |
|||
</head> |
|||
<body class="content"> |
|||
<h1><a href="/">COSI D&D Archive</a></h1> |
|||
{% block content %}{% endblock %} |
|||
</body> |
|||
</html> |
@ -1,66 +1,34 @@ |
|||
<html> |
|||
<head> |
|||
<meta charset='utf-8'> |
|||
<link rel="stylesheet" type="text/css" href="style.css"> |
|||
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed" rel="stylesheet"> |
|||
<title>COSI D&D Archive</title> |
|||
</head> |
|||
<body class="content"> |
|||
<h1>COSI D&D Archive</h1> |
|||
<form action="/search" id="searchForm" method="post"> |
|||
Search Type: |
|||
<select name="type"> |
|||
<option value="name">Name</option> |
|||
<option value="rarity">Rarity</option> |
|||
<option value="aura">Aura</option> |
|||
<option value="text">Text</option> |
|||
</select> |
|||
<input type="text" name="inputText" placeholder="Enter your search here"> |
|||
{% extends "base.html" %} |
|||
{% block content %} |
|||
<form action="/search" id="searchForm" method="post"> |
|||
Search Type: |
|||
<select name="type"> |
|||
<option value="name">Name</option> |
|||
<option value="rarity">Rarity</option> |
|||
<option value="aura">Aura</option> |
|||
<option value="text">Text</option> |
|||
</select> |
|||
<input type="text" name="inputText" placeholder="Enter your search here"> |
|||
|
|||
<input type="submit" value="search"> |
|||
</form> |
|||
<nav> |
|||
<ul> |
|||
<li><a href="/items">Items</a></li> |
|||
<li><a href="/places">Places</a></li> |
|||
<li><a href="/characters">Characters</a></li> |
|||
<li><a href="/spells">Spells</a></li> |
|||
</ul> |
|||
</nav> |
|||
<input type="submit" value="search"> |
|||
</form> |
|||
<nav> |
|||
<ul> |
|||
<li><a href="/items">Items</a></li> |
|||
<li><a href="/places">Places</a></li> |
|||
<li><a href="/characters">Characters</a></li> |
|||
<li><a href="/spells">Spells</a></li> |
|||
</ul> |
|||
</nav> |
|||
|
|||
{% if searchResults is defined %} |
|||
<table> |
|||
{% for (name,heads,text) in searchResults %} |
|||
<tr> |
|||
<th class="topalign" id="{{name}}"> |
|||
{{name}} |
|||
<table class="props"> |
|||
{% for (key, value) in heads %} |
|||
<tr><th> {{key}} </th><td> {{value}} </td></tr> |
|||
{% endfor %} |
|||
</table> |
|||
</th> |
|||
<td class="freeform monospace"> {{text}} </td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
{% endif %} |
|||
{% if searchResults is defined %} |
|||
{{ macros.itemTable(searchResults) }} |
|||
{% endif %} |
|||
|
|||
<section> |
|||
<h2>Featured {{featureType}}:</h2> |
|||
<table> |
|||
<tr> |
|||
<th class="topalign" id="{{name}}"> |
|||
{{featureText[0]}} |
|||
<table class="props"> |
|||
{% for (key, value) in featureText[1] %} |
|||
<tr><th> {{key}} </th><td> {{value}} </td></tr> |
|||
{% endfor %} |
|||
</table> |
|||
</th> |
|||
<td class="freeform monospace"> {{featureText[2]}} </td> |
|||
</tr> |
|||
</table> |
|||
</section> |
|||
</body> |
|||
</html> |
|||
{% if featureText is defined %} |
|||
<section> |
|||
<h2>Featured {{featureType}}:</h2> |
|||
{{ macros.itemTable([featureText]) }} |
|||
</section> |
|||
{% endif %} |
|||
{% endblock %} |
@ -1,33 +1,15 @@ |
|||
<html> |
|||
<head> |
|||
<meta charset='utf-8'> |
|||
<link rel="stylesheet" type="text/css" href="style.css"> |
|||
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed" rel="stylesheet"> |
|||
<title>{{ title }} - COSI D&D Archive</title> |
|||
</head> |
|||
<body class="content"> |
|||
<h1><a href="/">COSI D&D Archive</a></h1> |
|||
<h2>{{title}}</h2> |
|||
<ul class="headlist"> |
|||
{% for (name,_,_) in items %} |
|||
<li><a href="#{{name}}"> {{name}} </a> {% if not loop.last %} · {% endif %} </li> |
|||
{% endfor %} |
|||
</ul> |
|||
<table> |
|||
{% for (name,heads,text) in items %} |
|||
<tr> |
|||
<th class="topalign" id="{{name}}"> |
|||
{{name}} |
|||
<table class="props"> |
|||
{% for (key, value) in heads %} |
|||
<tr><th> {{key}} </th><td> {{value}} </td></tr> |
|||
{% endfor %} |
|||
</table> |
|||
</th> |
|||
<td class="freeform monospace"> {{text}} </td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
<a class="topLink" href="#">Scroll to Top</a> |
|||
</body> |
|||
</html> |
|||
{% extends "base.html" %} |
|||
{% block content %} |
|||
<h2>{{title}}</h2> |
|||
<ul class="headlist special"> |
|||
<li><a href="{{uri}}/random">Random</a></li> |
|||
</ul> |
|||
|
|||
<ul class="headlist"> |
|||
{% for (name,_,_) in items %} |
|||
<li><a href="#{{name}}"> {{name}} </a> {% if not loop.last %} · {% endif %} </li> |
|||
{% endfor %} |
|||
</ul> |
|||
{{ macros.itemTable(items) }} |
|||
<a class="topLink" href="#">Scroll to Top</a> |
|||
{% endblock %} |
@ -0,0 +1,21 @@ |
|||
{% macro itemRow(name, heads, text) -%} |
|||
<tr> |
|||
<th class="topalign" id="{{name}}"> |
|||
{{name}} |
|||
<table class="props"> |
|||
{% for (key, value) in heads %} |
|||
<tr><th>{{key}}</th><td>{{value}}</td></tr> |
|||
{% endfor %} |
|||
</table> |
|||
</th> |
|||
<td class="freeform monospace">{{text}}</td> |
|||
</tr> |
|||
{%- endmacro %} |
|||
|
|||
{% macro itemTable(rows) -%} |
|||
<table> |
|||
{% for (name, heads, text) in rows %} |
|||
{{ itemRow(name, heads, text) }} |
|||
{% endfor %} |
|||
</table> |
|||
{%- endmacro %} |
@ -0,0 +1,16 @@ |
|||
{% extends "base.html" %} |
|||
{% block content %} |
|||
<h2>{{title}}</h2> |
|||
{% if error is defined %} |
|||
<div class="error">{{ error }}</div> |
|||
{% else %} |
|||
<table class="rolls"> |
|||
<tr><th>d{{roll}}</th><th>Result</th></tr> |
|||
{% for (name, _, _) in items %} |
|||
<tr><td>{{ loop.index }}</td><td><a href="#{{name}}">{{name}}</a></td></tr> |
|||
{% endfor %} |
|||
</table> |
|||
{{ macros.itemTable(items) }} |
|||
{% endif %} |
|||
<a class="topLink" href="#">Scroll to Top</a> |
|||
{% endblock %} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue