adds archive.org images

This commit is contained in:
buttle 2021-04-17 19:39:48 +02:00
parent 2cb3287c85
commit ded1d57d16
6 changed files with 19 additions and 30 deletions

View File

@ -12,6 +12,7 @@ class Module extends AbstractModule
const MEDIA_TYPE = [ const MEDIA_TYPE = [
'video' => 'Video', 'video' => 'Video',
'audio' => 'Audio', 'audio' => 'Audio',
'image' => 'Image',
]; ];
const RATIOS = [ const RATIOS = [

View File

@ -1,6 +1,7 @@
# Archive.org media for Omeka S # Archive.org media for Omeka S
[Archive.org media] is a module for [Omeka S] that integrates [Archive.org] media. [Archive.org media] is a module for [Omeka S] that integrates [Archive.org]
video and audio media.
## Install ## Install

View File

@ -1,6 +1,6 @@
/* Panaorama viewer custom */ /* Panaorama viewer custom */
@media screen { @media screen {
.panorama-viewer { .archive_org {
/* width: 600px; */ /* width: 600px; */
/* height: 400px; */ /* height: 400px; */
} }

View File

@ -31,7 +31,7 @@ class ArchiveOrgBlockForm extends Form
'name' => 'o:block[__blockIndex__][o:data][width]', 'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Number::class, 'type' => Element\Number::class,
'options' => [ 'options' => [
'label' => 'Video width in pixels', 'label' => 'Width in pixels',
], ],
'attributes' => [ 'attributes' => [
'min' => '100', 'min' => '100',
@ -42,7 +42,7 @@ class ArchiveOrgBlockForm extends Form
'name' => 'o:block[__blockIndex__][o:data][ratio]', 'name' => 'o:block[__blockIndex__][o:data][ratio]',
'type' => Element\Select::class, 'type' => Element\Select::class,
'options' => [ 'options' => [
'label' => 'Video ratio', 'label' => 'Ratio',
'value_options' => Module::RATIOS, 'value_options' => Module::RATIOS,
], ],
]); ]);

View File

@ -56,7 +56,8 @@ class ArchiveOrg extends AbstractBlockLayout
$html = ''; $html = '';
$html .= $view->blockAttachmentsForm($block); $html .= $view->blockAttachmentsForm($block);
$html .= '<a href="#" class="collapse" aria-label="collapse"><h4>' . $view->translate('Options'). '</h4></a>'; $html .= '<a href="#" class="collapse" aria-label="collapse"><h4>';
$html .= $view->translate('Options'). '</h4></a>';
$html .= '<div class="collapsible" style="padding-top:6px;">'; $html .= '<div class="collapsible" style="padding-top:6px;">';
$html .= $view->formCollection($form); $html .= $view->formCollection($form);
$html .= '</div>'; $html .= '</div>';

View File

@ -1,43 +1,29 @@
<div class="pannemmul-wrap" style="position:relative;"> <div class="archive_org-wrap" style="position:relative;">
<?php <?php
if ($title !== false && $title !== "") { if ($title !== false && $title !== "") {
$title = sprintf('<p id="panorama-viewer-title">%s</p>', $title); $title = sprintf('<p id="achive_org_media-title">%s</p>', $title);
} else { } else {
$title = false; $title = false;
} }
?> ?>
<?php if ($media_type != "audio") { ?>
<style> <style>
#<?= $id ?> { #<?= $id ?> {
height: <?= $height ?>px; height: <?= $height ?>px;
width: <?= $width ?>px; width: <?= $width ?>px;
} }
</style> </style>
<div class="pannellum-wrap">
<?php if ($media_type == "video") { ?>
<iframe
id="<?= $id ?>"
src="<?= $url ?>"
frameborder="0"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allowfullscreen >;
</iframe>
<?php } ?> <?php } ?>
<?php if ($media_type == "audio") { ?>
<iframe <iframe
src="<?= $url ?>" id="<?= $id ?>"
frameborder="0" src="<?= $url ?>"
webkitallowfullscreen="true" frameborder="0"
mozallowfullscreen="true" webkitallowfullscreen="true"
allowfullscreen >; mozallowfullscreen="true"
</iframe> allowfullscreen >
</iframe>
<?php } ?>
</div> </div>