Skip to content

Commit

Permalink
js/css in html templates
Browse files Browse the repository at this point in the history
  • Loading branch information
trinkey committed Oct 19, 2024
1 parent 8b30826 commit cd2e720
Show file tree
Hide file tree
Showing 113 changed files with 716 additions and 622 deletions.
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<details>
<summary><h2 style="display: inline">
How can I contribute to this project
</h2></summary>

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.
</details>

<details>
<summary><h2 style="display: inline">How to run locally</h2></summary>

Expand Down Expand Up @@ -241,25 +266,6 @@ doesn't exist.
and make a new issue (make sure you're logged in with github)
</details>

<details>
<summary><h2 style="display: inline">
How can I contribute to this project
</h2></summary>

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.
</details>

<details>
<summary><h2 style="display: inline">
How to setup Gmail on PythonAnywhere
Expand Down
12 changes: 12 additions & 0 deletions compile-less.py
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 7 additions & 7 deletions smiggins/static/css/admin.css → smiggins/less/admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Loading

0 comments on commit cd2e720

Please sign in to comment.