Commit c0c6f288 authored by Moritz Sokoll's avatar Moritz Sokoll 🦀
Browse files

added pages folder for pages

parent db2ff54c
FROM python:latest
RUN apt-get update -y
COPY . /app
RUN bash venv/bin/activate
RUN pip3 install -U pip
RUN pip3 install flask
CMD [ "python3", "src/" ]
docker build -t ulublog:latest .
docker run --name blog -p5000:5000 -v`pwd`/src/pages:/app/src/pages ulublog:latest
from flask import Flask
from flask import Flask, request
app = Flask(__name__)
def index():
return "<h1>Index page</h1>"
return open("/app/src/pages/index.html", "r").read()
def viewBlogPage():
if request.method != "GET":
return "please use the HTTP GET method to access this site"
if not "id" in request.args:
return "provide a blog id to view any article"
id = request.args['id']
# TODO: implement blog article view with 'id'
return f"viewing the article with id {id} will be implementet later"
def about():
return open("/app/src/pages/about.html").read()
if __name__ == "__main__":"", 5000, debug=True)
<!DOCTYPE html>
<title>About ULUdev's Blog</title>
<!DOCTYPE html>
<title>ULUdev's Blog</title>
body {
text-align: center;
font-family: Sans-Serif;
color: #969696;
background-color: #333333;
.navbar {
text-decoration: none;
nav {
background-color: #333333;
color: #969696;
nav *{
align: left;
display: inline;
margin-left: 3px;
<a class="navbar" href="/about">about</a>
<h1>ULUdev's Blog</h1>
Here will be something different later on. (No Sample Text)
This content will be recieved by an API.
<div class="blog links">
<p>Later here will be some links to blog articles (retrieved by the API)</p>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment