-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from chnm/iiif-integration
Integration of IIIF and layouts for toponyms and front-end
- Loading branch information
Showing
13 changed files
with
296 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
manuscript/migrations/0075_remove_location_related_folio.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 5.0.2 on 2024-06-07 16:15 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("manuscript", "0074_alter_stanzavariant_stanza"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="location", | ||
name="related_folio", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %}Manuscript - La Sfera{% endblock title %} | ||
|
||
{% block content %} | ||
|
||
<div class="flex justify-center mx-auto container"> | ||
<section id="manuscript" class="flex flex-col md:flex-row w-full p-4 my-10"> | ||
<div class="w-full md:w-2/5 p-2"> | ||
<h3 class="text-2xl pb-8" id="text"> | ||
Manuscript Metadata | ||
</h3> | ||
|
||
<p><strong>Siglum:</strong> {{ manuscript.siglum }}</p> | ||
<p><strong>Library:</strong> {{ manuscript.library }}</p> | ||
<p><strong>Shelfmark:</strong> {{ manuscript.shelfmark }}</p> | ||
|
||
<h4 class="text-xl pt-8">Related Toponyms</h4> | ||
{% for folio in folios %} | ||
<p class="pb-1">Folio {{ folio.folio_number }}: {% for location in folio.locations_mentioned.all %}<a href="#" class="underline hover:no-underline">{{ location.country }}</a>{% empty %}No related toponyms.{% endfor %}<br></p> | ||
{% empty %} | ||
<p>No related folios.</p> | ||
{% endfor %} | ||
|
||
</div> | ||
|
||
<div class="w-full md:w-3/5 p-2"> | ||
{% if manuscript.iiif_url %} | ||
<div id="iiif-viewer" style="width: 100%; height: 600px;"></div> | ||
{% else %} | ||
<h3 class="text-lg">No IIIF manifest provided.</h3> | ||
{% endif %} | ||
</div> | ||
</section> | ||
|
||
</div> | ||
|
||
{% endblock content %} | ||
|
||
{% block scripts %} | ||
<script src="{% static 'js/stanza.js' %}"></script> | ||
<script src="https://unpkg.com/mirador@latest/dist/mirador.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/4.1.1/openseadragon.min.js" integrity="sha512-LbaoUnRCul2C+I4cdS/EMnMbynmZMU58AApBnZkhMzp/r8rOS7htjTsox7g6rf5ZXkSx56F5dDYmhLwqV1Zt4A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script> | ||
const iiifUrl = "{{ iiif_url }}"; | ||
const viewer = OpenSeadragon({ | ||
id: "iiif-viewer", | ||
preserveViewport: true, | ||
visibilityRatio: 1, | ||
minZoomLevel: 1, | ||
defaultZoomLevel: 1, | ||
sequenceMode: true, | ||
tileSources: [{ | ||
"@context": "http://iiif.io/api/image/2/context.json", | ||
"@id": iiifUrl, | ||
"height": 7200, | ||
"width": 5233, | ||
"profile": [ "http://iiif.io/api/image/2/level2.json" ], | ||
"protocol": "http://iiif.io/api/image", | ||
"tiles": [{ | ||
"scaleFactors": [ 1, 2, 4, 8, 16, 32 ], | ||
"width": 1024 | ||
}] | ||
}] | ||
}); | ||
</script> | ||
{% endblock scripts %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block content %} | ||
<div class="flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"> | ||
<div class="max-w-md w-full space-y-8"> | ||
<div> | ||
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900"> | ||
Log in to La Sfera | ||
</h2> | ||
|
||
<p>Only verified users are allowed to log into the content management system. If you believe you should have access please contact the project directors.</p> | ||
|
||
</div> | ||
<form method="post"> | ||
{% csrf_token %} | ||
<div class="space-y-4"> | ||
<div> | ||
<label for="username" class="block text-sm font-medium text-gray-700">Username</label> | ||
<input type="text" name="username" id="username" class="w-full px-3 py-2 border rounded-md focus:outline-none focus:ring focus:border-blue-300"> | ||
</div> | ||
<div> | ||
<label for="password" class="block text-sm font-medium text-gray-700">Password</label> | ||
<input type="password" name="password" id="password" class="w-full px-3 py-2 border rounded-md focus:outline-none focus:ring focus:border-blue-300"> | ||
</div> | ||
<div> | ||
<button type="submit" class="w-full px-4 py-2 font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300">Login</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.