From 991fd7a6d67ee017c57beaaa21fc31c4bee7944d Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 7 Oct 2023 06:48:07 +0800 Subject: feat(version): versions --- src/templates/partials/actions.html | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/templates/partials/actions.html (limited to 'src/templates/partials/actions.html') diff --git a/src/templates/partials/actions.html b/src/templates/partials/actions.html new file mode 100644 index 00000000..75fcb8eb --- /dev/null +++ b/src/templates/partials/actions.html @@ -0,0 +1,54 @@ + + + +{% if page.edit_url %} + + + {% if "content.action.edit" in features %} + + {% set icon = config.theme.icon.edit or "material/file-edit-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} + + + {% if "content.action.view" in features %} + {% if "/blob/" in page.edit_url %} + {% set part = "blob" %} + {% else %} + {% set part = "edit" %} + {% endif %} + + {% set icon = config.theme.icon.view or "material/file-eye-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} +{% endif %} -- cgit v1.2.3-70-g09d2