Skip to content

Commit

Permalink
chore: introduce djlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Jan 16, 2024
1 parent 73d3886 commit 4076e70
Show file tree
Hide file tree
Showing 43 changed files with 2,649 additions and 2,444 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ update:

fmt:
autoflake --recursive --remove-all-unused-imports --in-place . && isort . && black .
echo "fmt django templates"
djlint --reformat templates/


check:
isort --check .
black --check .
djlint --check templates/

runserver:
$(PM) runserver 0.0.0.0:8000
Expand Down
29 changes: 12 additions & 17 deletions apps/sspanel/static/sspanel/css/sspanel.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
/* 动态为footer添加类fixed-bottom */

.fixed-bottom {
position: fixed;
bottom: 0;
width: 100%;
position: fixed;
bottom: 0;
width: 100%;
}


/* 注册错误消息提示 */

.errorlist {
color: red
color: red;
}


/* Navbar免js自动响应 */

#nav-toggle-state {
display: none;
display: none;
}

#nav-toggle-state:checked~.nav-menu {
display: block;
#nav-toggle-state:checked ~ .nav-menu {
display: block;
}


@media all and (max-width: 768px) {
body {
/* On modern browsers, prevent the whole page to bounce */
overflow: hidden;
}
}
body {
/* On modern browsers, prevent the whole page to bounce */
overflow: hidden;
}
}
2 changes: 1 addition & 1 deletion apps/stats/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DailyStatsAdmin(admin.ModelAdmin):
"order_amount",
"total_used_traffic",
]
list_per_page = 31
list_per_page = 10
list_filter = ["date"]


Expand Down
291 changes: 286 additions & 5 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ djangorestframework = "^3.14.0"
autoflake = "^2.2.1"
black = "^23.12.1"
isort = "^5.12.0"
djlint = "^1.34.1"

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
43 changes: 21 additions & 22 deletions templates/404.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<!DOCTYPE htmlL>
<html>

<head>
<title>该页面不存在/需要登录才能访问</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<head>
<title>该页面不存在/需要登录才能访问</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
font-family: 'Courgette', cursive;
}
Expand Down Expand Up @@ -53,20 +52,20 @@
-moz-border-radius: .1em;
-border-radius: .1em;
}
</style>
</head>


<body>
<div class="wrap">
<div class="logo">
<h1>404</h1>
<p>你访问的页面不存在/需要登录后才能访问</p>
<div class="sub">
<p><a href="/">回到首页</a></p>
</div>
</div>
</div>
</body>

</html>

</style>
</head>
<body>
<div class="wrap">
<div class="logo">
<h1>404</h1>
<p>你访问的页面不存在/需要登录后才能访问</p>
<div class="sub">
<p>
<a href="/">回到首页</a>
</p>
</div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 4076e70

Please sign in to comment.