Frontend - LIBCAS/INDIHU-Exhibition GitHub Wiki

Example of exhibition structure

  • API stores all information in "single" string
  • Processing is maintained in save a load expo actions
const templateStructure = {
  start,
  finish,
  screens: [
    /* array of sections */
    [templateScreen, templateScreen] /* first section with two screens */,
    [templateScreen] /* second section with one screen */
  ],
  files: [
    /* array of folders */
    {
      name: "folderName1",
      files: [templateFile] /* files of first folder */
    },
    {
      name: "folderName2",
      files: [templateFile, templateFile]
    },
    {
      /* Uncategorized files */
      files: [templateFile, templateFile, templateFile]
    }
  ]
};
Exhibition intro
const start = {
    type: "START",
    title: "expo title",
    subTitle: "expo subTitle",
    perex: "perex",
    image: templateFile.id,
    imageOrigData: { width: 0, height: 0 },
    audio: templateFile.id,
    collaborators: [{role: "role", text: "text"}, {role: "role", text: "text"}],
    documents: [],
    screenCompleted: false
};
Chapter intro
const chapterStart = {
    type: "INTRO",
    title: "chapter title",
    subTitle: "chapter subTitle",
    image: templateFile.id,
    imageOrigData: { width: 0, height: 0 },
    animationType: "FROM_TOP",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    music: templateFile.id,
    documents: [],
    screenCompleted: false
};
Picture screen
const image = {
    type: "IMAGE",
    title: "screen title",
    text: "screen text",
    image: templateFile.id,
    imageOrigData: { width: 0, height: 0 },
    animationType: "FROM_TOP",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    infopoints: [{text: "text", positionX: 0, positionY: 0, alwaysVisible: false}],
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Video screen
const video = {
    type: "VIDEO",
    title: "screen title",
    text: "screen text",
    video: templateFile.id,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Text screen
const text = {
    type: "TEXT",
    title: "screen title",
    text: "screen text",
    mainText: "text",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Photo gallery screen
const photogalery = {
    type: "PHOTOGALERY",
    title: "screen title",
    text: "screen text",
    images: [{ id: templateFile.id, imageOrigData: { width: 0, height: 0 }, infopoints: [{ text: "text", positionX: 0, positionY: 0, alwaysVisible: false }] }],
    animationType: "FROM_TOP",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Parallax screen
const parallax = {
    type: "PARALLAX",
    title: "screen title",
    text: "screen text",
    images: [ templateFile.id, templateFile.id, templateFile.id ],
    animationType: "FROM_TOP",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Zoom in screen
const zoomIn = {
    type: "IMAGE_ZOOM",
    title: "screen title",
    text: "screen text",
    image: templateFile.id,
    imageOrigData: { width: 0, height: 0 },
    sequence: [{ text: "text", zoom: 2, top: 0, left: 0 }],
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Before-after screen
const imageChange = {
    type: "IMAGE_CHANGE",
    title: "screen title",
    text: "screen text",
    image1: templateFile.id,
    image2: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    animationType: "HOVER",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Screen with an External object
const external = {
    type: "EXTERNAL",
    title: "screen title",
    text: "screen text",
    externalData: "code",
    audio: templateFile.id,
    time: 22,
    timeAuto: false,
    documents: [],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "find in map"
const gameFind = {
    type: "GAME_FIND",
    title: "screen title",
    task: "game task",
    image1: templateFile.id,
    image2: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    showTip: true,
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "Draw"
const gameDraw = {
    type: "GAME_DRAW",
    title: "screen title",
    task: "game task",
    image1: templateFile.id,
    image2: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    showDrawing: true,
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "Scratch Card"
const gameWipe = {
    type: "GAME_WIPE",
    title: "screen title",
    task: "game task",
    image1: templateFile.id,
    image2: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "Guess"
const gameSizing = {
    type: "GAME_SIZING",
    title: "screen title",
    task: "game task",
    image1: templateFile.id,
    image2: templateFile.id,
    image3: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    image3OrigData: { width: 0, height: 0 },
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "Move"
const gameMove = {
    type: "GAME_MOVE",
    title: "screen title",
    task: "game task",
    image1: templateFile.id,
    image2: templateFile.id,
    object: templateFile.id,
    image1OrigData: { width: 0, height: 0 },
    image2OrigData: { width: 0, height: 0 },
    objectOrigData: { width: 0, height: 0 },
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
Minigame "Quiz"
const gameOptions = {
    type: "GAME_OPTIONS",
    title: "screen title",
    task: "game task",
    image: templateFile.id,
    imageOrigData: { width: 0, height: 0 },
    answers: [
      {correct: true, text: "text odpovědi", image: templateFile.id, imageOrigData: { width: 0, height: 0 }},
      {correct: false, text: "text odpovědi", image: templateFile.id, imageOrigData: { width: 0, height: 0 }},
      {correct: false, text: "text odpovědi", image: templateFile.id, imageOrigData: { width: 0, height: 0 }}
    ],
    aloneScreen: false,
    music: templateFile.id,
    muteChapterMusic: false,
    screenCompleted: false
};
End of exhibition
const finish = {
    type: "FINISH",
};