Initial Commit

This commit is contained in:
Your Name 2026-08-02 15:46:01 -04:00
commit e9b9d00c82
10 changed files with 276 additions and 0 deletions

20
deploy.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
echo "Deploying"
# Activate virtual environment
source venv/bin/activate
# Pull latest changes
git pull
# Install any new dependencies
pip install -r requirements.txt
# Run database migrations
python manage.py migrate
# Collect static files
python manage.py collectstatic --noinput
# Restart

22
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', 'web.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()

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
django

58
templates/bindex.html Normal file
View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/p5@1.9.2/lib/p5.min.js"></script>
<style>
body {
margin: 0;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box {
width: 200px;
height: 200px;
background: red;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
</style>
</head>
<body>
<div class="box">Hello</div>
<script>
let boxDiv;
let boxX, boxY;
let angle = 0;
function setup() {
boxDiv = document.querySelector('.box');
let rect = boxDiv.getBoundingClientRect();
boxX = rect.left;
boxY = rect.top;
boxDiv.remove();
let canvas = createCanvas(windowWidth, windowHeight, WEBGL);
canvas.position(0, 0);
canvas.style('pointer-events', 'none');
background(0, 0, 0, 0);
}
function draw() {
clear();
angle += 0.02;
push();
fill(255, 0, 0);
box(200, 200, 50);
pop();
}
</script>
</body>
</html>

45
templates/cssindex.html Normal file
View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #f0f0f0;
}
.door-container {
width: 200px;
height: 200px;
perspective: 1000px;
}
.door {
width: 100%;
height: 100%;
background: red;
display: flex;
align-items: center;
justify-content: center;
color: white;
transform-style: preserve-3d;
transition: transform 0.5s ease;
transform-origin: left;
cursor: pointer;
}
.door-container:hover .door {
transform: rotateY(-90deg);
box-shadow: 5px 5px 15px rgba(0,0,0,0.5)
}
</style>
</head>
<body>
<div class="door-container">
<div class="door">Hello</div>
</div>
</body>
</html>

76
templates/index.html Normal file
View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/p5@1.9.2/lib/p5.min.js"></script>
<style>
body {
margin: 0;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box {
width: 200px;
height: 200px;
background: red;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
</style>
</head>
<body>
<div class="box">Hello</div>
<script>
let boxDiv;
let angle = 0;
let targetAngle = 0;
function setup() {
boxDiv = document.querySelector('.box');
let canvas = createCanvas(windowWidth, windowHeight, WEBGL);
canvas.position(0, 0);
canvas.style('pointer-events', 'none');
background(0, 0, 0, 0);
boxDiv.addEventListener('mouseenter', () => {
targetAngle = 0;
});
boxDiv.addEventListener('mouseleave', () => {
targetAngle = -PI/2;
});
}
function draw() {
clear();
angle += (targetAngle - angle) * 0.1;
let rect = boxDiv.getBoundingClientRect();
let boxX = rect.left;
let boxY = rect.top;
let webglX = boxX - width/2;
let webglY = boxY - height/2 + 100;
push();
translate(webglX, webglY, 0);
translate(0, 0, 0);
rotateY(PI/2 - angle);
translate(-100, 0, 0);
fill(255, 0, 0);
box(200, 200, 50);
pop();
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
</script>
</body>
</html>

0
web/__init__.py Normal file
View File

16
web/asgi.py Normal file
View File

@ -0,0 +1,16 @@
"""
ASGI config for web 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', 'web.settings')
application = get_asgi_application()

22
web/urls.py Normal file
View File

@ -0,0 +1,22 @@
"""
URL configuration for web project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path
from django.views.generic import TemplateView
urlpatterns = [
path('', TemplateView.as_view(template_name='index.html')),
]

16
web/wsgi.py Normal file
View File

@ -0,0 +1,16 @@
"""
WSGI config for web 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', 'web.settings')
application = get_wsgi_application()