<% if (typeof home != "undefined") { if (document.querySelector('meta[name="prerender-status-code"]') !== null) { document.querySelector('meta[name="prerender-status-code"]').setAttribute("content", "200"); } if (home.metadata__meta_title != "") { document.title = home.metadata__meta_title; } else { document.title = home.title + ' | ' + (WebBaseSchool.lang === 'it' ? 'Scuola professionale' : 'Berufsschule'); } if (document.querySelector('meta[name="description"]') !== null) { if (home.metadata__meta_description != "") { document.querySelector('meta[name="description"]').setAttribute("content", home.metadata__meta_description); } else { document.querySelector('meta[name="description"]').setAttribute("content", ""); } } if (document.querySelector('meta[property="og:title"]') !== null) { if (home.metadata__og_title != "") { document.querySelector('meta[property="og:title"]').setAttribute("content", home.metadata__og_title); } else { document.querySelector('meta[property="og:title"]').setAttribute("content", home.title + ' | ' + (WebBaseSchool.lang === 'it' ? 'Scuola professionale' : 'Berufsschule')); } } if (document.querySelector('meta[property="og:image"]') !== null) { if (typeof home.metadata__og_image != "undefined") { for(var ig=0; ig'); } if ($('meta[name=languageID]').length) { $('meta[name=languageID]').attr('content', langid); } else { $('head').append(''); } if ($('meta[name=projectID]').length) { $('meta[name=projectID]').attr('content', config.projectId); } else { $('head').append(''); } } else { url = ['https://app.kontent.ai', config.projectId, 'content-inventory', langid, 'content', model.system_id].join('/'); if ($('meta[name=editingPage]').length) { $('meta[name=editingPage]').attr('content', url); } else { $('head').append(''); } } } })(WebBaseSchool.config || {}, home || {}, (WebBaseSchool.lang || 'de')); } %>
<% if (typeof home.slider_container != "undefined") { %> <% } %> <% if (typeof home.button_container != "undefined") { %> <% } %>
<% if (home.container) { home.container.forEach(function(container, containerIndex) { %> <% // News Container: [News Item] if (container.system_type === "news_container") { (function(container, news) { var taxonomyLangIdx = 0; var newsItems = container.container || []; var moreLink = ''; if (typeof container.more_link != "undefined") { moreLink = container.more_link; } if (/it/i.test(WebBaseSchool.lang)) { taxonomyLangIdx = 1; } var collection = news[container.system_codename || '']; if (collection) { newsItems = newsItems.concat(collection.viewmodel || []); } %>

<%= container.title %>

<% if ((newsItems || []).length) { newsItems.forEach(function(article) { %>
<% if (article.news_kategorien___categorie_news && Array.isArray(article.news_kategorien___categorie_news)) { // categories %>
<% article.news_kategorien___categorie_news.forEach(function(category) { var names = (category.name || '').split('|'); %> <%= names.length>taxonomyLangIdx ? names[taxonomyLangIdx] : names[0] %><% }); %>
<% } if (article.main_image && Array.isArray(article.main_image)) { article.main_image.forEach(function(main_image) { var descAttr = (main_image.description || '').replace(/\u0022/g, ''); %>
<%= descAttr %>
<% }); } %>

<%= (article.title || '') %>

<%= (article.subtitle || '') %>

<%= (article.date ? WebBaseSchool.Utils.formatDateTime(article.date) : '') %>

<% }); } %>
<% })(container || {}, news || []); } %> <% // Service Container: [Service Item] if (container.system_type === "service_container") { (function (container) { var i, len, item; var detailPath = { 'de': 'dienste', 'it': 'servizi' }; var coll = container.container || []; if (coll.length) { %>

<%= WebBaseSchool.Utils.gettext("Services for parents and students") %>

<%= (container.subtitle || '') %>

    <% // max 6 services for (i=0, len = coll.length > 6 ? 6 : coll.length; i
  1. <%= (item.title || '') %>
  2. <% } %>
<% } })(container || {}); } %> <% // Introduction Item if (container.system_type === "introduction_item") { (function (container, containerIndex) { var introImage = ''; var introLink = ''; var introClass = ''; var introImgClass = ''; var introTxtClass = ''; if (typeof container.internal_link != "undefined") { introLink = '/' + WebBaseSchool.lang + '/' + container.internal_link[0].url; } else if (typeof container.external_link != "undefined") { introLink = container.external_link; } if (containerIndex % 2 === 0) { introClass = ''; introImgClass = ''; introTxtClass = ''; } else { introClass = 'invert_order'; introImgClass = 'img_item'; introTxtClass = 'text_item'; } %>
<% for(var ict=0; ict
<%= introImage.description %>
<% } %> <% if (typeof container.youtube__youtube_video != "undefined") { %> <% if (container.youtube__youtube_video != null) { %> <% var newsvideoObj = JSON.parse(container.youtube__youtube_video); %> <% if (newsvideoObj != null) { videoTitle = (newsvideoObj.title || '').replace(/\u0027/g, "'").replace(/[\u0022\r\n]/g, "\u0020"); %> <% } %> <% } %> <% } %>

<%= container.title %>

