Compare commits

...

2 commits

Author SHA1 Message Date
50cd2b17bb Shrunk site 2025-07-20 12:45:52 +02:00
ca0b2e7c5b Added live serving 2025-07-20 12:44:48 +02:00
12 changed files with 65 additions and 23 deletions

View file

@ -3,6 +3,8 @@ import shutil
from dataclasses import dataclass from dataclasses import dataclass
import markdown import markdown
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
import sys
from http.server import SimpleHTTPRequestHandler, HTTPServer
@dataclass @dataclass
@ -49,6 +51,18 @@ class Section:
def main() -> None: def main() -> None:
if sys.argv[1:] and sys.argv[1] == "serve":
port = int(sys.argv[2]) if len(sys.argv) > 2 else 8000
os.chdir("dist")
print(f"Serving on http://localhost:{port}")
httpd = HTTPServer(("localhost", port), SimpleHTTPRequestHandler)
try:
httpd.serve_forever()
except KeyboardInterrupt:
print("\nServer stopped.")
finally:
httpd.server_close()
return
env = Environment(loader=FileSystemLoader(".")) env = Environment(loader=FileSystemLoader("."))
template = env.get_template("site.template.html") template = env.get_template("site.template.html")
@ -70,6 +84,9 @@ def main() -> None:
shutil.rmtree(dst_folder, ignore_errors=True) shutil.rmtree(dst_folder, ignore_errors=True)
shutil.copytree(src_folder, dst_folder) shutil.copytree(src_folder, dst_folder)
if os.path.exists("favicon.ico"):
shutil.copy("favicon.ico", "dist/favicon.ico")
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View file

@ -73,17 +73,17 @@ body {
fill: #fefefe; fill: #fefefe;
} }
.top-bar { .top-content-section {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5) !important;
width: 100%; width: 100%;
position: fixed; position: fixed;
} }
.top-bar .menu { .top-content-section .menu {
background: transparent; background: transparent;
} }
.top-bar .menu-text { .top-content-section .menu-text {
color: #fefefe; color: #fefefe;
} }

8
dist/css/app.css vendored
View file

@ -73,17 +73,17 @@ body {
fill: #fefefe; fill: #fefefe;
} }
.top-bar { .top-content-section {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5) !important;
width: 100%; width: 100%;
position: fixed; position: fixed;
} }
.top-bar .menu { .top-content-section .menu {
background: transparent; background: transparent;
} }
.top-bar .menu-text { .top-content-section .menu-text {
color: #fefefe; color: #fefefe;
} }

11
dist/faq.html vendored
View file

@ -6,13 +6,17 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syng.Rocks</title> <title>Syng.Rocks</title>
<link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
</head> </head>
<body> <body>
<div class="top-content-section"> <div class="top-content-section">
<div class="top-bar"> <div class="title-bar" style="background: transparent" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="main-menu"></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu" style="background: unset;">
<div class="top-bar-left"> <div class="top-bar-left">
<ul class="menu"> <ul class="menu">
<li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li> <li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li>
@ -31,6 +35,7 @@
<ul class="menu"> <ul class="menu">
<li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li> <li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li>
<li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li> <li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li>
<li><a href="https://github.com/christofsteel/syng" target="_blank"><img alt="Github" src="images/github.svg" style="max-height:24px; max-width:24px"></a></p></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -114,7 +119,7 @@ For more information, see the <a href="privacy.html">privacy policy</a>.</p>
<script src="js/vendor/jquery.js"></script> <script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script> <script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script> <script src="js/vendor/foundation.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 KiB

After

Width:  |  Height:  |  Size: 103 KiB

11
dist/index.html vendored
View file

@ -6,13 +6,17 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syng.Rocks</title> <title>Syng.Rocks</title>
<link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
</head> </head>
<body> <body>
<div class="top-content-section"> <div class="top-content-section">
<div class="top-bar"> <div class="title-bar" style="background: transparent" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="main-menu"></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu" style="background: unset;">
<div class="top-bar-left"> <div class="top-bar-left">
<ul class="menu"> <ul class="menu">
<li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li> <li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li>
@ -31,6 +35,7 @@
<ul class="menu"> <ul class="menu">
<li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li> <li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li>
<li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li> <li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li>
<li><a href="https://github.com/christofsteel/syng" target="_blank"><img alt="Github" src="images/github.svg" style="max-height:24px; max-width:24px"></a></p></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -101,7 +106,7 @@ The web client also contains an admin mode, that allows for manual moderation of
<script src="js/vendor/jquery.js"></script> <script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script> <script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script> <script src="js/vendor/foundation.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>

11
dist/install.html vendored
View file

@ -6,13 +6,17 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syng.Rocks</title> <title>Syng.Rocks</title>
<link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
</head> </head>
<body> <body>
<div class="top-content-section"> <div class="top-content-section">
<div class="top-bar"> <div class="title-bar" style="background: transparent" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="main-menu"></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu" style="background: unset;">
<div class="top-bar-left"> <div class="top-bar-left">
<ul class="menu"> <ul class="menu">
<li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li> <li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li>
@ -31,6 +35,7 @@
<ul class="menu"> <ul class="menu">
<li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li> <li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li>
<li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li> <li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li>
<li><a href="https://github.com/christofsteel/syng" target="_blank"><img alt="Github" src="images/github.svg" style="max-height:24px; max-width:24px"></a></p></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -71,7 +76,7 @@
<script src="js/vendor/jquery.js"></script> <script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script> <script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script> <script src="js/vendor/foundation.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>

11
dist/privacy.html vendored
View file

@ -6,13 +6,17 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syng.Rocks</title> <title>Syng.Rocks</title>
<link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
</head> </head>
<body> <body>
<div class="top-content-section"> <div class="top-content-section">
<div class="top-bar"> <div class="title-bar" style="background: transparent" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="main-menu"></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu" style="background: unset;">
<div class="top-bar-left"> <div class="top-bar-left">
<ul class="menu"> <ul class="menu">
<li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li> <li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li>
@ -31,6 +35,7 @@
<ul class="menu"> <ul class="menu">
<li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li> <li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li>
<li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li> <li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li>
<li><a href="https://github.com/christofsteel/syng" target="_blank"><img alt="Github" src="images/github.svg" style="max-height:24px; max-width:24px"></a></p></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -66,7 +71,7 @@
<script src="js/vendor/jquery.js"></script> <script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script> <script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script> <script src="js/vendor/foundation.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View file

@ -11,13 +11,17 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syng.Rocks</title> <title>Syng.Rocks</title>
<link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/app.css">
</head> </head>
<body> <body>
<div class="top-content-section"> <div class="top-content-section">
<div class="top-bar"> <div class="title-bar" style="background: transparent" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="main-menu"></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu" style="background: unset;">
<div class="top-bar-left"> <div class="top-bar-left">
<ul class="menu"> <ul class="menu">
<li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li> <li class="menu-text"><img src="images/rocks.syng.Syng.png" alt="Syng.Rocks! Logo" height=30></li>
@ -30,6 +34,7 @@
<ul class="menu"> <ul class="menu">
<li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li> <li><a href="https://matrix.to/#/#syng:matrix.org" target="_blank"><img alt="Matrix" src="images/matrix.svg" style="max-height:24px;"></a></li>
<li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li> <li><a href="https://floss.social/@syng" target="_blank"><img alt="Mastodon" src="images/mastodon.svg" style="max-height:24px;"></a></p></li>
<li><a href="https://github.com/christofsteel/syng" target="_blank"><img alt="Github" src="images/github.svg" style="max-height:24px; max-width:24px"></a></p></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -41,7 +46,7 @@
<script src="js/vendor/jquery.js"></script> <script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script> <script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script> <script src="js/vendor/foundation.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>