diff --git a/Makefile b/Makefile index e1b13ef..051a540 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ test: format: uv run black bookmarks + uv run djlint bookmarks/templates --reformat --quiet npx prettier bookmarks/frontend --write npx prettier bookmarks/styles --write diff --git a/README.md b/README.md index 085377a..6393571 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ make test ### Formatting -Format Python code with black, and JavaScript code with prettier: +Format Python code with black, Django templates with djlint, and JavaScript code with prettier: ``` make format ``` diff --git a/bookmarks/templates/admin/background_tasks.html b/bookmarks/templates/admin/background_tasks.html index a0f341a..19815e1 100644 --- a/bookmarks/templates/admin/background_tasks.html +++ b/bookmarks/templates/admin/background_tasks.html @@ -1,24 +1,23 @@ {% extends "admin/base_site.html" %} - {% block content %} - - - - - - + + + + + + - {% for task in tasks %} - - - - - - - {% endfor %} + {% for task in tasks %} + + + + + + + {% endfor %}
IDNameArgsRetries
IDNameArgsRetries
{{ task.id }}{{ task.name }}{{ task.args }}{{ task.retries }}
{{ task.id }}{{ task.name }}{{ task.args }}{{ task.retries }}

diff --git a/bookmarks/templates/bookmarks/archive.html b/bookmarks/templates/bookmarks/archive.html index a0d632c..c6f86fb 100644 --- a/bookmarks/templates/bookmarks/archive.html +++ b/bookmarks/templates/bookmarks/archive.html @@ -1,12 +1,9 @@ -{% extends "bookmarks/layout.html" %} +{% extends "shared/layout.html" %} {% load static %} {% load shared %} {% load bookmarks %} - {% block content %} - - + {# Bookmark list #}

@@ -19,19 +16,15 @@
-
+ method="post" + autocomplete="off"> {% csrf_token %} {% include 'bookmarks/bulk_edit/bar.html' with disable_actions='bulk_archive' %} - -
- {% include 'bookmarks/bookmark_list.html' %} -
+
{% include 'bookmarks/bookmark_list.html' %}
- {# Filters #}
{% include 'bookmarks/bundle_section.html' %} @@ -39,12 +32,6 @@
{% endblock %} - {% block overlays %} - {# Bookmark details #} - - {% if details %} - {% include 'bookmarks/details/modal.html' %} - {% endif %} - + {% include 'bookmarks/details/modal.html' %} {% endblock %} diff --git a/bookmarks/templates/bookmarks/bookmark_list.html b/bookmarks/templates/bookmarks/bookmark_list.html index 41d76c6..0ab3b35 100644 --- a/bookmarks/templates/bookmarks/bookmark_list.html +++ b/bookmarks/templates/bookmarks/bookmark_list.html @@ -1,17 +1,18 @@ {% load static %} {% load shared %} {% load pagination %} - {% if bookmark_list.is_empty %} {% include 'bookmarks/empty_bookmarks.html' %} {% else %}
-
{% pagination bookmark_list.bookmarks_page %}
{% endif %} + diff --git a/bookmarks/templates/bookmarks/bulk_edit/bar.html b/bookmarks/templates/bookmarks/bulk_edit/bar.html index ba75138..cf0bed6 100644 --- a/bookmarks/templates/bookmarks/bulk_edit/bar.html +++ b/bookmarks/templates/bookmarks/bulk_edit/bar.html @@ -1,42 +1,41 @@ {% load shared %} {% htmlmin %} -
-
- - - - - - -
+
+
+ + + + + +
+
{% endhtmlmin %} diff --git a/bookmarks/templates/bookmarks/bulk_edit/toggle.html b/bookmarks/templates/bookmarks/bulk_edit/toggle.html index 00b477c..9f1cdf2 100644 --- a/bookmarks/templates/bookmarks/bulk_edit/toggle.html +++ b/bookmarks/templates/bookmarks/bulk_edit/toggle.html @@ -1,9 +1,16 @@ diff --git a/bookmarks/templates/bookmarks/bundle_section.html b/bookmarks/templates/bookmarks/bundle_section.html index e3ec1cd..eace134 100644 --- a/bookmarks/templates/bookmarks/bundle_section.html +++ b/bookmarks/templates/bookmarks/bundle_section.html @@ -4,12 +4,19 @@

Bundles

diff --git a/bookmarks/templates/bookmarks/close.html b/bookmarks/templates/bookmarks/close.html index dd18e6c..f4b9263 100644 --- a/bookmarks/templates/bookmarks/close.html +++ b/bookmarks/templates/bookmarks/close.html @@ -1,9 +1,7 @@ -{% extends "bookmarks/layout.html" %} - +{% extends "shared/layout.html" %} {% block content %}

You can now close this window.

{% endblock %} - diff --git a/bookmarks/templates/bookmarks/details/asset_icon.html b/bookmarks/templates/bookmarks/details/asset_icon.html index 6853fba..abca425 100644 --- a/bookmarks/templates/bookmarks/details/asset_icon.html +++ b/bookmarks/templates/bookmarks/details/asset_icon.html @@ -1,42 +1,70 @@ {% if asset.content_type == 'text/html' %} - - - - - - - - - - - + + + + + + + + + + + {% elif asset.content_type == 'application/pdf' %} - - - - - - - - + + + + + + + + {% elif asset.content_type == 'image/png' or asset.content_type == 'image/jpeg' or asset.content_type == 'image.gif' %} - - - - - - + + + + + + {% else %} - - - - + + + + -{% endif %} \ No newline at end of file +{% endif %} diff --git a/bookmarks/templates/bookmarks/details/assets.html b/bookmarks/templates/bookmarks/details/assets.html index 6dc3e7d..0bfa022 100644 --- a/bookmarks/templates/bookmarks/details/assets.html +++ b/bookmarks/templates/bookmarks/details/assets.html @@ -3,49 +3,55 @@
{% for asset in details.assets %}
-
- {% include 'bookmarks/details/asset_icon.html' %} -
+
{% include 'bookmarks/details/asset_icon.html' %}
- - {{ asset.display_name }} - {% if asset.status == 'pending' %}(queued){% endif %} - {% if asset.status == 'failure' %}(failed){% endif %} - - {% if asset.file_size %} - {{ asset.file_size|filesizeformat }} - {% endif %} + + {{ asset.display_name }} + {% if asset.status == 'pending' %}(queued){% endif %} + {% if asset.status == 'failure' %}(failed){% endif %} + + {% if asset.file_size %}{{ asset.file_size|filesizeformat }}{% endif %}
{% if asset.file %} - View + View {% endif %} {% if details.is_editable %} - + {% endif %}
{% endfor %}
{% endif %} - {% if details.is_editable %}
{% if details.snapshots_enabled %} - + {% endif %} {% if details.uploads_enabled %} - - + + {% endif %}
{% endif %} -
\ No newline at end of file + diff --git a/bookmarks/templates/bookmarks/details/form.html b/bookmarks/templates/bookmarks/details/form.html index f2cecb9..254e06e 100644 --- a/bookmarks/templates/bookmarks/details/form.html +++ b/bookmarks/templates/bookmarks/details/form.html @@ -1,21 +1,26 @@ {% load static %} {% load shared %} - -
+ {% csrf_token %} - {% if details.preview_image_enabled and details.bookmark.preview_image_file %}
- +
{% endif %}
@@ -51,14 +57,18 @@
@@ -66,7 +76,9 @@ {% if details.profile.enable_sharing %}
@@ -77,9 +89,7 @@ {% endif %}

Files

-
- {% include 'bookmarks/details/assets.html' %} -
+
{% include 'bookmarks/details/assets.html' %}
{% if details.bookmark.tag_names %}
@@ -111,4 +121,4 @@ {% endif %}
- \ No newline at end of file + diff --git a/bookmarks/templates/bookmarks/details/modal.html b/bookmarks/templates/bookmarks/details/modal.html index b982543..e4cd657 100644 --- a/bookmarks/templates/bookmarks/details/modal.html +++ b/bookmarks/templates/bookmarks/details/modal.html @@ -1,31 +1,37 @@ - - -
diff --git a/bookmarks/templates/bookmarks/head.html b/bookmarks/templates/bookmarks/head.html deleted file mode 100644 index 94beb5f..0000000 --- a/bookmarks/templates/bookmarks/head.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load static %} - - - - - - - - - - - - - - - {{ page_title|default:'Linkding' }} - {# Include specific theme variant based on user profile setting #} - {% if request.user_profile.theme == 'light' %} - - - {% elif request.user_profile.theme == 'dark' %} - - - {% else %} - {# Use auto theme as fallback #} - - - - - {% endif %} - {% if request.user_profile.custom_css %} - - {% endif %} - - {% if not request.global_settings.enable_link_prefetch %} - - {% endif %} - {% if rss_feed_url %} - - {% endif %} - - diff --git a/bookmarks/templates/bookmarks/index.html b/bookmarks/templates/bookmarks/index.html index 85ba762..1473e21 100644 --- a/bookmarks/templates/bookmarks/index.html +++ b/bookmarks/templates/bookmarks/index.html @@ -1,14 +1,10 @@ -{% extends "bookmarks/layout.html" %} +{% extends "shared/layout.html" %} {% load static %} {% load shared %} {% load bookmarks %} - {% block title %}Bookmarks - Linkding{% endblock %} - {% block content %} - - + {# Bookmark list #}
@@ -21,19 +17,15 @@
-
+ method="post" + autocomplete="off"> {% csrf_token %} {% include 'bookmarks/bulk_edit/bar.html' with disable_actions='bulk_unarchive' %} - -
- {% include 'bookmarks/bookmark_list.html' %} -
+
{% include 'bookmarks/bookmark_list.html' %}
- {# Filters #}
{% include 'bookmarks/bundle_section.html' %} @@ -41,12 +33,6 @@
{% endblock %} - {% block overlays %} - {# Bookmark details #} - - {% if details %} - {% include 'bookmarks/details/modal.html' %} - {% endif %} - -{% endblock %} \ No newline at end of file + {% include 'bookmarks/details/modal.html' %} +{% endblock %} diff --git a/bookmarks/templates/bookmarks/layout.html b/bookmarks/templates/bookmarks/layout.html deleted file mode 100644 index b1623af..0000000 --- a/bookmarks/templates/bookmarks/layout.html +++ /dev/null @@ -1,83 +0,0 @@ -{% load static %} - - -{# Use data attributes as storage for access in static scripts #} - -{% block head %}{% include 'bookmarks/head.html' %}{% endblock %} - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- {% if has_toasts %} -
-
- {% csrf_token %} - {% for toast in toast_messages %} -
- {{ toast.message }} - -
- {% endfor %} -
-
- {% endif %} -
- - - LINKDING - - -
-
-
- {% block content %} - {% endblock %} -
-
- {% block overlays %} - {% endblock %} -
- - diff --git a/bookmarks/templates/bookmarks/nav_menu.html b/bookmarks/templates/bookmarks/nav_menu.html deleted file mode 100644 index d929781..0000000 --- a/bookmarks/templates/bookmarks/nav_menu.html +++ /dev/null @@ -1,109 +0,0 @@ -{% load shared %} -{% htmlmin %} - {# Basic menu list #} -
- Add bookmark - - - - - - - - -
- {% csrf_token %} - -
-
- {# Menu drop-down for smaller devices #} -
- - - - - - - - - - -
-{% endhtmlmin %} diff --git a/bookmarks/templates/bookmarks/new.html b/bookmarks/templates/bookmarks/new.html index 07baeaf..7545420 100644 --- a/bookmarks/templates/bookmarks/new.html +++ b/bookmarks/templates/bookmarks/new.html @@ -1,11 +1,7 @@ -{% extends 'bookmarks/layout.html' %} - +{% extends 'shared/layout.html' %} {% block head %} - {% with page_title="New bookmark - Linkding" %} - {{ block.super }} - {% endwith %} + {% with page_title="New bookmark - Linkding" %}{{ block.super }}{% endwith %} {% endblock %} - {% block content %}
diff --git a/bookmarks/templates/bookmarks/read.html b/bookmarks/templates/bookmarks/read.html index 329dbbc..dd23b79 100644 --- a/bookmarks/templates/bookmarks/read.html +++ b/bookmarks/templates/bookmarks/read.html @@ -1,90 +1,106 @@ {% load static %} - - - Reader view - - {# Include specific theme variant based on user profile setting #} - {% if request.user_profile.theme == 'light' %} - - - {% elif request.user_profile.theme == 'dark' %} - - - {% else %} - {# Use auto theme as fallback #} - - - - - {% endif %} - {% if request.user_profile.custom_css %} - - {% endif %} - - - - - + - + content.replaceWith(container); + } + makeReadable(); + + diff --git a/bookmarks/templates/bookmarks/search.html b/bookmarks/templates/bookmarks/search.html index 776d167..350c6eb 100644 --- a/bookmarks/templates/bookmarks/search.html +++ b/bookmarks/templates/bookmarks/search.html @@ -1,27 +1,31 @@ {% load widget_tweaks %} -
{% endif %} {% if 'shared' in preferences_form.editable_fields %} -
+
{% endif %} {% if 'unread' in preferences_form.editable_fields %} -
+
- - {% for hidden_field in preferences_form.hidden_fields %} - {{ hidden_field }} - {% endfor %} + {% for hidden_field in preferences_form.hidden_fields %}{{ hidden_field }}{% endfor %}
diff --git a/bookmarks/templates/bookmarks/shared.html b/bookmarks/templates/bookmarks/shared.html index 120d8b8..c18a0f6 100644 --- a/bookmarks/templates/bookmarks/shared.html +++ b/bookmarks/templates/bookmarks/shared.html @@ -1,12 +1,10 @@ -{% extends "bookmarks/layout.html" %} +{% extends "shared/layout.html" %} {% load static %} {% load shared %} {% load bookmarks %} - {% block content %} - + class="bookmarks-page grid columns-md-1 {% if bookmark_list.collapse_side_panel %}collapse-side-panel{% endif %}"> {# Bookmark list #}
@@ -18,17 +16,14 @@
-
+ method="post" + autocomplete="off"> {% csrf_token %} -
- {% include 'bookmarks/bookmark_list.html' %} -
+
{% include 'bookmarks/bookmark_list.html' %}
- {# Filters #}
@@ -44,12 +39,6 @@
{% endblock %} - {% block overlays %} - {# Bookmark details #} - - {% if details %} - {% include 'bookmarks/details/modal.html' %} - {% endif %} - + {% include 'bookmarks/details/modal.html' %} {% endblock %} diff --git a/bookmarks/templates/bookmarks/tag_cloud.html b/bookmarks/templates/bookmarks/tag_cloud.html index 93687d4..6b9f22c 100644 --- a/bookmarks/templates/bookmarks/tag_cloud.html +++ b/bookmarks/templates/bookmarks/tag_cloud.html @@ -1,37 +1,33 @@ {% load shared %} {% htmlmin %} -
- {% if tag_cloud.has_selected_tags %} -

- {% for tag in tag_cloud.selected_tags %} - - -{{ tag.name }} - +

+ {% if tag_cloud.has_selected_tags %} +

+ {% for tag in tag_cloud.selected_tags %} + + -{{ tag.name }} + + {% endfor %} +

+ {% endif %} +
+ {% for group in tag_cloud.groups %} +

+ {% for tag in group.tags %} + {# Highlight first char of first tag in group if grouping is enabled #} + {% if group.highlight_first_char and forloop.counter == 1 %} + + {{ tag.name|first_char }}{{ tag.name|remaining_chars:1 }} + + {% else %} + {# Render tags normally #} + + {{ tag.name }} + + {% endif %} {% endfor %}

- {% endif %} -
- {% for group in tag_cloud.groups %} -

- {% for tag in group.tags %} - {# Highlight first char of first tag in group if grouping is enabled #} - {% if group.highlight_first_char and forloop.counter == 1 %} - - {{ tag.name|first_char }}{{ tag.name|remaining_chars:1 }} - - {% else %} - {# Render tags normally #} - - {{ tag.name }} - - {% endif %} - {% endfor %} -

- {% endfor %} -
+ {% endfor %}
+
{% endhtmlmin %} diff --git a/bookmarks/templates/bookmarks/tag_section.html b/bookmarks/templates/bookmarks/tag_section.html index bbc6bc7..a9ff889 100644 --- a/bookmarks/templates/bookmarks/tag_section.html +++ b/bookmarks/templates/bookmarks/tag_section.html @@ -4,12 +4,19 @@ {% if user.is_authenticated %}
-
- {% include 'bookmarks/tag_cloud.html' %} -
+
{% include 'bookmarks/tag_cloud.html' %}
diff --git a/bookmarks/templates/bookmarks/updates/bookmark_view_stream.html b/bookmarks/templates/bookmarks/updates/bookmark_view_stream.html deleted file mode 100644 index b009915..0000000 --- a/bookmarks/templates/bookmarks/updates/bookmark_view_stream.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/bookmarks/templates/bookmarks/updates/details-modal-frame.html b/bookmarks/templates/bookmarks/updates/details-modal-frame.html deleted file mode 100644 index 80c51c4..0000000 --- a/bookmarks/templates/bookmarks/updates/details-modal-frame.html +++ /dev/null @@ -1,10 +0,0 @@ - -{% include 'bookmarks/head.html' %} - - - {% if details %} - {% include 'bookmarks/details/modal.html' %} - {% endif %} - - - diff --git a/bookmarks/templates/bookmarks/user_select.html b/bookmarks/templates/bookmarks/user_select.html index 5b2d67e..a535f99 100644 --- a/bookmarks/templates/bookmarks/user_select.html +++ b/bookmarks/templates/bookmarks/user_select.html @@ -1,10 +1,7 @@ {% load widget_tweaks %} -
- {% for hidden_field in form.hidden_fields %} - {{ hidden_field }} - {% endfor %} + {% for hidden_field in form.hidden_fields %}{{ hidden_field }}{% endfor %}
{% render_field form.user class+="form-select" data-submit-on-change="" %} @@ -14,4 +11,4 @@
-
\ No newline at end of file + diff --git a/bookmarks/templates/bundles/edit.html b/bookmarks/templates/bundles/edit.html index a67f855..c4b0df8 100644 --- a/bookmarks/templates/bundles/edit.html +++ b/bookmarks/templates/bundles/edit.html @@ -1,32 +1,27 @@ -{% extends 'bookmarks/layout.html' %} +{% extends 'shared/layout.html' %} {% load widget_tweaks %} - {% block head %} - {% with page_title="Edit bundle - Linkding" %} - {{ block.super }} - {% endwith %} + {% with page_title="Edit bundle - Linkding" %}{{ block.super }}{% endwith %} {% endblock %} - {% block content %}

Edit bundle

- {% include 'shared/messages.html' %} - -
+ {% csrf_token %} {% include 'bundles/form.html' %}
-
diff --git a/bookmarks/templates/bundles/form.html b/bookmarks/templates/bundles/form.html index 67ecec7..b081817 100644 --- a/bookmarks/templates/bundles/form.html +++ b/bookmarks/templates/bundles/form.html @@ -1,96 +1,83 @@ {% load widget_tweaks %} -
{{ form.name|add_class:"form-input"|attr:"autocomplete:off"|attr:"placeholder: " }} - {% if form.name.errors %} -
- {{ form.name.errors }} -
- {% endif %} + {% if form.name.errors %}
{{ form.name.errors }}
{% endif %}
-
{{ form.search|add_class:"form-input"|attr:"autocomplete:off"|attr:"placeholder: " }} - {% if form.search.errors %} -
- {{ form.search.errors }} -
- {% endif %} -
- All of these search terms must be present in a bookmark to match. -
+ {% if form.search.errors %}
{{ form.search.errors }}
{% endif %} +
All of these search terms must be present in a bookmark to match.
-
- -
- At least one of these tags must be present in a bookmark to match. -
+
At least one of these tags must be present in a bookmark to match.
-
- -
- All of these tags must be present in a bookmark to match. -
+
All of these tags must be present in a bookmark to match.
-
- -
- None of these tags must be present in a bookmark to match. -
+
None of these tags must be present in a bookmark to match.
- - diff --git a/bookmarks/templates/bundles/index.html b/bookmarks/templates/bundles/index.html index 21ebb0d..860a60c 100644 --- a/bookmarks/templates/bundles/index.html +++ b/bookmarks/templates/bundles/index.html @@ -1,61 +1,65 @@ -{% extends "bookmarks/layout.html" %} - +{% extends "shared/layout.html" %} {% block head %} - {% with page_title="Bundles - Linkding" %} - {{ block.super }} - {% endwith %} + {% with page_title="Bundles - Linkding" %}{{ block.super }}{% endwith %} {% endblock %} - {% block content %}

Bundles

Add bundle
- {% include 'shared/messages.html' %} - {% if bundles %}
{% csrf_token %} - - - - + + + + - {% for bundle in bundles %} - - - - - {% endfor %} + {% for bundle in bundles %} + + + + + {% endfor %}
Name - Actions -
Name + Actions +
-
- - - - - - - - - - {{ bundle.name }} -
-
- Edit - -
+
+ + + + + + + + + + {{ bundle.name }} +
+
+ Edit + +
-
@@ -66,7 +70,6 @@
{% endif %} - - {% endblock %} diff --git a/bookmarks/templates/settings/integrations.html b/bookmarks/templates/settings/integrations.html index ed392df..43507b0 100644 --- a/bookmarks/templates/settings/integrations.html +++ b/bookmarks/templates/settings/integrations.html @@ -1,33 +1,40 @@ -{% extends "bookmarks/layout.html" %} - +{% extends "shared/layout.html" %} {% block head %} - {% with page_title="Integrations - Linkding" %} - {{ block.super }} - {% endwith %} + {% with page_title="Integrations - Linkding" %}{{ block.super }}{% endwith %} {% endblock %} - {% block content %}

Integrations

-

Browser Extension

-

The browser extension allows you to quickly add new bookmarks without leaving the page that you are on. The - extension is available in the official extension stores for:

+

+ The browser extension allows you to quickly add new bookmarks without leaving the page that you are on. The + extension is available in the official extension stores for: +

-

The extension is open source - as well, which enables you to build and manually load it into any browser that supports Chrome extensions.

+

+ The extension is open source + as well, which enables you to build and manually load it into any browser that supports Chrome extensions. +

Bookmarklet

-

The bookmarklet is an alternative, cross-browser way to quickly add new bookmarks without opening the linkding - application first. Here's how it works:

+

+ The bookmarklet is an alternative, cross-browser way to quickly add new bookmarks without opening the linkding + application first. Here's how it works: +

    -
  • Choose your preferred method for detecting website titles and descriptions below (Help) +
  • + Choose your preferred method for detecting website titles and descriptions below (Help)
  • Drag the bookmarklet below into your browser's bookmark bar / toolbar
  • Open the website that you want to bookmark
  • @@ -35,86 +42,94 @@
  • linkding opens in a new window or tab and allows you to add a bookmark for the site
  • After saving the bookmark, the linkding window closes, and you are back on your website
- -
+

Choose your preferred bookmarklet:

-
- -
-

REST API

- - {% if api_success_message %} -
- {{ api_success_message }} +
+

REST API

+ {% if api_success_message %}
{{ api_success_message }}
{% endif %} + {% if api_token_name and api_token_key %} +
+

+ Copy this token now, it will only be shown once: +

+ +
+ +
- {% endif %} - - {% if api_token_name and api_token_key %} -
-

Copy this token now, it will only be shown once:

- -
- - -
-
- {% endif %} - -

- API tokens can be used to authenticate 3rd-party applications against the REST API. Please treat - tokens as you would any other credential. Any party with access to a token can access and manage all - your bookmarks. -

- - {% if api_tokens %} -
- - + + {% endif %} +

+ API tokens can be used to authenticate 3rd-party applications against the REST API. Please treat + tokens as you would any other credential. Any party with access to a token can access and manage all + your bookmarks. +

+ {% if api_tokens %} + +
+ @@ -122,87 +137,96 @@ Actions - - + + {% for token in api_tokens %} {% endfor %} - -
Name Created
{{ token.name }} {{ token.created|date:"M d, Y H:i" }} {% csrf_token %} - +
-
- {% endif %} - - Create API token -
- - - - + + + + {% endif %} + Create API token +
+ +
-

RSS Feeds

The following URLs provide RSS feeds for your bookmarks:

-

- All URLs support the following URL parameters: -

+

All URLs support the following URL parameters:

    -
  • A limit parameter for specifying the maximum number of bookmarks to include in the feed. By +
  • + A limit parameter for specifying the maximum number of bookmarks to include in the feed. By default, only the latest 100 matching bookmarks are included.
  • -
  • A q URL parameter for specifying a search query. You can get an example by doing a search in +
  • + A q URL parameter for specifying a search query. You can get an example by doing a search in the bookmarks view and then copying the parameter from the URL.
  • -
  • An unread parameter for filtering for unread or read bookmarks. Use yes for unread +
  • + An unread parameter for filtering for unread or read bookmarks. Use yes for unread bookmarks and no for read bookmarks.
  • -
  • A shared parameter for filtering for shared or unshared bookmarks. Use yes for +
  • + A shared parameter for filtering for shared or unshared bookmarks. Use yes for shared bookmarks and no for unshared bookmarks.

Please note that these URLs include an authentication token that should be treated like any other - credential. + credential. Any party with access to these URLs can read all your bookmarks. - If you think that a URL was compromised you can delete the feed token for your user in the admin panel. + If you think that a URL was compromised you can delete the feed token for your user in the admin panel. After deleting the feed token, new URLs will be generated when you reload this settings page.

diff --git a/bookmarks/templates/shared/error_list.html b/bookmarks/templates/shared/error_list.html index 13e75ac..0c58c25 100644 --- a/bookmarks/templates/shared/error_list.html +++ b/bookmarks/templates/shared/error_list.html @@ -1,6 +1,10 @@ {% load i18n %} - {# Force rendering validation errors in English language to align with the rest of the app #} {% language 'en-us' %} -{% if errors %}
    {% for error in errors %}
  • {{ error }}
  • {% endfor %}
{% endif %} -{% endlanguage %} \ No newline at end of file + {% if errors %} +
    + {% for error in errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %} +{% endlanguage %} diff --git a/bookmarks/templates/shared/head.html b/bookmarks/templates/shared/head.html new file mode 100644 index 0000000..75c9204 --- /dev/null +++ b/bookmarks/templates/shared/head.html @@ -0,0 +1,64 @@ +{% load static %} + + + + + + + + + + + + + + {{ page_title|default:'Linkding' }} + {# Include specific theme variant based on user profile setting #} + {% if request.user_profile.theme == 'light' %} + + + {% elif request.user_profile.theme == 'dark' %} + + + {% else %} + {# Use auto theme as fallback #} + + + + + {% endif %} + {% if request.user_profile.custom_css %} + + {% endif %} + + {% if not request.global_settings.enable_link_prefetch %}{% endif %} + {% if rss_feed_url %}{% endif %} + + diff --git a/bookmarks/templates/shared/layout.html b/bookmarks/templates/shared/layout.html new file mode 100644 index 0000000..d7501af --- /dev/null +++ b/bookmarks/templates/shared/layout.html @@ -0,0 +1,81 @@ +{% load static %} + +{# Use data attributes as storage for access in static scripts #} + + {% block head %} + {% include 'shared/head.html' %} + {% endblock %} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ {% if has_toasts %} +
+
+ {% csrf_token %} + {% for toast in toast_messages %} +
+ {{ toast.message }} + +
+ {% endfor %} +
+
+ {% endif %} +
+ + + LINKDING + + +
+
+
+ {% block content %}{% endblock %} +
+
+ {% block overlays %}{% endblock %} +
+ + diff --git a/bookmarks/templates/shared/messages.html b/bookmarks/templates/shared/messages.html index fce07fc..2b44713 100644 --- a/bookmarks/templates/shared/messages.html +++ b/bookmarks/templates/shared/messages.html @@ -1,9 +1,5 @@ {% if messages %}
- {% for message in messages %} - - {% endfor %} + {% for message in messages %}{% endfor %}
{% endif %} diff --git a/bookmarks/templates/shared/modal_header.html b/bookmarks/templates/shared/modal_header.html index 9feb6fc..d340655 100644 --- a/bookmarks/templates/shared/modal_header.html +++ b/bookmarks/templates/shared/modal_header.html @@ -1,8 +1,18 @@ +{# Menu drop-down for smaller devices #} +
+ + + + + + + + + + +
+{% endhtmlmin %} diff --git a/bookmarks/templates/bookmarks/pagination.html b/bookmarks/templates/shared/pagination.html similarity index 99% rename from bookmarks/templates/bookmarks/pagination.html rename to bookmarks/templates/shared/pagination.html index 6af81cb..b75ddf3 100644 --- a/bookmarks/templates/bookmarks/pagination.html +++ b/bookmarks/templates/shared/pagination.html @@ -1,5 +1,4 @@ {% load shared %} -
    {% if prev_link %}
  • @@ -10,7 +9,6 @@ Previous
  • {% endif %} - {% for page_link in page_links %} {% if page_link %}
  • @@ -22,7 +20,6 @@
  • {% endif %} {% endfor %} - {% if next_link %}
  • Next @@ -32,4 +29,4 @@ Next
  • {% endif %} -
\ No newline at end of file + diff --git a/bookmarks/templates/shared/top_frame.html b/bookmarks/templates/shared/top_frame.html new file mode 100644 index 0000000..5c18466 --- /dev/null +++ b/bookmarks/templates/shared/top_frame.html @@ -0,0 +1,6 @@ + + {% include 'shared/head.html' %} + + + + diff --git a/bookmarks/templates/tags/edit.html b/bookmarks/templates/tags/edit.html index 0d7a04f..419fea1 100644 --- a/bookmarks/templates/tags/edit.html +++ b/bookmarks/templates/tags/edit.html @@ -1,19 +1,21 @@ -
- {% csrf_token %} - - -