piha.lc / beta.piha.li + company_site marketing landing (#4)
## Summary - Public short domain is **`piha.lc`** (prod) and **`beta.piha.li`** (beta) - `/` is a marketing page in [aimloperations.com](https://aimloperations.com) / `company_site` styling (Inter, dark, cyan) - CTA: want access → [contact](https://aimloperations.com/contact) - Nav/logo/footer match the company site; debug mint form uses the same chrome Closes #3. ## Secrets (control node) Update hostnames only — no new token/pepper unless you are rotating: **`url_shortening_service_prod.env`** ```text DJANGO_ALLOWED_HOSTS=piha.lc,shortener.aimloperations.com,url-shortener,web SHORT_DOMAIN=piha.lc PUBLIC_SHORT_URL=https://piha.lc SHORT_PUBLIC_HOSTS=piha.lc CONTACT_URL=https://aimloperations.com/contact ``` **`url_shortening_service_beta.env`** ```text DJANGO_ALLOWED_HOSTS=beta.piha.li,shortener-beta.aimloperations.com,url-shortener,web SHORT_DOMAIN=beta.piha.li PUBLIC_SHORT_URL=https://beta.piha.li SHORT_PUBLIC_HOSTS=beta.piha.li CONTACT_URL=https://aimloperations.com/contact ``` NPM: `piha.lc` / `beta.piha.li` → this container. Still do not proxy `/api/` on the short host. ## Test plan - [ ] `cd site && uv run python manage.py test` - [ ] `GET /` looks like aimloperations.com; Request access / Contact go to aimloperations.com/contact - [ ] `GET /<code>` still 302 - [ ] `/api/` on Host `piha.lc` is 404 Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -1,35 +1,43 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% block title %}Create short link · debug{% endblock %}
|
||||
{% block content %}
|
||||
<p class="eyebrow">Debug only</p>
|
||||
<h1>Create a short link</h1>
|
||||
<p class="lede">Uses the same allowlist as the API. Not served when <code>DEBUG</code> is false.</p>
|
||||
<div class="section debug-section">
|
||||
<div class="container" style="max-width: 40rem;">
|
||||
<h1 class="hero-title" style="font-size: 2.2rem;">Create a short link</h1>
|
||||
<p class="hero-subtitle" style="margin: 1rem 0 2rem; text-align: left;">
|
||||
DEBUG only. Same allowlist as the API. Not served when <code>DEBUG</code> is false.
|
||||
</p>
|
||||
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}<li>{{ message }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if messages %}
|
||||
<ul class="messages" style="list-style: none; padding: 0; margin: 0 0 1rem; color: var(--primary-color);">
|
||||
{% for message in messages %}<li>{{ message }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if created_link %}
|
||||
<div class="result">
|
||||
<p>Short URL</p>
|
||||
<p><code>{{ created_link.public_short_url }}</code></p>
|
||||
<p>Target: {{ created_link.target_url }}</p>
|
||||
<a class="btn" href="{{ created_link.public_short_url }}">Open</a>
|
||||
{% if created_link %}
|
||||
<div class="card debug-result">
|
||||
<p class="card-title">Short URL</p>
|
||||
<p><code>{{ created_link.public_short_url }}</code></p>
|
||||
<p class="card-text">Target: {{ created_link.target_url }}</p>
|
||||
<a class="btn" href="{{ created_link.public_short_url }}" style="margin-top: 1rem; padding: 0.7rem 1.4rem;">Open</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url 'debug-create' %}">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
<label>
|
||||
{{ field.label }}
|
||||
<input class="form-control" type="{{ field.field.widget.input_type|default:'text' }}"
|
||||
name="{{ field.name }}" value="{{ field.value|default_if_none:'' }}"
|
||||
{% if field.field.widget.attrs.placeholder %}placeholder="{{ field.field.widget.attrs.placeholder }}"{% endif %}
|
||||
{% if field.field.widget.attrs.autofocus %}autofocus{% endif %}>
|
||||
{% if field.errors %}<span class="alert-text" style="color: #ff6b6b;">{{ field.errors|striptags }}</span>{% endif %}
|
||||
</label>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn">Mint</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url 'debug-create' %}">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
<label>
|
||||
{{ field.label }}
|
||||
{{ field }}
|
||||
{% if field.errors %}<span class="error">{{ field.errors|striptags }}</span>{% endif %}
|
||||
</label>
|
||||
{% endfor %}
|
||||
<button type="submit">Mint</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user