general setup
This commit is contained in:
@@ -1,30 +1,19 @@
|
||||
AddType application/javascript .mjs
|
||||
|
||||
#DirectoryIndex index.html spa.html
|
||||
#DirectoryIndex spa.html
|
||||
# notwendig, da sonst über normale url spa.html aufgerufen wird, muss nur datei name sei, der nicht existiert
|
||||
DirectoryIndex noindex
|
||||
|
||||
<ifModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
|
||||
RewriteRule ^/?api/(.*)$ http://tibi-server:8080/api/v1/_/demo/$1 [P,QSA,L]
|
||||
|
||||
# set in vhost or global in apache
|
||||
#SSLProxyEngine On
|
||||
#SSLProxyVerify none
|
||||
#SSLProxyCheckPeerCN off
|
||||
#SSLProxyCheckPeerName off
|
||||
#SSLProxyCheckPeerExpire off
|
||||
|
||||
# Set the Host header for requests to sentry
|
||||
RequestHeader set Host sentry.basehosts.de env=proxy-sentry
|
||||
RequestHeader unset Authorization env=proxy-sentry
|
||||
# need to update project id
|
||||
RewriteRule ^/?_s(.*)$ https://sentry.basehosts.de/api/__PROJECT_ID__/envelope/$1 [P,L,E=proxy-sentry:1]
|
||||
RewriteRule ^/?api/(.*)$ http://tibi-server:8080/api/v1/_/tibi_starter/$1 [P,QSA,L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^/?(.*)$ http://tibi-server:8080/api/v1/_/demo/ssr?token=owshwerNwoa&url=/$1 [P,QSA,L]
|
||||
# leitet initale request an backend und nicht an spa.html weiter
|
||||
RewriteRule ^/?(.*)$ http://tibi-server:8080/api/v1/_/tibi_starter/ssr?token=owshwerNwoa&url=/$1 [P,QSA,L]
|
||||
# standardmäßig wegen deeplink aus google notwendig, da sonst 404
|
||||
#RewriteRule (.*) /spa.html [QSA,L]
|
||||
|
||||
</ifModule>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
if (callbacks["rerender"]) unregisterEventCallback("navigate", "rerender")
|
||||
})
|
||||
loadModulesAndSetStore()
|
||||
|
||||
loadNavigationAndSetStores()
|
||||
loadLibraryAndSetStore()
|
||||
loadContentAndSetStores()
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
mitte: "center",
|
||||
unten: "flex-end",
|
||||
}
|
||||
|
||||
window.addEventListener("ccAccept", (e) => {
|
||||
if ((e as CustomEvent).detail[1] == cookieName) contentShown = true
|
||||
})
|
||||
if (typeof window !== "undefined")
|
||||
window.addEventListener("ccAccept", (e) => {
|
||||
if ((e as CustomEvent).detail[1] == cookieName) contentShown = true
|
||||
})
|
||||
//isCookieSet isnt really precise
|
||||
function checkCookie(cookieName: string) {
|
||||
// Get all cookies
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
// Verwendung
|
||||
if (checkCookie(cookieName)) contentShown = true
|
||||
if (typeof window !== "undefined") if (checkCookie(cookieName)) contentShown = true
|
||||
</script>
|
||||
|
||||
{#if contentShown}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { navigateWrapper } from "../functions/utils"
|
||||
</script>
|
||||
|
||||
<div class="footer">
|
||||
<footer class="footer">
|
||||
<div class="infos">
|
||||
<h3>webmakers Erfurt</h3>
|
||||
<div class="infos-inner">
|
||||
@@ -53,7 +53,7 @@
|
||||
{/each}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<style lang="less">
|
||||
@import "../assets/css/variables.less";
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
let opened = -1
|
||||
let openMenu = false
|
||||
$: {
|
||||
if (openMenu) document.body.style.overflow = "hidden"
|
||||
else document.body.style.overflow = "auto"
|
||||
if (typeof window !== "undefined")
|
||||
if (openMenu) document.body.style.overflow = "hidden"
|
||||
else document.body.style.overflow = "auto"
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="image-container">
|
||||
<img
|
||||
src="{`${apiBaseURL}medialib/${image}/${$mediaLibrary?.[image]?.file?.src}?filter=${
|
||||
window.innerWidth > 500 ? 'xl' : 'm'
|
||||
typeof window !== 'undefined' && window.innerWidth > 500 ? 'xl' : 'm'
|
||||
}`}"
|
||||
alt="Bild"
|
||||
/>
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="image-container single flex">
|
||||
<img
|
||||
src="{`${apiBaseURL}medialib/${image}/${$mediaLibrary?.[image]?.file?.src}?filter=${
|
||||
window.innerWidth > 500 ? 'xl' : 'm'
|
||||
typeof window !== 'undefined' && window.innerWidth > 500 ? 'xl' : 'm'
|
||||
}`}"
|
||||
alt="Bild"
|
||||
/>
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
<h3 style="margin-bottom: -0.5rem;">
|
||||
{#if formRow.title}{formRow.title || ""}{/if}
|
||||
</h3>
|
||||
{#if innerWidth < 768}
|
||||
{#if innerWidth < 768 && typeof window !== "undefined"}
|
||||
<div class="form-cols mobile-fields">
|
||||
{#each formRow.columns as column, columnIndex}
|
||||
<FormColumn {column} {index} {columnIndex} {formValues} />
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{#if innerWidth >= 768}
|
||||
{#if innerWidth >= 768 && typeof window !== "undefined"}
|
||||
<div class="form-cols desktop-fields">
|
||||
{#each formRow.columns as column, columnIndex}
|
||||
<div class="form-column">
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import { api } from "../../../api"
|
||||
|
||||
export async function loadContent(): Promise<Content[]> {
|
||||
let site = await api<Content[]>("content", {})
|
||||
return site.data
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { api } from "../../../api"
|
||||
|
||||
export async function loadNavigation(): Promise<Navigation[]> {
|
||||
let nav = await api<Navigation[]>("navigation", {})
|
||||
console.log(nav.data, "nav")
|
||||
return nav.data
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
<script>
|
||||
import { navigateWrapper } from "../lib/functions/utils"
|
||||
// set 404 for ssr
|
||||
if (typeof window === "undefined") {
|
||||
// @ts-ignore
|
||||
if (context) context.is404 = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="not-found">
|
||||
|
||||
Reference in New Issue
Block a user