pig.py/templates/base.html.j2
Russell Ballestrini 11f8fc59ae modified: requirements.txt
modified:   serp.py
	new file:   templates/about.html.j2
	new file:   templates/base.html.j2
	new file:   templates/crawl.html.j2
	new file:   templates/import.html.j2
	new file:   templates/live.html.j2
	new file:   templates/partials/search_box.html.j2
	new file:   templates/phantom.html.j2
	new file:   templates/search.html.j2
	new file:   templates/view.html.j2
2026-01-03 13:48:47 -05:00

76 lines
2.8 KiB
Django/Jinja

<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}neopig{% endblock %}</title>
<style>
/* Base styles */
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0; padding: 0;
background: #0a0a0a; color: #e0e0e0;
}
.nav {
background: #1a1a1a; padding: 10px 20px;
display: flex; gap: 20px; align-items: center;
border-bottom: 1px solid #333;
flex-wrap: wrap;
}
.nav a { color: #ff6b6b; text-decoration: none; padding: 5px 0; }
.nav a:hover { text-decoration: underline; }
.nav .brand { font-weight: bold; font-size: 18px; }
@media (max-width: 600px) {
.nav { gap: 12px; padding: 10px 15px; }
.nav a { font-size: 14px; }
.nav .brand { font-size: 16px; width: 100%; margin-bottom: 5px; }
}
.container { padding: 20px; }
a { color: #ff6b6b; }
input[type="text"], select {
padding: 12px 16px; font-size: 16px;
border: 2px solid #333; border-radius: 8px;
background: #1a1a1a; color: #fff;
}
input[type="text"]:focus { outline: none; border-color: #ff6b6b; }
button {
padding: 12px 24px; font-size: 16px;
background: #ff6b6b; color: #fff;
border: none; border-radius: 8px; cursor: pointer;
}
button:hover { background: #ff5252; }
.search-box { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.search-box input[type="text"] { flex: 1; min-width: 200px; }
@media (max-width: 600px) {
.search-box input[type="text"] { width: 100%; flex: 1 1 100%; }
.search-box select, .search-box button { flex: 1 1 auto; }
}
{% block extra_css %}{% endblock %}
</style>
{% block extra_head %}{% endblock %}
</head>
<body>
<div class="nav">
<a href="/" class="brand">neopig</a>
<a href="/">{{ t.search }}</a>
<a href="/live">{{ t.live }}</a>
<a href="/random">{{ t.random }}</a>
<a href="/crawl">{{ t.crawl }}</a>
{% if import_mode %}<a href="/import">Import</a>{% endif %}
<a href="/about">{{ t.about }}</a>
<select id="lang-select" onchange="setLang(this.value)" style="background:#1a1a1a;color:#888;border:1px solid #333;border-radius:4px;padding:4px 8px;font-size:12px;cursor:pointer;">
{% for code, name in langs.items() %}<option value="{{ code }}"{% if code == lang %} selected{% endif %}>{{ name }}</option>{% endfor %}
</select>
</div>
<script>
function setLang(code) {
localStorage.setItem('neopig_lang', code);
document.cookie = 'lang=' + code + ';path=/;max-age=31536000';
if (window.UNCLOSEAI_LANGUAGE !== undefined) window.UNCLOSEAI_LANGUAGE = code;
location.reload();
}
</script>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>