Skip to content

Commit b7ce0f4

Browse files
committed
Added another example site.
1 parent 5951a26 commit b7ce0f4

File tree

12 files changed

+119
-0
lines changed

12 files changed

+119
-0
lines changed

examples/portfolio/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/logs/
2+
/output/
3+
/temp/

examples/portfolio/Build.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@ECHO OFF
2+
CD /D "%~dp0"
3+
..\..\webgen.exe build

examples/portfolio/README.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Information
2+
Portfolio Example
3+
4+
This example shows how to access data from the data folder. The site is just a
5+
single page that doesn't use any layout.

examples/portfolio/config.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
title = "My Art Portfolio",
3+
baseUrl = "http://portfolio.example/",
4+
languageCode = "en",
5+
}
2.43 KB
Loading
9.64 KB
Loading
5.11 KB
Loading
2.5 KB
Loading
477 Bytes
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{{
2+
page.date = "2020-09-12"
3+
page.layout = ""
4+
*}}
5+
6+
<!DOCTYPE html>
7+
8+
<html lang="{{ site.languageCode }}">
9+
<head>
10+
<meta charset="utf-8">
11+
<meta name="viewport" content="width=device-width, initial-scale=1">
12+
{{ generatorMeta() }}
13+
14+
<title>
15+
{{ echo(site.title) }}
16+
</title>
17+
18+
<link rel="canonical" href="{{ page.permalink }}">
19+
<link rel="stylesheet" href="/style.css">
20+
</head>
21+
22+
<body>
23+
<main>
24+
<section>
25+
<h1>About Me</h1>
26+
27+
<p>
28+
I have always liked lines.<br>
29+
Lines are true art in my eyes.<br>
30+
Long lines, short lines, few lines, many lines...<br>
31+
it makes no difference - I like all lines equally!
32+
</p>
33+
</section>
34+
35+
<section>
36+
<h1>My {{ #data.art.art }} Art Pieces</h1>
37+
38+
{{ fori piece in data.art.art }}
39+
<div class="art">
40+
{{
41+
local w, h = assert(getImageDimensions(piece.file))
42+
}}
43+
<img src="{{ piece.file }}" width="{{w}}" height="{{h}}">
44+
<div>{{ '"' .. piece.name .. '"' }}</div>
45+
</div>
46+
{{ end }}
47+
</section>
48+
49+
<section>
50+
<h1>Contact Me</h1>
51+
52+
<p>Write me a letter to this address:</p>
53+
<address>500 Avenue Street, North Pole, Saturn</address>
54+
<p>I love letters! (Not as much as lines, though.)</p>
55+
</section>
56+
</main>
57+
</body>
58+
</html>

0 commit comments

Comments
 (0)