Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added 'netloc-tag' to URL_RENDER_MODE values #802

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

LeXofLeviafan
Copy link
Collaborator

Adding a "hybrid" option for BUKUSERVER_URL_RENDER_MODE= setting (it's effectively identical to netloc, except that the netloc-filter link is rendered as a "tag" – just like when using the full option). …It just looks cleaner, IMO.

@jarun alternatively we could replace the netloc option with this – it does pretty much the exact same thing, after all; just retaining design used by the other option for the same element.

Screenshots

netloc-tag

The other options still work as before:

full/unset

full

netloc

netloc

@@ -135,7 +135,7 @@ def _list_entry(self, context: Any, model: Namespace, name: str) -> Markup:
res += [f'<span class="netloc"> ({link(netloc, url_for_index_view_netloc)})</span>']
if not parsed_url.scheme:
res += [f'<span class="link">{escape(model.url)}</span>']
elif self.url_render_mode is None or self.url_render_mode == 'full':
elif self.url_render_mode == 'full':
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change in logic here; this property is actually implemented in a way that prevents returning None in the first place

@jarun jarun merged commit 349662a into jarun:master Dec 16, 2024
1 check passed
@jarun
Copy link
Owner

jarun commented Dec 16, 2024

Thank you!

@LeXofLeviafan LeXofLeviafan deleted the url-render-netloc-tag branch December 16, 2024 13:32
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants