cmd/web: remove xess, fix showpaste on public pastes

Signed-off-by: Xe Iaso <xe@tailscale.com>
This commit is contained in:
Xe Iaso 2023-08-22 15:26:06 -04:00
parent 0ffce32a1b
commit 442be15765
2 changed files with 2 additions and 144 deletions

View file

@ -1,142 +0,0 @@
:root {
--background-color: 0;
--text-color: 43;
--accent-color: 344;
--font-family: "OpenDyslexic", sans-serif;
--mono-font-family: "OpenDyslexicMono", monospace;
--width: 55rem;
--padding: 0;
--selection: hsla(var(--accent-color), 80%, 30%, 100%);
--selection-light: hsla(var(--accent-color), 50%, 80%, 100%);
--background: hsla(var(--background-color), 100%, 10%, 100%);
--background-light: hsla(var(--background-color), 10%, 95%, 100%);
--text: hsla(var(--text-color), 0%, 90%, 100%);
--text-light: hsla(var(--text-color), 90%, 5%, 100%);
--pre-background: hsla(var(--background-color), 90%, 5%, 100%);
--pre-background-light: hsla(var(--background-color), 10%, 80%, 100%);
--article-text: hsla(var(--text-color), 0%, 95%, 100%);
--article-text-light: hsla(var(--text-color), 0%, 0%, 100%);
--article-background: hsla(var(--background-color), 80%, 5%, 100%);
--article-background-light: hsla(var(--background-color), 15%, 75%, 100%);
--a-background: hsla(var(--background-color), 90%, 5%, 100%);
--a-background-light: hsla(var(--background-color), 30%, 90%, 100%);
--a-color: hsla(var(--accent-color), 80%, 90%, 100%);
--a-color-light: hsla(var(--accent-color), 80%, 10%, 100%);
--blockquote-border: 0.5ch solid hsla(var(--accent-color), 80%, 80%, 100%);
--blockquote-border-light: 0.5ch solid hsla(var(--accent-color), 50%, 30%, 100%);
}
.left {
float: left;
}
.right{
float: right;
}
article {
font-family: "OpenDyslexic", "Inter";
background-color: var(--article-background);
color: var(--article-text);
padding: 1em;
border: 0;
}
article h1, article h2, article h3, article h4, article h5, article h6 {
font-family: "OpenDyslexic", "Inter";
}
main {
font-family: var(--font-family);
max-width: var(--width);
padding: var(--padding);
margin: auto;
}
@media only screen and (max-device-width: 736px) {
main {
padding: 0rem;
}
}
::selection {
background: var(--selection);
}
body {
background: var(--background);
color: var(--text);
}
pre {
background-color: var(--pre-background);
padding: 1em;
border: 0;
font-family: var(--mono-font-family);
}
a, a:active, a:visited {
color: var(--a-color);
background-color: var(--a-background);
}
h1, h2, h3, h4, h5 {
margin-bottom: .1rem;
}
blockquote {
border-left: var(--blockquote-border);
margin: 0.5em 10px;
padding: 0.5em 10px;
}
footer {
align: center;
}
@media (prefers-color-scheme: light) {
::selection {
background: var(--selection-light);
}
body {
background: var(--background-light);
color: var(--text-light);
}
pre {
background-color: var(--pre-background-light);
padding: 1em;
border: 0;
}
a, a:active, a:visited {
color: var(--a-color-light);
background-color: var(--a-background-light);
}
h1, h2, h3, h4, h5 {
margin-bottom: .1rem;
}
blockquote {
border-left: var(--blockquote-border-light);
margin: 0.5em 10px;
padding: 0.5em 10px;
}
article {
background-color: var(--article-background-light);
color: var(--article-text-light);
}
}
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}

View file

@ -4,10 +4,10 @@
{{if .UserInfo}}
{{if ne .PasterUserID .UserID}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
<div class="float-right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
{{end}}
{{else}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
<div class="float-right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
{{end}}
<p>Created at {{.CreatedAt}}</p>