fix(контакты): тёмная версия картинки и системный шрифт страницы
На тёмной карточке белый прямоугольник выглядел заплаткой, а DejaVu не совпадал с системным шрифтом страницы. Теперь две картинки: светлая и тёмная цветом карточки (#211d17), обе набраны системным шрифтом — тем же, что страница берёт после Inter. Переключение по data-theme в стилях каждой страницы; тёмная версия без alt. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -75,6 +75,12 @@ button { font-family: inherit; }
|
||||
.landing-hero h1 { font-size: 1.35rem; }
|
||||
}
|
||||
#login-form, #reset-form { background: var(--bg-card); padding: 2.5rem 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 340px; }
|
||||
/* Контакты: две картинки под темы. На тёмной карточке белый прямоугольник выглядел
|
||||
заплаткой (сказал Хозяин 18.11), поэтому тёмная версия нарисована цветом карточки. */
|
||||
.contacts-img { display: block; max-width: min(100%, 320px); height: auto; margin: .8rem auto .2rem; }
|
||||
.contacts-img.contacts-dark { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img.contacts-dark { display: block; }
|
||||
.landing-login #login-form, .landing-login #reset-form { width: 100%; }
|
||||
#login-form h2, #reset-form h2 { margin-bottom: .3rem; text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--text); }
|
||||
#login-form .subtitle, #reset-form .subtitle { text-align: center; color: var(--text-muted); font-size: .85rem; margin-bottom: 1.5rem; display: block; }
|
||||
@@ -425,7 +431,8 @@ html { color-scheme: light; }
|
||||
<p class="register-link"><a href="#" id="forgot-link" onclick="return openReset(event)">Забыли пароль?</a></p>
|
||||
<p class="tg-line">Новости сервиса — в телеграме:
|
||||
<a id="tg-channel-login" class="tg-channel" href="https://t.me/infosmeta_ru" target="_blank" rel="noopener noreferrer">@infosmeta_ru</a></p>
|
||||
<img src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="496" height="102" style="display:block;max-width:100%;height:auto;margin:.8rem auto .2rem">
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="360" height="84">
|
||||
<img class="contacts-img contacts-dark" src="/static/contacts-dark.png" alt="" width="360" height="84">
|
||||
<p style="text-align:center;font-size:.66rem;color:var(--text-muted);opacity:.7;margin-top:.2rem;line-height:1.4">Самозанятый Казин Юрий Владимирович · ИНН 272404581280 · г. Хабаровск ·
|
||||
<a href="/static/privacy.html" target="_blank" rel="noopener">политика обработки данных</a> ·
|
||||
<a href="/static/terms.html" target="_blank" rel="noopener">условия и возврат</a> ·
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 18 KiB |
+8
-2
@@ -21,7 +21,12 @@ th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(-
|
||||
th { font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; }
|
||||
td.num, th.num { text-align: right; white-space: nowrap; }
|
||||
.calc { background: #faf7f3; border: 1px solid var(--border); border-radius: 8px; padding: .8rem .9rem; font-size: .84rem; margin: .5rem 0 .9rem; }
|
||||
.contacts-img { display: block; max-width: 100%; height: auto; margin: .4rem 0 .2rem; }
|
||||
/* Контакты: две картинки под темы. На тёмной карточке белый прямоугольник выглядел
|
||||
заплаткой (сказал Хозяин 18.11), поэтому тёмная версия нарисована цветом карточки. */
|
||||
.contacts-img { display: block; max-width: min(100%, 320px); height: auto; margin: .4rem 0 .2rem; }
|
||||
.contacts-img.contacts-dark { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img.contacts-dark { display: block; }
|
||||
html { color-scheme: light; }
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
@@ -109,7 +114,8 @@ html { color-scheme: light; }
|
||||
</ul>
|
||||
|
||||
<h2>5. Связаться</h2>
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="496" height="102">
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="360" height="84">
|
||||
<img class="contacts-img contacts-dark" src="/static/contacts-dark.png" alt="" width="360" height="84">
|
||||
<p class="muted">Самозанятый Казин Юрий Владимирович · ИНН 272404581280 · г. Хабаровск</p>
|
||||
<p class="muted"><a href="/">← На главную</a> ·
|
||||
<a href="/static/privacy.html">политика обработки данных</a> ·
|
||||
|
||||
+8
-1
@@ -19,6 +19,12 @@ ul { padding-left: 1.3rem; margin-bottom: .6rem; }
|
||||
.muted { color: var(--muted); font-size: .8rem; }
|
||||
a { color: var(--accent); }
|
||||
|
||||
/* Контакты: две картинки под темы. На тёмной карточке белый прямоугольник выглядел
|
||||
заплаткой (сказал Хозяин 18.11), поэтому тёмная версия нарисована цветом карточки. */
|
||||
.contacts-img { display: block; max-width: min(100%, 320px); height: auto; margin: 1.5rem 0 .2rem; }
|
||||
.contacts-img.contacts-dark { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img.contacts-dark { display: block; }
|
||||
html { color-scheme: light; }
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
@@ -113,7 +119,8 @@ html { color-scheme: light; }
|
||||
журналируются, резервное копирование базы данных выполняется ежедневно, на сервере
|
||||
применяется антивирусная защита.</p>
|
||||
|
||||
<img src="/static/contacts.png" alt="Связаться с оператором: телефон и электронная почта" width="496" height="102" style="display:block;max-width:100%;height:auto;margin:1.5rem 0 .2rem">
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с оператором: телефон и электронная почта" width="360" height="84">
|
||||
<img class="contacts-img contacts-dark" src="/static/contacts-dark.png" alt="" width="360" height="84">
|
||||
<p class="muted">Самозанятый Казин Юрий Владимирович · ИНН 272404581280 · г. Хабаровск</p>
|
||||
<p class="muted"><a href="/static/terms.html">условия использования</a> ·
|
||||
<a href="/static/pricing.html">стоимость услуг</a></p>
|
||||
|
||||
@@ -25,6 +25,12 @@ button:disabled { background: var(--border); cursor: not-allowed; }
|
||||
.step.active { display: block; }
|
||||
|
||||
/* ===== Тёмная тема (общая с чатом; выбор в localStorage['theme']) ===== */
|
||||
/* Контакты: две картинки под темы. На тёмной карточке белый прямоугольник выглядел
|
||||
заплаткой (сказал Хозяин 18.11), поэтому тёмная версия нарисована цветом карточки. */
|
||||
.contacts-img { display: block; max-width: min(100%, 320px); height: auto; margin: 1.2rem auto 0; }
|
||||
.contacts-img.contacts-dark { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img.contacts-dark { display: block; }
|
||||
html { color-scheme: light; }
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
@@ -142,7 +148,8 @@ document.addEventListener('DOMContentLoaded',applyThemeIcon);
|
||||
<button onclick="window.location.href='/'">Войти</button>
|
||||
</div>
|
||||
|
||||
<img src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="496" height="102" style="display:block;max-width:100%;height:auto;margin:1.2rem auto 0">
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="360" height="84">
|
||||
<img class="contacts-img contacts-dark" src="/static/contacts-dark.png" alt="" width="360" height="84">
|
||||
<p style="text-align:center;font-size:.68rem;color:var(--muted);opacity:.7;margin-top:.7rem">
|
||||
Самозанятый Казин Юрий Владимирович · ИНН 272404581280 · г. Хабаровск ·
|
||||
<a class="link" href="/static/privacy.html" target="_blank">политика обработки данных</a> ·
|
||||
|
||||
+8
-1
@@ -16,6 +16,12 @@ p, li { font-size: .9rem; margin-bottom: .5rem; }
|
||||
ul { padding-left: 1.3rem; margin-bottom: .6rem; }
|
||||
.muted { color: var(--muted); font-size: .8rem; }
|
||||
a { color: var(--accent); }
|
||||
/* Контакты: две картинки под темы. На тёмной карточке белый прямоугольник выглядел
|
||||
заплаткой (сказал Хозяин 18.11), поэтому тёмная версия нарисована цветом карточки. */
|
||||
.contacts-img { display: block; max-width: min(100%, 320px); height: auto; margin: 1.5rem 0 .2rem; }
|
||||
.contacts-img.contacts-dark { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img { display: none; }
|
||||
:root[data-theme="dark"] .contacts-img.contacts-dark { display: block; }
|
||||
html { color-scheme: light; }
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
@@ -83,7 +89,8 @@ html { color-scheme: light; }
|
||||
<p>Новая редакция публикуется на этой странице с указанием даты. Продолжение работы
|
||||
после публикации означает согласие с новой редакцией.</p>
|
||||
|
||||
<img src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="496" height="102" style="display:block;max-width:100%;height:auto;margin:1.5rem 0 .2rem">
|
||||
<img class="contacts-img" src="/static/contacts.png" alt="Связаться с исполнителем: телефон и электронная почта" width="360" height="84">
|
||||
<img class="contacts-img contacts-dark" src="/static/contacts-dark.png" alt="" width="360" height="84">
|
||||
<p class="muted">Самозанятый Казин Юрий Владимирович · ИНН 272404581280 · г. Хабаровск</p>
|
||||
<p class="muted"><a href="/">← На главную</a> ·
|
||||
<a href="/static/pricing.html">стоимость услуг</a> ·
|
||||
|
||||
@@ -238,9 +238,18 @@ def test_contacts_and_pricing_served(env):
|
||||
contacts = client.get("/static/contacts.png")
|
||||
assert contacts.status_code == 200
|
||||
assert contacts.headers["content-type"] == "image/png"
|
||||
# Контакты вставлены картинкой на всех страницах, где человек их ищет.
|
||||
for page in ("/static/privacy.html", "/static/terms.html", "/static/pricing.html"):
|
||||
assert 'src="/static/contacts.png"' in client.get(page).text, page
|
||||
# Тёмная версия — своя картинка цветом карточки: на тёмной теме белая выглядела заплаткой.
|
||||
dark = client.get("/static/contacts-dark.png")
|
||||
assert dark.status_code == 200
|
||||
assert dark.headers["content-type"] == "image/png"
|
||||
# Контакты вставлены картинкой на всех страницах, где человек их ищет, и обе версии
|
||||
# переключаются темой (иначе на тёмной карточке снова побелеет).
|
||||
for page in ("/static/privacy.html", "/static/terms.html", "/static/pricing.html",
|
||||
"/register"):
|
||||
html = client.get(page).text
|
||||
assert 'src="/static/contacts.png"' in html, page
|
||||
assert 'src="/static/contacts-dark.png"' in html, page
|
||||
assert '[data-theme="dark"] .contacts-img.contacts-dark' in html, page
|
||||
|
||||
|
||||
def test_admin_toggle_rbac_and_validation(env):
|
||||
|
||||
Reference in New Issue
Block a user