aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/components/image/index.css12
-rw-r--r--src/app/components/image/index.html2
-rw-r--r--src/app/index.html1
-rw-r--r--src/app/root.zig1
-rw-r--r--src/app/theme.css5
5 files changed, 21 insertions, 0 deletions
diff --git a/src/app/components/image/index.css b/src/app/components/image/index.css
index e69de29..86ba44e 100644
--- a/src/app/components/image/index.css
+++ b/src/app/components/image/index.css
@@ -0,0 +1,12 @@
+:host {
+ --src: attr(src)
+}
+
+.image {
+ width: 100%;
+ padding-bottom: 100%;
+ height: 0;
+ background-image: url("" ++ var(--src));
+ background-size: cover;
+ background-position: center;
+}
diff --git a/src/app/components/image/index.html b/src/app/components/image/index.html
index e69de29..bd124ad 100644
--- a/src/app/components/image/index.html
+++ b/src/app/components/image/index.html
@@ -0,0 +1,2 @@
+<div class="image">
+</div>
diff --git a/src/app/index.html b/src/app/index.html
index 18c0c6b..b96a445 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -1 +1,2 @@
<app-navbutton></app-navbutton>
+<app-image src="icon.png"></app-image>
diff --git a/src/app/root.zig b/src/app/root.zig
index 5d56b49..d57faf9 100644
--- a/src/app/root.zig
+++ b/src/app/root.zig
@@ -11,6 +11,7 @@ const components = @import("components/root.zig").components;
pub const app: zilch.App(.{
.name = "Memora",
+ .favicon = "icon.png",
.functions = &(zilch.Object.functions ++
zilch.Promise.functions ++
zilch.Callable.functions),
diff --git a/src/app/theme.css b/src/app/theme.css
index 00a1e92..cfe5205 100644
--- a/src/app/theme.css
+++ b/src/app/theme.css
@@ -12,3 +12,8 @@ body {
margin: 0;
overflow: hidden;
}
+
+app-image {
+ display: block;
+ width: 20vw;
+}