Browse Source

Initial commit

Graham Northup 2 years ago
commit
69078fb8ee
31 changed files with 581 additions and 0 deletions
  1. 4
    0
      .gitignore
  2. 18
    0
      Makefile
  3. 8
    0
      cmp/badges.html
  4. 5
    0
      cmp/header.html
  5. 7
    0
      cmp/nav.html
  6. 47
    0
      contact.html
  7. 10
    0
      contact.m4
  8. 57
    0
      downloads.html
  9. 12
    0
      downloads.m4
  10. 0
    0
      files/.git-keep
  11. BIN
      img/Octocat/Octocat.jpg
  12. BIN
      img/Octocat/Octocat.png
  13. BIN
      img/bg/fountain.png
  14. BIN
      img/bg/path.png
  15. BIN
      img/bg/spawn.png
  16. BIN
      img/discord/color.png
  17. BIN
      img/download.png
  18. BIN
      img/email.png
  19. BIN
      img/placeholder.png
  20. BIN
      img/right_arrow.png
  21. BIN
      img/world.png
  22. 57
    0
      index.html
  23. 27
    0
      index.m4
  24. 19
    0
      lib/00html.m4
  25. 28
    0
      lib/99local.m4
  26. 47
    0
      servers.html
  27. 10
    0
      servers.m4
  28. 185
    0
      style.css
  29. 27
    0
      util/server.py
  30. 13
    0
      util/versions.py
  31. 0
    0
      worlds/.git-keep

+ 4
- 0
.gitignore View File

