Compare commits
4 Commits
7a3c649fb4
...
4a24a125f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a24a125f5 | |||
| 165bf47291 | |||
| f109e60b03 | |||
| 8066793131 |
@@ -1,115 +0,0 @@
|
|||||||
/* Mobile header / navigation fixes for MandelBlog Studio.
|
|
||||||
Scoped to Carbasa mega header to avoid desktop regressions. */
|
|
||||||
|
|
||||||
@media (max-width: 991.98px) {
|
|
||||||
header.mega_header .header-inner .container {
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: center;
|
|
||||||
padding-top: 0.5rem;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner .navbar-brand {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
position: relative;
|
|
||||||
z-index: 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner .navbar-brand .logo.big_brand img,
|
|
||||||
header.mega_header .header-inner .navbar-brand .logo img {
|
|
||||||
max-height: 36px;
|
|
||||||
width: auto;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner .header-right {
|
|
||||||
padding-left: 0;
|
|
||||||
margin-left: auto;
|
|
||||||
gap: 0.5rem;
|
|
||||||
position: relative;
|
|
||||||
z-index: 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner .header-right .user-button {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Move the mobile menu toggle into the header (not floating at the bottom). */
|
|
||||||
header.mega_header .header-inner .navbar-toggler {
|
|
||||||
position: static;
|
|
||||||
inset: auto;
|
|
||||||
width: 42px;
|
|
||||||
height: 42px;
|
|
||||||
margin: 0 0 0 0.5rem;
|
|
||||||
box-shadow: none;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid rgba(15, 23, 42, 0.12);
|
|
||||||
z-index: 35;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fullscreen mobile menu that sits above header icons. */
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent.show {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 100vh;
|
|
||||||
width: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
background: #fff;
|
|
||||||
padding: 5.25rem 1.25rem 6rem;
|
|
||||||
z-index: 40;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Prevent header action icons overlapping the open menu. */
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent.show ~ .header-right {
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make mobile menu items consistent and aligned. */
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .brand-wrapper {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .navbar-nav {
|
|
||||||
width: 100%;
|
|
||||||
align-items: stretch;
|
|
||||||
gap: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .navbar-nav > li {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .navbar-nav > li > a.nav-link,
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .navbar-nav > li > a.toggler.nav-link {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0.85rem 0.25rem;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .dropdown-menu {
|
|
||||||
position: static;
|
|
||||||
float: none;
|
|
||||||
width: 100%;
|
|
||||||
border: 0;
|
|
||||||
padding: 0.25rem 0 0.75rem;
|
|
||||||
margin: 0;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
header.mega_header .header-inner #navbarSupportedContent .dropdown-menu .nav-link {
|
|
||||||
justify-content: flex-start;
|
|
||||||
padding: 0.6rem 0.25rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% esi_fragment 'oxyan/headers/partials/carbasa-user-bar.html' with sessionid=True oscar_open_basket=True messages=messages request=request csrf_token=csrf_token user=user|default:None basket=basket|default:None num_unread_notifications=num_unread_notifications|default:0 only %}
|
{% esi_fragment 'oxyan/headers/partials/carbasa-user-bar.html' with sessionid=True oscar_open_basket=True messages=messages request=request csrf_token=csrf_token user=user basket=basket num_unread_notifications=num_unread_notifications only %}
|
||||||
|
|
||||||
{% block language_chooser %}{% endblock language_chooser %}
|
{% block language_chooser %}{% endblock language_chooser %}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{# Ensure Carbasa webshop styling is present so responsive header/footer render correctly. #}
|
{# Ensure Carbasa webshop styling is present so responsive header/footer render correctly. #}
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{% static 'carbasa/webshop_base.scss' %}">
|
<link rel="stylesheet" type="text/x-scss" href="{% static 'carbasa/webshop_base.scss' %}">
|
||||||
{# Project-scoped mobile header fixes (plain CSS; no Bootstrap overrides). #}
|
|
||||||
<link rel="stylesheet" href="{% static 'mandelstudio/header_mobile.css' %}">
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
|
|||||||
@@ -51,44 +51,12 @@ def _cta_issue_is_allowed_now(locale: str, issue: dict) -> bool:
|
|||||||
return issue.get("severity") == "block" and issue.get("issue_type") == "cta_language_mismatch"
|
return issue.get("severity") == "block" and issue.get("issue_type") == "cta_language_mismatch"
|
||||||
|
|
||||||
|
|
||||||
def enabled_locales_from_config() -> set[str] | None:
|
|
||||||
"""
|
|
||||||
If the project config declares a limited set of i18n languages, use it to
|
|
||||||
scope CI blocking checks.
|
|
||||||
"""
|
|
||||||
|
|
||||||
config_path = PROJECT_ROOT / "mandelstudio" / "ocyan.json"
|
|
||||||
if not config_path.exists():
|
|
||||||
return None
|
|
||||||
|
|
||||||
try:
|
|
||||||
payload = load_json(config_path)
|
|
||||||
except Exception:
|
|
||||||
return None
|
|
||||||
|
|
||||||
languages = (
|
|
||||||
(payload.get("settings") or {})
|
|
||||||
.get("i18n", {})
|
|
||||||
.get("languages")
|
|
||||||
)
|
|
||||||
if not languages or not isinstance(languages, list):
|
|
||||||
return None
|
|
||||||
|
|
||||||
enabled = {str(code).split("-")[0] for code in languages if code}
|
|
||||||
return enabled or None
|
|
||||||
|
|
||||||
|
|
||||||
def effective_block_count(payload: dict) -> tuple[int, int]:
|
def effective_block_count(payload: dict) -> tuple[int, int]:
|
||||||
"""Return (effective_block, ignored_block) after applying allowlists."""
|
"""Return (effective_block, ignored_block) after applying allowlists."""
|
||||||
enabled_locales = enabled_locales_from_config()
|
|
||||||
ignored = 0
|
ignored = 0
|
||||||
block = 0
|
block = 0
|
||||||
issues = payload.get("issues") or {}
|
issues = payload.get("issues") or {}
|
||||||
for locale, data in locale_rows(payload):
|
for locale, data in locale_rows(payload):
|
||||||
if enabled_locales is not None and locale not in enabled_locales:
|
|
||||||
locale_issues = issues.get(locale) or []
|
|
||||||
ignored += sum(int(issue.get("count") or 1) for issue in locale_issues if issue.get("severity") == "block")
|
|
||||||
continue
|
|
||||||
locale_issues = issues.get(locale) or []
|
locale_issues = issues.get(locale) or []
|
||||||
for issue in locale_issues:
|
for issue in locale_issues:
|
||||||
if issue.get("severity") != "block":
|
if issue.get("severity") != "block":
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ trap 'rm -f "$TMP_FILE" "$TMP_DEBUG"' EXIT
|
|||||||
|
|
||||||
REMOTE_DEBUG_CMD="cd '${STAGING_AUDIT_PROJECT_DIR}' && '${STAGING_AUDIT_MANAGE}' shell -c \"\
|
REMOTE_DEBUG_CMD="cd '${STAGING_AUDIT_PROJECT_DIR}' && '${STAGING_AUDIT_MANAGE}' shell -c \"\
|
||||||
from django.template.loader import get_template; \
|
from django.template.loader import get_template; \
|
||||||
from django.test import Client; \
|
|
||||||
import pathlib; \
|
import pathlib; \
|
||||||
import os; \
|
import os; \
|
||||||
import traceback; \
|
|
||||||
import mandelstudio; \
|
import mandelstudio; \
|
||||||
print('DJANGO_SETTINGS_MODULE=' + os.environ.get('DJANGO_SETTINGS_MODULE','')); \
|
print('DJANGO_SETTINGS_MODULE=' + os.environ.get('DJANGO_SETTINGS_MODULE','')); \
|
||||||
troot = pathlib.Path(mandelstudio.__file__).resolve().parent; \
|
troot = pathlib.Path(mandelstudio.__file__).resolve().parent; \
|
||||||
@@ -32,14 +30,6 @@ t1=get_template('carbasa/headers/header.html'); \
|
|||||||
t2=get_template('engine/pages/base_home_page.html'); \
|
t2=get_template('engine/pages/base_home_page.html'); \
|
||||||
print('carbasa/headers/header.html -> ' + getattr(getattr(t1,'origin',None),'name','(no origin)')); \
|
print('carbasa/headers/header.html -> ' + getattr(getattr(t1,'origin',None),'name','(no origin)')); \
|
||||||
print('engine/pages/base_home_page.html -> ' + getattr(getattr(t2,'origin',None),'name','(no origin)')); \
|
print('engine/pages/base_home_page.html -> ' + getattr(getattr(t2,'origin',None),'name','(no origin)')); \
|
||||||
try: \
|
|
||||||
c=Client(); \
|
|
||||||
r=c.get('/'); \
|
|
||||||
print('debug_home_status=' + str(r.status_code)); \
|
|
||||||
except Exception as exc: \
|
|
||||||
print('debug_home_status=EXC'); \
|
|
||||||
print('debug_home_exc=' + repr(exc)); \
|
|
||||||
traceback.print_exc(); \
|
|
||||||
\""
|
\""
|
||||||
|
|
||||||
REMOTE_CMD="cd '${STAGING_AUDIT_PROJECT_DIR}' && '${STAGING_AUDIT_MANAGE}' audit_locales --format=json"
|
REMOTE_CMD="cd '${STAGING_AUDIT_PROJECT_DIR}' && '${STAGING_AUDIT_MANAGE}' audit_locales --format=json"
|
||||||
|
|||||||
Reference in New Issue
Block a user