You've already forked snikket-web-portal
Compare commits
10 Commits
feature/fi
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b812c773d | ||
|
|
fa61ee4e11 | ||
|
|
7402480c62 | ||
|
|
a68a469319 | ||
|
|
961f285fa5 | ||
|
|
7456295cb6 | ||
|
|
96f4b0d4f8 | ||
|
|
245434126e | ||
|
|
725dffc458 | ||
|
|
22783b837e |
36
Dockerfile
36
Dockerfile
@@ -3,44 +3,28 @@ FROM debian:buster
|
|||||||
ARG BUILD_SERIES=dev
|
ARG BUILD_SERIES=dev
|
||||||
ARG BUILD_ID=0
|
ARG BUILD_ID=0
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
COPY requirements.txt /opt/snikket-web-portal/requirements.txt
|
||||||
|
COPY build-requirements.txt /opt/snikket-web-portal/build-requirements.txt
|
||||||
|
COPY Makefile /opt/snikket-web-portal/Makefile
|
||||||
|
COPY snikket_web/ /opt/snikket-web-portal/snikket_web
|
||||||
|
COPY babel.cfg /opt/snikket-web-portal/babel.cfg
|
||||||
|
|
||||||
# This Dockerfile attempts to strike a balance between image size and time it
|
WORKDIR /opt/snikket-web-portal
|
||||||
# takes to do an incremental build on changes.
|
|
||||||
# Improvements welcome.
|
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN set -eu; \
|
||||||
|
export DEBIAN_FRONTEND=noninteractive ; \
|
||||||
apt-get update ; \
|
apt-get update ; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
python3 python3-pip python3-setuptools python3-wheel \
|
python3 python3-pip python3-setuptools python3-wheel \
|
||||||
libpython3-dev \
|
libpython3-dev \
|
||||||
make build-essential \
|
make build-essential \
|
||||||
; \
|
; \
|
||||||
apt-get clean ; rm -rf /var/lib/apt/lists
|
|
||||||
|
|
||||||
COPY requirements.txt /opt/snikket-web-portal/requirements.txt
|
|
||||||
COPY build-requirements.txt /opt/snikket-web-portal/build-requirements.txt
|
|
||||||
|
|
||||||
WORKDIR /opt/snikket-web-portal
|
|
||||||
|
|
||||||
RUN set -eu; \
|
|
||||||
pip3 install -r requirements.txt; \
|
pip3 install -r requirements.txt; \
|
||||||
pip3 install -r build-requirements.txt; \
|
pip3 install -r build-requirements.txt; \
|
||||||
rm -rf /root/.cache;
|
|
||||||
|
|
||||||
COPY Makefile /opt/snikket-web-portal/Makefile
|
|
||||||
COPY snikket_web/ /opt/snikket-web-portal/snikket_web
|
|
||||||
COPY babel.cfg /opt/snikket-web-portal/babel.cfg
|
|
||||||
|
|
||||||
# NOTE: abusing true(1) as a terrible way to disable a specific command. If
|
|
||||||
# one merged all the RUN commands into one, one would want to run the
|
|
||||||
# uninstall/remove commands there, but with the split up RUN commands it is
|
|
||||||
# rather pointless.
|
|
||||||
RUN set -eu; \
|
|
||||||
make; \
|
make; \
|
||||||
true pip3 uninstall -yr build-requirements.txt; \
|
pip3 uninstall -yr build-requirements.txt; \
|
||||||
true apt-get remove -y build-essential make libpython3-dev; \
|
apt-get remove -y build-essential make libpython3-dev; \
|
||||||
true apt-get autoremove -y; \
|
apt-get autoremove -y; \
|
||||||
pip3 install hypercorn; \
|
pip3 install hypercorn; \
|
||||||
rm -rf /root/.cache; \
|
rm -rf /root/.cache; \
|
||||||
apt-get clean ; rm -rf /var/lib/apt/lists
|
apt-get clean ; rm -rf /var/lib/apt/lists
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 421 KiB |
@@ -48,6 +48,7 @@ async def proc() -> typing.Dict[str, typing.Any]:
|
|||||||
"text_to_css": colour.text_to_css,
|
"text_to_css": colour.text_to_css,
|
||||||
"lang": infra.selected_locale(),
|
"lang": infra.selected_locale(),
|
||||||
"user_info": user_info,
|
"user_info": user_info,
|
||||||
|
"is_in_debug_mode": current_app.debug,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -148,7 +149,7 @@ class AppConfig:
|
|||||||
"en",
|
"en",
|
||||||
"fr",
|
"fr",
|
||||||
"id",
|
"id",
|
||||||
"po",
|
"pl",
|
||||||
], converter=autosplit)
|
], converter=autosplit)
|
||||||
apple_store_url = environ.var("")
|
apple_store_url = environ.var("")
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version_info = (0, 1, 0, "a0")
|
version_info = (0, 1, 1, "a0")
|
||||||
version = (
|
version = (
|
||||||
".".join(map(str, version_info[:3])) +
|
".".join(map(str, version_info[:3])) +
|
||||||
(f"-{version_info[3]}" if version_info[3] else "")
|
(f"-{version_info[3]}" if version_info[3] else "")
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ def context() -> typing.Mapping[str, typing.Any]:
|
|||||||
|
|
||||||
|
|
||||||
@bp.route("/<id_>")
|
@bp.route("/<id_>")
|
||||||
|
@bp.route("/<id_>/")
|
||||||
async def view(id_: str) -> str:
|
async def view(id_: str) -> str:
|
||||||
try:
|
try:
|
||||||
invite = await client.get_public_invite_by_id(id_)
|
invite = await client.get_public_invite_by_id(id_)
|
||||||
|
|||||||
@@ -79,8 +79,11 @@ async def login() -> typing.Union[str, quart.Response]:
|
|||||||
|
|
||||||
@bp.route("/meta/about.html")
|
@bp.route("/meta/about.html")
|
||||||
async def about() -> str:
|
async def about() -> str:
|
||||||
|
version = None
|
||||||
extra_versions = {}
|
extra_versions = {}
|
||||||
if current_app.debug:
|
|
||||||
|
if current_app.debug or client.is_admin_session:
|
||||||
|
version = _version.version
|
||||||
extra_versions["Quart"] = quart.__version__
|
extra_versions["Quart"] = quart.__version__
|
||||||
extra_versions["aiohttp"] = aiohttp.__version__
|
extra_versions["aiohttp"] = aiohttp.__version__
|
||||||
extra_versions["babel"] = babel.__version__
|
extra_versions["babel"] = babel.__version__
|
||||||
@@ -89,7 +92,7 @@ async def about() -> str:
|
|||||||
|
|
||||||
return await render_template(
|
return await render_template(
|
||||||
"about.html",
|
"about.html",
|
||||||
version=_version.version,
|
version=version,
|
||||||
extra_versions=extra_versions,
|
extra_versions=extra_versions,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ div#topbar {
|
|||||||
font-size: $_top-h-size;
|
font-size: $_top-h-size;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
|
||||||
|
body.debug & {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: $small-screen-threshold) {
|
@media screen and (max-width: $small-screen-threshold) {
|
||||||
font-size: $_top-h-small-size;
|
font-size: $_top-h-small-size;
|
||||||
}
|
}
|
||||||
@@ -134,22 +138,20 @@ body > footer {
|
|||||||
background-color: $gray-100;
|
background-color: $gray-100;
|
||||||
color: $gray-800;
|
color: $gray-800;
|
||||||
padding: 0 $w-l1;
|
padding: 0 $w-l1;
|
||||||
|
font-size: 92.21079115%;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.6267076567643135;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
display: inline-block;
|
display: block;
|
||||||
margin: $w-l1 0;
|
margin: $w-s1 0;
|
||||||
}
|
|
||||||
|
|
||||||
li:before {
|
|
||||||
content: '•';
|
|
||||||
padding-right: $w-s2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a, a:visited, a:hover, a:active, a:focus {
|
a, a:visited, a:hover, a:active, a:focus {
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
{#- -#}
|
{#- -#}
|
||||||
<li>{% trans about_url=url_for('main.about') %}A <a href="{{ about_url }}">Snikket</a> service{% endtrans %}</li>
|
<li>{% trans about_url=url_for('main.about') %}A <a href="{{ about_url }}">Snikket</a> service{% endtrans %}</li>
|
||||||
{#- -#}
|
{#- -#}
|
||||||
|
<li>{% trans %}“Snikket” and the parrot logo are trademarks of Snikket Community Interest Company.{% endtrans %}</li>
|
||||||
|
{#- -#}
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -14,10 +14,12 @@
|
|||||||
<p>{% trans agpl_url="https://www.gnu.org/licenses/agpl.html" %}The web portal software is licensed under the terms of the <a href="{{ agpl_url }}">Affero GNU General Public License, version 3.0 or later</a>. The full terms of the license can be reviewed using the aforementioned link.{% endtrans %}</p>
|
<p>{% trans agpl_url="https://www.gnu.org/licenses/agpl.html" %}The web portal software is licensed under the terms of the <a href="{{ agpl_url }}">Affero GNU General Public License, version 3.0 or later</a>. The full terms of the license can be reviewed using the aforementioned link.{% endtrans %}</p>
|
||||||
<p>{% trans source_url="https://github.com/snikket-im/snikket-web-portal/" %}The source code of the web portal can be downloaded and viewed in <a href="{{ source_url }}">its GitHub repository</a>.{% endtrans %}</p>
|
<p>{% trans source_url="https://github.com/snikket-im/snikket-web-portal/" %}The source code of the web portal can be downloaded and viewed in <a href="{{ source_url }}">its GitHub repository</a>.{% endtrans %}</p>
|
||||||
<p>{% trans source_url="https://material.io/resources/icons/", apache20_url="https://www.apache.org/licenses/LICENSE-2.0.txt" %}The icons used in the web portal are <a href="{{ source_url }}">Google’s Material Icons</a>, made available by Google under the terms of the <a href="{{ apache20_url }}">Apache 2.0 License</a>.{% endtrans %}</p>
|
<p>{% trans source_url="https://material.io/resources/icons/", apache20_url="https://www.apache.org/licenses/LICENSE-2.0.txt" %}The icons used in the web portal are <a href="{{ source_url }}">Google’s Material Icons</a>, made available by Google under the terms of the <a href="{{ apache20_url }}">Apache 2.0 License</a>.{% endtrans %}</p>
|
||||||
|
<h3>{% trans %}Trademarks{% endtrans %}</h3>
|
||||||
|
<p>{% trans trademarks_url="https://snikket.org/about/trademarks/" %}“Snikket” and the parrot logo are trademarks of Snikket Community Interest Company. For more information about the trademarks, visit the <a href="{{ trademarks_url }}">Snikket Trademarks information page</a>.{% endtrans %}
|
||||||
<h3>{% trans %}Software Versions{% endtrans %}</h3>
|
<h3>{% trans %}Software Versions{% endtrans %}</h3>
|
||||||
<pre>Snikket Server
|
<pre>Snikket Server
|
||||||
Domain: {{ config["SNIKKET_DOMAIN"] }}
|
Domain: {{ config["SNIKKET_DOMAIN"] }}
|
||||||
Snikket Web Portal ({{ version }})
|
Snikket Web Portal{% if version %} ({{ version }}){% endif %}
|
||||||
{%- if extra_versions -%}
|
{%- if extra_versions -%}
|
||||||
{% for name, version in extra_versions.items() %}
|
{% for name, version in extra_versions.items() %}
|
||||||
{{ name }} ({{ version }}){% endfor %}
|
{{ name }} ({{ version }}){% endfor %}
|
||||||
|
|||||||
@@ -16,5 +16,5 @@
|
|||||||
<meta name="msapplication-TileColor" content="#fbd308">
|
<meta name="msapplication-TileColor" content="#fbd308">
|
||||||
<meta name="theme-color" content="#fbd308">
|
<meta name="theme-color" content="#fbd308">
|
||||||
</head>
|
</head>
|
||||||
<body{% if body_id | default(False) %} id="{{ body_id }}"{% endif %}{% if body_class | default(False) %} class="{{ body_class }}"{% endif %}{% if onload | default(False) %} onload="{{ onload }}"{% endif %}>{% block body %}{% endblock %}</body>
|
<body{% if body_id | default(False) %} id="{{ body_id }}"{% endif %} class="{% if is_in_debug_mode %}debug{% endif %}{% if body_class | default(False) %} {{ body_class }}{% endif %}"{% if onload | default(False) %} onload="{{ onload }}"{% endif %}>{% block body %}{% endblock %}</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -32,7 +32,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</from>
|
</from>
|
||||||
</div></main></div>
|
</div></main></div>
|
||||||
<footer>
|
{%- include "_footer.html" -%}
|
||||||
<ul><li>{% trans about_url=url_for('.about') %}A <a href="{{ about_url }}">Snikket</a> service{% endtrans %}</li></ul>
|
|
||||||
</footer>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user