From 08fe9a5b2ed6f33492fcd80a59c4ced26f93f650 Mon Sep 17 00:00:00 2001 From: Jason Heppler Date: Thu, 1 Aug 2024 14:51:17 -0500 Subject: [PATCH] feat: Add loading spinner to OpenSeaDragon viewer This commit adds a Tailwind-based SVG loading spinner to the OpenSeaDragon viewer. --- static/css/custom.css | 14 ++++++++++++ templates/manuscript_page.html | 41 +++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/static/css/custom.css b/static/css/custom.css index 644e7a4..34bf16e 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -24,3 +24,17 @@ .active { font-weight: bold; } + +.loader { + border-top-color: #3498db; + animation: spin 1s ease-in-out infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/templates/manuscript_page.html b/templates/manuscript_page.html index 25c4214..21ff04a 100644 --- a/templates/manuscript_page.html +++ b/templates/manuscript_page.html @@ -13,6 +13,28 @@
+
+ + + + +
{% if previous_page %} @@ -81,8 +108,10 @@ {% if manuscript_page.attached_images.all.1 %}
@@ -152,7 +181,8 @@

Document Deta
  • Page: {{ manuscript_page.page_range }}
  • Page tagged with: {% for tag in manuscript_page.tags.all %} - {{ tag.name }} + {{ tag.name }} {% endfor %}
  • @@ -169,9 +199,8 @@

    Document Deta

    Cite this page

    The Denig Manuscript, Winterthur Museum, Garden & Library and the Roy Rosenzweig Center for - History and New Media (2024--): p. {{ manuscript_page.page_range }}. https://denig.rrchnm.org/manuscript/{{manuscript_page.id}} + History and New Media (2024--): p. {{ manuscript_page.page_range }}. https://denig.rrchnm.org/manuscript/{{manuscript_page.id}}