完成大体结构,后续还需学习或者迁移
This commit is contained in:
20
var/main.py
20
var/main.py
@@ -37,12 +37,28 @@ async def reload_301():
|
|||||||
async def home(request: Request):
|
async def home(request: Request):
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
"home.html",
|
"home.html",
|
||||||
{"request": request}
|
{
|
||||||
|
"request": request,
|
||||||
|
"title": "home"
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.get("/resources/")
|
@app.get("/resources/")
|
||||||
async def resources(request: Request):
|
async def resources(request: Request):
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
"resources.html",
|
"resources.html",
|
||||||
{"request": request}
|
{
|
||||||
|
"request": request,
|
||||||
|
"title": "resources"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
@app.get("/bbs/")
|
||||||
|
async def bbs(request: Request):
|
||||||
|
return templates.TemplateResponse(
|
||||||
|
"bbs.html",
|
||||||
|
{
|
||||||
|
"request": request,
|
||||||
|
"title": "bbs"
|
||||||
|
},
|
||||||
)
|
)
|
||||||
0
var/static/src/js/resources/main.js
Normal file
0
var/static/src/js/resources/main.js
Normal file
11
var/templates/bbs.html
Normal file
11
var/templates/bbs.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>绿坝娘资源小站 (仮) | {{ title }}</title>
|
||||||
|
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="/">返回主页</a>
|
||||||
|
<br>
|
||||||
|
搭建中......
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>绿坝娘资源小站 (仮) | home</title>
|
<title>绿坝娘资源小站 (仮) | {{ title }}</title>
|
||||||
<link rel="stylesheet" href="/static/src/css/home/main.css">
|
<link rel="stylesheet" href="/static/src/css/home/main.css">
|
||||||
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
|
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
|
||||||
</head>
|
</head>
|
||||||
@@ -35,10 +35,10 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<li style="font-size: 600%; width: 65%; height: 25%; text-align: right;">
|
<li style="font-size: 600%; width: 65%; height: 25%; text-align: right; list-style: none;">
|
||||||
<a href="#">主页</a>
|
<a href="/">主页</a>
|
||||||
<a href="/resources/">资源</a>
|
<a href="/resources/">资源</a>
|
||||||
<a href="#">论坛</a>
|
<a href="/bbs/">论坛</a>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -1 +1,16 @@
|
|||||||
123
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>绿坝娘资源小站 (仮) | {{ title }}</title>
|
||||||
|
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="/">返回主页</a>
|
||||||
|
<br>
|
||||||
|
<h1>Index of /</h1>
|
||||||
|
<hr>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user