Compare commits
1 Commits
d1621b8e70
...
4d00ba3dbe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d00ba3dbe |
@@ -1,4 +1,4 @@
|
|||||||
{% set _app_slugs = {'cart': cart_url('/')} %}
|
{% set _app_slugs = {'market': market_url('/'), 'cart': cart_url('/')} %}
|
||||||
<div class="flex flex-col sm:flex-row sm:items-center gap-2 border-r border-stone-200 mr-2 sm:max-w-2xl"
|
<div class="flex flex-col sm:flex-row sm:items-center gap-2 border-r border-stone-200 mr-2 sm:max-w-2xl"
|
||||||
id="menu-items-nav-wrapper">
|
id="menu-items-nav-wrapper">
|
||||||
{% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
|
{% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
|
||||||
|
|||||||
7
utils.py
7
utils.py
@@ -39,7 +39,12 @@ def _join_url_parts(parts: List[str]) -> str:
|
|||||||
cleaned = [first.strip("/")]
|
cleaned = [first.strip("/")]
|
||||||
for seg in parts[1:]:
|
for seg in parts[1:]:
|
||||||
seg = str(seg)
|
seg = str(seg)
|
||||||
if seg.startswith("?") or seg.startswith("#"):
|
# If a later segment is already an absolute URL, use it as the base
|
||||||
|
m2 = re.match(r"^([a-zA-Z][a-zA-Z0-9+.-]*://)(.*)$", seg)
|
||||||
|
if m2:
|
||||||
|
scheme, first = m2.group(1), m2.group(2)
|
||||||
|
cleaned = [first.strip("/")]
|
||||||
|
elif seg.startswith("?") or seg.startswith("#"):
|
||||||
cleaned[-1] = cleaned[-1] + seg # attach query/fragment
|
cleaned[-1] = cleaned[-1] + seg # attach query/fragment
|
||||||
else:
|
else:
|
||||||
cleaned.append(seg.strip("/"))
|
cleaned.append(seg.strip("/"))
|
||||||
|
|||||||
Reference in New Issue
Block a user