大概页面布局完成,api确认没问题,接下来就要上传内容了

This commit is contained in:
2026-05-22 03:16:06 +00:00
parent 55f01abd74
commit dfd630fa2b
10 changed files with 221 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
<html>
<head>
<title>绿坝娘资源小站 (仮) | {{ title }}</title>
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
</head>
<body>
<h2>视频导览<a href="/resources">../返回上级</a></h2>
<br>
<div id="list"></div>
</body>
<script>
fetch('https://greendam.ww3.tw/api/video/list/')
.then(res => res.json())
.then(data => {
data.forEach(item => {
console.log("ID", item.id)
console.log("Name", item.filename)
console.log("Url", item.url_path)
let list_Document = `<a href="./${item.filename}">${item.filename}</a>__`
document.getElementById('list').innerHTML += list_Document
})
})
</script>
</html>

View File

@@ -0,0 +1,24 @@
<html>
<head>
<title>绿坝娘资源小站 (仮) | {{ name }}</title>
<link rel="icon" type="image/png" sizes="128x128" href="/static/src/img/logo.png">
</head>
<body>
{{ name }}
<div id="content"></div>
</body>
<script>
fetch('https://greendam.ww3.tw/api/video/list/{{ name }}/')
.then(res => res.json())
.then(data => {
data.forEach(itme => {
console.log("ID", itme.id)
console.log("Name", itme.filename)
console.log("Url", itme.url_path)
let video_Document = `<br><br><b>${itme.filename}</b><br><br><hr><video width="25%" controls><source src=${itme.url_path} type="video/mp4"></video><br>`
document.getElementById('content').innerHTML += video_Document
})
})
</script>
</html>