Remove temporary custom language-test view/template
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
{% load i18n %}
|
|
||||||
<!doctype html>
|
|
||||||
<html lang="{{ LANGUAGE_CODE }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>{% trans "Language Test" %}</title>
|
|
||||||
<style>
|
|
||||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; background: #f4f7fb; color: #0f172a; }
|
|
||||||
.wrap { max-width: 860px; margin: 48px auto; padding: 0 20px; }
|
|
||||||
.card { background: #fff; border: 1px solid #dbe3ef; border-radius: 14px; padding: 24px; box-shadow: 0 6px 20px rgba(12, 34, 81, .08); }
|
|
||||||
h1 { margin: 0 0 12px; font-size: 1.8rem; }
|
|
||||||
p { margin: 0 0 16px; color: #334155; }
|
|
||||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
|
|
||||||
.lang-link { display: block; padding: 10px 12px; border: 1px solid #c7d4e9; border-radius: 10px; text-decoration: none; color: #1e3a8a; background: #f8fbff; font-weight: 600; }
|
|
||||||
.lang-link.active { border-color: #2563eb; background: #eaf2ff; color: #1d4ed8; }
|
|
||||||
.back { margin-top: 18px; display: inline-block; color: #334155; text-decoration: none; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="wrap">
|
|
||||||
<div class="card">
|
|
||||||
<h1>{% trans "Language Switch Test Page" %}</h1>
|
|
||||||
<p>{% blocktrans %}Current language code: {{ current_language }}{% endblocktrans %}</p>
|
|
||||||
|
|
||||||
<div class="grid">
|
|
||||||
{% for code, name in languages %}
|
|
||||||
{% language code %}
|
|
||||||
<a class="lang-link {% if current_language|slice::2 == code|slice::2 %}active{% endif %}" href="{% url language_test %}">
|
|
||||||
{{ code|upper }} - {{ name }}
|
|
||||||
</a>
|
|
||||||
{% endlanguage %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="back" href="/">{% trans "Back to homepage" %}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django.shortcuts import render
|
|
||||||
from django.utils.translation import get_language
|
|
||||||
|
|
||||||
|
|
||||||
def language_test(request):
|
|
||||||
return render(
|
|
||||||
request,
|
|
||||||
"mandelstudio/language_test.html",
|
|
||||||
{
|
|
||||||
"current_language": get_language(),
|
|
||||||
"languages": settings.LANGUAGES,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user