wp-chinese-converter/assets/admin/admin.css
feibisi 6c9407cbd5 Enhance language variant handling and sitemap support
This update improves dynamic language variant handling across URL, cookie, and redirect logic, including dynamic regex generation for enabled languages. It adds a 'first visit no conversion' option to both network and site settings, updates admin UI labels to Chinese, and refines the sitemap module to generate rules and output only for enabled languages. Cookie setting now uses secure attributes, and sitemap URLs in the UI reflect the actual enabled language set. Several regexes and logic paths are now dynamically generated based on the current language configuration, improving flexibility and correctness.
2025-10-26 15:20:25 +08:00

772 lines
No EOL
14 KiB
CSS

.wpcc-settings .form-table th {
width: 220px;
}
.wpcc-settings .description {
font-size: 13px;
margin: 2px 0 5px;
color: #9e9e9e;
}
.wpcc-tabs-wrapper {
margin-bottom: 20px;
}
.wpcc-sync-tabs {
display: flex;
flex-wrap: wrap;
gap: 5px;
border-bottom: 1px solid #c3c4c7;
margin-bottom: 20px;
}
.wpcc-tab {
padding: 8px 16px;
border: none;
background: none;
cursor: pointer;
font-size: 14px;
border-bottom: 2px solid transparent;
color: #646970;
}
.wpcc-tab.active {
border-bottom: 2px solid #007cba;
font-weight: 600;
background: #f0f0f1;
color: #1d2327;
}
.wpcc-tab:hover:not(.active) {
background: #f0f0f1;
border-bottom-color: #dcdcde;
color: #1d2327;
}
.wpcc-card {
background: #fff;
border: 1px solid #ccd0d4;
border-radius: 4px;
margin-top: 20px;
padding: 20px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.wpcc-card h2 {
margin-top: 0;
padding-bottom: 10px;
border-bottom: 1px solid #f0f0f1;
color: #1d2327;
}
.wpcc-section-desc {
color: #666;
margin-bottom: 20px;
font-size: 14px;
}
.wpcc-stats-card {
background: #f9f9f9;
border-radius: 4px;
padding: 15px;
margin-bottom: 20px;
border: 1px solid #e0e0e0;
}
.wpcc-stats-card h3 {
margin-top: 0;
margin-bottom: 15px;
color: #1d2327;
}
.wpcc-info-box {
margin-top: 15px;
border-left: 4px solid #2271b1;
background: #f0f6fc;
padding: 12px;
margin-bottom: 15px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.wpcc-info-box p {
margin: 0.5em 0;
}
.wpcc-info-box.error {
background: #ffebee;
border-left-color: #d32f2f;
}
.wpcc-info-box.warning {
background: #fff8e1;
border-left-color: #f57c00;
}
.wpcc-info-box.success {
background: #e8f5e8;
border-left-color: #4caf50;
}
.wpcc-action-buttons {
display: flex;
gap: 10px;
margin-top: 15px;
flex-wrap: wrap;
}
.wpcc-submit-wrapper {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #f0f0f1;
}
.wpcc-switch {
position: relative;
display: inline-flex;
align-items: center;
cursor: pointer;
}
.wpcc-switch input {
opacity: 0;
width: 0px;
height: 0;
min-width: 0;
margin: -.25rem -0.15rem 0 0;
}
.wpcc-slider {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
background-color: #ccc;
border-radius: 34px;
transition: .4s;
}
.wpcc-slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 2px;
bottom: 2px;
background-color: white;
border-radius: 50%;
transition: .4s;
}
.wpcc-switch input:checked + .wpcc-slider {
background-color: #2196F3;
}
.wpcc-switch input:focus + .wpcc-slider {
box-shadow: 0 0 1px #2196F3;
}
.wpcc-switch input:checked + .wpcc-slider:before {
transform: translateX(20px);
}
.wpcc-switch-label {
margin-left: 10px;
color: #1d2327;
}
.wpcc-radio {
display: inline-flex;
align-items: center;
margin-bottom: 8px;
}
.wpcc-radio-label {
margin-left: 8px;
color: #1d2327;
}
.wpcc-input {
border: 1px solid #ddd;
padding: 6px 10px;
border-radius: 4px;
font-size: 14px;
}
.wpcc-input:focus {
border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1;
outline: none;
}
.wpcc-select {
border: 1px solid #ddd;
padding: 6px 10px;
border-radius: 4px;
height: 36px;
min-width: 240px;
font-size: 14px;
}
.wpcc-select:focus {
border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1;
outline: none;
}
.wpcc-textarea {
border: 1px solid #ddd;
padding: 8px 10px;
border-radius: 4px;
font-size: 14px;
resize: vertical;
min-height: 80px;
}
.wpcc-textarea:focus {
border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1;
outline: none;
}
.wpcc-section {
display: none;
}
.wpcc-feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-top: 20px;
}
.wpcc-feature-card {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 4px;
padding: 15px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.wpcc-feature-card h4 {
margin-top: 0;
margin-bottom: 10px;
color: #1d2327;
}
.wpcc-tooltip {
position: relative;
display: inline-block;
cursor: help;
color: #666;
margin-left: 5px;
}
.wpcc-tooltip .tooltiptext {
visibility: hidden;
width: 300px;
background-color: #555;
color: #fff;
text-align: left;
border-radius: 6px;
padding: 10px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -150px;
opacity: 0;
transition: opacity 0.3s;
font-size: 12px;
line-height: 1.4;
}
.wpcc-tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
.wpcc-language-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-top: 15px;
}
.wpcc-language-item {
display: flex;
align-items: center;
padding: 10px;
background: #f9f9f9;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
.wpcc-language-item input[type="checkbox"] {
margin-right: 10px;
}
.wpcc-language-item label {
flex: 1;
margin: 0;
cursor: pointer;
}
.wpcc-language-item input[type="text"] {
margin-left: 10px;
flex: 1;
max-width: 120px;
}
/* Disabled state styling for network-controlled or engine-restricted options */
.wpcc-disabled,
.wpcc-disabled * {
opacity: 0.6 !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
.wpcc-disabled .wpcc-slider {
background-color: #e0e0e0 !important;
}
.wpcc-disabled .wpcc-slider:before {
background-color: #f5f5f5 !important;
}
input[disabled] + .wpcc-slider {
background-color: #e0e0e0 !important;
}
input[disabled] + .wpcc-slider:before {
background-color: #f5f5f5 !important;
}
@media (max-width: 768px) {
.wpcc-sync-tabs {
flex-direction: column;
}
.wpcc-feature-grid {
grid-template-columns: 1fr;
}
.wpcc-language-grid {
grid-template-columns: 1fr;
}
.wpcc-action-buttons {
flex-direction: column;
}
.wpcc-settings .form-table th {
width: auto;
display: block;
padding-bottom: 5px;
}
.wpcc-settings .form-table td {
display: block;
padding-left: 0;
}
.wpcc-settings .form-table tr {
display: block;
margin-bottom: 20px;
border-bottom: 1px solid #f0f0f1;
padding-bottom: 15px;
}
.wpcc-card {
margin: 10px 0;
padding: 15px;
}
.wrap h1 {
font-size: 20px;
line-height: 1.3;
}
.wrap h1 .button {
display: block;
margin: 10px 0 5px 0;
text-align: center;
}
.wpcc-language-section > div {
margin-bottom: 15px;
padding: 10px;
background: #f9f9f9;
border-radius: 4px;
}
.wpcc-language-section .wpcc-switch {
display: block;
margin-bottom: 10px;
}
.wpcc-language-section .regular-text {
margin-left: 0 !important;
width: 100%;
box-sizing: border-box;
}
}
@media (max-width: 480px) {
.wpcc-card {
margin: 5px 0;
padding: 10px;
border-radius: 0;
}
.wpcc-tab {
padding: 10px 12px;
font-size: 13px;
text-align: center;
}
.wpcc-switch-label {
font-size: 14px;
line-height: 1.4;
}
.wpcc-input, .wpcc-select, .wpcc-textarea {
font-size: 16px;
padding: 8px 12px;
}
.wpcc-tooltip .tooltiptext {
width: 250px;
margin-left: -125px;
font-size: 11px;
}
.wrap h1 span {
display: block;
margin-top: 5px;
font-size: 12px;
}
.wpcc-action-buttons .button {
width: 100%;
margin-bottom: 8px;
text-align: center;
}
.wpcc-language-section > div {
padding: 8px;
}
.wpcc-switch {
align-items: flex-start;
}
.wpcc-switch-label {
margin-left: 8px;
margin-top: 2px;
}
}
.wpcc-module-card {
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 4px;
margin-bottom: 20px;
padding: 20px;
box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.wpcc-module-card h3 {
margin-top: 0;
margin-bottom: 10px;
color: #1d2327;
font-size: 16px;
font-weight: 600;
}
.wpcc-module-card .description {
margin-bottom: 15px;
color: #646970;
}
.wpcc-action-buttons {
margin: 15px 0;
}
.wpcc-action-buttons .button {
margin-right: 10px;
margin-bottom: 5px;
}
.wpcc-notice {
background: #fff;
border-left: 4px solid #dba617;
padding: 15px 20px;
margin: 20px 0;
border-radius: 0 4px 4px 0;
box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.wpcc-notice-warning {
border-left-color: #dba617;
}
.wpcc-notice-error {
border-left-color: #d63638;
}
.wpcc-notice-success {
border-left-color: #00a32a;
}
.wpcc-notice h3 {
margin-top: 0;
margin-bottom: 10px;
color: #1d2327;
}
.wpcc-notice ul {
margin: 10px 0;
padding-left: 20px;
}
.wpcc-notice li {
margin-bottom: 5px;
}
.wpcc-switch.wpcc-disabled {
opacity: 0.5;
pointer-events: none;
}
.wpcc-switch.wpcc-disabled input[type="checkbox"] {
cursor: not-allowed;
}
.wpcc-switch.wpcc-disabled .wpcc-slider {
background-color: #dcdcde;
cursor: not-allowed;
}
.wpcc-switch.wpcc-disabled .wpcc-slider:before {
background-color: #f6f7f7;
}
.wpcc-switch.wpcc-disabled .wpcc-switch-label {
color: #8c8f94;
cursor: not-allowed;
}
.wpcc-disabled-text {
color: #8c8f94;
font-style: italic;
}
.wpcc-doc-link {
color: #646970;
text-decoration: none;
margin-left: 8px;
font-size: 12px;
opacity: 0.7;
transition: all 0.2s ease;
display: inline-block;
}
.wpcc-doc-link:hover {
color: #2271b1;
opacity: 1;
transform: translateY(-1px);
text-decoration: none;
}
/* 网络管理提示样式 */
.wpcc-network-notice {
margin: 10px 0 20px 0;
padding: 12px 15px;
background: #fff3cd;
border-left: 4px solid #ffc107;
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
font-size: 13px;
line-height: 1.4;
}
.wpcc-network-notice p {
margin: 0;
color: #856404;
}
.wpcc-network-notice p:not(:last-child) {
margin-bottom: 8px;
}
.wpcc-network-notice .dashicons {
font-size: 14px;
width: 14px;
height: 14px;
vertical-align: text-top;
margin-right: 4px;
color: #856404;
}
.wpcc-network-notice a {
color: #856404;
text-decoration: underline;
}
.wpcc-network-notice a:hover {
color: #533f03;
text-decoration: none;
}
.wpcc-network-notice strong {
font-weight: 600;
color: #533f03;
}
.wpcc-network-notice em {
font-style: normal;
opacity: 0.9;
}
/* 响应式设计 */
@media (max-width: 768px) {
.wpcc-network-notice {
margin: 15px 0;
padding: 10px 12px;
font-size: 12px;
}
.wpcc-network-notice .dashicons {
font-size: 12px;
width: 12px;
height: 12px;
}
}
/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
.wpcc-network-notice {
background: #2c2611;
border-left-color: #d4a017;
}
.wpcc-network-notice p,
.wpcc-network-notice .dashicons {
color: #f4d03f;
}
.wpcc-network-notice strong {
color: #f7dc6f;
}
.wpcc-network-notice a {
color: #f4d03f;
}
.wpcc-network-notice a:hover {
color: #f7dc6f;
}
}/* Disab
led 字段样式 */
.wpcc-switch.wpcc-disabled {
opacity: 0.6;
pointer-events: none;
cursor: not-allowed;
}
.wpcc-switch.wpcc-disabled .wpcc-slider {
background-color: #ddd;
cursor: not-allowed;
}
.wpcc-switch.wpcc-disabled .wpcc-switch-label {
color: #999;
cursor: not-allowed;
}
.wpcc-radio input[disabled] + .wpcc-radio-label {
color: #999;
cursor: not-allowed;
}
input[disabled].wpcc-input,
select[disabled].wpcc-select,
textarea[disabled].wpcc-textarea {
background-color: #f5f5f5;
color: #999;
cursor: not-allowed;
opacity: 0.6;
}
/* 网络控
制禁用状态样式 */
.wpcc-switch.wpcc-disabled {
opacity: 0.6;
pointer-events: none !important;
cursor: not-allowed !important;
}
.wpcc-switch.wpcc-disabled input[type="checkbox"] {
pointer-events: none !important;
cursor: not-allowed !important;
}
.wpcc-switch.wpcc-disabled .wpcc-slider {
background-color: #ddd !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
.wpcc-switch.wpcc-disabled .wpcc-switch-label {
color: #999 !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
.wpcc-switch.wpcc-disabled input[type="checkbox"]:checked + .wpcc-slider {
background-color: #ccc !important;
}
.wpcc-switch.wpcc-disabled input[type="checkbox"]:checked + .wpcc-slider:before {
background-color: #f0f0f0 !important;
}
/* 网络控制区域样式 */
.wpcc-network-controlled {
opacity: 0.6;
pointer-events: none !important;
}
.wpcc-network-controlled select,
.wpcc-network-controlled input,
.wpcc-network-controlled textarea {
background-color: #f5f5f5 !important;
color: #999 !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
/* 网络控制提示样式 */
.wpcc-network-notice {
margin: 10px 0;
padding: 10px 12px;
background: #fff3cd;
border-left: 4px solid #ffc107;
border-radius: 4px;
}
.wpcc-network-notice p {
margin: 0;
color: #856404;
}
.wpcc-network-notice .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
vertical-align: text-top;
}