pig.py/templates/base.html.j2
Russell Ballestrini 3714c9b6a9 Extract common CSS to 5 external stylesheets (DRY)
- base.css: Core layout, typography, container
- nav.css: Navigation bar styles
- forms.css: Form elements, buttons, inputs, checkboxes
- quests.css: CSS-only easter eggs
- results.css: Media grid and result card styles

Templates now link external CSS via extra_css_links block.
Page-specific styles remain inline (correct pattern).
Fixed OVER_9000 test (it's OVER 9000, so 9001).
2026-01-05 20:44:35 -05:00

51 lines
2.1 KiB
Django/Jinja

<!---------------------------------------------------------------------------
|
| Welcome, curious one. You found the source.
|
| This is Adventure #1. Not all side quests are called out.
|
| The source code for neopig is Public Domain. Steal what works for you.
|
| If you seek Adventure #2, consider: what happens at /fnord ?
|
| - The Sign Maker
|
---------------------------------------------------------------------------->
<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}neopig{% endblock %}</title>
<link rel="stylesheet" href="/static/css/base.css">
<link rel="stylesheet" href="/static/css/nav.css">
<link rel="stylesheet" href="/static/css/forms.css">
<link rel="stylesheet" href="/static/css/quests.css">
{% block extra_css_links %}{% endblock %}
<style>{% 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">{{ t.import_nav }}</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>