diff --git a/previewers/AudioPreview.html b/previewers/AudioPreview.html new file mode 100644 index 0000000..409ae03 --- /dev/null +++ b/previewers/AudioPreview.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + +

SSHOC Audio Preview +

+
+
+
+
+ + + diff --git a/previewers/AudioPreviewOriginal.html b/previewers/AudioPreviewOriginal.html new file mode 100644 index 0000000..036853a --- /dev/null +++ b/previewers/AudioPreviewOriginal.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + +

Audio Preview +

+
+
+
+
+ + + diff --git a/previewers/HtmlPreview.html b/previewers/HtmlPreview.html new file mode 100644 index 0000000..b186495 --- /dev/null +++ b/previewers/HtmlPreview.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + +

SSHOC Html Preview +

+
+
+
+
+ + diff --git a/previewers/HtmlPreviewOriginal.html b/previewers/HtmlPreviewOriginal.html new file mode 100644 index 0000000..5ed68f2 --- /dev/null +++ b/previewers/HtmlPreviewOriginal.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + +

Html Preview +

+
+
+
+
+ + diff --git a/previewers/HypothesisPreview.html b/previewers/HypothesisPreview.html new file mode 100644 index 0000000..e63eca1 --- /dev/null +++ b/previewers/HypothesisPreview.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + +

+ATIAnnotations +

+
+
+
+ + diff --git a/previewers/ImagePreview.html b/previewers/ImagePreview.html new file mode 100644 index 0000000..33ffbd8 --- /dev/null +++ b/previewers/ImagePreview.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + +

Image Preview +

+
+
+
+
+ + diff --git a/previewers/PDFPreview.html b/previewers/PDFPreview.html new file mode 100644 index 0000000..7842c73 --- /dev/null +++ b/previewers/PDFPreview.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + +

SSHOC PDF Preview +

+
+
+
+
+ + +     + Page: / +
+
+ +
+
+ + diff --git a/previewers/PDFPreviewOriginal.html b/previewers/PDFPreviewOriginal.html new file mode 100644 index 0000000..d2b4e5f --- /dev/null +++ b/previewers/PDFPreviewOriginal.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + +

PDF Preview +

+
+
+
+
+ + +     + Page: / +
+
+ +
+
+ + diff --git a/previewers/SendPDF.html b/previewers/SendPDF.html new file mode 100644 index 0000000..f7e31cb --- /dev/null +++ b/previewers/SendPDF.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/previewers/SendPDF_original.html b/previewers/SendPDF_original.html new file mode 100644 index 0000000..13fb7b7 --- /dev/null +++ b/previewers/SendPDF_original.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/previewers/SendText.html b/previewers/SendText.html new file mode 100644 index 0000000..2468d2d --- /dev/null +++ b/previewers/SendText.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + diff --git a/previewers/SpreadsheetPreview.html b/previewers/SpreadsheetPreview.html new file mode 100644 index 0000000..0ceb903 --- /dev/null +++ b/previewers/SpreadsheetPreview.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + +

SSHOC Spreadsheet Viewer +

+
+
+
+
+
+
+ + diff --git a/previewers/SpreadsheetPreviewOriginal.html b/previewers/SpreadsheetPreviewOriginal.html new file mode 100644 index 0000000..492d286 --- /dev/null +++ b/previewers/SpreadsheetPreviewOriginal.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + +

Spreadsheet Viewer +

+
+
+
+
+
+
+ + diff --git a/previewers/TextPreview.html b/previewers/TextPreview.html new file mode 100644 index 0000000..49513f4 --- /dev/null +++ b/previewers/TextPreview.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + +

SSHOC Text Preview +

+
+
+
+
+ + diff --git a/previewers/TextPreview2original.html b/previewers/TextPreview2original.html new file mode 100644 index 0000000..bf7ac9b --- /dev/null +++ b/previewers/TextPreview2original.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + +

Text Preview +

+
+
+
+
+ + diff --git a/previewers/VideoPreview.html b/previewers/VideoPreview.html new file mode 100644 index 0000000..d3d93ec --- /dev/null +++ b/previewers/VideoPreview.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + +

Video Preview +

