add contact page

main
Dominik Madarász 2023-01-12 18:03:38 +00:00
parent 74b64c5a63
commit e54dffec24
3 changed files with 45 additions and 1 deletions

View File

@ -1229,6 +1229,19 @@ async def remote_interaction(
{"outbox_object": outbox_object},
)
@app.get("/contact")
async def serve_contact(
request: Request,
db_session: AsyncSession = Depends(get_db_session),
) -> templates.TemplateResponse:
return await templates.render_template(
db_session,
request,
"contact.html",
{},
)
@app.post("/remote_interaction")
async def post_remote_interaction(
@ -1616,7 +1629,8 @@ Disallow: /followers
Disallow: /following
Disallow: /admin
Disallow: /remote_interaction
Disallow: /remote_follow"""
Disallow: /remote_follow
Disallow: /contact"""
async def _get_outbox_for_feed(db_session: AsyncSession) -> list[models.OutboxObject]:

View File

@ -0,0 +1,29 @@
{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
{% block head %}
<title>blog.zak - Chat</title>
{% endblock %}
{% block content %}
{% include "header.html" %}
<p>
You can find me on QuakeNet IRC under the nickname <strong>zaklaus</strong>. I am also available on Discord under the handle <strong>zpl-zak#0302</strong>.
</p>
<p>
You can join zpl Discord server at <a href="https://discord.gg/7pJpfw7hYn" target="_blank">discord.gg/7pJpfw7hYn</a> or reach me on IRC in the <strong>#zaklaus</strong> channel on QuakeNet.
</p>
<p>
I also receive an E-Mail, reach me at <i>contact [at] madaraszd.net</i>
</p>
<p>
Out of convenience, here's a pre-configured IRC webchat you can use to reach me quickly:
</p>
<iframe src="https://webchat.quakenet.org/?randomnick=1&channels=zaklaus&prompt=1&uio=MTY9dHJ1ZSY5PXRydWUmMTE9MTk1a4" width="647" height="400"></iframe>
{% endblock %}

View File

@ -59,6 +59,7 @@
{% if not HIDES_FOLLOWING %}
<li>{{ header_link("following", "Following") }} <span class="counter">{{ following_count }}</span></li>
{% endif %}
<li>{{ header_link("serve_contact", "Contact") }}</li>
<li>{{ header_link("get_remote_follow", "Remote follow") }}</li>
{% for navbar_item in NAVBAR_ITEMS.EXTRA_NAVBAR_ITEMS %}
{{ navbar_item_link(navbar_item) }}