Initial Commit

This commit is contained in:
2026-04-13 11:01:20 -05:00
commit 1aadf40164
12 changed files with 840 additions and 0 deletions

48
templates/base.html Normal file
View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html style="--hue: var(--{{ hue }});">
<head>
<title>Icolotl Index</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block head %}{% endblock %}
</head>
<body>
<header>
<a href="/">
<svg version=" 1.1" width="196" height="46" xmlns="http://www.w3.org/2000/svg">
<polyline points="23,46 173,46 196,23 173,0 23,0 0,23" fill="#FFFFFF" class="icon-bg" />
<polyline points="23,44 33,34 23,24 13,34" fill="var(--color-max)" style="--hue: var(--des);" />
<polyline points="34,33 44,23 34,13 24,23" fill="var(--color-max)" style="--hue: var(--bea);" />
<polyline points="23,22 33,12 23,2 13,12" fill="var(--color-max)" style="--hue: var(--ade);" />
<polyline points="12,33 22,23 12,13 2,23" fill="var(--color-max)" style="--hue: var(--cam);" />
<text x="54" y="22" fill="#FFFFFF" class="icon-txt">INDEX</text>
</svg>
</a>
<div>
<div id="header-top">
<div>
<span class="spacer"></span>
<a href="/account">Account</a>
<a>Console</a>
</div>
</div>
<div id="header-bottom">
<span class="spacer"></span>
<form action="{{ url_for('search') }}" method="get" id="searchform">
<label for="search-type">Search Type:</label>
<select name="search-type" id="search-type">
<option value="classic">Classic</option>
<option value="oid">Object ID</option>
</select>
<input type="search" name="search" id="search">
<input type="submit" value="Search">
</form>
</div>
</div>
</header>
{% block content %}{% endblock %}
</body>
</html>

35
templates/database.html Normal file
View File

@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='database.css') }}">
{% endblock %}
{% block content %}
<main>
<form method="post">
<div>
<label for="collection">Collection:</label>
<input id="collection" name="collection" list="cnames">
<datalist id="cnames">
{% for cname in cnames %}
<option value="{{ cname }}">{{ cname }}</option>
{% endfor %}
</datalist>
</div>
<div id="query-box">
<label for="query">Query:</label>
<input id="query" name="query">
</div>
<input type="submit" value="Submit Query">
</form>
<hr>
{% if results %}
<ul>
{% for result in results %}
<li><a href="{{ url_for('database_edit', collection=collection, oid=result['_id']) }}">{{ result["id"] }} ({{
result["_id"] }})</a></li>
{% endfor %}
</ul>
{% endif %}
</main>
{% endblock %}

View File

@@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='database.css') }}">
{% endblock %}
{% block content %}
<main>
<form id="edit-form" method="post">
<div>
<label for="collection">Collection:</label>
<output id="collection">{{ collection }}</output>
</div>
<div id="object-box">
<label for="object">Document:</label>
<output id="object">{{ name }} ({{ oid }})</output>
</div>
<input type="submit" value="Save Changes">
</form>
<hr>
<div id="doc-box">
<textarea form="edit-form" id="document" name="document">{{ document }}</textarea>
</div>
</main>
{% endblock %}

81
templates/index.html Normal file
View File

@@ -0,0 +1,81 @@
{% extends "base.html" %}
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
{% endblock %}
{% block content %}
<div id="outer">
<nav id="sidebar">
{% set quads = {"ade":"♢", "bea":"♡", "cam":"♧", "des":"♤"} %}
{% for quad in quads %}
{% if domains[quad] %}
<div style="--hue: var(--{{ quad }});">
<h2>{{ quads[quad] }}</h2>
<ul>
{% for category in domains[quad] %}
{% for domain in domains[quad][category] %}
<li><a href="{{ url_for(domains[quad][category][domain]) }}">{{ domain }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
</nav>
<main>
<nav id="sector">
<a href="/ade" style="--hue: 130;"></a>
<a href="/bea" style="--hue: 242;"></a>
<a href="/cam" style="--hue: 350;"></a>
<a href="/des" style="--hue: 73;"></a>
</nav>
<hr id="sectorbar">
<div id="main-split">
<div id="apps">
{% for category in domains[quad] %}
<div>
<h2>{{ category }}</h2>
<ul>
{% for domain in domains[quad][category] %}
<li><a href="{{ url_for(domains[quad][category][domain]) }}">{{ domain }}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
<div id="other">
<div id="welcome">
<h2>{{ wdata["header"] }}</h2>
<p>{{ wdata["text"] }}</p>
<i>For assistance, please contact the Sector Administrator at <a
href="mailto:{{ wdata['email'] }}@icolotl.com">{{ wdata['email'] }}@icolotl.com</a>.</i>
</div>
<div id="login">
<h2>Index Unified Login</h2>
<form method="post" action="{{ url_for('login') }}">
{% if session["username"] %}
<span>Welcome, <b>{{ session["username"] }}</b>.</span>
<input type="submit" value="Log Out">
{% else %}
<label for="username">Username:</label>
<input id="username" name="username" autocomplete="username">
<label for="password">Password:</label>
<input type="password" id="password" name="password" autocomplete="current-password">
<input type="submit" value="Log In">
{% endif %}
</form>
</div>
<div id="news">
<h2>News</h2>
<h3>Test1</h3>
<p>Foo, Bar, Baz</p>
<hr>
<h3>Test2</h3>
<p>Quux, Quuux, Quuuux</p>
</div>
</div>
</div>
</main>
</div>
{% endblock %}