Compare commits

..

1 Commits

Author SHA1 Message Date
rra dfce751860 quick sketch of descriptions and interactions for app list 2022-01-21 14:39:44 +01:00
8 changed files with 36 additions and 106 deletions

View File

@ -13,7 +13,7 @@ KEYCLOAK_CLIENT_SECRET = environ.get("KEYCLOAK_CLIENT_SECRET")
KEYCLOAK_DOMAIN = environ.get("KEYCLOAK_DOMAIN")
KEYCLOAK_REALM = environ.get("KEYCLOAK_REALM")
KEYCLOAK_SCOPES = environ.get("KEYCLOAK_SCOPES", "openid profile email")
KEYCLOAK_BASE_URL = f"https://{KEYCLOAK_DOMAIN}/realms/{KEYCLOAK_REALM}/protocol/openid-connect" # noqa
KEYCLOAK_BASE_URL = f"https://{KEYCLOAK_DOMAIN}/auth/realms/{KEYCLOAK_REALM}/protocol/openid-connect" # noqa
# Redis connection details, our main storage
REDIS_DB = environ.get("REDIS_DB")

View File

@ -12,7 +12,7 @@ def init_keycloak():
)
client = KeycloakAdmin(
server_url=f"https://{KEYCLOAK_DOMAIN}/",
server_url=f"https://{KEYCLOAK_DOMAIN}/auth/",
realm_name=KEYCLOAK_REALM,
client_secret_key=KEYCLOAK_CLIENT_SECRET,
verify=True,

View File

@ -39,7 +39,7 @@ async def register_invite(
expired = (
dt.fromisoformat(matching_invite["time"])
+ timedelta(days=INVITE_TIME_LIMIT)
) < dt.now()
).day > dt.now().day
if expired:
message = "This invite has expired, sorry."

View File

@ -1,7 +1,7 @@
@font-face {
font-family: "Gudea";
src:
src:
url("/static/fonts/Gudea-Regular.ttf") format("ttf"),
url("/static/fonts/Gudea-Regular.woff2") format("woff2");
font-weight: 400;
@ -9,7 +9,7 @@
@font-face {
font-family: "Gudea";
src:
src:
url("/static/fonts/Gudea-Italic.ttf") format("ttf"),
url("/static/fonts/Gudea-Italic.woff2") format("woff2");
font-weight: 400;
@ -18,7 +18,7 @@
@font-face {
font-family: "Gudea";
src:
src:
url("/static/fonts/Gudea-Bold.ttf") format("ttf"),
url("/static/fonts/Gudea-Bold.woff2") format("woff2");
font-weight: 700;
@ -28,6 +28,7 @@ body {
font-family: "Gudea", "sans-serif";
color: #333;
margin: 0;
}
body {
@ -77,6 +78,7 @@ input:invalid:focus {
.logo {
margin: 60px 0 !important;
}
}
.logo {
@ -133,13 +135,13 @@ nav strong{
}
footer {
background-color: #AFAFAF !important;
background-color: #AFAFAF !important;
padding: 1rem 1.5rem !important;
}
footer .content span {
padding-right: 0.5rem;
}
}
.container {
padding-bottom: 2rem !important;
@ -157,15 +159,15 @@ footer .content span {
}
@media all and (min-width: 768px) {
#formlogo.logo {
#formlogo.logo{
width: 50%;
}
.signup-form-box {
max-width: 70%;
margin: auto;
margin-top: 4em;
}
}
@media all and (min-width: 1216px) {
@ -175,6 +177,7 @@ footer .content span {
}
}
.signup-form-box {
margin: auto;
margin-top: 4em;
@ -207,33 +210,21 @@ footer .content span {
.button {
font-family: "Gudea", "sans-serif" !important;
}
.app_icon:hover {
transform: rotate(-15deg);
}
.app_name {
.app_name{
font-weight: bold;
font-size: 18px;
margin-bottom: 0.2em;
}
.app_name:hover {
.app_name:hover{
text-decoration: underline;
}
.app_description {
.app_description{
font-size: 14px;
}
@media all and (min-width: 768px) {
.app_description {
padding-left: 24px;
padding-right: 24px;
}
}
.tools .app_description a:link {
text-decoration: underline;
}
}

View File

@ -3,74 +3,21 @@
{% block content %}
{% include 'nav.html' %}
<div class="logo">
<a href="https://lumbung.space">
<img src="{{ url_for('static', path='svg/lumbung_space_logo.svg') }}" alt="lumbung.space logo">
</a>
<img src="{{ url_for('static', path='svg/lumbung_space_logo.svg') }}" alt="lumbung.space logo">
</div>
<div class="columns is-multiline is-gapless is-mobile is-centered tools">
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://tv.lumbung.space/plugins/auth-openid-connect/0.1.1/auth/openid-connect">
<img class="app_icon" src="{{ url_for('static', path='svg/tv_lumbung.svg') }}" alt="lumbung.tv">
<p class="app_name">tv.lumbung.space</p>
</a>
<p class="app_description">Video archive. Watch or upload videos or start a livestream! Learn more on <a href="https://panduan.lumbung.space/doc/tvlumbungspace-hxOefAj04z">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://social.lumbung.space/auth/sign_in">
<img class="app_icon" src="{{ url_for('static', path='svg/social_lumbung.svg') }}" alt="lumbung.social">
<p class="app_name">social.lumbung.space</p>
</a>
<p class="app_description">Like twitter but for us! Jokes, announcements, chitchat! Learn more on <a href="https://panduan.lumbung.space/doc/sociallumbungspace-qVXmQksobB">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://cloud.lumbung.space">
<img class="app_icon" src="{{ url_for('static', path='svg/cloud_lumbung.svg') }}" alt="lumbung.cloud">
<p class="app_name">cloud.lumbung.space</p>
</a>
<p class="app_description">Share and organize files. Learn more on <a href="https://panduan.lumbung.space/doc/cloudlumbungspace-Pc34vr4gxv">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://pen.lumbung.space/wp-admin">
<img class="app_icon" src="{{ url_for('static', path='svg/pen_lumbung.svg') }}" alt="lumbung.pen">
<p class="app_name">pen.lumbung.space</p>
</a>
<p class="app_description">Write and publish longer texts. Learn more on <a href="https://panduan.lumbung.space/doc/penlumbungspace-cspRmBVvii">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://books.lumbung.space/link/generic">
<img class="app_icon" src="{{ url_for('static', path='svg/books_lumbung.svg') }}" alt="lumbung.books">
<p class="app_name">books.lumbung.space</p>
</a>
<p class="app_description">Archive of publications. Share, read or download PDFs and ebooks! Learn more on <a href="https://panduan.lumbung.space/doc/bookslumbungspace-dnSnVqknnz">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://panduan.lumbung.space/">
<img class="app_icon" src="{{ url_for('static', path='svg/panduan_lumbung.svg') }}" alt="lumbung.panduan">
<p class="app_name">panduan.lumbung.space</p>
</a>
<p class="app_description">Our collectively written knowledge base, FAQs, manuals and more! Learn more on <a href="https://panduan.lumbung.space/doc/panduanlumbungspace-KQEdwilTrs">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="https://nongkrong.lumbung.space/">
<img class="app_icon" src="{{ url_for('static', path='svg/nongkrong_lumbung.svg') }}" alt="lumbung.nongkrong">
<p class="app_name">nongkrong.lumbung.space</p>
</a>
<p class="app_description">Chatrooms, 1-1 chat, video calls. Come and nongkrong :) Learn more on <a href="https://panduan.lumbung.space/doc/nongkronglumbungspace-UxL0yw2uK2">panduan.lumbung.space</a>.</p>
</div>
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile sounds">
<a href="https://sounds.lumbung.space">
<img class="app_icon" src="{{ url_for('static', path='svg/sounds_lumbung.svg') }}" alt="lumbung.sounds">
<p class="app_name">sounds.lumbung.space</p>
</a>
<p class="app_description">Sharing music, streams, audio archiving and more. Learn more on <a href="https://panduan.lumbung.space/doc/soundslumbungspace-cRDBnjoVM4">panduan.lumbung.space</a>.</p>
</div>
{% set site_list = ("tv","social","cloud","pen", "books", "panduan", "nongkrong") %}
{% set site_urls= ("https://tv.lumbung.space/plugins/auth-openid-connect/0.0.5/auth/openid-connect","https://social.lumbung.space","https://cloud.lumbung.space","https://pen.lumbung.space/wp-admin", "https://books.lumbung.space/link/generic", "https://panduan.lumbung.space/", "https://nongkrong.lumbung.space/") %}
{% set site_descriptions= ("Video archive. Watch or upload videos or start a livestream!","Like twitter but for us! Jokes, announcements, chitchat!","Share and organize files.","Write and publish longer texts.", "Archive of publications. Share, read or download PDFs and ebooks!", "Our collectively written knowledge base, FAQs, manuals and more!", "Chatrooms, 1-1 chat, video calls. Come and nongkrong :)") %}
<div class="columns is-multiline is-gapless is-mobile is-centered">
{% for i, u, d in site_list|zip(site_urls)|zip(site_descriptions) %}
<div class="column site is-one-third-tablet is-one-quarter-desktop is-one-half-mobile">
<a href="{{u}}">
<img class="app_icon" src="{{ url_for('static', path='svg/' ~ i ~'_lumbung.svg') }}" alt="lumbung.{{i}}">
<p class="app_name">{{i}}.lumbung.space</p>
</a>
<p class="app_description">{{d}}</p>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -10,17 +10,12 @@
<div class="signup-form-box">
<div class="form-header">
<div id="formlogo" class="logo">
<a href="https://lumbung.space">
<img src="{{ url_for('static', path='svg/lumbung_space_logo.svg') }}" alt="lumbung.space logo">
</a>
<img src="{{ url_for('static', path='svg/lumbung_space_logo.svg') }}" alt="lumbung.space logo">
</div>
</div>
<div class="form-body">
<p>
Hello {{user.preferred_username}}. On this page you can generate invite
links for your friends to join lumbung.space! The invite links can be
used by multiple people. Need more help? See <a href="https://panduan.lumbung.space/doc/memberslumbungspace-wP0a2k6Avl">panduan.lumbung.space</a>
for more.
Hello {{user.preferred_username}}. Here are links you can send to invite others to register.
</p>
{% if user.preferred_username in invites and invites[user.preferred_username]|length > 0 %}
<table>

View File

@ -7,9 +7,6 @@
</a>
<div id="navbar" class="navbar-menu">
<div class="navbar-end">
<div class="navbar-item">
<a href="https://lumbung.space/about/"><strong>about</strong></a>
</div>
<div class="navbar-item">
<a href="/"><strong>tools</strong></a>
</div>

View File

@ -17,10 +17,10 @@
<form method="post" action="{{ url_for('form_keycloak_register') }}">
<label for="first_name">First name:</label>
<input type="text" name="first_name" value="{{ first_name }}" minlength="1" />
<input type="text" name="first_name" value="{{ first_name }}" minlength="3" />
<label for="last_name">Last name:</label>
<input type="text" name="last_name" value="{{ last_name }}" minlength="1"/>
<input type="text" name="last_name" value="{{ last_name }}" minlength="3"/>
<label for="username">Username:</label>
<input type="text" name="username" value="{{ username }}" minlength="3"/>