|
|
@@ -1,23 +1,43 @@ |
|
|
|
import http.server |
|
|
|
|
|
|
|
|
|
|
|
def page(path): |
|
|
|
print(path) |
|
|
|
match path: |
|
|
|
case "/ying.html": |
|
|
|
return """ |
|
|
|
<html> |
|
|
|
<head> |
|
|
|
<title> YingYang </title> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<div> <b>Ying</b> </div> |
|
|
|
<div> <a href="yang.html">The second word of power...</a> </div> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
""" |
|
|
|
|
|
|
|
case "/yang.html": |
|
|
|
return """ |
|
|
|
<html> |
|
|
|
<head> |
|
|
|
<title> YingYang </title> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<div> <b>Yang</b> </div> |
|
|
|
<div> <a href="ying.html">The first word of power...</a> </div> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
class EigenerHandler(http.server.BaseHTTPRequestHandler): |
|
|
|
|
|
|
|
def do_GET(self): |
|
|
|
self.send_response(200) |
|
|
|
self.send_header('Content-tyoe', 'text-html') |
|
|
|
self.send_header('Content-type', 'text-html') |
|
|
|
self.end_headers() |
|
|
|
|
|
|
|
msg = """ |
|
|
|
<html> |
|
|
|
<head> |
|
|
|
<title> YingYang </title> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<b>Ying</b> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
""" |
|
|
|
msg = page(self.path) |
|
|
|
self.wfile.write(msg.encode('utf-8')) |
|
|
|
|
|
|
|
|