<% if (container.description != "


") { %>
<%- container.description %>
<% } if (introLink.length) { %> <% } %>
<% })(container || {}, containerIndex); } %> <% // Card Container: [ Card Item, ... ] if (container.system_type === "card_container") { (function (container) { var coll = container.container || []; var containerClass = (container.type ? container.type.map(function (item) { return (item.name || ""); // only name }) : []) .concat(["col_3_1"]) // default value: if no other was selected .filter(function (item) { return item.length ? item : null; // only non empty values }) .slice(0,1) // only first .concat((function (options) { return (options ? options.map(function (item) { return (item.name || ""); // only name }) : []); }(container.options))); %>
<% if (container.title != "") { %>

<%= container.title %>

<% } %>
<% coll.forEach(function (item) { var cardClass = ["card"] .concat((item.type ? item.type.map(function (item) { return (item.name || ""); // only name }) : []) .filter(function (item) { return item.length ? item : null; // only non empty values })), isCircular = (cardClass.join(' ').indexOf("circle", 0) > -1), imgProps = { fit: "crop", h: 300, w: (isCircular ? 300 : 546), fm: "webp", lossless: 0, q: 75 }, linkedOptions = (item.options || []).reduce(function (acc, item) { if (item.codename && item.codename.indexOf("linked_", 0) === 0) { acc[item.codename] = true; // add item } return acc; }, {}), cardLink = (item.external_link && item.external_link.length) ? item.external_link : WebBaseSchool.lang + "/" + ((item.internal_link && item.internal_link.length) ? item.internal_link[0].url : ""); %>
<% if ( item.image && item.image.length ) { %>
<%= item.title.replace(/\u0022/g, '') %>
<% } %>

<% if ( linkedOptions.linked_title ) { %>"><%= (item.title || '') %><% } else { %><%= (item.title || '') %><% } %>

<%= item.text %>

<% if ( linkedOptions.linked_button ) { %>"><%= WebBaseSchool.Utils.gettext("More") %> <% } %>
<% }); %>
<% })(container || {}); } %> <% // Appointment Container: [ Appointment Item, ... ] if (container.system_type === "appointment_container") { (function (container, appointments) { var taxonomyLangIdx = 0; var detailPath = { 'de': 'terminkalender', 'it': 'calendario-appuntamenti' }; if (/it/i.test(WebBaseSchool.lang)) { taxonomyLangIdx = 1; } %>

<%= (container.title || '') %>

<% if ((container.subtitle || '').length) { %>

<%= container.subtitle %>

<% } %>
<% if ((appointments || []).length) { appointments.forEach(function(appointment) { %>
<% if (appointment.date_from) { %>
<%= WebBaseSchool.Utils.formatDateTime(appointment.date_from, "shortmonth") %>
<% } if (appointment.date_from) { %>
<%= WebBaseSchool.Utils.formatDateTime(appointment.date_from, "onlyday") %>
<% } %>
<% if (appointment.terminkalender_kategorien___categorie_calendario) { %>

<% appointment.terminkalender_kategorien___categorie_calendario.forEach(function(category) { var names = (category.name || '').split('|'); %> <%= names.length>taxonomyLangIdx ? names[taxonomyLangIdx] : names[0] %><% }); %>

<% } %>

<%= (appointment.title || '') %>

<% if (appointment.date_from && appointment.date_to) { %>
<% if (WebBaseSchool.Utils.formatDateTime(appointment.date_from) != WebBaseSchool.Utils.formatDateTime(appointment.date_to)) { %> <%= WebBaseSchool.Utils.formatDateTime(appointment.date_from) %> - <%= WebBaseSchool.Utils.formatDateTime(appointment.date_to) %> <% } else { %> <%= WebBaseSchool.Utils.formatDateTime(appointment.date_from, "withtime") %> - <%= WebBaseSchool.Utils.formatDateTime(appointment.date_to, "onlytime") %><% } %>
<% } %>
<% }); } else { %>

<%= WebBaseSchool.Utils.gettext('No dates available!') %>

<% } %>
<% })((container || {}), (appointments || [])); } %> <% // Banner Item if (container.system_type === "banner") { (function (container) { var image = (container.image || [{}])[0]; var wrapperStyle = "position:relative;z-index:1;"; if ( image && image.url.length ) { wrapperStyle = image.url ? ["position:relative;z-index:1;", "background-image:url('", image.url, "?fm=webp&lossless=0&q=75');"].join('') : ''; } var overlay = [ 'position:absolute;z-index:5;width:100%;height:100%', ['background-color:', (container.overlay_color || 'black').replace(/[^#A-Z0-9a-z]/igm, '')].join(''), ['opacity:', (container.overlay_opacity || '0.0').toString(10).replace(/[^\.0-9]/igm, '')].join('') ]; var link = (container.internal_link || []).length ? ['/', WebBaseSchool.lang, '/', (container.internal_link[0].url || '')].join('') : ''; link.length || (link = (container.external_link || '')); %>

<%= (container.title || "") %>

<%= (container.subtitle || "") %>

<% if (link.length) { %> <%= WebBaseSchool.Utils.gettext("More") %> <% } %>
<% })(container); } %> <% // Social if (container.system_type === "social") { if (1 === 2) { %>

<%= (container.title || '') %>

Facebook

Twitter

<% } } %> <% }); } %>