ai/at
1
0
This commit is contained in:
2024-10-18 22:49:50 +09:00
parent bce11adb82
commit 5acaa7aeec
64 changed files with 2608 additions and 0 deletions

View File

@ -0,0 +1,20 @@
{% extends 'base.html' %}
{% block content %}
<h2>service</h2>
<p>This service allows you to comment on live broadcasts using your atproto account.</p>
<h2>system</h2>
<p>Display posts to BBS using atproto oauth.</p>
<p>This service is generated using <a href="https://github.com/bluesky-social/cookbook">bluesky/cookbook</a>.</p>
<p>Authentication information will be deleted periodically.</p>
<hr/>
<h2>サービス</h2>
<p>このサービスはlive配信にatprotoアカウントを使ってコメントができます。</p>
<h2>システム</h2>
<p>atproto oauthを使用してbbsへの書き込みを許可します。</p>
<p>このサービスは<a href="https://github.com/bluesky-social/cookbook">bluesky/cookbook</a>を使用して生成されています。</p>
<p>認証情報は定期的に削除されます。</p>
{% endblock %}

View File

@ -0,0 +1,114 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="referrer" content="origin-when-cross-origin">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.blue.min.css">
<link rel="stylesheet" href="https://syui.ai/bower_components/font-awesome/css/all.min.css" />
<link rel="icon" href="https://live.syui.ai/favicon.ico">
<title>o.syui.ai</title>
</head>
<body>
<header>
<hgroup>
{% if g.user %}
{% endif %}
</hgroup>
<nav>
<ul>
<li><a href="/"><button class="secondary">o</button></a></li>
<li>.syui.ai</li>
</ul>
<ul>
{% if g.user %}
<li><a href="{{ url_for('bsky_post') }}">post</a>
<li><a href="{{ url_for('oauth_refresh') }}">refresh</a>
<li><a href="{{ url_for('oauth_logout') }}"><button class="secondary">logout</button></a>
{% else %}
<li><a href="/about"><i class="fa-solid fa-circle-question"></i></a></li>
{% endif %}
<!--
<li><a href="https://github.com/bluesky-social/cookbook">Code</a>
-->
</ul>
</nav>
</header>
<main class="container">
<section class="content">
{% for message in get_flashed_messages() %}
<article>{{ message }}</article>
{% endfor %}
{% block content %}{% endblock %}
</section>
</main>
<style>
body {
background-color: #f1f1f1;
}
button a {
color: #fff;
}
iframe#livechat {
width: 100%;
min-height: 500px;
}
iframe#livestream {
width: 100%;
min-height: 500px;
}
button.oauth-login {
width: 100%;
}
footer {
text-align:center;
}
.container-1 {
display: flex;
.right-container {
background-color: #fff;
position: sticky;
top: 0;
align-self: flex-start;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding:10px;
margin-left:30px;
.content:first-of-type {
position: sticky;
bottom: 0;
}
}
}
.left-container {
padding:10px;
background-color: #fff;
width: 80%;
}
@media screen and (max-width: 959px) {
.left-container {
width: 100%;
}
iframe#livestream {
width: 100%;
min-height:300px;
height:100%;
}
.container-1 {
display: block;
.right-container {
margin-left:0px;
}
}
}
</style>
<footer>©syui</footer>
</body>
</html>

View File

@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% block content %}
<form method="post">
<textarea name="post_text" placeholder="What's up?" id="post_text" required></textarea>
<input type="submit" value="Poast!">
</form>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends 'base.html' %}
{% block title %}Error{% endblock %}
{% block content %}
<h2>⚠️ Error {{ status_code }} ⚠️</h2>
{% if err.description %}
<p><code>{{ err.description }}</code></p>
{% else %}
<p>Something went wrong!</p>
{% endif %}
<p><a href="/">Start Over</a></p>
{% endblock %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" ?><svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><title/><path d="M413.48,284.46c58.87,47.24,91.61,89,80.31,108.55-17.85,30.85-138.78-5.48-270.1-81.15S.37,149.84,18.21,119c11.16-19.28,62.58-12.32,131.64,14.09" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><circle cx="256" cy="256" r="160" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/></svg>

After

Width:  |  Height:  |  Size: 450 B

View File

@ -0,0 +1,29 @@
{% extends 'base.html' %}
{% block content %}
<div class="container-1">
<div class="left-container">
<div class="livestream">
<iframe id="livestream" title="stream" src="https://live.syui.ai/b9ec42d4-8a4d-4343-99fc-1bd1cdbc5a6f.html"> </iframe>
</div>
</div>
<div class="right-container">
{% if g.user %}
<span class="user-handle">@{{ g.user['handle'] }}</span>
<div class="livechat">
<iframe id="livechat" title="bskychat" src="https://bbs.syui.ai/?handle={{ session['user_handle'] }}"> </iframe>
</div>
{% else %}
<div class="livechat">
<a href="{{ url_for('oauth_login') }}"><button class="oauth-login">@</button></a>
<iframe id="livechat" title="bskychat" src="https://bbs.syui.ai"> </iframe>
</div>
<div class="right-container">
<p>write comment using oauth atproto.</p>
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% block content %}
<article>
<h3>Login with atproto</h3>
<form method="post">
<p>Provide your handle or DID to authorize an existing account with PDS.
<br>You can also supply a PDS/entryway URL (eg, <code>https://pds.example.com</code>).</p>
<fieldset role="group">
<input name="username" id="username" placeholder="handle.example.com" style="font-family: monospace,monospace;" required>
<input type="submit" value="Login">
</fieldset>
</form>
</article>
{% endblock %}