Skip to content

Commit f5dc39d

Browse files
committed
added contact us
1 parent 16e397e commit f5dc39d

File tree

9 files changed

+66
-31
lines changed

9 files changed

+66
-31
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ logs/
3939
log/
4040

4141

42-
.vscode/
4342
.idea/
4443
*.swp
4544
*.swo

.vscode/dictionaries/project-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
APIHTTP
12
appleboy
23
projectx
34
RZRO

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ All notable changes to this repository will be documented in this file.
2222

2323
- Added Database connection retry logic
2424

25-
## [1.1.1] THu, Mar 12, 2026
25+
## [1.1.1] Thu, Mar 12, 2026
2626

2727
- Added Memory Cache
2828
- Redesign Page
29+
30+
## [1.1.2] Sat, Mar 14, 2026
31+
32+
- Mobile responsiveness
33+
- Added Contact us Page

app/routes.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
11
import os
22
from datetime import datetime, timezone
33
from typing import Optional
4-
from app.utils.cache import list_cache_clean, clear_cache
4+
55
from fastapi import (
66
APIRouter,
7-
Form,
8-
Request,
9-
status,
10-
HTTPException,
117
BackgroundTasks,
8+
Form,
129
Header,
10+
HTTPException,
1311
Query,
12+
Request,
13+
status,
1414
)
1515
from fastapi.responses import (
1616
HTMLResponse,
17+
JSONResponse,
1718
PlainTextResponse,
1819
RedirectResponse,
19-
JSONResponse,
2020
)
2121
from fastapi.templating import Jinja2Templates
2222
from pydantic import BaseModel, Field
2323

24-
2524
from app import __version__
2625
from app.utils import db
2726
from app.utils.cache import (
27+
clear_cache,
2828
get_from_cache,
2929
get_recent_from_cache,
3030
get_short_from_cache,
31-
set_cache_pair,
3231
increment_visit_cache,
33-
url_cache,
32+
list_cache_clean,
3433
remove_cache_key,
3534
rev_cache,
35+
set_cache_pair,
36+
url_cache,
3637
)
3738
from app.utils.config import (
39+
CACHE_PURGE_TOKEN,
3840
DOMAIN,
3941
MAX_RECENT_URLS,
40-
CACHE_PURGE_TOKEN,
4142
QR_DIR,
4243
)
4344
from app.utils.helper import (
44-
generate_code,
45-
sanitize_url,
46-
is_valid_url,
4745
authorize_url,
4846
format_date,
47+
generate_code,
48+
is_valid_url,
49+
sanitize_url,
4950
)
5051
from app.utils.qr import generate_qr_with_logo
5152

@@ -152,6 +153,11 @@ async def create_short_url(
152153
return RedirectResponse("/", status_code=status.HTTP_303_SEE_OTHER)
153154

154155

156+
@ui_router.get("/contact", response_class=HTMLResponse)
157+
async def contact(request: Request):
158+
return templates.TemplateResponse("contact.html", {"request": request})
159+
160+
155161
@ui_router.get("/history", response_class=HTMLResponse)
156162
async def recent_urls(request: Request):
157163
recent_urls_list = db.get_recent_urls(MAX_RECENT_URLS) or get_recent_from_cache(

app/static/css/tiny.css

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ body {
2020
margin: 0;
2121
overflow-x: hidden;
2222
background-image: radial-gradient(circle at 50% -20%, #1e1e2e 0%, transparent 50%);
23+
}
2324

25+
a {
26+
color: var(--accent);
2427
}
2528

2629
body.light-theme {
@@ -191,7 +194,6 @@ body.dark-theme .app-header {
191194
cursor: pointer;
192195
}
193196

194-
195197
@media (max-width: 600px) {
196198
.app-logo {
197199
transform: scale(0.9);
@@ -200,13 +202,9 @@ body.dark-theme .app-header {
200202
.app-name {
201203
font-size: 1.1rem;
202204
}
203-
204-
205205
}
206206

207-
208207
@media (max-width: 700px) {
209-
210208
.hamburger {
211209
display: block;
212210
}
@@ -229,7 +227,6 @@ body.dark-theme .app-header {
229227
.header-nav.open {
230228
display: flex;
231229
}
232-
233230
}
234231

235232
/* Hero input */
@@ -446,7 +443,6 @@ body.dark-theme .app-header {
446443
}
447444

448445
@media (max-width: 768px) {
449-
450446
.input-wrapper {
451447
flex-direction: column;
452448
}
@@ -459,7 +455,6 @@ body.dark-theme .app-header {
459455
padding-left: 12px;
460456
padding-right: 12px;
461457
}
462-
463458
}
464459

465460
/* ===============================
@@ -849,3 +844,18 @@ body.light-theme .history-link {
849844
.history-link:hover {
850845
opacity: 0.7;
851846
}
847+
848+
.contact-info {
849+
max-width: 600px;
850+
margin: 0 auto;
851+
background: var(--glass);
852+
border: 1px solid var(--glass-border);
853+
border-radius: 1rem;
854+
padding: 2rem;
855+
list-style-type: none;
856+
& li {
857+
margin-bottom: 1rem;
858+
font-size: 1.1rem;
859+
color: var(--text-primary);
860+
}
861+
}

app/templates/404.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44

55
<head>
6-
<title>Page Not Found</title>
6+
<title>rzro.link: Page Not Found</title>
77
<style>
88
body {
99
margin: 0;
@@ -41,8 +41,8 @@
4141
<h1>🚫 Page not found</h1>
4242
<p>The page you are looking for does not exist.</p>
4343

44-
<a href="/" onclick="history.back(); return false;">
45-
← Go Back
44+
<a href="/">
45+
← Go Home
4646
</a>
4747
</div>
4848
</body>

app/templates/contact.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "layout.html" %} {% block content %}
2+
<div class="main-layout">
3+
<div class="contact-card">
4+
<h1>Contact Us</h1>
5+
<p>If you have any questions, feedback, or need assistance, feel free to reach out to us!</p>
6+
<ul class="contact-info">
7+
<li><strong>Email:</strong> <a href="mailto:hello@recursivezero.com">hello@recursivezero.com</a></li>
8+
<li><strong>Twitter:</strong> <a href="https://twitter.com/recursivezero" target="_blank">@recursivezero</a></li>
9+
<li><strong>GitHub:</strong> <a href="https://github.com/recursivezero/tiny/issues" target="_blank">GitHub
10+
Issues</a></li>
11+
</ul>
12+
</div>
13+
</div>
14+
{% endblock %}

app/templates/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</div>
66
<nav class="header-nav">
77
<a href="/" class="nav-link active">Home</a>
8-
<a href="/coming-soon" class="nav-link">Analysis</a>
9-
<a href="/coming-soon" class="nav-link">Search</a>
10-
<a href="/coming-soon" class="nav-link">Contact</a>
8+
<!--<a href="/coming-soon" class="nav-link">Analysis</a>-->
9+
<!--<a href="/coming-soon" class="nav-link">Search</a>-->
10+
<a href="/contact" class="nav-link">Contact</a>
1111
<a href="/history" class="nav-link" title="Show recent shortened URLs">History</a>
1212
</nav>
1313
<div class="header-right">

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "tiny"
3-
version = "1.1.1"
4-
description = "A package for URL Shortener with QR Code generation"
3+
version = "1.1.2"
4+
description = "A python web app for URL Shortener with QR Code generation"
55
authors = [
66
{ name = "recursivezero", email = "152776938+recursivezero@users.noreply.github.com" },
77
]

0 commit comments

Comments
 (0)