Skip to content

Commit

Permalink
update example templates
Browse files Browse the repository at this point in the history
Signed-off-by: George Lemon <[email protected]>
  • Loading branch information
georgelemon committed Mar 17, 2024
1 parent 9a27d30 commit f67850d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions example/templates/layouts/base.timl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
html
head
@include "meta/head"
style: "
style: """
body {
background-color: #212121;
color: whitesmoke
Expand All @@ -28,7 +28,7 @@ html
--bs-btn-disabled-bg: #0d6efd;
--bs-btn-disabled-border-color: #0d6efd;
}
"
"""
body
@view
@include "ws"
4 changes: 2 additions & 2 deletions example/templates/layouts/secondary.timl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
html
head
@include "meta/head"
style: "
style: """
body {
background-color: #1b0f5b;
}
Expand Down Expand Up @@ -31,7 +31,7 @@ html
--bs-btn-disabled-bg: #0d6efd;
--bs-btn-disabled-border-color: #0d6efd;
}
"
"""
body
@view
@include "ws"
6 changes: 5 additions & 1 deletion example/templates/partials/foot.timl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ div.row > div.col-12.text-center
3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
span.fw-bold.ms-2: "Check it on GitHub"
if $this.path == "/about":
a href="/" .btn.btn-link.text-light.btn-lg.rounded-pill.px-4.py-2:
a.btn.text-light.btn-lg.rounded-pill.px-4.py-2 href="/":
"Go back to Homepage"
else:
div.mt-2 > a.text-light.text-decoration-none href="/about":
span.me-2 "Curious about"
em: "\"Forgotten Professions & Historical Oddities\"?"
div.text-center
p.mb-0: "&copy; " & $app.year & " &mdash; Made by Humans from OpenPeeps"
p: "Open Source | LGPL-3.0 license"
Expand Down
18 changes: 11 additions & 7 deletions example/templates/views/about.timl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@placeholder#topbar
var boxes = [
{
title: "Chimney Sweep"
Expand All @@ -19,26 +20,29 @@ var boxes = [
}
{
title: "Ancient Rome"
description: "In ancient Rome, gladiators sometimes fought wild animals while wearing costumes of mythological figures"
description: "In ancient Rome, gladiators sometimes
fought wild animals while wearing costumes of mythological figures"
}
{
title: "The first traffic light"
description: "Was installed in London in 1868 and used gas lanterns to signal stop and go."
description: "Was installed in London in 1868 and used gas
lanterns to signal stop and go."
}
{
title: "The Great Wall at once?"
description: "Nope. It wasn't built all at once, but over centuries by different dynasties."
description: "Nope. It wasn't built all at once, but over
centuries by different dynasties."
}
]

section.pt-5 > div.container
div.row > div#content-zone.col-lg-7.mx-auto
div.text-center > img src="https://raw.githubusercontent.com/openpeeps/tim/main/.github/timengine.png" alt="Tim Engine" width="200px"
h1.display-4.fw-bold:
"Some pure random Forgotten Professions & Historical Oddities"
"Random Forgotten Professions & Historical Oddities 🤯"
div.row.my-3.g-4
for $box in $boxes:
div.col-lg-4.d-flex.align-items-stretch > div.card.bg-transparent.text-light.border-0 style="border-radius: 18px" > div.card-body.p-4
div.card-title.fw-bold.h4: $box.title
p.card-text: $box.description
@include "foot"
div.card-title.fw-bold.h3: $box.title
p.card-text.fw-normal.h5.lh-base: $box.description
@include "foot"
2 changes: 1 addition & 1 deletion example/templates/views/index.timl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ section.pt-5 > div.container > div.row > div#content-zone.col-lg-7.mx-auto
"Build sleek, dynamic websites and apps in a breeze with
Tim Engine's intuitive syntax and powerful features.
It's the template engine that keeps up with your creativity."
@include "foot"
@include "foot" // include footer

0 comments on commit f67850d

Please sign in to comment.