diff --git a/.vscode/settings.json b/.vscode/settings.json
index 06136644..997cb87a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -11,12 +11,14 @@
},
"files.associations": {
- "*.json": "jsonc"
+ "*.json": "jsonc",
+ "**/css/**/*.css": "css",
+ "**/js/**/*.js": "javascript"
},
"files.eol": "\n",
- "cSpell.words": ["accs", "adminlog", "ankora", "anstata", "applebot", "apwu", "asgi", "bolditalic", "breaadyboy", "bytespider", "cairosvg", "caltanto", "caltilo", "canadien", "cargu", "catojn", "cosmetika", "dajne", "dargi", "dargu", "detikedo", "diffbot", "dilo", "displ", "dojn", "dolma", "dprotokolo", "dtanbrunan", "dtipoj", "elsalutu", "facebookexternalhit", "fontawesome", "gbdjm", "hitboxes", "iaskspider", "imagesift", "insigniaj", "insignio", "insignioj", "isinstance", "jerimiah", "keycheck", "kont", "linkifyjs", "maxlength", "mensiis", "monanto", "monantoj", "nesvaligdeg", "nkcdd", "noreply", "noscript", "notif", "notifs", "omgili", "omgilibot", "privatemessagecontainer", "ratelimited", "ratelimits", "refre", "retpa", "sfjl", "showlog", "sidetrade", "signup", "smiggins", "stmp", "subcomment", "timpibot", "typecheck", "ufeff", "unlikes", "urlpart", "vailida", "webzio"],
+ "cSpell.words": ["accs", "adminlog", "ankora", "anstata", "applebot", "apwu", "asgi", "bolditalic", "breaadyboy", "bytespider", "cairosvg", "caltanto", "caltilo", "canadien", "cargu", "catojn", "collectstatic", "cosmetika", "dajne", "dargi", "dargu", "detikedo", "diffbot", "dilo", "displ", "dojn", "dolma", "dprotokolo", "dtanbrunan", "dtipoj", "elsalutu", "facebookexternalhit", "fontawesome", "gbdjm", "hitboxes", "iaskspider", "imagesift", "insigniaj", "insignio", "insignioj", "isinstance", "jerimiah", "keycheck", "kont", "lessc", "linkifyjs", "maxlength", "mensiis", "monanto", "monantoj", "nesvaligdeg", "nkcdd", "noreply", "noscript", "notif", "notifs", "omgili", "omgilibot", "privatemessagecontainer", "ratelimited", "ratelimits", "refre", "retpa", "sfjl", "showlog", "sidetrade", "signup", "smiggins", "stmp", "subcomment", "timpibot", "typecheck", "ufeff", "unlikes", "urlpart", "vailida", "webzio"],
"cSpell.ignorePaths": [
".vscode/"
diff --git a/README.md b/README.md
index 7550480b..71d241ce 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,31 @@ free to reach out to [@trinkey](https://github.com/trinkey). if you don't agree
with this, then don't start drama about it, just leave and pretend smiggins
doesn't exist.
+
+
+ How can I contribute to this project
+
+
+ If you would like to help translate this website, read
+ [this file](smiggins/lang/README.md)
+
+ If there is a specific thing you want to do, you can make an issue (if an
+ existing doesn't already exist).
+
+ Once you finish programming you can create a new fork with your code and then
+ make a pull request with it.
+
+ Anyone who gets contributor access to the repository is decided by
+ [@trinkey](https://github.com/trinkey). If you think you are deserving of
+ getting it and don't currently have it, let her know.
+
+ Finally, to compile typescript/less, you need to install those npm packages
+ (`npm i -g less typescript less-plugin-clean-css`). Then, to compile
+ typescript, you can run `tsc` assuming your working directory in your console
+ is somewhere within this project. To compile less, you can run
+ `python compile-less.py` in the root directory of this project.
+
+
How to run locally
@@ -241,25 +266,6 @@ doesn't exist.
and make a new issue (make sure you're logged in with github)
-
-
- How can I contribute to this project
-
-
- if you would like to help tranlate this website, read
- [this file](smiggins/lang/README.md)
-
- if there is a specific thing you want to do, you can make an issue (if a
- duplicate doesn't already exist).
-
- once you finish programming you can create a new fork with your code and then
- make a pull request with it.
-
- anyone who gets contributor access to the repository is decided by
- [@trinkey](https://github.com/trinkey). if you think you are deserving of
- getting it and don't currently have it, let her know.
-
-
How to setup Gmail on PythonAnywhere
diff --git a/compile-less.py b/compile-less.py
new file mode 100644
index 00000000..2965f1b2
--- /dev/null
+++ b/compile-less.py
@@ -0,0 +1,12 @@
+import os
+from pathlib import Path
+
+CONFIG = {
+ "in_directory": Path("./smiggins/less"),
+ "out_directory": Path("./smiggins/templates/css"),
+ "compress": True
+}
+
+for i in os.listdir(CONFIG["in_directory"]):
+ os.system(f"lessc {CONFIG['in_directory'] / i} {CONFIG['out_directory'] / i.replace('.less', '.css')} {'--clean-css' if CONFIG['compress'] else ''}")
+ print(i)
\ No newline at end of file
diff --git a/smiggins/static/css/admin.css b/smiggins/less/admin.less
similarity index 74%
rename from smiggins/static/css/admin.css
rename to smiggins/less/admin.less
index 4677e2c3..11180d03 100644
--- a/smiggins/static/css/admin.css
+++ b/smiggins/less/admin.less
@@ -21,13 +21,13 @@ p {
.admin-logs {
margin: 0 auto;
max-width: calc(100vw - 2em);
-}
-.admin-logs th {
- padding: 0.3em;
-}
+ th {
+ padding: 0.3em;
+ }
-.admin-logs td {
- padding: 0.3em;
- text-align: left;
+ td {
+ padding: 0.3em;
+ text-align: left;
+ }
}
diff --git a/smiggins/static/css/base.css b/smiggins/less/base.less
similarity index 57%
rename from smiggins/static/css/base.css
rename to smiggins/less/base.less
index cfe97f57..f9e90be5 100644
--- a/smiggins/static/css/base.css
+++ b/smiggins/less/base.less
@@ -51,16 +51,15 @@ small {
noscript {
display: block;
margin-bottom: 10vh;
-}
-noscript h1,
-noscript h2 {
- color: var(--red);
-}
+ h1, h2 {
+ color: var(--red)
+ }
-noscript ul {
- display: inline-block;
- text-align: left;
+ ul {
+ display: inline-block;
+ text-align: left;
+ }
}
button {
@@ -72,33 +71,33 @@ button {
cursor: pointer;
font-size: 0.8em;
transition: color 0.15s, scale 0.15s, margin 0.15s, background-color 0.15s;
-}
-button:disabled {
- opacity: 60%;
- pointer-events: none;
-}
+ &:disabled {
+ opacity: 60%;
+ pointer-events: none;
+ }
-button:active {
- scale: 95%;
- background-color: var(--button-hover-background);
-}
+ &:active {
+ scale: 95%;
+ background-color: var(--button-hover-background);
+ }
-button:hover,
-button.inverted:hover {
- background-color: var(--button-hover-background);
-}
+ &:hover {
+ background-color: var(--button-hover-background);
+ }
-button.inverted {
- background-color: var(--button-inverted-background);
-}
+ &.inverted {
+ background-color: var(--button-inverted-background);
+ }
-button.primary,
-button.primary:hover {
- background-color: var(--accent);
- color: var(--background);
- border-color: var(--button-border);
- outline-color: var(--button-border);
+ &.primary {
+ &, &:hover {
+ background-color: var(--accent);
+ color: var(--background);
+ border-color: var(--button-border);
+ outline-color: var(--button-border);
+ }
+ }
}
.fake-input {
@@ -109,6 +108,19 @@ button.primary:hover {
cursor: text;
}
+.fake-hidden {
+ display: block;
+ user-select: none;
+ pointer-events: none;
+ opacity: 0;
+ height: 0;
+ width: 0;
+ position: absolute;
+ top: 0;
+ left: 0;
+ text-wrap: nowrap;
+}
+
.fake-input,
input:not([type="checkbox"]),
textarea,
@@ -125,52 +137,56 @@ select {
resize: vertical;
}
-body:not([data-disable-checkboxes]) label:has(+ input[type="checkbox"]),
-body:not([data-disable-checkboxes]) input[type="checkbox"] + label {
- cursor: pointer;
-}
+body:not([data-disable-checkboxes]) {
+ label:has(+ input[type="checkbox"]),
+ input[type="checkbox"] + label {
+ cursor: pointer;
+ }
-body:not([data-disable-checkboxes]) label + input[type="checkbox"],
-body:not([data-disable-checkboxes]) input[type="checkbox"]:has(+ label) {
- width: 0;
- height: 0;
- opacity: 0;
- margin: 0;
- padding: 0;
- border: none;
- outline: none;
-}
+ label + input[type="checkbox"],
+ input[type="checkbox"]:has(+ label) {
+ width: 0;
+ height: 0;
+ opacity: 0;
+ margin: 0;
+ padding: 0;
+ border: none;
+ outline: none;
+ }
-body:not([data-disable-checkboxes]) label:has(+ input[type="checkbox"])::after,
-body:not([data-disable-checkboxes]) input[type="checkbox"] + label::before {
- content: "";
- transition: background-color 0.25s, outline-color 0.25s;
- background-color: var(--checkbox-background);
- display: inline-block;
- position: relative;
- top: 0.1em;
- width: 1em;
- height: 1em;
- border-radius: 0.2em;
- outline: 1px solid var(--checkbox-border);
-}
+ label:has(+ input[type="checkbox"])::after,
+ input[type="checkbox"] + label::before {
+ content: "";
+ transition: background-color 0.25s, outline-color 0.25s;
+ background-color: var(--checkbox-background);
+ display: inline-block;
+ position: relative;
+ top: 0.1em;
+ width: 1em;
+ height: 1em;
+ border-radius: 0.2em;
+ outline: 1px solid var(--checkbox-border);
+ }
-label::after {
- margin-left: 0.4em;
-}
+ label:has(+ input[type="checkbox"]:checked)::after,
+ input[type="checkbox"]:checked + label::before {
+ background-color: var(--accent);
+ }
-label::before {
- margin-right: 0.4em;
+ label:has(+ input[type="checkbox"]:focus)::after,
+ input[type="checkbox"]:focus + label::before {
+ outline-color: var(--accent);
+ }
}
-body:not([data-disable-checkboxes]) label:has(+ input[type="checkbox"]:checked)::after,
-body:not([data-disable-checkboxes]) input[type="checkbox"]:checked + label::before {
- background-color: var(--accent);
-}
+label {
+ &::after {
+ margin-left: 0.4em;
+ }
-body:not([data-disable-checkboxes]) label:has(+ input[type="checkbox"]:focus)::after,
-body:not([data-disable-checkboxes]) input[type="checkbox"]:focus + label::before {
- outline-color: var(--accent);
+ &::before {
+ margin-right: 0.4em;
+ }
}
option {
@@ -202,18 +218,20 @@ textarea:disabled::placeholder {
color: var(--gray);
}
-a:link, a:visited {
- color: var(--accent);
- text-decoration: none;
-}
+a {
+ &:link, &:visited {
+ color: var(--accent);
+ text-decoration: none;
+ }
-a:hover {
- text-decoration: underline;
-}
+ &:hover {
+ text-decoration: underline;
+ }
-a::selection {
- -webkit-text-decoration-color: var(--text);
- text-decoration-color: var(--text);
+ &::selection {
+ -webkit-text-decoration-color: var(--text);
+ text-decoration-color: var(--text);
+ }
}
i {
@@ -225,18 +243,19 @@ p {
padding: 2px;
}
-table.center {
- margin-left: auto;
- margin-right: auto;
-}
+table {
+ .center {
+ margin-left: auto;
+ margin-right: auto;
+ }
-table.bordered {
- border-collapse: collapse;
-}
+ .bordered {
+ border-collapse: collapse;
-table.bordered th,
-table.bordered td {
- border: 1.5px solid var(--table-border);
+ th, td {
+ border: 1.5px solid var(--table-border);
+ }
+ }
}
.user-badge {
@@ -351,32 +370,32 @@ body[data-bar-dir="v"][data-bar-pos^="l"] {
position: fixed;
gap: 0.5em;
z-index: 999;
-}
-.icons a {
- display: inline-block;
-}
-
-.icons svg {
- height: 1.5em;
- width: 1.5em;
- display: inline-block;
- fill: var(--text);
- stroke: none;
- cursor: pointer;
-}
+ a {
+ display: inline-block;
+ }
-.icons svg:active {
- scale: 90%;
-}
+ svg {
+ height: 1.5em;
+ width: 1.5em;
+ display: inline-block;
+ fill: var(--text);
+ stroke: none;
+ cursor: pointer;
+
+ &:active {
+ scale: 90%;
+ }
+ }
-.icons .dot::after {
- position: absolute;
- display: inline-block;
- width: 0.5em;
- height: 0.5em;
- border-radius: 0.25em;
- transform: translate(-0.3em, 0);
- background-color: var(--accent);
- content: "";
+ .dot::after {
+ position: absolute;
+ display: inline-block;
+ width: 0.5em;
+ height: 0.5em;
+ border-radius: 0.25em;
+ transform: translate(-0.3em, 0);
+ background-color: var(--accent);
+ content: "";
+ }
}
diff --git a/smiggins/static/css/contact.css b/smiggins/less/contact.less
similarity index 100%
rename from smiggins/static/css/contact.css
rename to smiggins/less/contact.less
diff --git a/smiggins/less/fonts.less b/smiggins/less/fonts.less
new file mode 100644
index 00000000..091afbbd
--- /dev/null
+++ b/smiggins/less/fonts.less
@@ -0,0 +1,69 @@
+:root {
+ --x: "{% load static %}";
+}
+
+/* Monospace font */
+@font-face {
+ font-family: 'Cousine';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url("{% static '/font/cousine-normal.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Cousine';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url("{% static '/font/cousine-bold.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Cousine';
+ font-style: italic;
+ font-weight: 400;
+ font-display: swap;
+ src: url("{% static '/font/cousine-italic.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Cousine';
+ font-style: italic;
+ font-weight: 700;
+ font-display: swap;
+ src: url("{% static '/font/cousine-bolditalic.woff' %}") format('woff');
+}
+
+/* Normal font */
+@font-face {
+ font-family: 'Poppins';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url("{% static '/font/poppins-normal.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Poppins';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url("{% static '/font/poppins-bold.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Poppins';
+ font-style: italic;
+ font-weight: 400;
+ font-display: swap;
+ src: url("{% static '/font/poppins-italic.woff' %}") format('woff');
+}
+
+@font-face {
+ font-family: 'Poppins';
+ font-style: italic;
+ font-weight: 700;
+ font-display: swap;
+ src: url("{% static '/font/poppins-bolditalic.woff' %}") format('woff');
+}
diff --git a/smiggins/static/css/home.css b/smiggins/less/home.less
similarity index 66%
rename from smiggins/static/css/home.css
rename to smiggins/less/home.less
index ebad7497..c49c506e 100644
--- a/smiggins/static/css/home.css
+++ b/smiggins/less/home.less
@@ -4,62 +4,63 @@ button:not(.bottom-content-icon) {
.toggle-poll {
cursor: pointer;
-}
-.toggle-poll:hover {
- text-decoration: underline;
+ &:hover {
+ text-decoration: underline;
+ }
}
.poll-bar-container {
margin: 0.25em 0;
border-radius: 0.5em;
height: 2.2em;
-}
-
-.poll-bar-container:has(.poll-bar) {
- background-color: var(--poll-voted-background);
-}
-.poll-bar-container:not(:has(.poll-bar)) {
- background-color: var(--poll-no-vote-background);
- cursor: pointer;
-}
-
-.poll-bar-container:not(:has(.poll-bar)):hover {
- background-color: var(--poll-voted-background);
-}
+ &:has(.poll-bar) {
+ background-color: var(--poll-voted-background);
+ }
-.poll-bar-container .poll-text {
- margin: 0.25em;
- padding: 0.1em 0.35em;
- border-radius: 0.3em;
- position: absolute;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- max-width: calc(25.75em - (3em / 7));
-}
+ &:not(:has(.poll-bar)) {
+ background-color: var(--poll-no-vote-background);
+ cursor: pointer;
-.poll-bar-container .poll-bar {
- color: transparent;
- user-select: none;
- position: absolute;
- width: calc(26.95em - (3em / 7));
-}
+ &:hover {
+ background-color: var(--poll-voted-background);
+ }
+ }
-.poll-bar-container .poll-bar ~ .poll-text {
- background-color: var(--poll-voted-background);
-}
+ .poll-text {
+ margin: 0.25em;
+ padding: 0.1em 0.35em;
+ border-radius: 0.3em;
+ position: absolute;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ max-width: calc(25.75em - (3em / 7));
+ }
-.poll-bar-container .poll-bar.voted div {
- background-color: var(--accent);
+ .poll-bar {
+ color: transparent;
+ user-select: none;
+ position: absolute;
+ width: calc(26.95em - (3em / 7));
+
+ & ~ .poll-text {
+ background-color: var(--poll-voted-background);
+ }
+
+ &.voted div {
+ background-color: var(--accent);
+ }
+
+ div {
+ background-color: var(--accent-50);
+ border-radius: 0.5em;
+ height: 2.2em;
+ }
+ }
}
-.poll-bar-container .poll-bar div {
- background-color: var(--accent-50);
- border-radius: 0.5em;
- height: 2.2em;
-}
.post-text {
resize: none;
@@ -135,18 +136,19 @@ input.c-warning {
text-overflow: ellipsis;
}
-.quote-area .main-content {
- -webkit-line-clamp: 5;
- line-clamp: 5;
-}
+.quote-area {
+ .main-content {
+ -webkit-line-clamp: 5;
+ line-clamp: 5;
+ }
-.quote-area .post {
- margin-bottom: 0.5em;
- margin-top: 0.75em;
- width: 23.5em;
+ .post {
+ margin-bottom: 0.5em;
+ margin-top: 0.75em;
+ width: 23.5em;
+ }
}
-.post,
.displ-name-container {
width: calc(26.95em - (3em / 7));
}
@@ -159,26 +161,23 @@ input.c-warning {
display: inline-block;
border-radius: calc(3em / 14);
background-color: var(--post-background);
+ width: calc(26.95em - (3em / 7));
}
.upper-content {
cursor: pointer;
-}
-.upper-content > * {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- justify-content: left;
- gap: 0.25em;
-}
+ & > * {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ justify-content: left;
+ gap: 0.25em;
-.upper-content > * > div {
- max-width: calc(100% - 3.25em);
-}
-
-.upper-lower-opacity {
- color: var(--subtext);
+ & > div {
+ max-width: calc(100% - 3.25em);
+ }
+ }
}
.banner-pfp {
@@ -199,10 +198,10 @@ input.c-warning {
border-radius: 0.2em;
margin-bottom: 0.2em;
cursor: pointer;
-}
-.c-warning summary:focus {
- outline: none;
+ &:focus {
+ outline: none;
+ }
}
.bottom-content {
@@ -232,15 +231,16 @@ input.c-warning {
.like-secondary {
position: absolute;
display: none;
-}
-.like-secondary:has(+ .like[data-liked="true"]) {
- display: inline-block;
- animation: like-anim 1s forwards ease-out;
+ &:has(+ .like[data-liked="true"]) {
+ display: inline-block;
+ animation: like-anim 1s forwards ease-out;
+ }
}
.upper-lower-opacity {
display: block;
+ color: var(--subtext);
}
.displ-name-container {
@@ -248,10 +248,10 @@ input.c-warning {
flex-direction: row-reverse;
justify-content: left;
align-items: flex-start;
-}
-.displ-name-container .spacing {
- margin-left: auto;
+ .spacing {
+ margin-left: auto;
+ }
}
.bottom-content-icon svg,
@@ -352,6 +352,14 @@ button.bottom-content-icon {
display: inline-block;
}
+.more-button:focus + .more-container,
+.more-container:hover,
+.more-container:focus-within {
+ opacity: 1;
+ pointer-events: all;
+ user-select: auto;
+}
+
.more-container {
border: 2px solid var(--accent);
background-color: var(--button-background);
@@ -365,47 +373,39 @@ button.bottom-content-icon {
opacity: 0;
pointer-events: none;
user-select: none;
-}
-.more-button:focus + .more-container,
-.more-container:hover,
-.more-container:focus-within {
- opacity: 1;
- pointer-events: all;
- user-select: auto;
-}
-
-.more-container > button {
- display: block;
- padding: 4px 12px 6px 6px;
- font-size: 1em;
- text-align: left;
- max-width: 10em;
- width: 100%;
- cursor: pointer;
- border: none;
- background: none;
-}
-
-.more-container > button:hover {
- background-color: var(--button-hover-background);
-}
-
-.more-container > button:focus {
- border-color: var(--accent);
- scale: 100% !important;
-}
-
-.more-container > button:first-child {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
-}
-
-.more-container > button:last-child {
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
-}
-
-.more-container > button:not(:first-child) {
- border-top: 1px solid var(--button-border-color);
+ & > button {
+ display: block;
+ padding: 4px 12px 6px 6px;
+ font-size: 1em;
+ text-align: left;
+ max-width: 10em;
+ width: 100%;
+ cursor: pointer;
+ border: none;
+ background: none;
+
+ &:hover {
+ background-color: var(--button-hover-background);
+ }
+
+ &:focus {
+ border-color: var(--accent);
+ scale: 100% !important;
+ }
+
+ &:first-child {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ }
+
+ &:last-child {
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ }
+
+ &:not(:first-child) {
+ border-top: 1px solid var(--button-border-color);
+ }
+ }
}
diff --git a/smiggins/less/messages.less b/smiggins/less/messages.less
new file mode 100644
index 00000000..06ff62e0
--- /dev/null
+++ b/smiggins/less/messages.less
@@ -0,0 +1,102 @@
+.messages-container {
+ width: calc(100vw - 2em);
+ max-width: 40em;
+ background-color: var(--button-hover-background);
+ border-radius: 0.25em;
+ margin: 0 auto;
+ padding: 1em;
+ height: calc(90vh - 2em);
+
+ button {
+ margin: 0 auto;
+ margin-top: 1.5em;
+ }
+}
+
+.messages {
+ display: flex;
+ flex-direction: column-reverse;
+ gap: 0.5em;
+ overflow-x: hidden;
+ overflow-y: scroll;
+ height: calc(90vh - 8em - 9px);
+ margin-top: 2em;
+}
+
+.message {
+ width: calc(70% - 0.6em);
+ padding: 0 0.5em;
+
+ div {
+ display: inline-block;
+ min-width: 0.5em;
+ padding: 0.3em 0.6em;
+ word-break: break-word;
+ }
+
+ &.receive {
+ padding-right: 30%;
+ text-align: left;
+
+ div {
+ background-color: var(--table-border);
+ border-radius: 0.6em 0.6em 0.6em 0;
+ }
+ }
+
+ &.send {
+ padding-left: 30%;
+ text-align: right;
+
+ div {
+ text-align: left;
+ background-color: var(--accent);
+ color: var(--background);
+ border-radius: 0.6em 0.6em 0 0.6em;
+
+ &::selection {
+ background-color: var(--gray);
+ color: var(--background);
+ }
+
+ & > a {
+ color: var(--background);
+ text-decoration: underline;
+ }
+ }
+ }
+}
+
+
+.header-container {
+ position: absolute;
+ width: 90vw;
+ left: 5vw;
+ top: 1vh;
+
+ h1 {
+ filter: drop-shadow(0 0 5px var(--background))
+ drop-shadow(0 0 5px var(--background))
+ drop-shadow(0 0 3px var(--background));
+ }
+}
+
+#your-mom {
+ height: 3em;
+ width: calc(100vw - 2em);
+ max-width: 40em;
+ margin-top: 1em;
+ resize: none;
+}
+
+.timestamp {
+ display: block;
+ font-size: 0.7em;
+ color: var(--text);
+}
+
+@media screen and (max-width: 565px) {
+ #your-mom {
+ width: calc(90vw - (4em / 7) - 17px);
+ }
+}
diff --git a/smiggins/static/css/notifications.css b/smiggins/less/notifications.less
similarity index 56%
rename from smiggins/static/css/notifications.css
rename to smiggins/less/notifications.less
index 9d179199..cce1a0b6 100644
--- a/smiggins/static/css/notifications.css
+++ b/smiggins/less/notifications.less
@@ -5,9 +5,9 @@ hr {
.post button {
cursor: default;
-}
-.post button:focus {
- scale: 100%;
- outline: none !important;
+ &:focus {
+ scale: 100%;
+ outline: none !important;
+ }
}
diff --git a/smiggins/static/css/post.css b/smiggins/less/post.less
similarity index 100%
rename from smiggins/static/css/post.css
rename to smiggins/less/post.less
diff --git a/smiggins/static/css/settings.css b/smiggins/less/settings.less
similarity index 86%
rename from smiggins/static/css/settings.css
rename to smiggins/less/settings.less
index fac7951e..c30382e1 100644
--- a/smiggins/static/css/settings.css
+++ b/smiggins/less/settings.less
@@ -22,10 +22,10 @@ hr {
height: 50px;
display: inline-block;
border-radius: 0.2em;
-}
-#banner.gradient {
- background: linear-gradient(90deg, var(--banner), var(--banner-two));
+ &.gradient {
+ background: linear-gradient(90deg, var(--banner), var(--banner-two));
+ }
}
.post {
diff --git a/smiggins/static/css/user.css b/smiggins/less/user.less
similarity index 90%
rename from smiggins/static/css/user.css
rename to smiggins/less/user.less
index 84661e21..01d777d9 100644
--- a/smiggins/static/css/user.css
+++ b/smiggins/less/user.less
@@ -4,10 +4,10 @@
width: 35em;
height: 6em;
background-color: var(--banner);
-}
-#banner.gradient {
- background: linear-gradient(90deg, var(--banner), var(--banner-two));
+ .gradient {
+ background: linear-gradient(90deg, var(--banner), var(--banner-two));
+ }
}
#username-main {
diff --git a/smiggins/less/user_lists.less b/smiggins/less/user_lists.less
new file mode 100644
index 00000000..1fe1c1d5
--- /dev/null
+++ b/smiggins/less/user_lists.less
@@ -0,0 +1,16 @@
+.lists-container {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: center;
+
+ & > div {
+ width: 100%;
+ max-width: 25em;
+ margin: 0 3em;
+ }
+
+ .post {
+ width: 22.125em;
+ }
+}
diff --git a/smiggins/static/css/font/cousine-bold.woff2 b/smiggins/static/css/font/cousine-bold.woff2
deleted file mode 100644
index fee467d6..00000000
Binary files a/smiggins/static/css/font/cousine-bold.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/cousine-bolditalic.woff2 b/smiggins/static/css/font/cousine-bolditalic.woff2
deleted file mode 100644
index 954d1cb9..00000000
Binary files a/smiggins/static/css/font/cousine-bolditalic.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/cousine-italic.woff2 b/smiggins/static/css/font/cousine-italic.woff2
deleted file mode 100644
index 9f9f5e76..00000000
Binary files a/smiggins/static/css/font/cousine-italic.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/cousine-normal.woff2 b/smiggins/static/css/font/cousine-normal.woff2
deleted file mode 100644
index 0e606a94..00000000
Binary files a/smiggins/static/css/font/cousine-normal.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/poppins-bold.woff2 b/smiggins/static/css/font/poppins-bold.woff2
deleted file mode 100644
index dd65c647..00000000
Binary files a/smiggins/static/css/font/poppins-bold.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/poppins-bolditalic.woff2 b/smiggins/static/css/font/poppins-bolditalic.woff2
deleted file mode 100644
index 02e86a74..00000000
Binary files a/smiggins/static/css/font/poppins-bolditalic.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/poppins-italic.woff2 b/smiggins/static/css/font/poppins-italic.woff2
deleted file mode 100644
index 7d2a6eb1..00000000
Binary files a/smiggins/static/css/font/poppins-italic.woff2 and /dev/null differ
diff --git a/smiggins/static/css/font/poppins-normal.woff2 b/smiggins/static/css/font/poppins-normal.woff2
deleted file mode 100644
index b6cb8f04..00000000
Binary files a/smiggins/static/css/font/poppins-normal.woff2 and /dev/null differ
diff --git a/smiggins/static/css/fonts.css b/smiggins/static/css/fonts.css
deleted file mode 100644
index 4aa2d21e..00000000
--- a/smiggins/static/css/fonts.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Monospace font */
-@font-face {
- font-family: 'Cousine';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url("/static/css/font/cousine-normal.woff") format('woff'),
- url("/static/css/font/cousine-normal.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Cousine';
- font-style: normal;
- font-weight: 700;
- font-display: swap;
- src: url("/static/css/font/cousine-bold.woff") format('woff'),
- url("/static/css/font/cousine-bold.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Cousine';
- font-style: italic;
- font-weight: 400;
- font-display: swap;
- src: url("/static/css/font/cousine-italic.woff") format('woff'),
- url("/static/css/font/cousine-italic.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Cousine';
- font-style: italic;
- font-weight: 700;
- font-display: swap;
- src: url("/static/css/font/cousine-bolditalic.woff") format('woff'),
- url("/static/css/font/cousine-bolditalic.woff2") format('woff2');
-}
-
-/* Normal font */
-@font-face {
- font-family: 'Poppins';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url("/static/css/font/poppins-normal.woff") format('woff'),
- url("/static/css/font/poppins-normal.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Poppins';
- font-style: normal;
- font-weight: 700;
- font-display: swap;
- src: url("/static/css/font/poppins-bold.woff") format('woff'),
- url("/static/css/font/poppins-bold.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Poppins';
- font-style: italic;
- font-weight: 400;
- font-display: swap;
- src: url("/static/css/font/poppins-italic.woff") format('woff'),
- url("/static/css/font/poppins-italic.woff2") format('woff2');
-}
-
-@font-face {
- font-family: 'Poppins';
- font-style: italic;
- font-weight: 700;
- font-display: swap;
- src: url("/static/css/font/poppins-bolditalic.woff") format('woff'),
- url("/static/css/font/poppins-bolditalic.woff2") format('woff2');
-}
diff --git a/smiggins/static/css/messages.css b/smiggins/static/css/messages.css
deleted file mode 100644
index f72b0ab3..00000000
--- a/smiggins/static/css/messages.css
+++ /dev/null
@@ -1,101 +0,0 @@
-.messages-container {
- width: calc(100vw - 2em);
- max-width: 40em;
- background-color: var(--button-hover-background);
- border-radius: 0.25em;
- margin: 0 auto;
- padding: 1em;
- height: calc(90vh - 2em);
-}
-
-.messages-container button {
- margin: 0 auto;
- margin-top: 1.5em;
-}
-
-.messages {
- display: flex;
- flex-direction: column-reverse;
- gap: 0.5em;
- overflow-x: hidden;
- overflow-y: scroll;
- height: calc(90vh - 8em - 9px);
- margin-top: 2em;
-}
-
-.message {
- width: calc(70% - 0.6em);
- padding: 0 0.5em;
-}
-
-.message div {
- display: inline-block;
- min-width: 0.5em;
- padding: 0.3em 0.6em;
- word-break: break-word;
-}
-
-.message.receive {
- padding-right: 30%;
- text-align: left;
-}
-
-.message.receive div {
- background-color: var(--table-border);
- border-radius: 0.6em 0.6em 0.6em 0;
-}
-
-.message.send {
- padding-left: 30%;
- text-align: right;
-}
-
-.message.send div {
- text-align: left;
- background-color: var(--accent);
- color: var(--background);
- border-radius: 0.6em 0.6em 0 0.6em;
-}
-
-.message.send div::selection {
- background-color: var(--gray);
- color: var(--background);
-}
-
-.message.send div > a {
- color: var(--background);
- text-decoration: underline;
-}
-
-.header-container {
- position: absolute;
- width: 90vw;
- left: 5vw;
- top: 1vh;
-}
-
-.header-container h1 {
- filter: drop-shadow(0 0 5px var(--background))
- drop-shadow(0 0 5px var(--background))
- drop-shadow(0 0 3px var(--background));
-}
-
-#your-mom {
- height: 3em;
- width: calc(100vw - 2em);
- max-width: 40em;
- margin-top: 1em;
- resize: none;
-}
-
-.timestamp {
- display: block;
- font-size: 0.7em;
- color: var(--text);
-}
-
-@media screen and (max-width: 565px) {
- #your-mom {
- width: calc(90vw - (4em / 7) - 17px);
- }
-}
diff --git a/smiggins/static/css/user_lists.css b/smiggins/static/css/user_lists.css
deleted file mode 100644
index d4ee249d..00000000
--- a/smiggins/static/css/user_lists.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.lists-container {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: center;
-}
-
-.lists-container > div {
- width: 100%;
- max-width: 25em;
- margin: 0 3em;
-}
-
-.lists-container .post {
- width: 22.125em;
-}
diff --git a/smiggins/static/css/font/cousine-bold.woff b/smiggins/static/font/cousine-bold.woff
similarity index 100%
rename from smiggins/static/css/font/cousine-bold.woff
rename to smiggins/static/font/cousine-bold.woff
diff --git a/smiggins/static/css/font/cousine-bolditalic.woff b/smiggins/static/font/cousine-bolditalic.woff
similarity index 100%
rename from smiggins/static/css/font/cousine-bolditalic.woff
rename to smiggins/static/font/cousine-bolditalic.woff
diff --git a/smiggins/static/css/font/cousine-italic.woff b/smiggins/static/font/cousine-italic.woff
similarity index 100%
rename from smiggins/static/css/font/cousine-italic.woff
rename to smiggins/static/font/cousine-italic.woff
diff --git a/smiggins/static/css/font/cousine-normal.woff b/smiggins/static/font/cousine-normal.woff
similarity index 100%
rename from smiggins/static/css/font/cousine-normal.woff
rename to smiggins/static/font/cousine-normal.woff
diff --git a/smiggins/static/css/font/poppins-bold.woff b/smiggins/static/font/poppins-bold.woff
similarity index 100%
rename from smiggins/static/css/font/poppins-bold.woff
rename to smiggins/static/font/poppins-bold.woff
diff --git a/smiggins/static/css/font/poppins-bolditalic.woff b/smiggins/static/font/poppins-bolditalic.woff
similarity index 100%
rename from smiggins/static/css/font/poppins-bolditalic.woff
rename to smiggins/static/font/poppins-bolditalic.woff
diff --git a/smiggins/static/css/font/poppins-italic.woff b/smiggins/static/font/poppins-italic.woff
similarity index 100%
rename from smiggins/static/css/font/poppins-italic.woff
rename to smiggins/static/font/poppins-italic.woff
diff --git a/smiggins/static/css/font/poppins-normal.woff b/smiggins/static/font/poppins-normal.woff
similarity index 100%
rename from smiggins/static/css/font/poppins-normal.woff
rename to smiggins/static/font/poppins-normal.woff
diff --git a/smiggins/static/ts/check-logged-out.ts b/smiggins/static/ts/check-logged-out.ts
deleted file mode 100644
index 9c5f5516..00000000
--- a/smiggins/static/ts/check-logged-out.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-(function(): void {
- let accounts: string[][] = JSON.parse(localStorage.getItem("acc-switcher") || "[]");
- let username: string = localStorage.getItem("username");
-
- if (username && accounts.length) {
- let set: boolean = false;
-
- if (location.search != "?from=token") {
- for (const account of accounts) {
- if (!set && account[0] == username && document.cookie.split(/\btoken=/)[1].split(";")[0] != account[1]) {
- setCookie("token", account[1]);
- set = true;
- }
- }
- }
-
- localStorage.setItem("acc-switcher", JSON.stringify(accounts));
-
- if (!set) {
- setCookie("token", accounts[0][1]);
- localStorage.setItem("username", accounts[0][0]);
- }
-
- location.href = location.href;
- }
-})();
diff --git a/smiggins/templates/admin.html b/smiggins/templates/admin.html
index ca8c4d86..438adc87 100644
--- a/smiggins/templates/admin.html
+++ b/smiggins/templates/admin.html
@@ -1,13 +1,12 @@
{% extends "base.html" %}
{% load smiggins_custom %}
-{% load static %}
{% block title %}
{{ lang.admin.title }} - {{ SITE_NAME }} {{ VERSION }}
{% endblock %}
{% block head %}
-
+
+
{% endblock %}
diff --git a/smiggins/templates/base.html b/smiggins/templates/base.html
index afac8d65..9da1db35 100644
--- a/smiggins/templates/base.html
+++ b/smiggins/templates/base.html
@@ -115,6 +115,15 @@
+
+
+
+
+
+
+
+
+
{% block meta %}
@@ -126,80 +135,26 @@
{% endblock %}
-
-
-
-
-
-
- {% if ENABLE_HASHTAGS == "true" %}
-
- {% endif %}
+
-
+
{% block head %}{% endblock %}
-
+
{% block body %}{% endblock %}
@@ -213,6 +168,10 @@ {{ lang.noscript.subtitle }}
-
+
+
+
+ AA AA
+ AA AA