commit 73c4f14189e3ab1ea83a76c6110d98ee044b4b7b Author: TickNick Date: Wed May 17 18:24:29 2023 +0200 initialize a webserver with html/css diff --git a/main.py b/main.py new file mode 100644 index 0000000..d048d0b --- /dev/null +++ b/main.py @@ -0,0 +1,17 @@ +from flask import Flask, render_template +from flask_socketio import SocketIO, emit + +app = Flask(__name__) +app.config['SECRET_KEY'] = 'dein_geheimer_schluessel' +socketio = SocketIO(app) + +@app.route('/') +def index(): + return render_template('index.html') + +@socketio.on('connect') +def handle_connect(): + emit('message', {'data': 'Verbunden'}) + +if __name__ == '__main__': + socketio.run(app) diff --git a/static/css/styles.css b/static/css/styles.css new file mode 100644 index 0000000..9b3cfa6 --- /dev/null +++ b/static/css/styles.css @@ -0,0 +1,185 @@ +/* Reset CSS */ +* { + box-sizing: border-box; + margin: 0; + padding: 0; + } + + body { + font-family: Arial, sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; + } + + header { + background-color: #333; + padding: 20px; + color: #fff; + text-align: center; + } + + nav ul { + list-style: none; + margin-top: 20px; + } + + nav ul li { + display: inline-block; + margin-right: 10px; + } + + nav ul li a { + color: #fff; + text-decoration: none; + } + + main { + padding: 20px; + } + + h2 { + margin-bottom: 10px; + } + + section { + margin-bottom: 40px; + } + + #hero { + background-image: url("img/hero-bg.jpg"); + background-size: cover; + background-position: center; + color: #fff; + padding: 80px 0; + text-align: center; + transform-style: preserve-3d; + perspective: 1000px; + } + + .hero-content { + max-width: 600px; + margin: 0 auto; + transform: rotateY(10deg) rotateX(-10deg); + transition: transform 0.5s ease; + } + + #hero:hover .hero-content { + transform: rotateY(0) rotateX(0); + } + + #features { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + } + + .feature { + flex-basis: 300px; + margin: 20px; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + text-align: center; + transform-style: preserve-3d; + perspective: 1000px; + } + + .feature:hover { + transform: rotateY(10deg) rotateX(-10deg); + transition: transform 0.5s ease; + } + + #portfolio { + text-align: center; + } + + .portfolio-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + grid-gap: 20px; + margin-top: 20px; + } + + .portfolio-item { + border: 1px solid #ccc; + border-radius: 5px; + overflow: hidden; + transform-style: preserve-3d; + perspective: 1000px; + } + + .portfolio-item:hover { + transform: rotateY(10deg) rotateX(-10deg); + transition: transform 0.5s ease; + } + + .portfolio-item img { + width: 100%; + height: auto; + } + + #contact { + text-align: center; + } + + .form-group { + margin-bottom: 20px; + } + + label { + display: block; + margin-bottom: 5px; + } + + input[type="text"], + input[type="email"], + textarea { + width: 100%; + padding: 10px; + border-radius: 5px; + border: 1px solid #ccc; + } + + button[type="submit"] { + background-color: #333; + color: #fff; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + transform-style: preserve-3d; + perspective: 1000px; + } + + button[type="submit"]:hover { + transform: rotateY(10deg) rotateX(-10deg); + transition: transform 0.5s ease; + } + + footer { + background-color: #333; + color: #fff; + padding: 20px; + text-align: center; + } + + footer p { + margin: 0; + } + + .container { + max-width: 1200px; + margin: 0 auto; + padding: 0 20px; + } + + /* Media Queries */ + @media (max-width: 768px) { + nav ul li { + display: block; + margin-bottom: 10px; + } + } + \ No newline at end of file diff --git a/templates/Irgendwann.html b/templates/Irgendwann.html new file mode 100644 index 0000000..a024e2e --- /dev/null +++ b/templates/Irgendwann.html @@ -0,0 +1,92 @@ + + + + + + Meine coole Website + + + +
+
+

Meine coole Website

+ +
+
+ +
+
+

Willkommen auf unserer Website

+

Wir erstellen moderne und ansprechende Websites für Ihr Unternehmen.

+ Mehr erfahren +
+
+ +
+
+
+ +

Responsives Design

+

Unsere Websites passen sich allen Geräten an und sind auf Mobilgeräten benutzerfreundlich.

+
+
+ +

Kreatives Design

+

Wir verwenden moderne Designprinzipien, um ansprechende und ästhetische Websites zu erstellen.

+
+
+ +

Saubere Codierung

+

Unser qualifiziertes Team verwendet beste Praktiken für eine saubere und effiziente Codierung.

+
+
+
+ +
+
+

Unsere Projekte

+
+
+ Projekt 1 +

Projekt 1

+
+
+ Projekt 2 +

Projekt 2

+
+
+ Projekt 3 +

Projekt 3

+
+
+
+
+ +
+
+

Kontaktieren Sie uns

+
+ + + + +
+
+
+ + + + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..a5c2ce9 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,18 @@ + + + + WebSocket Beispiel + + +

WebSocket Beispiel

+ + + + +