basic text content type
This commit is contained in:
parent
f1a2e290ae
commit
1ef39dc0fb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -21,7 +21,11 @@ jQuery(document).ready(function ($) {
|
||||
$form.find('.object-label:visible').html(optionAttributes['data-object-label'].value);
|
||||
$('.type-icon').attr('class', 'type-icon fa ' + optionAttributes['data-icon'].value);
|
||||
$('.tab-select .widget').attr('class', 'widget ' + ('border-' + color) + ' ' + color);
|
||||
$form.find('button[type=submit]').attr('class', 'btn ' + ('btn-' + color));
|
||||
$form.find('button[type=submit]').attr('class', [
|
||||
'btn',
|
||||
`btn-${color}`,
|
||||
color === 'gscaleF' ? 'gscale0' : ''
|
||||
].join(' '));
|
||||
};
|
||||
|
||||
const main = function () {
|
||||
|
||||
@ -40,6 +40,8 @@ $colors: (
|
||||
redhat:$redhat,
|
||||
centos:$centos,
|
||||
other:$other,
|
||||
gscale0:$gscale0,
|
||||
gscaleF:$gscaleF,
|
||||
);
|
||||
|
||||
// Classes
|
||||
|
||||
@ -307,6 +307,8 @@
|
||||
"enum_content_type_external_storage_object_label": "Specify an existing directory relative to the following path",
|
||||
"enum_content_type_external_storage_flashdrive_label": "Path relative to a removeable device",
|
||||
"enum_content_type_composition": "Composition",
|
||||
"enum_content_type_text": "Text",
|
||||
"enum_content_type_text_object_label": "Displayed text",
|
||||
"enum_content_type_url": "URL",
|
||||
"enum_content_type_video": "Video",
|
||||
"enum_content_type_picture": "Picture",
|
||||
|
||||
@ -308,6 +308,8 @@
|
||||
"enum_content_type_external_storage_object_label": "Especifique un directorio existente relativo a la siguiente ruta",
|
||||
"enum_content_type_external_storage_flashdrive_label": "Ruta relativa a un dispositivo extraíble",
|
||||
"enum_content_type_composition": "Composición",
|
||||
"enum_content_type_text": "Texto",
|
||||
"enum_content_type_text_object_label": "Texto mostrado",
|
||||
"enum_content_type_url": "URL",
|
||||
"enum_content_type_video": "Video",
|
||||
"enum_content_type_picture": "Imagen",
|
||||
|
||||
@ -309,6 +309,8 @@
|
||||
"enum_content_type_external_storage_object_label": "Spécifiez un répertoire existant par rapport au chemin suivant",
|
||||
"enum_content_type_external_storage_flashdrive_label": "Chemin relatif à un périphérique amovible",
|
||||
"enum_content_type_composition": "Composition",
|
||||
"enum_content_type_text": "Texte",
|
||||
"enum_content_type_text_object_label": "Texte affiché",
|
||||
"enum_content_type_url": "URL",
|
||||
"enum_content_type_video": "Vidéo",
|
||||
"enum_content_type_picture": "Image",
|
||||
|
||||
@ -308,6 +308,8 @@
|
||||
"enum_content_type_external_storage_object_label": "Specificare una directory esistente relativi al seguente percorso",
|
||||
"enum_content_type_external_storage_flashdrive_label": "Percorso relativo ad un dispositivo rimovibile",
|
||||
"enum_content_type_composition": "Composizione",
|
||||
"enum_content_type_text": "Testo",
|
||||
"enum_content_type_text_object_label": "Testo visualizzato",
|
||||
"enum_content_type_url": "URL",
|
||||
"enum_content_type_video": "Video",
|
||||
"enum_content_type_picture": "Immagine",
|
||||
|
||||
@ -31,6 +31,7 @@ class ContentType(Enum):
|
||||
VIDEO = 'video'
|
||||
EXTERNAL_STORAGE = 'external_storage'
|
||||
COMPOSITION = 'composition'
|
||||
TEXT = 'text'
|
||||
|
||||
@staticmethod
|
||||
def guess_content_type_file(filename: str):
|
||||
@ -65,6 +66,8 @@ class ContentType(Enum):
|
||||
return ContentInputType.STORAGE
|
||||
elif value == ContentType.COMPOSITION:
|
||||
return ContentInputType.HIDDEN
|
||||
elif value == ContentType.TEXT:
|
||||
return ContentInputType.TEXT
|
||||
|
||||
@staticmethod
|
||||
def get_fa_icon(value: Union[Enum, str]) -> str:
|
||||
@ -83,6 +86,8 @@ class ContentType(Enum):
|
||||
return 'fa-brands fa-usb'
|
||||
elif value == ContentType.COMPOSITION:
|
||||
return 'fa-solid fa-clone'
|
||||
elif value == ContentType.TEXT:
|
||||
return 'fa-solid fa-font'
|
||||
|
||||
return 'fa-file'
|
||||
|
||||
@ -103,5 +108,7 @@ class ContentType(Enum):
|
||||
return 'other'
|
||||
elif value == ContentType.COMPOSITION:
|
||||
return 'purple'
|
||||
elif value == ContentType.TEXT:
|
||||
return 'gscaleF'
|
||||
|
||||
return 'neutral'
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
.slide, iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding-top: 0; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; }
|
||||
.slide iframe { background: white; }
|
||||
.slide img, .slide video { {% if force_cover %}width: 100%;{% endif %} height: 100%; }
|
||||
.slide .text { width: 100%; height: 100%; color: white; font-family: 'Arial', 'sans-serif'; font-size: 20px; display: flex; flex-direction: row; justify-content: center; align-items: center; }
|
||||
.slide video { width: 100%; height: 100%; }
|
||||
</style>
|
||||
<script type="application/javascript" src="{{ STATIC_PREFIX }}js/utils.js"></script>
|
||||
@ -341,6 +342,9 @@
|
||||
case 'picture':
|
||||
loadPicture(element, callbackReady, item);
|
||||
break;
|
||||
case 'text':
|
||||
loadText(element, callbackReady, item);
|
||||
break;
|
||||
case 'video':
|
||||
loadVideo(element, callbackReady, item);
|
||||
break;
|
||||
@ -366,6 +370,11 @@
|
||||
callbackReady(function() {});
|
||||
};
|
||||
|
||||
const loadText = function(element, callbackReady, item) {
|
||||
element.innerHTML = `<div class="text">${item.location}</div>`;
|
||||
callbackReady(function() {});
|
||||
};
|
||||
|
||||
const loadComposition = function(element, callbackReady, item) {
|
||||
element.innerHTML = `composition`;
|
||||
callbackReady(function() {});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user