@@ -0,0 +1,4 @@
1
+files/*
2
+!files/.git-keep
3
+worlds/*
4
+!worlds/.git-keep

+ 18
- 0
Makefile View File

@@ -0,0 +1,18 @@
1
+LIBDIR:=lib
2
+LIBS:=$(sort $(wildcard $(LIBDIR)/*.m4))
3
+
4
+SRCS:=$(wildcard *.m4)
5
+OUTS:=$(SRCS:.m4=.html)
6
+
7
+M4_DEFINES:=-Denv_libdir="$(LIBDIR)" -Denv_libs="$(LIBS)" -Denv_srcs="$(SRCS)" -Denv_outs="$(OUTS)"
8
+
9
+website: _force $(OUTS)
10
+
11
+_force:
12
+
13
+.PHONY: website _force
14
+
15
+$(OUTS): _force
16
+
17
+%.html: %.m4
18
+	m4 -P $(M4_DEFINES) -Denv_filename="$<" $(M4FLAGS) $(LIBS) $< > $@

+ 8
- 0
cmp/badges.html View File

@@ -0,0 +1,8 @@
1
+m4_define([[ll_badges]], [[<div class="badges">
2
+ll_each_badge($@)
3
+</div>]])m4_dnl
4
+m4_define([[ll_each_badge]], [[m4_ifelse([[$#$1]], [[1]], [[]], [[$#]], [[0]], [[]], [[ll_badge($1)
5
+$0(m4_shift($@))]])]])m4_dnl
6
+m4_define([[ll_badge]], [[m4_ifelse([[$4]], [[]], [[<div]], [[<a href="$4"]]) class="badge" m4_ifelse([[$3]], [[]], [[]], [[style="$3"]])>
7
+	<img src="m4_ifelse([[$2]], [[]], [[img/placeholder.png]], [[$2]])"/><p>$1</p>
8
+</m4_ifelse([[$4]], [[]], [[div]], [[a]])>]])m4_dnl

+ 5
- 0
cmp/header.html View File

@@ -0,0 +1,5 @@
1
+m4_define([[ll_header]], [[<style type="text/css">body { background-image: url($1); }</style>
2
+<header>
3
+	<h1><a href="./">Lusty Lavender</a></h1>
4
+	<h2>An <a href="https://electrical-age.net/">Electrical Age</a> Development Modpack</h2>
5
+</header>]])m4_dnl

+ 7
- 0
cmp/nav.html View File

@@ -0,0 +1,7 @@
1
+<nav>
2
+	<ul>
3
+		<a href="downloads.html"><li>Downloads</li></a>
4
+		<a href="servers.html"><li>Servers</li></a>
5
+		<a href="contact.html"><li>Contact</li></a>
6
+	</ul>
7
+</nav>

+ 47
- 0
contact.html View File

@@ -0,0 +1,47 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<title>Lusty Lavender</title>
5
+		<link rel="stylesheet" href="style.css" type="text/css"/>
6
+		<meta charset="utf-8"/>
7
+
8
+		<!-- Hello, and thanks for reading the source code! This is Grissess,
9
+			 and all of this content was handmade in Neovim and spliced
10
+			 together with GNU m4. Feel free to peek around and learn, and even
11
+			 use these patterns on your own projects - but please ask us before
12
+			 hosting exact replicas of our website, or hosting the modpack, so
13
+			 that we can make sure everyone gets content that's up to date :) .
14
+			 Have a good one!                                                   -->
15
+	</head>
16
+	<body>
17
+
18
+<style type="text/css">body { background-image: url(img/bg/spawn.png); }</style>
19
+<header>
20
+	<h1><a href="./">Lusty Lavender</a></h1>
21
+	<h2>An <a href="https://electrical-age.net/">Electrical Age</a> Development Modpack</h2>
22
+</header>
23
+
24
+<section class="main">
25
+<nav>
26
+	<ul>
27
+		<a href="downloads.html"><li>Downloads</li></a>
28
+		<a href="servers.html"><li>Servers</li></a>
29
+		<a href="contact.html"><li>Contact</li></a>
30
+	</ul>
31
+</nav>
32
+
33
+<span class="discordAreaMarker">
34
+<div class="badges">
35
+<a href="https://discord.gg/DTGVB9a" class="badge" >
36
+	<img src="img/discord/color.png"/><p>Join our Discord server</p>
37
+</a>
38
+<a href="mailto:jrddunbr@gmail.com" class="badge" >
39
+	<img src="img/email.png"/><p>Send the admin an email</p>
40
+</a>
41
+
42
+</div>
43
+</span>
44
+</section>
45
+
46
+	</body>
47
+</html>

+ 10
- 0
contact.m4 View File

@@ -0,0 +1,10 @@
1
+ht_include([[cmp/header.html]])m4_dnl
2
+ll_header([[img/bg/spawn.png]])
3
+
4
+<section class="main">
5
+ht_include([[cmp/nav.html]])
6
+ht_include([[cmp/badges.html]])m4_dnl
7
+<span class="discordAreaMarker">
8
+ll_badges([[[[Join our Discord server]],[[img/discord/color.png]],,[[https://discord.gg/DTGVB9a]]]],[[[[Send the admin an email]],[[img/email.png]],,[[mailto:jrddunbr@gmail.com]]]])
9
+</span>
10
+</section>

+ 57
- 0
downloads.html View File

@@ -0,0 +1,57 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<title>Lusty Lavender</title>
5
+		<link rel="stylesheet" href="style.css" type="text/css"/>
6
+		<meta charset="utf-8"/>
7
+
8
+		<!-- Hello, and thanks for reading the source code! This is Grissess,
9
+			 and all of this content was handmade in Neovim and spliced
10
+			 together with GNU m4. Feel free to peek around and learn, and even
11
+			 use these patterns on your own projects - but please ask us before
12
+			 hosting exact replicas of our website, or hosting the modpack, so
13
+			 that we can make sure everyone gets content that's up to date :) .
14
+			 Have a good one!                                                   -->
15
+	</head>
16
+	<body>
17
+
18
+<style type="text/css">body { background-image: url(img/bg/fountain.png); }</style>
19
+<header>
20
+	<h1><a href="./">Lusty Lavender</a></h1>
21
+	<h2>An <a href="https://electrical-age.net/">Electrical Age</a> Development Modpack</h2>
22
+</header>
23
+
24
+<section class="main">
25
+<nav>
26
+	<ul>
27
+		<a href="downloads.html"><li>Downloads</li></a>
28
+		<a href="servers.html"><li>Servers</li></a>
29
+		<a href="contact.html"><li>Contact</li></a>
30
+	</ul>
31
+</nav>
32
+
33
+<div class="badges">
34
+<a href="files/llv7.zip" class="badge" >
35
+	<img src="img/download.png"/><p>Download the latest version</p>
36
+</a>
37
+<a href="https://github.com/jrddunbr/ElectricalAge" class="badge" >
38
+	<img src="img/Octocat/Octocat.png"/><p>Browse source on GitHub</p>
39
+</a>
40
+<a href="worlds/latest.7z" class="badge" >
41
+	<img src="img/world.png"/><p>Get the map</p>
42
+</a>
43
+
44
+</div>
45
+
46
+<h3>Worlds:</h3>
47
+
48
+<ul class="versions">
49
+	<li><a href="worlds/latest.7z">latest.7z</a></li>
50
+	<li><a href="worlds/ll-07-07-2018_19:35:05.7z">ll-07-07-2018_19:35:05.7z</a></li>
51
+	<li><a href="worlds/ll-08-07-2018_04:00:22.7z">ll-08-07-2018_04:00:22.7z</a></li>
52
+</ul>
53
+
54
+</section>
55
+
56
+	</body>
57
+</html>

+ 12
- 0
downloads.m4 View File

@@ -0,0 +1,12 @@
1
+ht_include([[cmp/header.html]])m4_dnl
2
+ll_header([[img/bg/fountain.png]])
3
+
4
+<section class="main">
5
+ht_include([[cmp/nav.html]])
6
+ht_include([[cmp/badges.html]])m4_dnl
7
+ll_badges([[[[Download the latest version]],[[img/download.png]],,[[files/llv7.zip]]]], [[[[Browse source on GitHub]],[[img/Octocat/Octocat.png]],,[[https://github.com/jrddunbr/ElectricalAge]]]], [[[[Get the map]],[[img/world.png]],,[[worlds/latest.7z]]]])
8
+
9
+<h3>Worlds:</h3>
10
+
11
+m4_syscmd([[util/versions.py worlds]])
12
+</section>

+ 0
- 0
files/.git-keep View File


BIN
img/Octocat/Octocat.jpg View File


BIN
img/Octocat/Octocat.png View File


BIN
img/bg/fountain.png View File


BIN
img/bg/path.png View File


BIN
img/bg/spawn.png View File


BIN
img/discord/color.png View File


BIN
img/download.png View File


BIN
img/email.png View File


BIN
img/placeholder.png View File


BIN
img/right_arrow.png View File


BIN
img/world.png View File


+ 57
- 0
index.html View File

@@ -0,0 +1,57 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<title>Lusty Lavender</title>
5
+		<link rel="stylesheet" href="style.css" type="text/css"/>
6
+		<meta charset="utf-8"/>
7
+
8
+		<!-- Hello, and thanks for reading the source code! This is Grissess,
9
+			 and all of this content was handmade in Neovim and spliced
10
+			 together with GNU m4. Feel free to peek around and learn, and even
11
+			 use these patterns on your own projects - but please ask us before
12
+			 hosting exact replicas of our website, or hosting the modpack, so
13
+			 that we can make sure everyone gets content that's up to date :) .
14
+			 Have a good one!                                                   -->
15
+	</head>
16
+	<body>
17
+
18
+<style type="text/css">body { background-image: url(img/bg/spawn.png); }</style>
19
+<header>
20
+	<h1><a href="./">Lusty Lavender</a></h1>
21
+	<h2>An <a href="https://electrical-age.net/">Electrical Age</a> Development Modpack</h2>
22
+</header>
23
+
24
+<section class="main">
25
+<nav>
26
+	<ul>
27
+		<a href="downloads.html"><li>Downloads</li></a>
28
+		<a href="servers.html"><li>Servers</li></a>
29
+		<a href="contact.html"><li>Contact</li></a>
30
+	</ul>
31
+</nav>
32
+
33
+
34
+<p>
35
+	<code>Lusty Lavender</code> is a relatively lightweight modpack designed specifically to experiment with the <a href="https://electrical-age.net/">Electrical Age</a> mod. It also contains some support mods:
36
+	<ul>
37
+		<li>OpenComputers,</li>
38
+		<li>Applied Energistics 2,</li>
39
+		<li>BuildCraft,</li>
40
+		<li>Thermal Expansion, Thermal Dynamics, etc.,</li>
41
+		<li>RailCraft,</li>
42
+		<li>some of Project Red,</li>
43
+	</ul>
44
+	...and so forth, mostly to serve and complement Electrical Age nicely.
45
+</p>
46
+
47
+<p>
48
+	The pack and the server are currently maintained by <a href="https://github.com/jrddunbr/">Jared Dunbar</a>, and the Electrical Age used in the pack may be built off his own repository tip&mdash;so don't expect it to be 100%-compatible with mainline ELN (instead, expect bugfixes!).
49
+</p>
50
+
51
+<p>
52
+	To get started, <a href="downloads.html">download</a> the latest version, and check out the <a href="downloads.html#instructions">instructions</a>. Then, connect to a <a href="servers.html">server</a>!
53
+</p>
54
+</section>
55
+
56
+	</body>
57
+</html>

+ 27
- 0
index.m4 View File

@@ -0,0 +1,27 @@
1
+ht_include([[cmp/header.html]])m4_dnl
2
+ll_header([[img/bg/spawn.png]])
3
+
4
+<section class="main">
5
+ht_include([[cmp/nav.html]])
6
+
7
+<p>
8
+	<code>Lusty Lavender</code> is a relatively lightweight modpack designed specifically to experiment with the <a href="https://electrical-age.net/">Electrical Age</a> mod. It also contains some support mods:
9
+	<ul>
10
+		<li>OpenComputers,</li>
11
+		<li>Applied Energistics 2,</li>
12
+		<li>BuildCraft,</li>
13
+		<li>Thermal Expansion, Thermal Dynamics, etc.,</li>
14
+		<li>RailCraft,</li>
15
+		<li>some of Project Red,</li>
16
+	</ul>
17
+	...and so forth, mostly to serve and complement Electrical Age nicely.
18
+</p>
19
+
20
+<p>
21
+	The pack and the server are currently maintained by <a href="https://github.com/jrddunbr/">Jared Dunbar</a>, and the Electrical Age used in the pack may be built off his own repository tip&mdash;so don't expect it to be 100%-compatible with mainline ELN (instead, expect bugfixes!).
22
+</p>
23
+
24
+<p>
25
+	To get started, <a href="downloads.html">download</a> the latest version, and check out the <a href="downloads.html#instructions">instructions</a>. Then, connect to a <a href="servers.html">server</a>!
26
+</p>
27
+</section>

+ 19
- 0
lib/00html.m4 View File

@@ -0,0 +1,19 @@
1
+m4_divert(-1)
2
+
3
+This file is loaded first. Place any macros you want to access from all files
4
+here. Note that the Makefile runs with -P, so all builtins have an m4 prefix.
5
+
6
+First and foremost, change the quote character to doubled brackets, which are
7
+unlikely to conflict with any syntactic element in HTML itself. Note that the
8
+string end quote would conflict with CDATA for XHTML, so this should be
9
+avoided. HTML5 generally has no need for CDATA sections.
10
+
11
+m4_changequote(`[[', `]]')
12
+
13
+ht_include([[filename]]) - include a filename relative to the Makefile root.
14
+(This is a thin wrapper around m4_include which can be redirected or
15
+redefined.)
16
+
17
+m4_define([[ht_include]], [[m4_include($@)]])
18
+
19
+m4_divert(0)m4_dnl

+ 28
- 0
lib/99local.m4 View File

@@ -0,0 +1,28 @@
1
+m4_divert(-1)
2
+
3
+This file contains local configuration. For the most part, it's responsible for
4
+printing out the initial lines of all files. You should avoid anything not
5
+specifically local here--it can go in 00html.m4 instead.
6
+
7
+m4_divert(9)m4_dnl This section contains footer material for all pages.
8
+
9
+	</body>
10
+</html>
11
+m4_divert(0)m4_dnl
12
+<!DOCTYPE html>
13
+<html>
14
+	<head>
15
+		<title>Lusty Lavender</title>
16
+		<link rel="stylesheet" href="style.css" type="text/css"/>
17
+		<meta charset="utf-8"/>
18
+
19
+		<!-- Hello, and thanks for reading the source code! This is Grissess,
20
+			 and all of this content was handmade in Neovim and spliced
21
+			 together with GNU m4. Feel free to peek around and learn, and even
22
+			 use these patterns on your own projects - but please ask us before
23
+			 hosting exact replicas of our website, or hosting the modpack, so
24
+			 that we can make sure everyone gets content that's up to date :) .
25
+			 Have a good one!                                                   -->
26
+	</head>
27
+	<body>
28
+

+ 47
- 0
servers.html View File

@@ -0,0 +1,47 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<title>Lusty Lavender</title>
5
+		<link rel="stylesheet" href="style.css" type="text/css"/>
6
+		<meta charset="utf-8"/>
7
+
8
+		<!-- Hello, and thanks for reading the source code! This is Grissess,
9
+			 and all of this content was handmade in Neovim and spliced
10
+			 together with GNU m4. Feel free to peek around and learn, and even
11
+			 use these patterns on your own projects - but please ask us before
12
+			 hosting exact replicas of our website, or hosting the modpack, so
13
+			 that we can make sure everyone gets content that's up to date :) .
14
+			 Have a good one!                                                   -->
15
+	</head>
16
+	<body>
17
+
18
+<style type="text/css">body { background-image: url(img/bg/path.png); }</style>
19
+<header>
20
+	<h1><a href="./">Lusty Lavender</a></h1>
21
+	<h2>An <a href="https://electrical-age.net/">Electrical Age</a> Development Modpack</h2>
22
+</header>
23
+
24
+<section class="main">
25
+<nav>
26
+	<ul>
27
+		<a href="downloads.html"><li>Downloads</li></a>
28
+		<a href="servers.html"><li>Servers</li></a>
29
+		<a href="contact.html"><li>Contact</li></a>
30
+	</ul>
31
+</nav>
32
+
33
+<div class="badges">
34
+<div class="badge" >
35
+	<img src="img/right_arrow.png"/><p>Connect to <addr>eln.ja13.org:3030</addr></p>
36
+</div>
37
+
38
+</div>
39
+
40
+<div class="serverStatus">
41
+<div class="statusLine"><span class="serverName">[Unofficial ELN Testing Server] LLv7</span> is up: <span class="online">0</span>/<span class="max">30</span> players</div>
42
+</div>
43
+
44
+</section>
45
+
46
+	</body>
47
+</html>

+ 10
- 0
servers.m4 View File

@@ -0,0 +1,10 @@
1
+ht_include([[cmp/header.html]])m4_dnl
2
+ll_header([[img/bg/path.png]])
3
+
4
+<section class="main">
5
+ht_include([[cmp/nav.html]])
6
+ht_include([[cmp/badges.html]])m4_dnl
7
+ll_badges([[[[Connect to <addr>eln.ja13.org:3030</addr>]],[[img/right_arrow.png]]]])
8
+
9
+m4_syscmd([[util/server.py 128.153.145.151 3030]])
10
+</section>

+ 185
- 0
style.css View File

@@ -0,0 +1,185 @@
1
+body {
2
+	margin: 0;
3
+	background-color: #ddd;
4
+	background-size: cover;
5
+	background-repeat: no-repeat;
6
+}
7
+
8
+a, a:visited {
9
+	text-decoration: none;
10
+}
11
+
12
+a:hover {
13
+	text-decoration: underline;
14
+}
15
+
16
+h1 {
17
+	font-size: 450%;
18
+}
19
+
20
+h1, h1 a {
21
+	font-variant: small-caps;
22
+	font-family: Courier;
23
+	text-decoration: none;
24
+}
25
+
26
+h2 {
27
+	font-style: italic;
28
+}
29
+
30
+h1, h2 {
31
+	text-align: center;
32
+	margin: 0;
33
+	padding: 0.25em 0;
34
+	background-color: rgb(255, 255, 255, 0.25);
35
+	color: #7700aa;
36
+	text-shadow: 1px 1px 2px #fff, -1px 1px 2px #fff, -1px -1px 2px #fff, 1px -1px 2px #fff;
37
+}
38
+
39
+h3 {
40
+	font-variant: small-caps;
41
+}
42
+
43
+header {
44
+	padding: 4em 0 6em 0;
45
+}
46
+
47
+section.main {
48
+	margin: -2em 15%;
49
+	box-shadow: 0 -3px 6px #000;
50
+	background-color: #eee;
51
+	padding: 1em;
52
+}
53
+
54
+nav ul {
55
+	display: flex;
56
+	flex-direction: row;
57
+	width: 100%;
58
+	list-style: none inside;
59
+	justify-content: space-evenly;
60
+	padding: 0;
61
+}
62
+
63
+nav ul li {
64
+	font-size: 125%;
65
+	padding: 0.5em 1em;
66
+	background-color: #007;
67
+	border: 1px solid #000;
68
+	border-radius: 5px;
69
+}
70
+
71
+nav ul a {
72
+	color: #fff;
73
+	font-weight: bold;
74
+}
75
+
76
+nav ul a:visited {
77
+	color: #9f9;
78
+}
79
+
80
+div.badges {
81
+	display: flex;
82
+	flex-direction: row;
83
+	flex-wrap: wrap;
84
+	justify-content: space-evenly;
85
+	width: 100%;
86
+	padding: 1em;
87
+}
88
+
89
+.badge {
90
+	display: flex;
91
+	border: 1px solid #bbb;
92
+	border-radius: 3px;
93
+	width: 40%;
94
+	padding: 0.5em;
95
+	margin: 0.5em 1.5em;
96
+	font-weight: bold;
97
+	background-color: #ccc;
98
+	box-shadow: 0 0 2px #000;
99
+	align-items: center;
100
+	justify-content: center;
101
+}
102
+
103
+.badge div {
104
+	margin: auto;
105
+}
106
+
107
+.badge img {
108
+	float: left;
109
+	height: 48px;
110
+	margin: 0.5em;
111
+	vertical-align: middle;
112
+}
113
+
114
+.error {
115
+	color: #700;
116
+}
117
+
118
+.serverStatus .statusLine {
119
+	text-align: center;
120
+}
121
+
122
+.serverStatus .serverName, .serverStatus .online {
123
+	font-weight: bold;
124
+}
125
+
126
+.serverStatus .max {
127
+	color: #007;
128
+	font-style: italic;
129
+}
130
+
131
+.serverStatus .players {
132
+	display: flex;
133
+	flex-direction: row;
134
+	flex-wrap: wrap;
135
+	justify-content: space-evenly;
136
+	padding: 1em;
137
+}
138
+
139
+.serverStatus .players .player {
140
+	display: flex;
141
+	align-items: center;
142
+	width: 30%;
143
+	padding: 0.5em;
144
+	border: 1px solid #bbb;
145
+	border-radius: 3px;
146
+}
147
+
148
+.serverStatus .players .player img {
149
+	margin: 0.5em;
150
+	height: 48px;
151
+	float: left;
152
+}
153
+
154
+.serverStatus .players .player .name {
155
+	font-family: Courier;
156
+}
157
+
158
+.versions {
159
+	padding: 0;
160
+	list-style: none inside;
161
+}
162
+
163
+.versions li {
164
+	margin: 0.5em 0;
165
+}
166
+
167
+.versions li a {
168
+	display: block;
169
+	padding: 0.5em;
170
+	padding-left: 1.5em;
171
+	background-color: #aaf;
172
+	font-family: Courier;
173
+	font-size: 125%;
174
+}
175
+
176
+.versions li a:hover {
177
+	background-color: #afa;
178
+}
179
+
180
+.discordAreaMarker img {
181
+	background-color: #fff;
182
+	border: 2px solid #444;
183
+	border-radius: 3px;
184
+	padding: 0.5em;
185
+}

+ 27
- 0
util/server.py View File

@@ -0,0 +1,27 @@
1
+#!/usr/bin/env python3
2
+import sys, cgi, socket
3
+
4
+from mcstatus import MinecraftServer
5
+
6
+AVATAR_URI = 'https://crafatar.com/avatars/{}.png'
7
+
8
+if len(sys.argv) < 3:
9
+    print(f'usage: {sys.argv[0]} host port', file=sys.stderr)
10
+    exit()
11
+
12
+print('<div class="serverStatus">')
13
+
14
+server = MinecraftServer(sys.argv[1], int(sys.argv[2]))
15
+try:
16
+    stat = server.status()
17
+except (ConnectionError, socket.error):
18
+    print('<div class="error">The server at {cgi.escape(sys.argv[1])}:{sys.argv[2]}appears to be down.</div>')
19
+else:
20
+    print(f'<div class="statusLine"><span class="serverName">{cgi.escape(stat.description)}</span> is up: <span class="online">{stat.players.online}</span>/<span class="max">{stat.players.max}</span> players</div>')
21
+    if stat.players.online:
22
+        print('<div class="players">')
23
+        for player in stat.players.sample:
24
+            print(f'\t<div class="player"><img src="{AVATAR_URI.format(player.id)}"/><p class="name">{cgi.escape(player.name)}</p></div>')
25
+        print('</div>')
26
+
27
+print('</div>')

+ 13
- 0
util/versions.py View File

@@ -0,0 +1,13 @@
1
+#!/usr/bin/env python3
2
+import sys, os
3
+
4
+if len(sys.argv) < 2:
5
+    print(f'usage: {sys.argv[0]} dir', file=sys.stderr)
6
+    exit()
7
+
8
+print('<ul class="versions">')
9
+for fname in sorted(os.listdir(sys.argv[1])):
10
+    if fname.startswith('.'):
11
+        continue
12
+    print(f'\t<li><a href="{sys.argv[1]}/{fname}">{fname}</a></li>')
13
+print('</ul>')

+ 0
- 0
worlds/.git-keep View File


Loading…
Cancel
Save