+
+
+
+
+ + diff --git a/previewers/css/lds-spinner.css b/previewers/css/lds-spinner.css new file mode 100644 index 0000000..0e8d283 --- /dev/null +++ b/previewers/css/lds-spinner.css @@ -0,0 +1,76 @@ +.lds-spinner { + color: official; + position: relative; + margin: 20% 10% 10% 30%; +} +.lds-spinner div { + transform-origin: 128px 128px; + animation: lds-spinner 1.2s linear infinite; +} +.lds-spinner div:after { + content: " "; + display: block; + position: absolute; + top: 3px; + left: 122px; + width: 10px; + height: 64px; + border-radius: 20%; + background: #999; +} +.lds-spinner div:nth-child(1) { + transform: rotate(0deg); + animation-delay: -1.1s; +} +.lds-spinner div:nth-child(2) { + transform: rotate(30deg); + animation-delay: -1s; +} +.lds-spinner div:nth-child(3) { + transform: rotate(60deg); + animation-delay: -0.9s; +} +.lds-spinner div:nth-child(4) { + transform: rotate(90deg); + animation-delay: -0.8s; +} +.lds-spinner div:nth-child(5) { + transform: rotate(120deg); + animation-delay: -0.7s; +} +.lds-spinner div:nth-child(6) { + transform: rotate(150deg); + animation-delay: -0.6s; +} +.lds-spinner div:nth-child(7) { + transform: rotate(180deg); + animation-delay: -0.5s; +} +.lds-spinner div:nth-child(8) { + transform: rotate(210deg); + animation-delay: -0.4s; +} +.lds-spinner div:nth-child(9) { + transform: rotate(240deg); + animation-delay: -0.3s; +} +.lds-spinner div:nth-child(10) { + transform: rotate(270deg); + animation-delay: -0.2s; +} +.lds-spinner div:nth-child(11) { + transform: rotate(300deg); + animation-delay: -0.1s; +} +.lds-spinner div:nth-child(12) { + transform: rotate(330deg); + animation-delay: 0s; +} +@keyframes lds-spinner { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} diff --git a/previewers/css/preview.css b/previewers/css/preview.css new file mode 100644 index 0000000..a20fe74 --- /dev/null +++ b/previewers/css/preview.css @@ -0,0 +1,135 @@ +.page-title { + display: inline-block; + width: 58%; + text-align:center; +} + +.page-title a { + color: #56B7CB; +} + +.preview-header { + font-size:14px; + font-family: sans-serif; + color: darkslategray; + overflow-wrap: break-word; + margin-bottom: 10px; + background: #ECF6FB; + border-color: #9acfea; + border-style: solid; + border-width:1px; + padding: 15px 15px 5px 15px; +} +.preview-header div { + margin: 10px 5px 5px 0px; +} +.preview-header #filename { +font-size: 16px; +} + +.preview-header #dataset { +font-style: italic; +} + +.preview-note { + float:right; + font-size: 12px; + padding-top:20px; +} + +.preview-container { +margin-left: 40px; +} + +.preview { + margin: 0 auto; + padding: 10px 10px 5px 10px; +} + +.preview audio { + margin:20px auto; + display: table; +} + +.preview video { + margin:20px auto; + min-width:600px; + display: table; +} + +#logo { + display: inline-block; + margin-left: 40px; + width: 240px; + min-height:140px; +} + +#footer { + font-size: x-small; + float: right; +} +} + +.annotation-note { + float:right; + font-size: 12px; + padding-top:20px; +} +.annotation-card { + font-size: 13px; + line-height: 15px; + font-weight: 400; + border: 1px solid #ececec; + list-style: none; + padding: 15px; + margin-bottom: 10px; + box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + background: #fff; + overflow-wrap: break-word; +} +.annotation-card__text { + overflow-wrap: break-word; +} +.annotation-card__text img { +max-width:100%; +} + +.annotation-card__quote { + padding: 0 10px; + overflow-wrap: break-word; + color: #a6a6a6; + font-family: sans-serif; + font-size: 12px; + font-style: italic; + letter-spacing: .1px; + border-left: 3px solid #dbdbdb; + margin-bottom: 10px; +} +.annotation-card__tags { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.annotation-card__tag { + text-decoration: none; + border: 1px solid #dbdbdb; + border-radius: 2px; + padding: 0 5px 2px; + color: #7a7a7a; + background: #f2f2f2; + margin: 0 5px 5px 0; + font-size: 11px; + cursor: pointer; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.annotation_raw { + max-height:500px; + word-break:break-all; + overflow-y:auto; +} + diff --git a/previewers/i18n/en.json b/previewers/i18n/en.json new file mode 100644 index 0000000..3693d47 --- /dev/null +++ b/previewers/i18n/en.json @@ -0,0 +1,25 @@ +{ + "filenameText": "Filename: ", + "inText": "In ", + "byText": ", by ", + "uploadedOnText": "File uploaded on ", + "downloadFileText": "Download File", + "closePreviewText": "Close Preview", + "audioPreviewText": "SSHOC Audio Preview", + "csvPreviewText": "Csv Preview", + "htmlPreviewText": "Html Preview", + "annotationsText": "Annotations", + "imagePreviewText": "Image Preview", + "pdfPreviewText": "SSHOC PDF Preview", + "spreadsheetViewerText": "SSHOC Spreadsheet Viewer", + "textPreviewText": "SSHOC Text Preview", + "videoPreviewText": "Video Preview", + "prev": "Previous", + "next": "Next", + "pageText": "Page:", + "versionText": "version", + "LRSText": "Process with Language Resource Switchboard", + "descriptionText": "Description: ", + "footer": "The SSHOC Previewer, developed by Cesare Concordia, is based on the one developed by QDR and maintained at https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers.", +"errorText" : "Please try again. The most common issue is that your login has timed out. If the problem persists, please contact the support team of this data repository. Please include any status code included at the end of this message: " +} diff --git a/previewers/i18n/en_orig.json b/previewers/i18n/en_orig.json new file mode 100644 index 0000000..f0d64c7 --- /dev/null +++ b/previewers/i18n/en_orig.json @@ -0,0 +1,24 @@ +{ + "filenameText": "Filename: ", + "inText": "In ", + "byText": ", by ", + "uploadedOnText": "File uploaded on ", + "downloadFileText": "Download File", + "closePreviewText": "Close Preview", + "audioPreviewText": "Audio Preview", + "csvPreviewText": "Csv Preview", + "htmlPreviewText": "Html Preview", + "annotationsText": "Annotations", + "imagePreviewText": "Image Preview", + "pdfPreviewText": "PDF Preview", + "spreadsheetViewerText": "Spreadsheet Viewer", + "textPreviewText": "Text Preview", + "videoPreviewText": "Video Preview", + "prev": "Previous", + "next": "Next", + "pageText": "Page:", + "versionText": "version", + "descriptionText": "Description: ", + "footer": "Previewers originally developed by QDR and maintained at https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers. Feedback and contributions welcome.", +"errorText" : "Please try again. The most common issue is that your login has timed out. If the problem persists, please contact the support team of this data repository. Please include any status code included at the end of this message: " +} diff --git a/previewers/i18n/es.json b/previewers/i18n/es.json new file mode 100644 index 0000000..3bde576 --- /dev/null +++ b/previewers/i18n/es.json @@ -0,0 +1,25 @@ +{ + "filenameText": "Nombre del fichero: ", + "inText": "En ", + "byText": ", por ", + "uploadedOnText": "Fichero subido el ", + "downloadFileText": "Descargar fichero", + "closePreviewText": "Cerrar previsualización", + "audioPreviewText": "SSHOC Previsualización de audio", + "csvPreviewText": "Previsualización de csv", + "htmlPreviewText": "Previsualización de html", + "annotationsText": "Anotaciones", + "imagePreviewText": "Previsualización de imagen", + "pdfPreviewText": "SSHOC Previsualización de pdf", + "spreadsheetViewerText": "SSHOC Visor de hojas de cálculo", + "textPreviewText": "Previsualización de texto", + "videoPreviewText": "Previsualización de vídeo", + "prev": "Anterior", + "next": "Siguiente", + "pageText": "Página:", + "versionText": "versión", + "LRSText": "Process with Language Resource Switchboard", + "descriptionText": "Descripción: ", + "footer": "The SSHOC Previewer, developed by Cesare Concordia, is based on the one developed by QDR and maintained at https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers.", + "errorText" : "Inténtelo de nuevo por favor. El problema más común es que su sesión haya caducado. Si el problema continúa puede contactar con el equipo de soporte de su repositorio de datos. Por favor, indique los códigos de estado que encontrará al final de este mensaje: " +} diff --git a/previewers/i18n/fr.json b/previewers/i18n/fr.json new file mode 100644 index 0000000..cf402b7 --- /dev/null +++ b/previewers/i18n/fr.json @@ -0,0 +1,25 @@ +{ + "filenameText": "Nom du fichier: ", + "inText": "Dans ", + "byText": ", par ", + "uploadedOnText": "Fichier téléversé le ", + "downloadFileText": "Télécharger le fichier", + "closePreviewText": "Fermer l'aperçu", + "audioPreviewText": "SSHOC Aperçu audio", + "csvPreviewText": "Aperçu CSV", + "htmlPreviewText": "Aperçu HTML", + "annotationsText": "Annotations", + "imagePreviewText": "Aperçu image", + "pdfPreviewText": "SSHOC Aperçu PDF", + "spreadsheetViewerText": "SSHOC Visualisateur de feuille de calcul", + "textPreviewText": "Aperçu texte", + "videoPreviewText": "Aperçu vidéo", + "prev": "Précédent", + "next": "Suivant", + "pageText": "Page:", + "versionText": "version", + "LRSText": "Process with Language Resource Switchboard", + "descriptionText": "Description: ", + "footer": "The SSHOC Previewer, developed by Cesare Concordia, is based on the one developed by QDR and maintained at https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers.", + "errorText" : "Veuillez réessayer. Le problème le plus commun est que votre session a expiré. Si le problème persiste, veuillez communiquer avec l'équipe de soutien pour ce dépôt de données. Veuillez fournir le code indiqué à la fin du présent message : " +} diff --git a/previewers/images/logo_placeholder.png b/previewers/images/logo_placeholder.png new file mode 100644 index 0000000..8ce068f Binary files /dev/null and b/previewers/images/logo_placeholder.png differ diff --git a/previewers/js/audio.js b/previewers/js/audio.js new file mode 100644 index 0000000..315a2c8 --- /dev/null +++ b/previewers/js/audio.js @@ -0,0 +1,14 @@ +$(document).ready(function() { +startPreview(false); +}); + +function translateBaseHtmlPage() { + var audioPreviewText = $.i18n( "audioPreviewText" ); + $( '.audioPreviewText' ).text( audioPreviewText ); +} + +function writeContent(fileUrl, file, title, authors) { + addStandardPreviewHeader(file, title, authors); + $('.preview').append($("