weewoo
This commit is contained in:
parent
3a91ee6264
commit
c061347b0a
41 changed files with 180 additions and 69 deletions
|
|
@ -2,8 +2,8 @@ body {
|
|||
max-width: 940px;
|
||||
margin: 0 auto;
|
||||
padding: 1em;
|
||||
font-family: Verdana;
|
||||
background-color: azure;
|
||||
font-family: Arial;
|
||||
background-image: url('https://file.garden/aJzQmzrHVB4BLKwu/pencils-5682457_640.jpg');
|
||||
color: midnightblue;
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,8 @@ body {
|
|||
|
||||
.cols {
|
||||
display: grid;
|
||||
}
|
||||
background-color: #fff;
|
||||
color: #000;}
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
|
|
@ -45,6 +46,8 @@ a {
|
|||
|
||||
.status {
|
||||
margin-bottom: 1em;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
dt {
|
||||
|
|
@ -78,4 +81,4 @@ dd {
|
|||
|
||||
.info {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
83
assets/style2.css/style.css
Normal file
83
assets/style2.css/style.css
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
body {
|
||||
max-width: 940px;
|
||||
margin: 0 auto;
|
||||
padding: 1em;
|
||||
font-family: Arial;
|
||||
background-image: url('https://file.garden/aJzQmzrHVB4BLKwu/pencils-5682457_640.jpg');
|
||||
color: midnightblue;
|
||||
}
|
||||
|
||||
.faces {
|
||||
margin-bottom: 1em;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.profile-picture {
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.flash {
|
||||
background-color: lightgreen;
|
||||
padding: 0.5em 1em;
|
||||
color: darkgreen;
|
||||
}
|
||||
|
||||
.cols {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-username {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.status-content {
|
||||
margin: 0 1em 0.5em 1em;
|
||||
}
|
||||
|
||||
.status nav {
|
||||
font-size: 0.8em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-bottom: 1em;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.edit-status {
|
||||
width: 100%; box-sizing: border-box; height: 100px;
|
||||
}
|
||||
|
||||
.tools {
|
||||
list-style-position: inside;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 650px) {
|
||||
.cols {
|
||||
grid-template-columns: 1fr 2fr;
|
||||
grid-gap: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
.radio { display: inline-block }
|
||||
.field { margin-bottom: 1rem; max-width: 500px; }
|
||||
.field > label { margin-bottom: .25rem; }
|
||||
.field > * { display: block; width: 100%; box-sizing: border-box; }
|
||||
|
||||
.info {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
db/pg_xact/0000
BIN
db/pg_xact/0000
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
1
|
||||
/var/lib/postgresql/data
|
||||
1763592637
|
||||
1763613416
|
||||
5432
|
||||
/var/run/postgresql
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ var TplCommonMap = map[string]string{
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ template "title" . }}Status Cafe</title>
|
||||
<title>{{ template "title" . }}Sillywordz!!!</title>
|
||||
<meta name="description" content="your friends' updates">
|
||||
<link rel="stylesheet" href="/assets/style.css"/>
|
||||
<link rel="stylesheet" href="/assets/style.css?v=2"/>
|
||||
{{ if .face }}
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ .face }}</text></svg>">
|
||||
{{ else }}
|
||||
|
|
@ -26,8 +26,7 @@ var TplCommonMap = map[string]string{
|
|||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a href="/">status.cafe</a> <a href="https://forum.status.cafe">forum</a>
|
||||
<nav><a href="/">home</a>
|
||||
{{ if .logged }}
|
||||
<a href="/settings">settings</a> <a href="/users/{{ .logged }}">{{ .logged }}</a> (<a href="/logout">logout</a>)
|
||||
{{ else }}
|
||||
|
|
@ -45,11 +44,15 @@ var TplCommonMap = map[string]string{
|
|||
</html>
|
||||
{{ end }}
|
||||
{{ define "head" }}{{ end }}
|
||||
{{ define "title" }}{{ end }}`,
|
||||
{{ define "title" }}{{ end }}
|
||||
`,
|
||||
"status": `{{ define "status" }}
|
||||
<div class="status-username"><a href="/users/{{ .User }}">{{ .User }}</a> {{ .Face }} {{ .TimeAgo }}</div>
|
||||
<p class="status-content">{{ .ContentHtml }}</p>
|
||||
{{ end }}`,
|
||||
<div class="status-number">
|
||||
I wrote {{ .Number }} words!</div> {{ if .Content}}
|
||||
<p class="status-content">And I had this to say about it: {{ .ContentHtml }}</p> {{ end }}
|
||||
{{ end }}
|
||||
`,
|
||||
"status_form": `{{ define "status_form" }}
|
||||
<div class="faces">
|
||||
{{ range $i, $v := faces }}
|
||||
|
|
|
|||
|
|
@ -112,14 +112,18 @@ var TplMap = map[string]string{
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p>Past this code into your HTML file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 75px;"><div id="sillywordz"><div id="sillywordz-username"></div><div id="sillywordz-content"></div></div><script src="https://sillywordz.kissing.computer/current-status.js?name={{ .name }}" defer></script></textarea>
|
||||
<p>Past this code into your CSS file:</p>
|
||||
<p>Paste this code into your HTML file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 75px;"><div id="sillywordz"><div id="sillywordz-username"></div><div id="sillywordz-number"><div id="sillywordz-content"></div></div><script src="https://sillywordz.kissing.computer/current-status.js?name={{ .name }}"></script></textarea>
|
||||
<p>Paste this code into your CSS file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 175px;">#sillywordz {
|
||||
padding: .5em;
|
||||
background-color: azure;
|
||||
border: 1px solid midnightblue;
|
||||
}
|
||||
|
||||
#sillywordz-number {
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
#sillywordz-username {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
|
@ -164,7 +168,7 @@ var TplMap = map[string]string{
|
|||
<div class="cols">
|
||||
<section>
|
||||
{{ if .logged }}
|
||||
<h2>Set your status</h2>
|
||||
<h2>Update your word count!</h2>
|
||||
{{ if .form.Error }}
|
||||
<p>{{ .form.Error }}</p>
|
||||
{{ end }}
|
||||
|
|
@ -182,9 +186,8 @@ var TplMap = map[string]string{
|
|||
<p>sillywordz is a place to share progress on your current writing projects.</p>
|
||||
<p><a href="/register">Register now!</a></p>
|
||||
{{ end }}
|
||||
<p><img src="/assets/button.png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/"><img src="https://status.cafe/assets/button.png" alt="Sillywordz"/></a></textarea></p></p>
|
||||
<p><a href="/feed.atom">Subscribe via Atom</a></p>
|
||||
</section>
|
||||
<p><img src="https://file.garden/aJzQmzrHVB4BLKwu/button(2).png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/button(2).png" alt="Sillywordz"/></a></textarea></p></p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Stream of updates!</h2>
|
||||
{{ range .statuses }}
|
||||
|
|
@ -217,7 +220,7 @@ var TplMap = map[string]string{
|
|||
</section>
|
||||
{{ end }}`,
|
||||
"manage": `{{ define "content" }}
|
||||
<h1>Manage statuses</h1>
|
||||
<h1>Manage updates</h1>
|
||||
{{ template "flash" .flash }}
|
||||
{{ range .statuses }}
|
||||
<article class="status">
|
||||
|
|
@ -241,7 +244,8 @@ var TplMap = map[string]string{
|
|||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}`,
|
||||
{{ end }}
|
||||
`,
|
||||
"register": `{{ define "content" }}
|
||||
<section>
|
||||
<h1>Register</h1>
|
||||
|
|
@ -271,14 +275,15 @@ var TplMap = map[string]string{
|
|||
<input type="password" id="password-confirm" name="password-confirm" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="answer">How did you discover status.cafe?</label>
|
||||
<label for="answer">How did you discover sillywordz?</label>
|
||||
<textarea id="answer" name="answer" required></textarea>
|
||||
</div>
|
||||
<p>By clicking the following button you agree to our <a href="/tos" target="_blank">Terms of Service</a>.</p>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</section>
|
||||
{{ end }}`,
|
||||
{{ end }}
|
||||
`,
|
||||
"register-success": `{{ define "content" }}
|
||||
<section>
|
||||
<h1>Thank you!</h1>
|
||||
|
|
@ -348,15 +353,15 @@ var TplMap = map[string]string{
|
|||
"tos": `{{ define "content" }}
|
||||
<section>
|
||||
<h1>Terms of service</h1>
|
||||
<p>In order to use Status Cafe, you must agree to the following rules. A user not respecting these rules will have their account removed and will be banned from the service. The general rule is to be nice, friendly and respectful to anyone and their status.</p>
|
||||
<p><b>Racist, bigoted or otherwise hate speech</b> is not permitted. Status Cafe is an inclusive place that will not tolerate anyone promoting hateful ideas and language.</p>
|
||||
<p>In order to use Sillywordz, you must agree to the following rules. A user not respecting these rules will have their account removed and will be banned from the service. The general rule is to be nice, friendly and respectful to anyone and their status.</p>
|
||||
<p><b>Racist, transphobic, ableist, homophobic etc bigoted or otherwise hate speech</b> is not permitted. SILLYWORDZ is an inclusive place that will not tolerate anyone promoting hateful ideas and language.</p>
|
||||
<p><b>Illegal activities</b> such as promoting malware, phishing or publishing something that promotes content that infringes copyright, patent or trademark you do not own is not permitted.</p>
|
||||
<p><b>Pornographic content</b> is not allowed.</p>
|
||||
<p><b>Spamming</b>, including unsolicited advertising isn't allowed. While it's perfectly fine to talk about your projects and link them, using Status Cafe only as a way to drive traffic to an external site isn't allowed.</p>
|
||||
<p><b>Spamming</b> is not allowed.</p>
|
||||
<p><b>Harassing</b>, bullying, picking on a user isn't permitted.</p>
|
||||
<p><b>Revealing information (doxing)</b> from a user isn't allowed.</p>
|
||||
</section>
|
||||
{{ end }}`,
|
||||
{{ end }}
|
||||
`,
|
||||
"user": `{{ define "head" }}
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="/users/{{ .user }}.atom" />
|
||||
{{ end }}
|
||||
|
|
@ -370,8 +375,7 @@ var TplMap = map[string]string{
|
|||
{{ if .picture }}
|
||||
<img src="{{ .picture }}" class="profile-picture"/>
|
||||
{{ end }}
|
||||
<p><a href="/users/{{ .user }}.atom">Subscribe via Atom</a></p>
|
||||
<dl>
|
||||
<dl>
|
||||
<dt class="homepage">Homepage</dt>
|
||||
<dd class="homepage">
|
||||
{{ if .homepage }}
|
||||
|
|
@ -397,7 +401,7 @@ var TplMap = map[string]string{
|
|||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Statuses</h2>
|
||||
<h2>Updates</h2>
|
||||
{{ range .statuses }}
|
||||
<article class="status">
|
||||
{{ template "status" . }}
|
||||
|
|
@ -419,5 +423,6 @@ var TplMap = map[string]string{
|
|||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}`,
|
||||
{{ end }}
|
||||
`,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ template "title" . }}Status Cafe</title>
|
||||
<title>{{ template "title" . }}Sillywordz!!!</title>
|
||||
<meta name="description" content="your friends' updates">
|
||||
<link rel="stylesheet" href="/assets/style.css"/>
|
||||
<link rel="stylesheet" href="/assets/style.css?v=2"/>
|
||||
{{ if .face }}
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ .face }}</text></svg>">
|
||||
{{ else }}
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a href="/">status.cafe</a> <a href="https://forum.status.cafe">forum</a>
|
||||
<nav><a href="/">home</a>
|
||||
{{ if .logged }}
|
||||
<a href="/settings">settings</a> <a href="/users/{{ .logged }}">{{ .logged }}</a> (<a href="/logout">logout</a>)
|
||||
{{ else }}
|
||||
|
|
@ -35,4 +34,4 @@
|
|||
</html>
|
||||
{{ end }}
|
||||
{{ define "head" }}{{ end }}
|
||||
{{ define "title" }}{{ end }}
|
||||
{{ define "title" }}{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{{ define "status" }}
|
||||
<div class="status-username"><a href="/users/{{ .User }}">{{ .User }}</a> {{ .Face }} {{ .TimeAgo }}</div>
|
||||
<p class="status-content">{{ .ContentHtml }}</p>
|
||||
{{ end }}
|
||||
<div class="status-number">
|
||||
I wrote {{ .Number }} words!</div> {{ if .Content}}
|
||||
<p class="status-content">And I had this to say about it: {{ .ContentHtml }}</p> {{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -37,14 +37,18 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p>Past this code into your HTML file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 75px;"><div id="sillywordz"><div id="sillywordz-username"></div><div id="sillywordz-content"></div></div><script src="https://sillywordz.kissing.computer/current-status.js?name={{ .name }}" defer></script></textarea>
|
||||
<p>Past this code into your CSS file:</p>
|
||||
<p>Paste this code into your HTML file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 75px;"><div id="sillywordz"><div id="sillywordz-username"></div><div id="sillywordz-number"><div id="sillywordz-content"></div></div><script src="https://sillywordz.kissing.computer/current-status.js?name={{ .name }}"></script></textarea>
|
||||
<p>Paste this code into your CSS file:</p>
|
||||
<textarea style="width: 100%; max-width: 500px; height: 175px;">#sillywordz {
|
||||
padding: .5em;
|
||||
background-color: azure;
|
||||
border: 1px solid midnightblue;
|
||||
}
|
||||
|
||||
#sillywordz-number {
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
#sillywordz-username {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div class="cols">
|
||||
<section>
|
||||
{{ if .logged }}
|
||||
<h2>Set your status</h2>
|
||||
<h2>Update your word count!</h2>
|
||||
{{ if .form.Error }}
|
||||
<p>{{ .form.Error }}</p>
|
||||
{{ end }}
|
||||
|
|
@ -24,9 +24,8 @@
|
|||
<p>sillywordz is a place to share progress on your current writing projects.</p>
|
||||
<p><a href="/register">Register now!</a></p>
|
||||
{{ end }}
|
||||
<p><img src="/assets/button.png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/"><img src="https://status.cafe/assets/button.png" alt="Sillywordz"/></a></textarea></p></p>
|
||||
<p><a href="/feed.atom">Subscribe via Atom</a></p>
|
||||
</section>
|
||||
<p><img src="https://file.garden/aJzQmzrHVB4BLKwu/button(2).png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/button(2).png" alt="Sillywordz"/></a></textarea></p></p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Stream of updates!</h2>
|
||||
{{ range .statuses }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{ define "content" }}
|
||||
<h1>Manage statuses</h1>
|
||||
<h1>Manage updates</h1>
|
||||
{{ template "flash" .flash }}
|
||||
{{ range .statuses }}
|
||||
<article class="status">
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@
|
|||
<input type="password" id="password-confirm" name="password-confirm" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="answer">How did you discover status.cafe?</label>
|
||||
<label for="answer">How did you discover sillywordz?</label>
|
||||
<textarea id="answer" name="answer" required></textarea>
|
||||
</div>
|
||||
<p>By clicking the following button you agree to our <a href="/tos" target="_blank">Terms of Service</a>.</p>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
{{ define "content" }}
|
||||
<section>
|
||||
<h1>Terms of service</h1>
|
||||
<p>In order to use Status Cafe, you must agree to the following rules. A user not respecting these rules will have their account removed and will be banned from the service. The general rule is to be nice, friendly and respectful to anyone and their status.</p>
|
||||
<p><b>Racist, bigoted or otherwise hate speech</b> is not permitted. Status Cafe is an inclusive place that will not tolerate anyone promoting hateful ideas and language.</p>
|
||||
<p>In order to use Sillywordz, you must agree to the following rules. A user not respecting these rules will have their account removed and will be banned from the service. The general rule is to be nice, friendly and respectful to anyone and their status.</p>
|
||||
<p><b>Racist, transphobic, ableist, homophobic etc bigoted or otherwise hate speech</b> is not permitted. SILLYWORDZ is an inclusive place that will not tolerate anyone promoting hateful ideas and language.</p>
|
||||
<p><b>Illegal activities</b> such as promoting malware, phishing or publishing something that promotes content that infringes copyright, patent or trademark you do not own is not permitted.</p>
|
||||
<p><b>Pornographic content</b> is not allowed.</p>
|
||||
<p><b>Spamming</b>, including unsolicited advertising isn't allowed. While it's perfectly fine to talk about your projects and link them, using Status Cafe only as a way to drive traffic to an external site isn't allowed.</p>
|
||||
<p><b>Spamming</b> is not allowed.</p>
|
||||
<p><b>Harassing</b>, bullying, picking on a user isn't permitted.</p>
|
||||
<p><b>Revealing information (doxing)</b> from a user isn't allowed.</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
{{ if .picture }}
|
||||
<img src="{{ .picture }}" class="profile-picture"/>
|
||||
{{ end }}
|
||||
<p><a href="/users/{{ .user }}.atom">Subscribe via Atom</a></p>
|
||||
<dl>
|
||||
<dl>
|
||||
<dt class="homepage">Homepage</dt>
|
||||
<dd class="homepage">
|
||||
{{ if .homepage }}
|
||||
|
|
@ -38,7 +37,7 @@
|
|||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Statuses</h2>
|
||||
<h2>Updates</h2>
|
||||
{{ range .statuses }}
|
||||
<article class="status">
|
||||
{{ template "status" . }}
|
||||
|
|
@ -60,4 +59,4 @@
|
|||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -6,25 +6,40 @@ import (
|
|||
)
|
||||
|
||||
func (h *Handler) showCurrentStatusJSView(w http.ResponseWriter, r *http.Request) {
|
||||
name := r.URL.Query().Get("name")
|
||||
escName := url.PathEscape(name)
|
||||
name := r.URL.Query().Get("name")
|
||||
escName := url.PathEscape(name)
|
||||
|
||||
w.Header().Set("Content-Type", "application/javascript")
|
||||
w.Write([]byte(`
|
||||
|
||||
w.Write([]byte(`
|
||||
document.write('<script src="https://cdn.jsdelivr.net/npm/dompurify@3.0.6/dist/purify.min.js"><\/script>');
|
||||
document.writeln('<div id="sillywordz"><div id="sillywordz-username"></div><div id="sillywordz-number"></div><div id="sillywordz-content"></div></div>');
|
||||
|
||||
fetch("https://sillywordz.kissing.computer/users/` + escName + `/status.json")
|
||||
.then( r => r.json() )
|
||||
.then( r => {
|
||||
.then(r => r.json())
|
||||
.then(r => {
|
||||
|
||||
if (!r.number || r.number < 1) {
|
||||
document.getElementById("sillywordz-number").innerHTML = "No updates yet.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let safeContent = DOMPurify.sanitize(r.content);
|
||||
document.getElementById("sillywordz-username").innerHTML= '<a href="https://sillywordz.kissing.computer/users/' + escName + '"target="_blank">' + r.Author + '</a> ' + r.face + ' ' + r.timeAgo
|
||||
document.getElementById("sillywordz-number").innerHTML = "I wrote " + r.number + " words on my project! "
|
||||
|
||||
document.getElementById("sillywordz-username").innerHTML =
|
||||
'<a href="https://sillywordz.kissing.computer/users/` + escName + `" target="_blank">' +
|
||||
r.author +
|
||||
'</a> ' + r.face + ' ' + r.timeAgo;
|
||||
|
||||
document.getElementById("sillywordz-number").innerHTML =
|
||||
"I wrote " + r.number + " words on my project!";
|
||||
|
||||
if (r.content && r.content.trim().length > 0) {
|
||||
document.getElementById("sillywordz-content").innerHTML = "And I had this to say about it: " + safeContent
|
||||
} })
|
||||
document.getElementById("sillywordz-content").innerHTML =
|
||||
"And I had this to say about it: " + safeContent;
|
||||
}
|
||||
|
||||
});
|
||||
`))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue