Compare commits

..

No commits in common. "9f4e06d7f9240b437a4eff403a78ee984c0bb9d9" and "28e4ae478efee093b2249c382abc04aff5b0bc6c" have entirely different histories.

7 changed files with 2 additions and 122 deletions

20
app.py
View file

@ -4,26 +4,8 @@ app = Flask(__name__)
@app.route('/') @app.route('/')
def home(): # put application's code here def hello_world(): # put application's code here
return render_template('home.html') return render_template('home.html')
@app.route('/random')
def random_image():
# TODO Implement
return NotImplementedError
@app.route('/daily')
def daily_image():
# TODO Implement
return NotImplementedError
@app.route('/all')
def all_images():
# TODO Implement
return NotImplementedError
if __name__ == '__main__': if __name__ == '__main__':
app.run(host='0.0.0.0') app.run(host='0.0.0.0')

View file

@ -1,17 +0,0 @@
import os
from sqlalchemy import create_engine
user = os.environ['DB_USER']
password = os.environ['DB_PASSWORD']
host = os.environ['DB_HOST']
port = os.environ['DB_PORT']
database = os.environ['DB_DATABASE']
def get_connection():
return create_engine(
url="mysql+pymysql://{0}:{1}@{2}:{3}/{4}".format(
user, password, host, port, database
)
)

View file

@ -1,18 +0,0 @@
import sqlalchemy as db
from db import connector
engine = connector.create_engine
metadata_obj = db.MetaData()
profile = db.Table(
'images',
metadata_obj,
db.Column('id', db.Integer, primary_key=True),
db.Column('location', db.String),
db.Column('copyright', db.String),
db.Column('date_added', db.TIMESTAMP),
)
metadata_obj.create_all(engine)

View file

@ -1,26 +0,0 @@
body {
background-image: url("/random");
height: 100vh;
width: 100vw;
}
body nav {
display: flex;
flex-direction: row;
justify-content: center;
background: rgba(0, 0, 0, 0.4);
width: 100vw;
padding: 0 20px;
}
body nav ul > li {
color: white;
}
body nav ul > li :hover {
color: #13678A;
animation: ease-in;
}
body h1 {
margin: auto;
text-align: center;
}
/*# sourceMappingURL=styles.css.map */

View file

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE,OAnBD;EAoBC;;AAKN;EACE;EACA","file":"styles.css"}

View file

@ -1,31 +0,0 @@
// Variables
$blue: #13678A;
body {
background-image: url("/random");
height: 100vh;
width: 100vw;
nav {
display: flex;
flex-direction: row;
justify-content: center;
background: rgba(0, 0, 0, 0.4);
width: 100vw;
padding: 0 20px;
ul > li {
color: white;
:hover {
color: $blue;
animation: ease-in;
}
}
}
h1 {
margin: auto;
text-align: center;
}
}

View file

@ -3,17 +3,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>DCSL Image Hosting Server</title> <title>DCSL Image Hosting Server</title>
<link type="text/css" href="/static/css/styles.css">
</head> </head>
<body> <body>
<nav>
<ul>
<li><a href="/daily">Daily Wallpaper</a></li>
<li><a href="/random">Random Wallpaper</a></li>
<li><a href="/all">All Wallpapers</a></li>
</ul>
</nav>
<h1>Welcome to the DCSL Image Hosting Server!</h1>
<h2> - Serving images since year 2022</h2>
</body> </body>
</html> </html>