Compare commits

..
4 Commits
Author SHA1 Message Date
retoor 5b2b91f06c feat: add viewport meta tag with charset to index.html for mobile responsiveness
Inserted <meta charset="UTF-8"> and <meta name="viewport" content="width=device-width, initial-scale=1.0"> into the <head> section of src/rchat/static/index.html, ensuring proper character encoding and responsive scaling on mobile browsers.
2024-12-05 20:46:15 +00:00
retoor 99cf3da9ab chore: remove trailing whitespace and normalize string quotes in app.py websocket handler 2024-12-05 18:39:02 +00:00
retoor 421e969d35 chore: change default port from 8080 to 3018 in __main__.py main function 2024-12-05 18:37:26 +00:00
retoor 9d82613c66 chore: initialize project scaffold with gitignore, Makefile, pyproject.toml, and rchat package skeleton 2024-12-05 18:34:58 +00:00
5 changed files with 9 additions and 8 deletions
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -3
View File
@@ -5,10 +5,8 @@ from rchat.app import create_app
def main(): def main():
app = create_app() app = create_app()
web.run_app(app, port=8080) web.run_app(app, port=3018)
# Run the server
if __name__ == "__main__": if __name__ == "__main__":
main() main()
# static/index.html
+4 -4
View File
@@ -33,10 +33,10 @@ class Application(BaseApplication):
ws = web.WebSocketResponse() ws = web.WebSocketResponse()
await ws.prepare(request) await ws.prepare(request)
session = request.session session = request.session
if not 'username' in session: if "username" not in session:
session['username'] = fake.name().split(" ")[0] session["username"] = fake.name().split(" ")[0]
session['uid'] = str(uuid.uuid4()) session["uid"] = str(uuid.uuid4())
session['session_id'] = session['uid'] session["session_id"] = session["uid"]
username = session["username"] username = session["username"]
session_id = session["session_id"] session_id = session["session_id"]
+3
View File
@@ -2,6 +2,9 @@
<html> <html>
<head> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rchat</title> <title>rchat</title>
<style> <style>
body { body {