Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 31 additions & 48 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
select,
textarea {
appearance: none;
padding-inline: 0.75rem; /* px-3 */
padding-block: 0.5rem; /* py-2 */
padding-inline: 0.75rem;
padding-block: 0.5rem;
font: inherit;
line-height: 24px;
border: 1px solid;
Expand Down Expand Up @@ -128,49 +128,31 @@
color: ButtonText;
background-color: ButtonFace;
}
}

/* Utilities */
/* Utilities */

.flex {
display: flex;
align-items: center;
gap: 0.5rem;
}
.flex-1 {
flex: 1 1 0%;
}
.flex-initial {
flex: 0 1 auto;
}
.mt-2 {
margin-top: 0.5rem;
.flex {
display: flex;
align-items: center;
gap: 0.5rem;
}
.flex-initial {
flex: 0 1 auto;
}
.flex-1 {
flex: 1 1 0%;
}
.mt-2 {
margin-top: 0.5rem;
}
}
</style>
<!-- https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ -->
<script>
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
let vh = window.innerHeight * 0.01;
// Then we set the value in the --vh custom property to the root of the document
document.documentElement.style.setProperty("--vh", `${vh}px`);
window.addEventListener("resize", () => {
// We execute the same script as before
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty("--vh", `${vh}px`);
});
</script>
</head>

<body>
<div
id="uv"
class="uv w-full md:w-[90vw] lg:w-[65vw] md:mx-auto md:h-[80vh] md:mt-4"
></div>

<div
id="uv-controls"
class="hidden md:!block md:w-[90vw] lg:w-[65vw] mx-auto my-8"
>
<div id="uv" class="uv"></div>

<div id="uv-controls">
<div>
<ul id="annotation-list"></ul>
</div>
Expand All @@ -186,7 +168,7 @@ <h2 class="controls-title">Manifest Id</h2>
<div class="flex">
<select
id="iiifManifestIdSelect"
class="py-2 px-3 mr-2 flex-1"
class="flex-1"
></select>
<input id="iiifManifestId" type="text" value="" class="flex-1" />
</div>
Expand All @@ -207,7 +189,7 @@ <h2 class="controls-title">Target</h2>
<input id="iiif_target" type="text" value="" class="flex-1" />
<button
id="iiif_setTargetButton"
class="controls-button flex-initial ml-2"
class="controls-button"
>
Set Target
</button>
Expand All @@ -225,7 +207,7 @@ <h2 class="controls-title">Rotation</h2>
<input id="iiif_rotation" type="text" value="" class="flex-1" />
<button
id="iiif_setRotationButton"
class="controls-button flex-initial ml-2"
class="controls-button"
>
Set Rotation
</button>
Expand All @@ -234,7 +216,8 @@ <h2 class="controls-title">Rotation</h2>

<div class="controls-group">
<h2 class="controls-title">Annotations</h2>
<textarea id="iiif_annotations" rows="5" class="w-full"></textarea>
<textarea id="iiif_annotations" rows="5"></textarea>

<div class="mt-2">
<button id="iiif_setAnnotationsButton" class="controls-button">
Set Annotations
Expand All @@ -250,15 +233,15 @@ <h2 class="controls-title">Annotations</h2>
<div class="controls-group">
<h2 class="controls-title">Video Id</h2>
<div class="flex">
<select id="youTubeVideoIdSelect" class="py-2 px-3 flex-1"></select>
<select id="youTubeVideoIdSelect" class="flex-1"></select>
<input
id="youTubeVideoId"
type="text"
value=""
class="flex-1 ml-2"
class="flex-1"
/>
</div>
<div class="mt-2">
<div>
<button id="setYouTubeVideoIdButton" class="controls-button">
Set YouTube Video Id
</button>
Expand All @@ -281,7 +264,7 @@ <h2 class="controls-title">Current Time</h2>
/>
<button
id="youtube_setCurrentTimeButton"
class="controls-button flex-initial ml-2"
class="controls-button"
>
Set Current Time
</button>
Expand All @@ -301,11 +284,11 @@ <h2 class="controls-title">Duration</h2>
id="youtube_durationEnd"
type="number"
value="0"
class="flex-1 ml-2"
class="flex-1"
/>
<button
id="youtube_setDurationButton"
class="controls-button flex-initial ml-2"
class="controls-button"
>
Set Duration
</button>
Expand Down