added files after removing them 5 times on accident
This commit is contained in:
commit
b026d00bd9
6 changed files with 194 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
data
|
||||||
27
README.md
Normal file
27
README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
# shitty darknet website
|
||||||
|
cool website with python, flask, mariadb and monero.
|
||||||
|
|
||||||
|
## description
|
||||||
|
We make a darknet dating website based darknet users (such as myself). Each user can provide their own web page and must pay to join. a list of users will be displayed on the main page. Website will not use javashit.
|
||||||
|
|
||||||
|
## goals:
|
||||||
|
Website must contain these features when finished
|
||||||
|
- create accounts
|
||||||
|
- delete accounts
|
||||||
|
- monero payments
|
||||||
|
- search page
|
||||||
|
|
||||||
|
## Database
|
||||||
|
### USER
|
||||||
|
- id (PK)
|
||||||
|
- username
|
||||||
|
- first name
|
||||||
|
- last name
|
||||||
|
- adress
|
||||||
|
- pgp
|
||||||
|
- xmpp
|
||||||
|
- email (optional)
|
||||||
|
- phone number (optional)
|
||||||
|
- likes
|
||||||
|
- dislikes
|
||||||
|
- sex
|
||||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
container_name: lovedb
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: love
|
||||||
|
POSTGRES_PASSWORD: love
|
||||||
|
POSTGRES_DB: lovedb
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/lib/postgresql
|
||||||
52
src/main.py
Normal file
52
src/main.py
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
from flask import Flask, render_template
|
||||||
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
from sqlalchemy import Enum
|
||||||
|
from sqlalchemy.dialects.postgresql import ARRAY
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://love:love@localhost/lovedb'
|
||||||
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
|
|
||||||
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
class SexEnum:
|
||||||
|
male = "male"
|
||||||
|
female = "female"
|
||||||
|
|
||||||
|
class User(db.Model):
|
||||||
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
|
username = db.Column(db.String(80), unique=True, nullable=False)
|
||||||
|
pgp = db.Column(db.String(4096), unique=True, nullable=False)
|
||||||
|
|
||||||
|
firstname = db.Column(db.String(80), unique=False, nullable=False)
|
||||||
|
lastname = db.Column(db.String(80), unique=False, nullable=False)
|
||||||
|
sex = db.Column(Enum('male', 'female', name="sex_enum"), nullable=False)
|
||||||
|
date_of_birth = db.Column(db.Date, nullable=False)
|
||||||
|
profile_picture = db.Column(db.String(200), nullable=False)
|
||||||
|
pictures = db.Column(ARRAY(db.String), nullable=True)
|
||||||
|
country = db.Column(db.String(80), unique=False, nullable=False)
|
||||||
|
city = db.Column(db.String(80), unique=False, nullable=True)
|
||||||
|
|
||||||
|
height = db.Column(db.Float, nullable=True)
|
||||||
|
weight = db.Column(db.Integer, nullable=True)
|
||||||
|
race = db.Column(db.String(20), unique=False, nullable=True)
|
||||||
|
|
||||||
|
prefered_age_range = db.Column(db.String(20), nullable=True)
|
||||||
|
likes = db.Column(ARRAY(db.String), nullable=True)
|
||||||
|
dislikes = db.Column(ARRAY(db.String), nullable=True)
|
||||||
|
|
||||||
|
xmpp = db.Column(db.String(80), unique=True, nullable=False)
|
||||||
|
email = db.Column(db.String(80), unique=True, nullable=True)
|
||||||
|
phone = db.Column(db.String(20), unique=True, nullable=True)
|
||||||
|
|
||||||
|
is_verified = db.Column(db.Boolean, default=False)
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def home():
|
||||||
|
return render_template("index.html")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
with app.app_context():
|
||||||
|
db.create_all()
|
||||||
|
app.run(debug=True)
|
||||||
86
src/static/style.css
Normal file
86
src/static/style.css
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'font';
|
||||||
|
src: url('/font/font.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'font';
|
||||||
|
src: url('/font/font-Bold.ttf') format('truetype');
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: #111011;
|
||||||
|
color: #e0e0e0;
|
||||||
|
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
|
||||||
|
max-width: 800px;
|
||||||
|
margin: auto;
|
||||||
|
font-family: font;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding: 0 0 1.5rem 0;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong, b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: underline #FF00FF;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
text-align: center;
|
||||||
|
color: #ff00ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
color: #ff00ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #0000ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
color: #ff00ff;
|
||||||
|
background: #111011;
|
||||||
|
}
|
||||||
|
|
||||||
|
details {
|
||||||
|
background: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary:hover {
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service {
|
||||||
|
padding: 0.5rem;
|
||||||
|
border: solid thin #ffff00;
|
||||||
|
}
|
||||||
13
src/templates/index.html
Normal file
13
src/templates/index.html
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>onions</title>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
|
</head>
|
||||||
|
<header><h1>onions</h1><p><h2>find the onion of your life!</h2></p></header>
|
||||||
|
<nav><a href="/register">register</a> / <a href="/login">login</a> / <a href="/search">search</a></nav>
|
||||||
|
<body>
|
||||||
|
<h1>Welcome!</h1>
|
||||||
|
<p>WIP<p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue