You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Add instance privacy policy, TOS and imprint, and loads of design cleanups
This commit is contained in:
@@ -55,3 +55,11 @@ limitations under the License.
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro separator() %}
|
||||
<div class="separator">
|
||||
<hr />
|
||||
<p>{{ _("mas.or_separator") }}</p>
|
||||
<hr />
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
41
templates/components/footer.html
Normal file
41
templates/components/footer.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{#
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
#}
|
||||
|
||||
<footer class="legal-footer">
|
||||
{%- if branding.policy_uri or branding.tos_uri -%}
|
||||
<nav>
|
||||
{%- if branding.policy_uri -%}
|
||||
<a href="{{ branding.policy_uri }}" referrerpolicy="no-referrer" title="{{ _('branding.privacy_policy.alt') }}" class="cpd-link" data-kind="primary">
|
||||
{{- _("branding.privacy_policy.link") -}}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.policy_uri and branding.tos_uri -%}
|
||||
<div class="separator" aria-hidden="true">•</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.tos_uri -%}
|
||||
<a href="{{ branding.tos_uri }}" referrerpolicy="no-referrer" title="{{ _('branding.terms_and_conditions.alt') }}" class="cpd-link" data-kind="primary">
|
||||
{{- _("branding.terms_and_conditions.link") -}}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
</nav>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.imprint -%}
|
||||
<p class="imprint">{{ branding.imprint }}</p>
|
||||
{%- endif -%}
|
||||
</footer>
|
@@ -15,12 +15,16 @@ limitations under the License.
|
||||
#}
|
||||
|
||||
{% macro button(text, csrf_token, as_link=false, post_logout_action={}) %}
|
||||
<form method="POST" action="{{ "/logout" | prefix_url }}" class="inline">
|
||||
<form method="POST" action="{{ "/logout" | prefix_url }}" class="inline-flex">
|
||||
<input type="hidden" name="csrf" value="{{ csrf_token }}" />
|
||||
{% for key, value in post_logout_action|items %}
|
||||
<input type="hidden" name="{{ key }}" value="{{ value }}" />
|
||||
{% endfor %}
|
||||
<button class="{% if as_link %}cpd-link{% else %}cpd-button{% endif %}" data-kind="critical" type="submit">{{ text }}</button>
|
||||
{% if as_link %}
|
||||
<button class="cpd-link flex-1" data-kind="critical" type="submit">{{ text }}</button>
|
||||
{% else %}
|
||||
<button class="cpd-button flex-1" data-kind="destructive" data-size="lg" type="submit">{{ text }}</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
|
@@ -1,35 +0,0 @@
|
||||
{#
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
#}
|
||||
|
||||
{% macro top() %}
|
||||
<nav class="container mx-auto py-2 flex-initial flex items-center px-8" role="navigation" aria-label="main navigation">
|
||||
<div class="flex-1"></div>
|
||||
|
||||
<div class="grid grid-flow-col auto-cols-max gap-4 place-items-center">
|
||||
{% if current_session %}
|
||||
<div class="text-grey-200 dark:text-grey-250 mx-2">
|
||||
{{ _("mas.navbar.signed_in_as", username=current_session.user.username) }}
|
||||
</div>
|
||||
|
||||
{{ button.link(text=_("mas.navbar.my_account"), href="/account/") }}
|
||||
{{ logout.button(text=_("action.sign_out"), csrf_token=csrf_token) }}
|
||||
{% else %}
|
||||
{{ button.link(text=_("action.sign_in"), href="/login") }}
|
||||
{{ button.link_outline(text=_("mas.navbar.register"), href="/register") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endmacro %}
|
Reference in New Issue
Block a user