Compare commits

..

12 Commits

42 changed files with 395 additions and 375 deletions

5
.gitignore vendored
View File

@@ -1,5 +1,8 @@
*.swp
/chat/node_modules /chat/node_modules
mastodon-status/* mastodon-status/*
venv/ venv/
__pycache__/ __pycache__/
settings.py
__init__.py
db.sqlite3

Binary file not shown.

View File

@@ -1,20 +0,0 @@
.-"""-.
' \
|,. ,-. |
|()L () \ |
| ___ |
| ` ` | `
.j ` `.
/ ' ' \
/ / ` `.
/ / Stay ` .
/ / Single l |
. , TuxCord | |
_ ,"`. .| |
| ' ``. | [..-'l
/ `.`, | '--' `.
( `. __.j )
\_ |--""___| ,-'
`"--...,+"""" `._,.-' mh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,102 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/index.css">
</head>
<body>
<pre>
<a href="/" class="no-spin">
__ __ __
---------/\ \__ /\ \ /\ \__
---------\ \ ,_\ __ __ __ _ ___ ___ _ __ \_\ \ ___ __\ \ ,_\
----------\ \ \/ /\ \/\ \/\ \/'\ /'___\ / __`\/\`'__\/'_` \ /'_ `\ /'__`\ \ \/
-----------\ \ \_\ \ \_\ \/> &lt;//\ \__//\ \L\ \ \ \//\ \L\ \ __/\ \/\ \/\ __/\ \ \_
------------\ \__\\ \____//\_/\_\ \____\ \____/\ \_\\ \___,_\/\_\ \_\ \_\ \____\\ \__\
-------------\/__/ \/___/ \//\/_/\/____/\/___/ \/_/ \/__,_ /\/_/\/_/\/_/\/____/ \/__/</a>
A friendly Linux community.
</pre>
<b><u>Services we provide:</u></b>
<ul>
<li>
<a href="https://mastodon.tuxcord.net">Mastodon</a> (<a href='/mastodon-status'>Status</a>)
</li>
<li>
<a href="https://git.javalsai.tuxcord.net">Gitea</a>
</li>
<li>
<a href="https://redlib.tuxcord.net">Redlib</a>
</li>
<li>
<a href="/mc">Minecraft</a>
</li>
<li>
Matrix server: matrix.tuxcord.net (please ask deadvey for access)
</li>
</ul>
<b><u>Join us:</u></b>
<ul>
Our Matrix and Discord are bridged, irc is not and is not very active.
<li>
<a href="https://matrix.to/#/#TuxCord:matrix.org">Matrix</a>
</li>
<li>
<a href="https://discord.gg/SPHymEDytw">Discord</a>
</li>
<li>
<a href="irc://irc.tuxcord.net">irc.tuxcord.net</a>
</li>
</ul>
<details>
<summary>
<u><b>Members:</b></u>
</summary>
<ul>
<li><u>pickzelle (Founder)</u></li>
<li>bruhhhhh😘</li>
<li><a href="https://git.javalsai.tuxcord.net/danmax">Danmax</a></li>
<li><a href="https://deadvey.tuxcord.net">DeaDvey</a></li>
<li><a href="https://github.com/ErrorNoInternet">ErrorNoInternet</a></li>
<li>grialion</li>
<li><a href="https://javalsai.tuxcord.net">Javalsai</a></li>
<li><a href="https://decompil.in/">Spamix</a></li>
</ul>
</details>
<div class="tuxcord-image">
<pre>
.-"""-.
' \
|,. ,-. |
|()L () \ |
|,' `".| |
|.___.',| `
.j `--"' ` `.
/ ' ' \
/ / ` `.
/ / ` .
/ / l |
. , TuxCord | |
_ ,"`. .| |
| ' ``. | [..-'l
/ `.`, | '--' `.
( `. __.j )
\_ |--""___| ,-'
`"--...,+"""" `._,.-' <a href="http://roysac.com/tutorial/diamondieasciiarttutorial.html">mh</a>
</pre>
</div>
</body>
<footer>
<hr/>
<div id="footer-links">
<a href="https://git.javalsai.tuxcord.net/deadvey/tuxcord.net">Source Code</a>
/
<a href="https://javalsai.tuxcord.net">Gitea, Hosted by Javalsai</a>
/
<a href="https://envs.net">Website inspired by envs.net</a>
</div>
</footer>
</html>

34
main.py
View File

@@ -1,34 +0,0 @@
from flask import Flask, render_template, request, redirect
from datetime import datetime
app = Flask(__name__)
def decide_ascii():
day = datetime.today().strftime('%d')
month = datetime.today().strftime('%m')
if month == "12":
return open(f'./ascii/christmas.html', 'r').read()
if month == "10":
return open(f'./ascii/halloween.html', 'r').read()
else:
return open(f'./ascii/normal.html', 'r').read()
@app.route('/')
def index():
ascii_penguin = decide_ascii()
return render_template('index.html', ascii_penguin = ascii_penguin)
@app.route('/mc')
def mc():
ascii_penguin = decide_ascii()
return render_template('mc.html', ascii_penguin = ascii_penguin)
if __name__ == '__main__':
app.run(
debug = True,
host = "0.0.0.0",
port = 8081
)

Binary file not shown.

View File

@@ -1,78 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/index.css">
</head>
<body>
<pre>
<a href="/" class="no-spin">
__ __ __
---------/\ \__ /\ \ /\ \__
---------\ \ ,_\ __ __ __ _ ___ ___ _ __ \_\ \ ___ __\ \ ,_\
----------\ \ \/ /\ \/\ \/\ \/'\ /'___\ / __`\/\`'__\/'_` \ /'_ `\ /'__`\ \ \/
-----------\ \ \_\ \ \_\ \/> &lt;//\ \__//\ \L\ \ \ \//\ \L\ \ __/\ \/\ \/\ __/\ \ \_
------------\ \__\\ \____//\_/\_\ \____\ \____/\ \_\\ \___,_\/\_\ \_\ \_\ \____\\ \__\
-------------\/__/ \/___/ \//\/_/\/____/\/___/ \/_/ \/__,_ /\/_/\/_/\/_/\/____/ \/__/</a>
A friendly Linux community.
</pre>
Name: Tuxcord-MC<br/>
IP/Server Address: mc.tuxcord.net<br/>
Version: 1.12.8<br/>
The server has a whitelist, so join our <a href="https://discord.gg/SPHymEDytw">Discord</a>, <a href="https://matrix.to/#/!BEyFZOZpWRoRrhRJbp:matrix.org">Matrix</a> or <a href="irc://irc.tuxcord.net">irc.tuxcord.net</a> and ask<br/>if you can join in the #.minecraft channel.<br/>
The server is cracked, so as to prevent bots and spam, we also have a registration system.<br/>
</pre>
<br/>
Rules:<br/>
<ol>
<li>
Joking around is Ok, but no directed hate speech.
</li>
<li>
Greifing and killing others is permitted.
</li>
<li>
No attempting to crash server or disrupt other people's gameplay with lag machines and the like.
</li>
<li>
While greifing is permitted in most cases, do not greif the main end island
</li>
</ol>
<div class="tuxcord-image">
<pre>
.-"""-.
' \
|,. ,-. |
|()L () \ |
|,' `".| |
|.___.',| `
.j `--"' ` `.
/ ' ' \
/ / ` `.
/ / ` .
/ / l |
. , TuxCord | |
_ ,"`. .| |
| ' ``. | [..-'l
/ `.`, | '--' `.
( `. __.j )
\_ |--""___| ,-'
`"--...,+"""" `._,.-' <a href="http://roysac.com/tutorial/diamondieasciiarttutorial.html">mh</a>
</pre>
</div>
</body>
<footer>
<hr/>
<div id="footer-links">
<a href="https://git.javalsai.tuxcord.net/deadvey/tuxcord.net">Source Code</a>
/
<a href="https://javalsai.tuxcord.net">Gitea, Hosted by Javalsai</a>
/
<a href="https://envs.net">Website inspired by envs.net</a>
</div>
</footer>
</html>

View File

@@ -1,50 +0,0 @@
:root {
--accent: #28ebb5
}
body {
background: #000000;
color: #ffffff;
padding-bottom: 100px;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
background: black;
}
#footer-links {
margin: 10px;
}
hr {
color: #ffffff;
}
.tuxcord-image {
position: absolute;
top: 0;
left: 650px;
}
a {
text-decoration: none;
color: var(--accent);
}
a:hover not(.no-spin) {
animation: half-spin 1s linear infinite;
display: inline-block; /* Ensures the text spins around its center */
}
@keyframes half-spin {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(10deg);
}
50% {
transform: rotate(0deg);
}
75% {
transform: rotate(-10deg);
}
100% {
transform: rotate(0deg);
}
}

