码桶

发现社区成员的开源项目

开心 /

kxpyq

公开
main
kxpyq/assets/css/houtai.css
houtai.css7.7 KB
/* Pyq 主题后台设置样式 */

/* 隐藏Typecho默认的提交按钮 */
.typecho-option-submit {
    display: none !important;
}

/* 全局盒模型 */
#theme-page *,
#theme-page *::before,
#theme-page *::after {
    box-sizing: border-box;
}

/* ========== 头部标题卡片 ========== */
.pyq-theme-header {
    background: white;
    margin: 0 10px 10px;
    padding: 16px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.pyq-theme-header h2 {
    font-size: 2em;
    margin: 0;
    font-weight: bold;
    background: linear-gradient(to top right, #f63b3b, #eccc48, #efdb44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pyq-theme-header .pyq-version {
    font-size: 14px;
    color: #999;
    margin-top: 4px;
}

/* ========== 备份栏 ========== */
.pyq-backup-bar {
    margin: 0 10px 10px;
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.pyq-backup-bar .btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    margin: 0 3px;
    transition: all 0.15s;
}
.pyq-backup-bar .btn:hover {
    background: #e0e0e0;
}
.pyq-backup-bar .btn-primary {
    background: #00BCD4;
    color: white;
    border-color: #00BCD4;
}
.pyq-backup-bar .btn-primary:hover {
    background: #0097A7;
}
.pyq-backup-bar .btn-danger {
    color: #f44336;
    border-color: #f44336;
}
.pyq-backup-bar .btn-danger:hover {
    background: #f44336;
    color: white;
}

/* ========== 左右容器(百分比栅格) ========== */
#theme-page.row {
    width: 100%;
    margin: 0;
}

/* 左侧Tab导航 */
#theme-page .tab {
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: 8px;
    line-height: 2.5em;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
#theme-page .tabLinks {
    cursor: pointer;
    display: block;
    transition: all 0.15s ease;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
    color: #555;
}
#theme-page .tabLinks:hover {
    background: #f0f0f0;
    color: #333;
}
#theme-page .tabLinks.active {
    background: #00BCD4;
    color: white;
}

/* 右侧内容卡片 */
#theme-page .card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

/* Tab内容区 */
.pyq-tab-content {
    display: none;
}
.pyq-tab-content.active {
    display: block;
}

/* ========== 分组标题 ========== */
.pyq-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    padding-bottom: 10px;
    margin-bottom: 16px;
    margin-top: 20px;
    border-bottom: 2px solid #00BCD4;
}
.pyq-section-title:first-child {
    margin-top: 0;
}

/* ========== 表单元素美化 ========== */
#theme-page .typecho-option,
#theme-page .typecho-option-title {
    margin-bottom: 16px;
}
#theme-page label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}
#theme-page .description {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}
#theme-page input[type="text"],
#theme-page textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
    line-height: 38px;
}
#theme-page select {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    height: 32px;
    padding: 4px 8px;
    cursor: pointer;
    background: #fff;
}
#theme-page input[type="text"]:focus,
#theme-page textarea:focus,
#theme-page select:focus {
    border-color: #00BCD4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,188,212,0.12);
}
#theme-page textarea {
    min-height: 80px;
    resize: vertical;
}

/* ========== 底部统一保存按钮 ========== */
.pyq-save-btn {
    width: 100%;
    border-radius: 8px;
    background: #3F51B5;
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
}
.pyq-save-btn:hover {
    background: #303F9F;
}

/* ========== 提示信息 ========== */
.pyq-notice {
    margin: 0 10px 10px;
    font-size: 14px;
    text-align: center;
    color: #f44336;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

/* ========== Checkbox美化 ========== */
#theme-page .imgcheck {
    background: none !important;
    display: inline-block !important;
    position: relative;
    height: 16px;
    max-height: 1em;
    cursor: pointer;
    -webkit-touch-callout: none;
    margin-right: 10px;
    padding-left: 30px;
    line-height: 16px;
}
#theme-page .imgcheck:before {
    position: absolute;
    display: inline-block;
    left: 0;
    content: '';
    width: 40px;
    height: 22px;
    background: #d8d8d8;
    border-radius: 20px;
    transition: all .3s;
    margin-top: -2px;
}
#theme-page .imgcheck:after {
    position: absolute;
    content: '';
    width: 20px;
    height: 20px;
    top: 1px;
    left: 1px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(51,51,51,0.25);
    border-radius: 10px;
    transition: left .3s;
    margin-top: -2px;
}
#theme-page .imgcheck-on:before {
    background: #00BCD4;
}
#theme-page .imgcheck-on:after {
    left: 19px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    /* 移动端tab和内容改为上下布局 */
    #theme-page.row {
        flex-direction: column;
    }
    #theme-page > .col-mb-4 {
        flex: 0 0 100%;
        max-width: 100%;
        position: static !important;
    }
    #theme-page > .col-mb-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* 导航横向滚动 */
    #theme-page .tab {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding: 6px;
        line-height: normal;
    }
    #theme-page .tabLinks {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 14px;
        text-align: center;
        font-size: 13px;
    }
    /* 卡片缩小内边距 */
    #theme-page .card {
        padding: 14px;
    }
    /* 备份按钮竖排 */
    .pyq-backup-bar .btn {
        display: block;
        width: 100%;
        margin: 4px 0;
    }
    /* 全局select下拉框修复 */
    select {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 编辑器移动端适配 */
    .typecho-post-area #text {
        width: 100% !important;
        min-height: 300px;
    }
    .typecho-post-area .row .col-tb-9,
    .typecho-post-area .row .col-tb-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .typecho-post-area #custom-field .fields .field {
        flex-direction: column;
    }
    .typecho-post-area #custom-field .fields .field .field-name {
        flex: 0 0 100%;
        margin-bottom: 6px;
        margin-right: 0;
    }
    .typecho-post-area #custom-field .fields .field .field-value {
        margin-left: 0;
        margin-top: 0;
    }
    /* 提交按钮全宽 */
    .typecho-post-area .submit {
        flex-direction: column;
        gap: 8px;
    }
    .typecho-post-area .submit .left,
    .typecho-post-area .submit .right {
        width: 100%;
        justify-content: center;
    }
    /* 侧边栏移动端全宽 */
    #edit-secondary {
        width: 100%;
    }
}