Skip to content

Commit 568cd16

Browse files
author
Andreas H. Kelch
committed
feat: adden Landing page
1 parent b6b46a4 commit 568cd16

18 files changed

+128
-101
lines changed

deploy/html/index.html

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{% extends "template.html" %}
2+
3+
{% block content %}
4+
<div class="wrapper-center">
5+
<div class="content">
6+
<h1>Hausverwaltung</h1>
7+
<div class="wrapper-entrypoint">
8+
<sl-card class="entrypoint" id="form">
9+
<a href="/todo/add" target="_blank">
10+
<div class="wrapper-card">
11+
<sl-icon name="plus-square-fill" ></sl-icon>
12+
<span>Zum Serviceformular</span>
13+
</div>
14+
</a>
15+
</sl-card>
16+
17+
<sl-card class="entrypoint" id="admin">
18+
<a href="/vi" target="_blank">
19+
<div class="wrapper-card">
20+
<sl-icon name="person-fill-gear" ></sl-icon>
21+
<span>Administration der Hausverwaltung</span>
22+
</div>
23+
</a>
24+
</sl-card>
25+
26+
<sl-card class="entrypoint" id="app">
27+
<a href="/app/index.html" target="_blank">
28+
<div class="wrapper-card">
29+
<sl-icon name="list-task" ></sl-icon>
30+
<span>Servicetechniker:innen App</span>
31+
</div>
32+
</a>
33+
34+
</sl-card>
35+
</div>
36+
</div>
37+
38+
</div>
39+
40+
41+
42+
43+
44+
{% endblock %}

deploy/html/template.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@
77
{%- block additionalhead %}
88

99
{% endblock %}
10-
11-
{%- if development %}
12-
<script type="module" src="http://localhost:8081/@vite/client"></script>
13-
<script type="module" src="http://localhost:8081/main.js"></script>
14-
{% else %}
15-
{{inject_vite()}}
16-
{% endif %}
10+
{{inject_vite(development)}}
1711
</head>
1812
<body>
1913
<div id="vite_context">

deploy/modules/index.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ def index(self, *args, **kwargs):
2020
if len(args) == 1 and args[0] == "sitemap.xml":
2121
return self.sitemap_xml()
2222

23-
return conf.main_app.todo.add()
23+
# Else, render index.html
24+
template = self.render.getEnv().get_template("index.html")
25+
return template.render()
26+
27+
#return conf.main_app.todo.add()
2428

2529
@exposed
2630
def scriptor(self):

deploy/render/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ def _postProcessAppObj(obj):
2020
import logging
2121
from viur.core.render.html.utils import jinjaGlobalFunction
2222
@jinjaGlobalFunction
23-
def inject_vite(render) -> t.Any:
23+
def inject_vite(render, development: bool = False) -> t.Any:
2424
"""build vue imports from manifest"""
2525

26+
if development:
27+
return """<script type="module" src="http://localhost:8081/@vite/client"></script>
28+
<script type="module" src="http://localhost:8081/main.js"></script>"""
29+
2630
vite_path = "/static/site"
2731

2832
try:

sources/site/images/arrowhead-left.svg

-6
This file was deleted.

sources/site/images/check.svg

-6
This file was deleted.

sources/site/images/cross.svg

-7
This file was deleted.

sources/site/images/flash.svg

-6
This file was deleted.

sources/site/images/heart.svg

-7
This file was deleted.

sources/site/images/javascript.svg

-1
This file was deleted.

sources/site/images/not-allowed.svg

-9
This file was deleted.

sources/site/images/pen.svg

-9
This file was deleted.

sources/site/images/start-vi.png

-46.7 KB
Binary file not shown.

sources/site/images/token.svg

-34
This file was deleted.
51.6 KB
Loading

sources/site/styles/landing.css

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.wrapper-center{
2+
display: grid;
3+
justify-items: center;
4+
align-items: center;
5+
height: 100%;
6+
background-image: url("@@/images/login-background.jpg");
7+
background-blend-mode:color-dodge;
8+
background-color: var(--sl-color-neutral-300);
9+
10+
11+
& h1{
12+
font-size: var(--sl-font-size-2x-large);
13+
color:black;
14+
}
15+
16+
& .wrapper-entrypoint{
17+
display:flex;
18+
flex-wrap: wrap;
19+
justify-content: center;
20+
gap:80px;
21+
}
22+
}
23+
24+
sl-card.entrypoint{
25+
cursor: pointer;
26+
font-size: var(--sl-font-size-x-large);
27+
color:white;
28+
text-align: center;
29+
width:400px;
30+
height: 300px;
31+
32+
& a{
33+
color:white;
34+
}
35+
36+
& .wrapper-card{
37+
display:grid;
38+
place-items: center;
39+
height: 100%;
40+
}
41+
42+
& sl-icon{
43+
width: 5rem;
44+
height: 5rem;
45+
}
46+
47+
&::part(base){
48+
height: 100%;
49+
background: linear-gradient(125deg, hsl(12, 100%, 61%), hsl(356, 86%, 44%));
50+
backdrop-filter: blue(10px);
51+
border: 1px solid hsl(356, 86%, 44%);
52+
border-radius: var(--sl-border-radius-x-large);
53+
box-shadow: 0 8px 32px 0 rgba(0,0,0,0.5);
54+
transition: all 0.2s ease-in-out;
55+
}
56+
57+
&::part(base):hover{
58+
box-shadow: 0 8px 32px 0 rgba(0,0,0,0.8);
59+
}
60+
61+
&::part(body){
62+
height: 100%;
63+
}
64+
65+
66+
}

sources/site/styles/style.css

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import url(landing.css);
12
:root {
23
height: 100%;
34
box-sizing: border-box;
@@ -8,16 +9,14 @@
89
}
910

1011
body {
11-
margin: 0;
12-
display: flex;
13-
place-items: center;
14-
min-width: 320px;
15-
min-height: 100vh;
12+
height: 100%;
13+
width: 100%;
14+
-webkit-font-smoothing:antialiased;
1615
}
1716

1817
#vite_context {
19-
max-width: 1280px;
20-
margin: 0 auto;
18+
width: 100%;
19+
height: 100%;
2120
}
2221

2322
h1{

sources/site/vite.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default defineConfig({
6161
resolve: {
6262
alias: {
6363
'@': fileURLToPath(new URL('./vue', import.meta.url)),
64+
'@@': fileURLToPath(new URL('./public', import.meta.url)),
6465
"vue":'vue/dist/vue.esm-bundler'
6566
}
6667
},

0 commit comments

Comments
 (0)