dfdsfsafdsfsdfasdsf

This commit is contained in:
drel
2025-07-26 15:23:11 +03:00
parent 2b41b6eba8
commit c55a0a5b18
14 changed files with 846 additions and 0 deletions

20
templates/about.html Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>OpenVK4WebTV - About</TITLE>
<STYLE>
Body { font-family: Arial; background: #EEE; }
.container { width: 300px; margin: 50px auto; padding: 20px; background: white; }
.field { margin: 10px 0; }
INPUT { width: 100%; padding: 2px; }
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<P><B>OpenVK4WebTV</B> is a simple ass OpenVK client for WebTVs (and maybe super old web browsers)</P>
<BR>
<P>Made by me... and DeepSeek (cuz i suck at everything)</P>
<IMG SRC="/static/me.gif"><IMG SRC="/static/deepseek.gif">
</DIV>
</BODY>
</HTML>

85
templates/feed.html Normal file
View File

@@ -0,0 +1,85 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>News Feed - OpenVK4WebTV</TITLE>
<STYLE>
Body {
font-family: Arial;
background: #EEE;
margin: 0;
padding: 10px;
}
.container {
background: white;
padding: 15px;
max-width: 500px;
margin: 0 auto;
}
.post {
margin-bottom: 15px;
}
.post IMG {
display: block;
border: 1px solid #DDD;
}
.separator {
height: 2px;
background: #DDD;
margin: 10px 0;
}
.pagination {
text-align: center;
margin: 15px 0;
}
.pagination A {
margin: 0 5px;
color: #00F;
text-decoration: none;
}
.likes {
margin-top: 5px;
color: #666;
}
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<H3>{% if global_feed %}Global {% endif %}News Feed</H3>
{% for post in posts %}
<DIV CLASS="post">
<IMG SRC="{{ post.author }}" ALT="Author"><BR>
<IMG SRC="{{ post.text }}" ALT="Post text">
{% if post.has_attachments %}
<DIV CLASS="attachments">
[Attachments not supported]
</DIV>
{% endif %}
<!-- Блок с лайками -->
{% if post.likes > 0 %}
<DIV CLASS="likes">
<IMG SRC="{{ render_text('Likes: ' + post.likes|string) }}" ALT="Likes">
</DIV>
{% endif %}
{% if post.separator %}
<BR>
<IMG SRC="{{ post.separator }}" ALT="Separator">
{% endif %}
</DIV>
{% endfor %}
<DIV CLASS="pagination">
{% if current_page > 0 %}
<A HREF="/feed?page={{ current_page - 1 }}&global={{ 1 if global_feed else 0 }}">Previous</A>
{% endif %}
{% if has_next %}
<A HREF="/feed?page={{ current_page + 1 }}&global={{ 1 if global_feed else 0 }}">Next</A>
{% endif %}
</DIV>
<P><A HREF="/profile">Profile</A> | <A HREF="/feed_global">Global Feed</A> | <A HREF="/post">New Post</A></P>
</BODY>
</HTML>

View File

@@ -0,0 +1,85 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Global News Feed - OpenVK4WebTV</TITLE>
<STYLE>
Body {
font-family: Arial;
background: #EEE;
margin: 0;
padding: 10px;
}
.container {
background: white;
padding: 15px;
max-width: 500px;
margin: 0 auto;
}
.post {
margin-bottom: 15px;
}
.post IMG {
display: block;
border: 1px solid #DDD;
}
.separator {
height: 2px;
background: #DDD;
margin: 10px 0;
}
.pagination {
text-align: center;
margin: 15px 0;
}
.pagination A {
margin: 0 5px;
color: #00F;
text-decoration: none;
}
.likes {
margin-top: 5px;
color: #666;
}
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<H3>{% if global_feed %}Global {% endif %}News Feed</H3>
{% for post in posts %}
<DIV CLASS="post">
<IMG SRC="{{ post.author }}" ALT="Author"><BR>
<IMG SRC="{{ post.text }}" ALT="Post text">
{% if post.has_attachments %}
<DIV CLASS="attachments">
[Attachments not supported]
</DIV>
{% endif %}
<!-- Блок с лайками -->
{% if post.likes > 0 %}
<DIV CLASS="likes">
<IMG SRC="{{ render_text('Likes: ' + post.likes|string) }}" ALT="Likes">
</DIV>
{% endif %}
{% if post.separator %}
<BR>
<IMG SRC="{{ post.separator }}" ALT="Separator">
{% endif %}
</DIV>
{% endfor %}
<DIV CLASS="pagination">
{% if current_page > 0 %}
<A HREF="/feed?page={{ current_page - 1 }}">Previous</A>
{% endif %}
{% if has_next %}
<A HREF="/feed?page={{ current_page + 1 }}">Next</A>
{% endif %}
</DIV>
<P><A HREF="/profile">Profile</A> | <A HREF="/feed">Personal Feed</A> | <A HREF="/post">New Post</A></P>
</BODY>
</HTML>

49
templates/index.html Normal file
View File

@@ -0,0 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>OpenVK4WebTV</TITLE>
<STYLE>
Body { font-family: Arial; background: #EEE; }
.container { width: 300px; margin: 50px auto; padding: 20px; background: white; }
.field { margin: 10px 0; }
INPUT { width: 100%; padding: 2px; }
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<H3>OpenVK4WebTV</H3>
{% if request.query_params.get('error') %}
<DIV STYLE="color: red; margin: 10px 0;">
{% if request.query_params.get('error') == '1' %}
All fields are required!
{% elif request.query_params.get('error') == '2' %}
Authentication failed!
{% elif request.query_params.get('error') == '3' %}
Profile loading error!
{% elif request.query_params.get('error') == '4' %}
Feed loading error!
{% elif request.query_params.get('error') == '5' %}
Users info loading error!
{% endif %}
</DIV>
{% endif %}
<FORM METHOD="POST" ACTION="/auth">
<DIV CLASS="field">
Instance URL:<BR>
<INPUT TYPE="text" NAME="instance">
</DIV>
<DIV CLASS="field">
Email:<BR>
<INPUT TYPE="text" NAME="username">
</DIV>
<DIV CLASS="field">
Password:<BR>
<INPUT TYPE="password" NAME="password">
</DIV>
<INPUT TYPE="submit" VALUE="Login" STYLE="width: auto; padding: 3px 10px;">
<P><A HREF="/profile">Profile (if already logged in)</A></P>
<P><A HREF="/about">About</A></P>
</FORM>
</DIV>
</BODY>
</HTML>

40
templates/post.html Normal file
View File

@@ -0,0 +1,40 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>New Post - OpenVK4WebTV</TITLE>
<STYLE>
Body { font-family: Arial; background: #EEE; }
.container { width: 500px; margin: 20px auto; padding: 15px; background: white; }
TEXTAREA { width: 100%; height: 100px; margin: 10px 0; }
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<H3>Create New Post</H3>
{% if error %}
<DIV STYLE="color: red; margin: 10px 0;">
{% if error == 'empty' %}Post text is required!
{% elif error == 'api' %}Posting failed!
{% endif %}
</DIV>
{% endif %}
{% if success %}
<DIV STYLE="color: green; margin: 10px 0;">
Post published successfully!
</DIV>
{% endif %}
<FORM METHOD="POST" ACTION="/post">
<TEXTAREA NAME="text" WRAP="physical"></TEXTAREA><BR>
<INPUT TYPE="submit" VALUE="Publish">
</FORM>
<P STYLE="margin-top: 15px;">
<A HREF="/profile">Profile</A> |
<A HREF="/feed">News Feed</A>
</P>
</DIV>
</BODY>
</HTML>

39
templates/profile.html Normal file
View File

@@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Profile - OpenVK4WebTV</TITLE>
<STYLE>
Body { font-family: Arial; background: #EEE; }
.container { width: 500px; margin: 20px auto; padding: 15px; background: white; }
.avatar { border: 1px solid #999; margin: 10px 0; }
.info { margin: 10px 0; }
INPUT[type="submit"] {
background: #CC0000;
color: white;
border: 1px solid #990000;
padding: 5px 15px;
font-weight: bold;
}
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="container">
<H3>User Profile</H3>
<DIV CLASS="avatar">
<IMG SRC="{{ avatar }}" WIDTH="128" HEIGHT="128" ALT="Avatar">
</DIV>
<DIV CLASS="info">
<B>Name:</B><BR>
<IMG SRC="{{ first_name_img }}" ALT="First Name">
<IMG SRC="{{ last_name_img }}" ALT="Last Name"><BR>
<B>User ID:</B> {{ user_id }}
</DIV>
<P><A HREF="/feed">News Feed</A></P>
<P><A HREF="/post">New Post</A></P>
<P><A HREF="/">Login into other account</A></P>
</DIV>
</BODY>
</HTML>

18
templates/token.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>Token</title>
<style>
body { font-family: Arial; padding: 20px; }
.token-box { background: #f5f5f5; padding: 15px; margin: 10px 0; }
</style>
</head>
<body>
<h3>Auth Success!</h3>
<div class="token-box">
<strong>Device UUID:</strong> {{ uuid }}<br>
<strong>Access Token:</strong> {{ token }}
</div>
<p>This UUID has been saved in cookies</p>
</body>
</html>