Binary file not shown.

View File

@@ -1,3 +0,0 @@
<meta charset="UTF-8" />
<link rel="stylesheet" href="/static/index.css">

View File

@@ -1,68 +0,0 @@
<!DOCTYPE html>
<html>
<head>
{% include 'head.html' %}
</head>
<body>
<header>
{% include 'header.html'%}
</header>
<b><u>Services we provide:</u></b>
<ul>
<li>
<a href="https://mastodon.tuxcord.net">Mastodon</a> (<a href='/mastodon-status'>Status</a>)
</li>
<li>
<a href="https://git.javalsai.tuxcord.net">Gitea</a>
</li>
<li>
<a href="https://redlib.tuxcord.net">Redlib</a>
</li>
<li>
<a href="/mc">Minecraft</a>
</li>
<li>
Matrix server: matrix.tuxcord.net (please ask deadvey for access)
</li>
</ul>
<b><u>Join us:</u></b>
<ul>
Our Matrix and Discord are bridged, irc is not and is not very active.
<li>
<a href="https://matrix.to/#/#TuxCord:matrix.org">Matrix</a>
</li>
<li>
<a href="https://discord.gg/SPHymEDytw">Discord</a>
</li>
<li>
<a href="irc://irc.tuxcord.net">irc.tuxcord.net</a>
</li>
</ul>
<details>
<summary>
<u><b>Members:</b></u>
</summary>
<ul>
<li><u>pickzelle (Founder)</u></li>
<li>bruhhhhh😘</li>
<li><a href="https://git.javalsai.tuxcord.net/danmax">Danmax</a></li>
<li><a href="https://deadvey.tuxcord.net">DeaDvey</a></li>
<li><a href="https://github.com/ErrorNoInternet">ErrorNoInternet</a></li>
<li>grialion</li>
<li><a href="https://javalsai.tuxcord.net">Javalsai</a></li>
<li><a href="https://decompil.in/">Spamix</a></li>
</ul>
</details>
<div class="tuxcord-image">
<pre>
{{ ascii_penguin|safe }}
</pre>
</div>
</body>
<footer>
{% include 'footer.html' %}
</footer>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

