mirror of
https://github.com/Kakune55/ComiPy.git
synced 2025-05-06 18:29:26 +08:00
使用显式GC节省内存 + 为book页添加响应式布局
This commit is contained in:
parent
a434e44f7f
commit
0d68d58e3f
@ -1,56 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<title>详情页面</title>
|
||||
<style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<title>详情页面</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
width: 80%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.header {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.movie-poster {
|
||||
flex: 1;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.movie-details {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.movie-details h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.movie-details p {
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.comments-section {
|
||||
width: 80%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.comment {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.comment p {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
@ -73,10 +93,12 @@
|
||||
<p>用户A:Lorem ipsum dolor sit amet consectetur adipisicing elit. Nobis, quam!</p>
|
||||
</div>
|
||||
<div class="comment">
|
||||
<p>用户B:Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aut sunt tempore architecto minus, cum mollitia voluptatibus repellendus aliquid id reprehenderit.</p>
|
||||
<p>用户B:Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aut sunt tempore architecto minus, cum
|
||||
mollitia voluptatibus repellendus aliquid id reprehenderit.</p>
|
||||
</div>
|
||||
<!-- 在此添加更多评论 -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
@ -1,6 +1,6 @@
|
||||
from flask import *
|
||||
from flask import Blueprint
|
||||
import db.file , file
|
||||
import db.file , file, gc
|
||||
|
||||
api_Img_bp = Blueprint("api_Img_bp", __name__)
|
||||
|
||||
@ -23,4 +23,5 @@ def img(bookid, index): # 图片接口
|
||||
del data
|
||||
response.headers.set("Content-Type", "image/Webp")
|
||||
response.headers.set("Content-Disposition", "inline", filename=filename)
|
||||
gc.collect()
|
||||
return response
|
||||
|
Loading…
x
Reference in New Issue
Block a user