Skip to content

Commit d2bb54d

Browse files
committed
feat(*): simplify items from recent activity
1 parent a526269 commit d2bb54d

File tree

7 files changed

+63
-71
lines changed

7 files changed

+63
-71
lines changed

public/stylesheets/sessionList.css

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.grid {
2+
display: grid;
3+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
4+
gap: 10px;
5+
}
6+
7+
.grid-item {
8+
border: 1px solid rgba(0, 0, 0, 0.8);
9+
padding: 20px;
10+
text-align: center;
11+
display: flex;
12+
flex-direction: column;
13+
justify-content: center;
14+
align-items: center;
15+
}
16+
17+
.grid-item p {
18+
margin: 5px 0;
19+
font-size: 16px;
20+
white-space: normal;
21+
word-break: break-word;
22+
text-align: center;
23+
}

public/stylesheets/style.css

+13-43
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,14 @@ body {
3434
font-family: "Poppins", sans-serif;
3535
}
3636

37-
.go-page-content {
37+
main {
3838
flex: 1;
3939
}
4040

41-
.go-page-footer {
41+
footer {
4242
width: 100%;
4343
}
4444

45-
.infobox {
46-
list-style-type: disc;
47-
padding-inline-start: 40px;
48-
}
49-
50-
.infobox__row {
51-
display: list-item;
52-
}
53-
54-
.infobox__heading,
55-
.infobox__details {
56-
display: inline;
57-
}
58-
59-
.infobox__heading {
60-
color: var(--text-bright);
61-
font-weight: 600;
62-
}
63-
64-
.infobox__details {
65-
margin-left: 0;
66-
}
67-
6845
.btn {
6946
appearance: button;
7047
border-radius: 6px;
@@ -82,26 +59,19 @@ body {
8259
text-decoration: none;
8360
}
8461

85-
.grid {
86-
display: grid;
87-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
88-
gap: 10px;
62+
.infobox dl {
63+
list-style-type: disc;
8964
}
9065

91-
.grid-item {
92-
border: 1px solid rgba(0, 0, 0, 0.8);
93-
padding: 20px;
94-
text-align: center;
95-
display: flex;
96-
flex-direction: column;
97-
justify-content: center;
98-
align-items: center;
66+
.infobox dt, dd{
67+
display: inline;
9968
}
10069

101-
.grid-item p {
102-
margin: 5px 0;
103-
font-size: 16px;
104-
white-space: normal;
105-
word-break: break-word;
106-
text-align: center;
70+
.infobox dt {
71+
color: var(--text-bright);
72+
font-weight: 600;
73+
}
74+
75+
.infobox dd {
76+
margin-left: 0;
10777
}

routes/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ async function handle(type, req, res, next) {
9797
res.status(200).render(type, json);
9898
}
9999

100-
function addMetadata(type, json) {
101-
json.bodyClass = type;
100+
function addMetadata(pageType, json) {
101+
json.bodyClass = pageType;
102+
json.pageType = pageType;
102103

103104
return json;
104105
}

views/layout.pug

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ html(lang="en")
55
meta(charset='utf-8')
66
meta(name='viewport', content='width=device-width, initial-scale=1')
77
meta(property="og:site_name" content="Resonite")
8+
meta(property="og:title" content=title)
9+
meta(property="og:type" content=`resonite.${pageType}`)
810
link(rel='stylesheet' href='https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css')
911
link(rel='stylesheet' href='/stylesheets/style.css')
1012
link(rel="preconnect" href="https://api.resonite.com")
@@ -14,12 +16,12 @@ html(lang="en")
1416
style.
1517
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
1618
body(class=bodyClass)
17-
header.go-page-header.center
19+
header.center
1820
img(src='/images/resonite.png' alt='Resonite')
19-
main.go-page-content
21+
main
2022
block content
2123
h1 Placeholder
22-
footer.go-page-footer
24+
footer
2325
p.center
2426
span Copyright ©
2527
a(href="https://yellowdogman.com/imprint.html") Yellow Dog Man Studios s.r.o.

views/session.pug

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
extends layout
22

33
block head
4-
meta(property="og:title" content=title)
5-
meta(property="og:type" content="resonite.session")
64
meta(property="og:image" content=thumbnailUrl)
75
meta(property="og:description" content!=description)
86
meta(name="twitter:card" content="summary_large_image")
@@ -15,15 +13,15 @@ block content
1513
img(src=thumbnailUrl alt=`A preview image of the '${title}' session.`)
1614

1715
dl.infobox
18-
.infobox__row
19-
dt.infobox__heading Host:
20-
dd.infobox__details #{hostUsername}
21-
.infobox__row
22-
dt.infobox__heading Version:
23-
dd.infobox__details #{appVersion}
24-
.infobox__row
25-
dt.infobox__heading Users (#{totalJoinedUsers}/#{maxUsers}):
26-
dd.infobox__details #{sessionUsers.map(user => user.username).join(", ")}
16+
.row
17+
dt Host:
18+
dd #{hostUsername}
19+
.row
20+
dt Version:
21+
dd #{appVersion}
22+
.row
23+
dt Users (#{totalJoinedUsers}/#{maxUsers}):
24+
dd #{sessionUsers.map(user => user.username).join(", ")}
2725
div.center
2826
a.btn(href=`ressession:///${sessionId}`) Join Session!
2927
p.center

views/sessionList.pug

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
extends layout
22

33
block head
4-
meta(property="og:title" content=title)
5-
meta(property="og:type" content="resonite.sessionList")
64
meta(property="og:description" content="Active sessions on Resonite")
75
link(type="application/json+oembed" href=`${urlPath}json`)
6+
link(rel='stylesheet' href='/stylesheets/sessionList.css')
87

98
block content
109
h1 Active Sessions

views/world.pug

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
extends layout
22

33
block head
4-
meta(property="og:title" content=title)
54
meta(property="og:type" content="resonite.world")
65
meta(property="og:image" content=thumbnailUri)
76
meta(property="og:description" content=description)
@@ -15,15 +14,15 @@ block content
1514
img(src=thumbnailUri alt=`A preview image of the '${title}' world.`)
1615

1716
dl.infobox
18-
.infobox__row
19-
dt.infobox__heading By:
20-
dd.infobox__details #{ownerName}
21-
.infobox__row
22-
dt.infobox__heading Description:
23-
dd.infobox__details #{description}
24-
.infobox__row
25-
dt.infobox__heading Tags:
26-
dd.infobox__details #{tags.join(", ")}
17+
.row
18+
dt By:
19+
dd #{ownerName}
20+
.row
21+
dt Description:
22+
dd #{description}
23+
.row
24+
dt Tags:
25+
dd #{tags.join(", ")}
2726
div.center
2827
a.btn(href=`resrec:///${ownerId}/${id}`) Open World!
2928
p.center

0 commit comments

Comments
 (0)