View File

@@ -18,4 +18,4 @@
/ `.`, | '--' `. / `.`, | '--' `.
( `. __.j ) ( `. __.j )
\_ |--""___| ,-' \_ |--""___| ,-'
`"--...,+"""" `._,.-' <a href="http://roysac.com/tutorial/diamondieasciiarttutorial.html">mh</a> `"--...,+"""" `._,.-'

View File

@@ -0,0 +1,8 @@
__
/ \
^ ^
O O/
|| ||
|\_/|
`___'

View File

@@ -0,0 +1,19 @@
: .-"""-.
'.\'/.' ' \
-= o =- |,. ,-. | *''*
.'/.\'. |()L () \ | *_\/_*
: _ |,' `".| | * /\ *
: O=====~_.',| ` *..*
: .j `--"' ` `. :
. '/ ' ' \;
_\(/_ / / ` `.
./)\ / / Happy ` .
' / / Holidays , l |
. , TuxCord! ║_/ |
_ ,"`. ( . /
| ' ``. | '..-'l
/ `.`, | `.
( `. __.j )
\_ |--""___| ,-'
`"--...,+"""" `._,.-'

View File

@@ -16,5 +16,4 @@
/ `.`, .'`" '--'.l / `.`, .'`" '--'.l
( `. / ^.^ \) ( `. / ^.^ \)
\_ |--""\ `===` / \_ |--""\ `===` /
`"--...,+"""" `--------`<a href="http://roysac.com/tutorial/diamondieasciiarttutorial.html">mh</a> `"--...,+"""" `--------`

View File

@@ -16,5 +16,4 @@
/ `.`, | '--' `. / `.`, | '--' `.
( `. __.j ) ( `. __.j )
\_ |--""___| ,-' \_ |--""___| ,-'
`"--...,+"""" `._,.-' <a href="http://roysac.com/tutorial/diamondieasciiarttutorial.html">mh</a> `"--...,+"""" `._,.-'

22
tuxcord/manage.py Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tuxcord.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()

51
tuxcord/members.json Normal file
View File

@@ -0,0 +1,51 @@
[
{
"name": "PixeL",
"additional": "Founder"
},
{
"name": "bruhhhhh😘",
"pfp": "bruh.png",
"additional": "Admin"
},
{
"name": "ErrorNoInternet",
"website": "https://github.com/ErrorNoInternet",
"pfp": "error.png",
"additional": "Admin"
},
{
"name": "Javalsai",
"website": "https://javalsai.tuxcord.net",
"pfp": "javalsai.avif",
"additional": "Admin"
},
{
"name": "Danmax",
"website": "https://git.javalsai.tuxcord.net/danmax",
"pfp": "danmax.png"
},
{
"name": "DeaDvey",
"website": "https://deadvey.tuxcord.net",
"pfp": "deadvey.png"
},
{
"name": "duck-that-quacks",
"website": "https://git.javalsai.tuxcord.net/duck-that-quacks"
},
{
"name": "Grialion"
},
{
"name": "MightyCoderX",
"website": "https://github.com/MightyCoderX",
"pfp": "mcx.png"
},
{
"name": "Spamix",
"website": "https://decompil.in",
"pfp": "spamix.webp"
}
]

BIN
tuxcord/static/bruh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
tuxcord/static/danmax.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
tuxcord/static/deadvey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
tuxcord/static/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
tuxcord/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
tuxcord/static/generic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

101
tuxcord/static/index.css Normal file
View File

@@ -0,0 +1,101 @@
:root {
--accent: #28ebb5;
--accent2: #3a7dff;
}
body {
background: #000000;
color: #ffffff;
padding-bottom: 100px;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
background: black;
}
h1 {
font-size: 20px;
}
ul {
list-style-type: none;
}
#footer-links {
margin: 0px;
padding: 5px;
border-top: 1px solid white;
}
hr {
color: #ffffff;
}
#ascii-penguin {
position: absolute;
top: 0;
left: 650px;
}
#ascii-clippy {
position: absolute;
top: 75px;
left: 861px;
font-size: 10px;
transform: rotate(-36deg);
animation: rotate 2s linear infinite;
animation-play-state: paused;
width: 40px;
}
#ascii-clippy:hover {
animation-play-state: running;
}
#ascii-exclamation {
display: none;
position: absolute;
left: 548px;
top: 11px;
}
#ascii-tuxcord:hover {
#ascii-exclamation {
display: inline;
}
}
a {
text-decoration: none;
color: var(--accent);
}
a:hover {
font-weight: bold;
color: var(--accent2);
}
#member img {
width: 100px;
border-radius: 50%;
}
#member-role {
color: #888888;
}
#members {
display: grid;
grid-template-columns: auto auto auto auto auto;
}
#members div {
padding: 10px;
border-bottom: 1px solid white;
text-align: center;
margin: 20px;
}
#member:hover {
animation-name: grow;
border-bottom: 1px solid white;
animation-duration: 1s;
background: #222222;
}
#member:active {
background: #666666;
}
@keyframes grow {
from {transform: scale(1);}
to {transform: scale(1.2);}
}
@keyframes rotate {
from { transform: rotate(-36deg); }
to { transform: rotate(324deg); }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
tuxcord/static/javalsai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
tuxcord/static/mcx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
tuxcord/static/spamix.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
tuxcord/static/tuxcord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,12 @@
<div id='ascii-penguin'>
<pre>
{{ ascii_penguin }}
</pre>
</div>
<div id='ascii-clippy'>
<a href='https://www.youtube.com/watch?v=2_Dtmpe9qaQ&pp=ygUUbG91aXMgcm9zc21hbiBjbGlwcHk%3D'>
<pre>
{{ ascii_clippy }}
</pre>
</a>
</div>

View File

@@ -1,9 +1,12 @@
<hr/>
<div id="footer-links"> <div id="footer-links">
<a href="https://git.javalsai.tuxcord.net/deadvey/tuxcord.net">Source Code</a> <a href="https://git.javalsai.tuxcord.net/deadvey/tuxcord.net">Source Code</a>
/ /
<a href="https://javalsai.tuxcord.net">Gitea, Hosted by Javalsai</a> <a href="https://javalsai.tuxcord.net">Gitea, Hosted by Javalsai</a>
/ /
<a href="https://envs.net">Website inspired by envs.net</a> <a href="https://envs.net">Website inspired by envs.net</a>
/
<a href='https://github.com/xero/figlet-fonts/blob/master/larry3d.flf'>larry3d (title font) by Larry Gelberg</a>
/
<a href='http://roysac.com/tutorial/diamondieasciiarttutorial.html'>ASCII tux by DiamonDie (2002?)</a>
</div> </div>

View File

@@ -0,0 +1,5 @@
{% load static %}
<meta charset="UTF-8" />
<link rel="stylesheet" href="{% static 'index.css' %}">
<title>Tuxcord.NET</title>

View File

@@ -1,13 +1,20 @@
<pre> <pre>
<a href="/" class="no-spin"> <a id='ascii-tuxcord' href="/" class="no-spin">
__ __ __ __ __ __
---------/\ \__ /\ \ /\ \__ ---------/\ \__ /\ \ /\ \__
---------\ \ ,_\ __ __ __ _ ___ ___ _ __ \_\ \ ___ __\ \ ,_\ ---------\ \ ,_\ __ __ __ _ ___ ___ _ __ \_\ \ ___ __\ \ ,_\
----------\ \ \/ /\ \/\ \/\ \/'\ /'___\ / __`\/\`'__\/'_` \ /'_ `\ /'__`\ \ \/ ----------\ \ \/ /\ \/\ \/\ \/'\ /'___\ / __`\/\`'__\/'_` \ /'_ `\ /'__`\ \ \/
-----------\ \ \_\ \ \_\ \/> &lt;//\ \__//\ \L\ \ \ \//\ \L\ \ __/\ \/\ \/\ __/\ \ \_ -----------\ \ \_\ \ \_\ \/> &lt;//\ \__//\ \L\ \ \ \//\ \L\ \ __/\ \/\ \/\ __/\ \ \_
------------\ \__\\ \____//\_/\_\ \____\ \____/\ \_\\ \___,_\/\_\ \_\ \_\ \____\\ \__\ ------------\ \__\\ \____//\_/\_\ \____\ \____/\ \_\\ \___,_\/\_\ \_\ \_\ \____\\ \__\
-------------\/__/ \/___/ \//\/_/\/____/\/___/ \/_/ \/__,_ /\/_/\/_/\/_/\/____/ \/__/</a> -------------\/__/ \/___/ \//\/_/\/____/\/___/ \/_/ \/__,_ /\/_/\/_/\/_/\/____/ \/__/
A friendly Linux community. A friendly Linux community - est. July 2023
<span id='ascii-exclamation'>
__
/\ \
\ \ \
\ \ \
\ \_\
\/\_\
\/_/</span></a>
</pre> </pre>

View File

@@ -0,0 +1,36 @@
{% load static %}
<!DOCTYPE html>
<html>
<head>
{% include 'head.html' %}
</head>
<body>
<header>
{% include 'header.html'%}
</header>
<pre>
<h1>> ls -l</h1>
-rwx------. root root <a href='https://tuxcord.net'>The website</a>
-rwxr-xr-x. deadvey users <a href="https://mastodon.tuxcord.net">Mastodon</a>
-rwxr-x---. javalsai javalsai <a href="https://git.javalsai.tuxcord.net">Gitea</a>
-rwxr-xr-x. deadvey users <a href="https://redlib.tuxcord.net">Redlib</a>
-rwxr-x---. deadvey deadvey <a href="/mc">Minecraft</a>
-rwxr-x---. deadvey deadvey matrix.tuxcord.net
-rwx------. pixel users join-us.txt
<h1>> cat join-us.txt</h1>
// Our Matrix and Discord are bridged
<a href="https://matrix.to/#/#TuxCord:matrix.org">Matrix</a>
<a href="https://discord.gg/SPHymEDytw">Discord</a>
</pre>
<h1>Members:</h1>
<div id='members'>
{{member_grid_html | safe}}
</div>
{% include 'ascii-art.html' %}
<footer>
{% include 'footer.html' %}
</footer>
</body>
</html>

View File

@@ -31,16 +31,19 @@
While greifing is permitted in most cases, do not greif the main end island While greifing is permitted in most cases, do not greif the main end island
</li> </li>
</ol> </ol>
Examples:<br/>
Allowed:<br/>
X-Ray, Baritone, AFK farming etc...<br/>
<br/>
Disallowed:<br/>
Aimbot, Auto Sword Smapping etc...<br/>
Lag machine and Game abuse bugs<br/>
{% include 'ascii-art.html' %}
<div class="tuxcord-image"> <footer>
<pre> {% include 'footer.html' %}
{{ ascii_penguin|safe }} </footer>
</pre>
</div>
</body> </body>
<footer>
{% include 'footer.html' %}
</footer>
</html> </html>

16
tuxcord/tuxcord/asgi.py Normal file
View File

@@ -0,0 +1,16 @@
"""
ASGI config for tuxcord project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tuxcord.settings')
application = get_asgi_application()

75
tuxcord/tuxcord/urls.py Normal file
View File

@@ -0,0 +1,75 @@
from django.shortcuts import render
from django.urls import path
from django.http import HttpResponse
import os
from datetime import datetime
import json
ascii_clippy = open('./ascii/clippy.html', 'r').read()
def decide_ascii():
date = datetime.today().strftime('%d%m')
# Fireworks/Independence days
if date == "0101" or date == "0407" or date == "0511":
return open('./ascii/fireworks.html').read()
# Christmas
if date[2:] == '12':
return open('./ascii/christmas.html', 'r').read()
# Hallowe'en
if date[2:] == '10':
return open('./ascii/halloween.html', 'r').read()
# Normal
else:
return open('./ascii/normal.html', 'r').read()
def members_grid():
members_grid_html = ''
with open('members.json', 'r') as members_file:
members_object = json.load(members_file)
for member in members_object:
members_grid_html += f'''
{f'<a href="{member["website"]}" target="_blank">' if "website" in member else ''}
<div id="member">
<span id='member-image'><img src="/static/{member["pfp"] if "pfp" in member else 'generic.png'}"></span>
<br/>
<span id='member-name'>{member["name"]}<span>
<br/>
<span id='member-role'><sub><i>{member["additional"] if "additional" in member else ''}</i></sub></span>
<br/>
</div>
{'</a>' if 'website' in member else ''}
'''
return members_grid_html
def index(request):
ascii_penguin = decide_ascii()
members_grid_html = members_grid()
return render(request, 'index.html', {
'ascii_penguin': ascii_penguin,
'ascii_clippy': ascii_clippy,
'member_grid_html': members_grid_html
})
def mc(request):
ascii_penguin = decide_ascii()
return render(request, 'mc.html', {
'ascii_penguin': ascii_penguin,
'ascii_clippy': ascii_clippy
})
def favicon(request):
with open('static/favicon.ico', "rb") as f:
return HttpResponse(f.read(), content_type="image/icon")
urlpatterns = [
path('', index, name='index'),
path('mc', mc, name='mc'),
path('favicon.ico', favicon, name='favicon'),
]
# In your main file (e.g., manage.py or wsgi.py), set up the server to run.
# Django handles the server running automatically. Configure your settings as needed.

16
tuxcord/tuxcord/wsgi.py Normal file
View File

@@ -0,0 +1,16 @@
"""
WSGI config for tuxcord project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tuxcord.settings')
application = get_wsgi_application()