@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.12" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/zyd2025.iml" filepath="$PROJECT_DIR$/.idea/zyd2025.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="django" name="Django">
|
||||
<configuration>
|
||||
<option name="rootFolder" value="$MODULE_DIR$/src" />
|
||||
<option name="settingsModule" value="settings.py" />
|
||||
<option name="manageScript" value="$MODULE_DIR$/src/manage.py" />
|
||||
<option name="environment" value="<map/>" />
|
||||
<option name="doNotUseTestRunner" value="false" />
|
||||
<option name="trackFilePattern" value="migrations" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/src/templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
||||
@ -0,0 +1,688 @@
|
||||
/*
|
||||
* 社交媒体图标样式
|
||||
*/
|
||||
|
||||
/* Google 图标样式 */
|
||||
.icon-sn-google {
|
||||
background-position: 0 -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-google {
|
||||
background-color: #4285f4;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.fa-sn-google {
|
||||
color: #4285f4;
|
||||
}
|
||||
|
||||
/* GitHub 图标样式 */
|
||||
.icon-sn-github {
|
||||
background-position: -28px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-github {
|
||||
background-color: #333;
|
||||
background-position: -28px 0;
|
||||
}
|
||||
|
||||
.fa-sn-github {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 微博图标样式 */
|
||||
.icon-sn-weibo {
|
||||
background-position: -56px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-weibo {
|
||||
background-color: #e90d24;
|
||||
background-position: -56px 0;
|
||||
}
|
||||
|
||||
.fa-sn-weibo {
|
||||
color: #e90d24;
|
||||
}
|
||||
|
||||
/* QQ 图标样式 */
|
||||
.icon-sn-qq {
|
||||
background-position: -84px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-qq {
|
||||
background-color: #0098e6;
|
||||
background-position: -84px 0;
|
||||
}
|
||||
|
||||
.fa-sn-qq {
|
||||
color: #0098e6;
|
||||
}
|
||||
|
||||
/* Twitter 图标样式 */
|
||||
.icon-sn-twitter {
|
||||
background-position: -112px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-twitter {
|
||||
background-color: #50abf1;
|
||||
background-position: -112px 0;
|
||||
}
|
||||
|
||||
.fa-sn-twitter {
|
||||
color: #50abf1;
|
||||
}
|
||||
|
||||
/* Facebook 图标样式 */
|
||||
.icon-sn-facebook {
|
||||
background-position: -140px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-facebook {
|
||||
background-color: #4862a3;
|
||||
background-position: -140px 0;
|
||||
}
|
||||
|
||||
.fa-sn-facebook {
|
||||
color: #4862a3;
|
||||
}
|
||||
|
||||
/* 人人网图标样式 */
|
||||
.icon-sn-renren {
|
||||
background-position: -168px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-renren {
|
||||
background-color: #197bc8;
|
||||
background-position: -168px 0;
|
||||
}
|
||||
|
||||
.fa-sn-renren {
|
||||
color: #197bc8;
|
||||
}
|
||||
|
||||
/* 腾讯微博图标样式 */
|
||||
.icon-sn-tqq {
|
||||
background-position: -196px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-tqq {
|
||||
background-color: #1f9ed2;
|
||||
background-position: -196px 0;
|
||||
}
|
||||
|
||||
.fa-sn-tqq {
|
||||
color: #1f9ed2;
|
||||
}
|
||||
|
||||
/* 豆瓣图标样式 */
|
||||
.icon-sn-douban {
|
||||
background-position: -224px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-douban {
|
||||
background-color: #279738;
|
||||
background-position: -224px 0;
|
||||
}
|
||||
|
||||
.fa-sn-douban {
|
||||
color: #279738;
|
||||
}
|
||||
|
||||
/* 微信图标样式 */
|
||||
.icon-sn-weixin {
|
||||
background-position: -252px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-weixin {
|
||||
background-color: #00b500;
|
||||
background-position: -252px 0;
|
||||
}
|
||||
|
||||
.fa-sn-weixin {
|
||||
color: #00b500;
|
||||
}
|
||||
|
||||
/* 虚线图标样式 */
|
||||
.icon-sn-dotted {
|
||||
background-position: -280px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-dotted {
|
||||
background-color: #eee;
|
||||
background-position: -280px 0;
|
||||
}
|
||||
|
||||
.fa-sn-dotted {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
/* 站点图标样式 */
|
||||
.icon-sn-site {
|
||||
background-position: -308px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-site {
|
||||
background-color: #00b500;
|
||||
background-position: -308px 0;
|
||||
}
|
||||
|
||||
.fa-sn-site {
|
||||
color: #00b500;
|
||||
}
|
||||
|
||||
/* LinkedIn 图标样式 */
|
||||
.icon-sn-linkedin {
|
||||
background-position: -336px -28px;
|
||||
}
|
||||
|
||||
.icon-sn-bg-linkedin {
|
||||
background-color: #0077b9;
|
||||
background-position: -336px 0;
|
||||
}
|
||||
|
||||
.fa-sn-linkedin {
|
||||
color: #0077b9;
|
||||
}
|
||||
|
||||
/* 通用图标样式 */
|
||||
[class*=icon-sn-] {
|
||||
display: inline-block;
|
||||
background-image: url('/static/blog/img/icon-sn.svg?56272f05e520');
|
||||
background-repeat: no-repeat;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
vertical-align: middle;
|
||||
background-size: auto 56px;
|
||||
}
|
||||
|
||||
[class*=icon-sn-]:hover {
|
||||
opacity: .8;
|
||||
filter: alpha(opacity=80);
|
||||
}
|
||||
|
||||
/*
|
||||
* 社交媒体按钮样式
|
||||
*/
|
||||
|
||||
/* Google 按钮样式 */
|
||||
.btn-sn-google {
|
||||
background: #4285f4;
|
||||
}
|
||||
|
||||
.btn-sn-google:active,
|
||||
.btn-sn-google:focus,
|
||||
.btn-sn-google:hover {
|
||||
background: #2a75f3;
|
||||
}
|
||||
|
||||
/* GitHub 按钮样式 */
|
||||
.btn-sn-github {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.btn-sn-github:active,
|
||||
.btn-sn-github:focus,
|
||||
.btn-sn-github:hover {
|
||||
background: #262626;
|
||||
}
|
||||
|
||||
/* 微博按钮样式 */
|
||||
.btn-sn-weibo {
|
||||
background: #e90d24;
|
||||
}
|
||||
|
||||
.btn-sn-weibo:active,
|
||||
.btn-sn-weibo:focus,
|
||||
.btn-sn-weibo:hover {
|
||||
background: #d10c20;
|
||||
}
|
||||
|
||||
/* QQ 按钮样式 */
|
||||
.btn-sn-qq {
|
||||
background: #0098e6;
|
||||
}
|
||||
|
||||
.btn-sn-qq:active,
|
||||
.btn-sn-qq:focus,
|
||||
.btn-sn-qq:hover {
|
||||
background: #0087cd;
|
||||
}
|
||||
|
||||
/* Twitter 按钮样式 */
|
||||
.btn-sn-twitter {
|
||||
background: #50abf1;
|
||||
}
|
||||
|
||||
.btn-sn-twitter:active,
|
||||
.btn-sn-twitter:focus,
|
||||
.btn-sn-twitter:hover {
|
||||
background: #38a0ef;
|
||||
}
|
||||
|
||||
/* Facebook 按钮样式 */
|
||||
.btn-sn-facebook {
|
||||
background: #4862a3;
|
||||
}
|
||||
|
||||
.btn-sn-facebook:active,
|
||||
.btn-sn-facebook:focus,
|
||||
.btn-sn-facebook:hover {
|
||||
background: #405791;
|
||||
}
|
||||
|
||||
/* 人人网按钮样式 */
|
||||
.btn-sn-renren {
|
||||
background: #197bc8;
|
||||
}
|
||||
|
||||
.btn-sn-renren:active,
|
||||
.btn-sn-renren:focus,
|
||||
.btn-sn-renren:hover {
|
||||
background: #166db1;
|
||||
}
|
||||
|
||||
/* 腾讯微博按钮样式 */
|
||||
.btn-sn-tqq {
|
||||
background: #1f9ed2;
|
||||
}
|
||||
|
||||
.btn-sn-tqq:active,
|
||||
.btn-sn-tqq:focus,
|
||||
.btn-sn-tqq:hover {
|
||||
background: #1c8dbc;
|
||||
}
|
||||
|
||||
/* 豆瓣按钮样式 */
|
||||
.btn-sn-douban {
|
||||
background: #279738;
|
||||
}
|
||||
|
||||
.btn-sn-douban:active,
|
||||
.btn-sn-douban:focus,
|
||||
.btn-sn-douban:hover {
|
||||
background: #228330;
|
||||
}
|
||||
|
||||
/* 微信按钮样式 */
|
||||
.btn-sn-weixin {
|
||||
background: #00b500;
|
||||
}
|
||||
|
||||
.btn-sn-weixin:active,
|
||||
.btn-sn-weixin:focus,
|
||||
.btn-sn-weixin:hover {
|
||||
background: #009c00;
|
||||
}
|
||||
|
||||
/* 虚线按钮样式 */
|
||||
.btn-sn-dotted {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.btn-sn-dotted:active,
|
||||
.btn-sn-dotted:focus,
|
||||
.btn-sn-dotted:hover {
|
||||
background: #e1e1e1;
|
||||
}
|
||||
|
||||
/* 站点按钮样式 */
|
||||
.btn-sn-site {
|
||||
background: #00b500;
|
||||
}
|
||||
|
||||
.btn-sn-site:active,
|
||||
.btn-sn-site:focus,
|
||||
.btn-sn-site:hover {
|
||||
background: #009c00;
|
||||
}
|
||||
|
||||
/* LinkedIn 按钮样式 */
|
||||
.btn-sn-linkedin {
|
||||
background: #0077b9;
|
||||
}
|
||||
|
||||
.btn-sn-linkedin:active,
|
||||
.btn-sn-linkedin:focus,
|
||||
.btn-sn-linkedin:hover {
|
||||
background: #0067a0;
|
||||
}
|
||||
|
||||
/* 通用按钮样式 */
|
||||
[class*=btn-sn-],
|
||||
[class*=btn-sn-]:active,
|
||||
[class*=btn-sn-]:focus,
|
||||
[class*=btn-sn-]:hover {
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-sn-more {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.btn-sn-more,
|
||||
.btn-sn-more:active,
|
||||
.btn-sn-more:hover {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[class*=btn-sn-] [class*=icon-sn-] {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
* 代码高亮样式
|
||||
*/
|
||||
.codehilite .hll {
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
|
||||
.codehilite {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.codehilite .c {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .err {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .k {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .l {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .n {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .o {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .ch {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .cm {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .cp {
|
||||
color: #633820;
|
||||
}
|
||||
|
||||
.codehilite .cpf {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .c1 {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .cs {
|
||||
color: #177500;
|
||||
}
|
||||
|
||||
.codehilite .kc {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .kd {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .kn {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .kp {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .kr {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .kt {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .ld {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .m {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .s {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .na {
|
||||
color: #836C28;
|
||||
}
|
||||
|
||||
.codehilite .nb {
|
||||
color: #A90D91;
|
||||
}
|
||||
|
||||
.codehilite .nc {
|
||||
color: #3F6E75;
|
||||
}
|
||||
|
||||
.codehilite .no {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nd {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .ni {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .ne {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nf {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nl {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nn {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nx {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .py {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nt {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .nv {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .ow {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .mb {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .mf {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .mh {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .mi {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .mo {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
.codehilite .sb {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .sc {
|
||||
color: #2300CE;
|
||||
}
|
||||
|
||||
.codehilite .sd {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .s2 {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .se {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .sh {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .si {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .sx {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .sr {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .s1 {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .ss {
|
||||
color: #C41A16;
|
||||
}
|
||||
|
||||
.codehilite .bp {
|
||||
color: #5B269A;
|
||||
}
|
||||
|
||||
.codehilite .vc {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .vg {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .vi {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.codehilite .il {
|
||||
color: #1C01CE;
|
||||
}
|
||||
|
||||
/*
|
||||
* 进度条样式 (NProgress)
|
||||
*/
|
||||
#nprogress {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#nprogress .bar {
|
||||
background: red;
|
||||
position: fixed;
|
||||
z-index: 1031;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
#nprogress .peg {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
box-shadow: 0 0 10px #29d, 0 0 5px #29d;
|
||||
opacity: 1.0;
|
||||
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
||||
-ms-transform: rotate(3deg) translate(0px, -4px);
|
||||
transform: rotate(3deg) translate(0px, -4px);
|
||||
}
|
||||
|
||||
#nprogress .spinner {
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 1031;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
#nprogress .spinner-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
box-sizing: border-box;
|
||||
border: solid 2px transparent;
|
||||
border-top-color: red;
|
||||
border-left-color: red;
|
||||
border-radius: 50%;
|
||||
-webkit-animation: nprogress-spinner 400ms linear infinite;
|
||||
animation: nprogress-spinner 400ms linear infinite;
|
||||
}
|
||||
|
||||
.nprogress-custom-parent {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nprogress-custom-parent #nprogress .spinner,
|
||||
.nprogress-custom-parent #nprogress .bar {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@-webkit-keyframes nprogress-spinner {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes nprogress-spinner {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,25 @@
|
||||
/* 按钮样式 */
|
||||
/* Button styles */
|
||||
.button {
|
||||
/* 移除边框 */
|
||||
/* Remove border */
|
||||
border: none;
|
||||
/* 设置内边距 */
|
||||
/* Set padding */
|
||||
padding: 4px 80px;
|
||||
/* 设置文本对齐方式 */
|
||||
/* Set text alignment */
|
||||
text-align: center;
|
||||
/* 移除文本装饰 */
|
||||
/* Remove text decoration */
|
||||
text-decoration: none;
|
||||
/* 设置为行内块元素 */
|
||||
/* Set as inline-block element */
|
||||
display: inline-block;
|
||||
/* 设置字体大小 */
|
||||
/* Set font size */
|
||||
font-size: 16px;
|
||||
/* 设置外边距 */
|
||||
/* Set margin */
|
||||
margin: 4px 2px;
|
||||
}
|
||||
@ -1,61 +1,89 @@
|
||||
/* 登录表单样式 */
|
||||
/* LOGIN FORM */
|
||||
|
||||
.login {
|
||||
/* 设置背景色 */
|
||||
background: var(--darkened-bg);
|
||||
/* 设置高度为自动 */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.login #header {
|
||||
/* 设置头部高度为自动 */
|
||||
height: auto;
|
||||
/* 设置内边距 */
|
||||
padding: 15px 16px;
|
||||
/* 设置内容居中对齐 */
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.login #header h1 {
|
||||
/* 设置标题字体大小 */
|
||||
font-size: 1.125rem;
|
||||
/* 设置外边距 */
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login #header h1 a {
|
||||
/* 设置链接颜色 */
|
||||
color: var(--header-link-color);
|
||||
}
|
||||
|
||||
.login #content {
|
||||
/* 设置内容区内边距 */
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.login #container {
|
||||
/* 设置容器背景色 */
|
||||
background: var(--body-bg);
|
||||
/* 设置边框 */
|
||||
border: 1px solid var(--hairline-color);
|
||||
/* 设置圆角 */
|
||||
border-radius: 4px;
|
||||
/* 设置溢出隐藏 */
|
||||
overflow: hidden;
|
||||
/* 设置宽度 */
|
||||
width: 28em;
|
||||
/* 设置最小宽度 */
|
||||
min-width: 300px;
|
||||
/* 设置外边距居中 */
|
||||
margin: 100px auto;
|
||||
/* 设置高度为自动 */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.login .form-row {
|
||||
/* 设置表单行内边距 */
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
/* 设置标签为块级元素 */
|
||||
display: block;
|
||||
/* 设置行高 */
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.login .form-row #id_username, .login .form-row #id_password {
|
||||
/* 设置内边距 */
|
||||
padding: 8px;
|
||||
/* 设置宽度为100% */
|
||||
width: 100%;
|
||||
/* 设置盒模型为border-box */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
/* 设置提交行内边距 */
|
||||
padding: 1em 0 0 0;
|
||||
/* 设置外边距 */
|
||||
margin: 0;
|
||||
/* 设置文本居中对齐 */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login .password-reset-link {
|
||||
/* 设置密码重置链接文本居中对齐 */
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -1,16 +1,21 @@
|
||||
'use strict';
|
||||
{
|
||||
// 定义表单输入元素标签数组
|
||||
const inputTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'];
|
||||
// 从页面中获取模型名称
|
||||
const modelName = document.getElementById('django-admin-form-add-constants').dataset.modelName;
|
||||
// 如果模型名称存在
|
||||
if (modelName) {
|
||||
// 根据模型名称获取表单元素
|
||||
const form = document.getElementById(modelName + '_form');
|
||||
// 遍历表单中的所有元素
|
||||
for (const element of form.elements) {
|
||||
// HTMLElement.offsetParent returns null when the element is not
|
||||
// rendered.
|
||||
// HTMLElement.offsetParent 在元素未渲染时返回 null
|
||||
// 查找第一个可用的输入元素并设置焦点
|
||||
if (inputTags.includes(element.tagName) && !element.disabled && element.offsetParent) {
|
||||
element.focus();
|
||||
break;
|
||||
element.focus(); // 设置焦点到第一个可用的输入元素
|
||||
break; // 找到后退出循环
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,15 +1,21 @@
|
||||
'use strict';
|
||||
{
|
||||
// 从页面中获取弹窗响应的初始化数据
|
||||
const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
||||
|
||||
// 根据不同的操作类型执行相应的处理函数
|
||||
switch(initData.action) {
|
||||
case 'change':
|
||||
// 处理修改对象的弹窗响应
|
||||
opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value);
|
||||
break;
|
||||
case 'delete':
|
||||
// 处理删除对象的弹窗响应
|
||||
opener.dismissDeleteRelatedObjectPopup(window, initData.value);
|
||||
break;
|
||||
default:
|
||||
// 默认处理添加对象的弹窗响应
|
||||
opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,22 @@
|
||||
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
// 简体中文国际化语言包
|
||||
// 为Select2下拉选择框提供简体中文的用户界面文本翻译
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{
|
||||
// 加载结果失败时的错误提示
|
||||
errorLoading:function(){return"无法载入结果。"},
|
||||
// 输入内容过长时的提示信息
|
||||
inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},
|
||||
// 输入内容过短时的提示信息
|
||||
inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},
|
||||
// 加载更多结果时的提示信息
|
||||
loadingMore:function(){return"载入更多结果…"},
|
||||
// 超过最大选择数量时的提示信息
|
||||
maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},
|
||||
// 没有找到匹配结果时的提示信息
|
||||
noResults:function(){return"未找到结果"},
|
||||
// 搜索过程中的提示信息
|
||||
searching:function(){return"搜索中…"},
|
||||
// 删除所有选中项的提示信息
|
||||
removeAllItems:function(){return"删除所有项目"}
|
||||
}}),n.define,n.require}();
|
||||
@ -1,3 +1,20 @@
|
||||
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
// 繁体中文国际化语言包
|
||||
// 为Select2下拉选择框提供繁体中文的用户界面文本翻译
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{
|
||||
// 输入内容过长时的提示信息
|
||||
inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},
|
||||
// 输入内容过短时的提示信息
|
||||
inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},
|
||||
// 加载更多结果时的提示信息
|
||||
loadingMore:function(){return"載入中…"},
|
||||
// 超过最大选择数量时的提示信息
|
||||
maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},
|
||||
// 没有找到匹配结果时的提示信息
|
||||
noResults:function(){return"沒有找到相符的項目"},
|
||||
// 搜索过程中的提示信息
|
||||
searching:function(){return"搜尋中…"},
|
||||
// 删除所有选中项的提示信息
|
||||
removeAllItems:function(){return"刪除所有項目"}
|
||||
}}),n.define,n.require}();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -1,293 +1,352 @@
|
||||
/* 代码高亮样式 */
|
||||
.codehilite .hll {
|
||||
background-color: #ffffcc
|
||||
}
|
||||
|
||||
/* 代码块背景 */
|
||||
.codehilite {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
/* 注释 */
|
||||
.codehilite .c {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
/* 注释 */
|
||||
/* Error */
|
||||
.codehilite .err {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Error */
|
||||
/* 错误 */
|
||||
/* Keyword */
|
||||
.codehilite .k {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword */
|
||||
/* 关键字 */
|
||||
/* Literal */
|
||||
.codehilite .l {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal */
|
||||
/* 字面量 */
|
||||
/* Name */
|
||||
.codehilite .n {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name */
|
||||
/* 名称 */
|
||||
/* Operator */
|
||||
.codehilite .o {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Operator */
|
||||
/* 操作符 */
|
||||
/* Comment.Hashbang */
|
||||
.codehilite .ch {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment.Hashbang */
|
||||
/* Hashbang注释 */
|
||||
/* Comment.Multiline */
|
||||
.codehilite .cm {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment.Multiline */
|
||||
/* 多行注释 */
|
||||
/* Comment.Preproc */
|
||||
.codehilite .cp {
|
||||
color: #633820
|
||||
}
|
||||
|
||||
/* Comment.Preproc */
|
||||
/* 预处理注释 */
|
||||
/* Comment.PreprocFile */
|
||||
.codehilite .cpf {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment.PreprocFile */
|
||||
/* 文件预处理注释 */
|
||||
/* Comment.Single */
|
||||
.codehilite .c1 {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment.Single */
|
||||
/* 单行注释 */
|
||||
/* Comment.Special */
|
||||
.codehilite .cs {
|
||||
color: #177500
|
||||
}
|
||||
|
||||
/* Comment.Special */
|
||||
/* 特殊注释 */
|
||||
/* Keyword.Constant */
|
||||
.codehilite .kc {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Constant */
|
||||
/* 常量关键字 */
|
||||
/* Keyword.Declaration */
|
||||
.codehilite .kd {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Declaration */
|
||||
/* 声明关键字 */
|
||||
/* Keyword.Namespace */
|
||||
.codehilite .kn {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Namespace */
|
||||
/* 命名空间关键字 */
|
||||
/* Keyword.Pseudo */
|
||||
.codehilite .kp {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Pseudo */
|
||||
/* 伪关键字 */
|
||||
/* Keyword.Reserved */
|
||||
.codehilite .kr {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Reserved */
|
||||
/* 保留关键字 */
|
||||
/* Keyword.Type */
|
||||
.codehilite .kt {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Keyword.Type */
|
||||
/* 类型关键字 */
|
||||
/* Literal.Date */
|
||||
.codehilite .ld {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Date */
|
||||
/* 日期字面量 */
|
||||
/* Literal.Number */
|
||||
.codehilite .m {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number */
|
||||
/* 数字字面量 */
|
||||
/* Literal.String */
|
||||
.codehilite .s {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String */
|
||||
/* 字符串字面量 */
|
||||
/* Name.Attribute */
|
||||
.codehilite .na {
|
||||
color: #836C28
|
||||
}
|
||||
|
||||
/* Name.Attribute */
|
||||
/* 属性名称 */
|
||||
/* Name.Builtin */
|
||||
.codehilite .nb {
|
||||
color: #A90D91
|
||||
}
|
||||
|
||||
/* Name.Builtin */
|
||||
/* 内置名称 */
|
||||
/* Name.Class */
|
||||
.codehilite .nc {
|
||||
color: #3F6E75
|
||||
}
|
||||
|
||||
/* Name.Class */
|
||||
/* 类名 */
|
||||
/* Name.Constant */
|
||||
.codehilite .no {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Constant */
|
||||
/* 常量名称 */
|
||||
/* Name.Decorator */
|
||||
.codehilite .nd {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Decorator */
|
||||
/* 装饰器名称 */
|
||||
/* Name.Entity */
|
||||
.codehilite .ni {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Entity */
|
||||
/* 实体名称 */
|
||||
/* Name.Exception */
|
||||
.codehilite .ne {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Exception */
|
||||
/* 异常名称 */
|
||||
/* Name.Function */
|
||||
.codehilite .nf {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Function */
|
||||
/* 函数名称 */
|
||||
/* Name.Label */
|
||||
.codehilite .nl {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Label */
|
||||
/* 标签名称 */
|
||||
/* Name.Namespace */
|
||||
.codehilite .nn {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Namespace */
|
||||
/* 命名空间名称 */
|
||||
/* Name.Other */
|
||||
.codehilite .nx {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Other */
|
||||
/* 其他名称 */
|
||||
/* Name.Property */
|
||||
.codehilite .py {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Property */
|
||||
/* 属性名称 */
|
||||
/* Name.Tag */
|
||||
.codehilite .nt {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Tag */
|
||||
/* 标签名称 */
|
||||
/* Name.Variable */
|
||||
.codehilite .nv {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Variable */
|
||||
/* 变量名称 */
|
||||
/* Operator.Word */
|
||||
.codehilite .ow {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Operator.Word */
|
||||
/* 操作符单词 */
|
||||
/* Literal.Number.Bin */
|
||||
.codehilite .mb {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Bin */
|
||||
/* 二进制数字 */
|
||||
/* Literal.Number.Float */
|
||||
.codehilite .mf {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Float */
|
||||
/* 浮点数 */
|
||||
/* Literal.Number.Hex */
|
||||
.codehilite .mh {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Hex */
|
||||
/* 十六进制数 */
|
||||
/* Literal.Number.Integer */
|
||||
.codehilite .mi {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Integer */
|
||||
/* 整数 */
|
||||
/* Literal.Number.Oct */
|
||||
.codehilite .mo {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Oct */
|
||||
/* 八进制数 */
|
||||
/* Literal.String.Backtick */
|
||||
.codehilite .sb {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Backtick */
|
||||
/* 反引号字符串 */
|
||||
/* Literal.String.Char */
|
||||
.codehilite .sc {
|
||||
color: #2300CE
|
||||
}
|
||||
|
||||
/* Literal.String.Char */
|
||||
/* 字符 */
|
||||
/* Literal.String.Doc */
|
||||
.codehilite .sd {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Doc */
|
||||
/* 文档字符串 */
|
||||
/* Literal.String.Double */
|
||||
.codehilite .s2 {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Double */
|
||||
/* 双引号字符串 */
|
||||
/* Literal.String.Escape */
|
||||
.codehilite .se {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Escape */
|
||||
/* 转义字符串 */
|
||||
/* Literal.String.Heredoc */
|
||||
.codehilite .sh {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Heredoc */
|
||||
/* Heredoc字符串 */
|
||||
/* Literal.String.Interpol */
|
||||
.codehilite .si {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Interpol */
|
||||
/* 插值字符串 */
|
||||
/* Literal.String.Other */
|
||||
.codehilite .sx {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Other */
|
||||
/* 其他字符串 */
|
||||
/* Literal.String.Regex */
|
||||
.codehilite .sr {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Regex */
|
||||
/* 正则表达式 */
|
||||
/* Literal.String.Single */
|
||||
.codehilite .s1 {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Single */
|
||||
/* 单引号字符串 */
|
||||
/* Literal.String.Symbol */
|
||||
.codehilite .ss {
|
||||
color: #C41A16
|
||||
}
|
||||
|
||||
/* Literal.String.Symbol */
|
||||
/* 符号 */
|
||||
/* Name.Builtin.Pseudo */
|
||||
.codehilite .bp {
|
||||
color: #5B269A
|
||||
}
|
||||
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* 伪内置名称 */
|
||||
/* Name.Variable.Class */
|
||||
.codehilite .vc {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Variable.Class */
|
||||
/* 类变量 */
|
||||
/* Name.Variable.Global */
|
||||
.codehilite .vg {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Variable.Global */
|
||||
/* 全局变量 */
|
||||
/* Name.Variable.Instance */
|
||||
.codehilite .vi {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
/* Name.Variable.Instance */
|
||||
/* 实例变量 */
|
||||
/* Literal.Number.Integer.Long */
|
||||
.codehilite .il {
|
||||
color: #1C01CE
|
||||
}
|
||||
|
||||
/* Literal.Number.Integer.Long */
|
||||
/* 长整数 */
|
||||
Loading…
Reference in new issue