458 lines
8.4 KiB
CSS
458 lines
8.4 KiB
CSS
/**
|
|
* WP Debug Frontend Panel Styles
|
|
*
|
|
* @package WP_Debug
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* Toggle Button */
|
|
.wp-debug-toggle {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
z-index: 99998;
|
|
background: #2271b1;
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: 4px;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.wp-debug-toggle:hover {
|
|
background: #135e96;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.wp-debug-toggle .dashicons {
|
|
font-size: 18px;
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.wp-debug-toggle .label {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
}
|
|
|
|
/* Main Panel */
|
|
.wp-debug-panel {
|
|
position: fixed;
|
|
bottom: 80px;
|
|
right: 20px;
|
|
width: 800px;
|
|
max-width: calc(100vw - 40px);
|
|
max-height: calc(100vh - 120px);
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
|
|
z-index: 99999;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
}
|
|
|
|
/* Panel Header */
|
|
.wp-debug-panel-header {
|
|
background: #2271b1;
|
|
color: #fff;
|
|
padding: 15px 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-shrink: 0;
|
|
border-bottom: 3px solid #135e96;
|
|
}
|
|
|
|
.wp-debug-panel-header h3 {
|
|
margin: 0;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
|
|
/* Tabs */
|
|
.wp-debug-panel-tabs {
|
|
display: flex;
|
|
gap: 5px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.wp-debug-tab {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: rgba(255, 255, 255, 0.8);
|
|
border: none;
|
|
border-radius: 4px;
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.wp-debug-tab:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: #fff;
|
|
}
|
|
|
|
.wp-debug-tab.active {
|
|
background: #fff;
|
|
color: #2271b1;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Close Button */
|
|
.wp-debug-panel-close {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: #fff;
|
|
border: none;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
transition: all 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.wp-debug-panel-close:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
/* Panel Content */
|
|
.wp-debug-panel-content {
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
flex: 1;
|
|
background: #f9f9f9;
|
|
}
|
|
|
|
.wp-debug-tab-content {
|
|
display: none;
|
|
}
|
|
|
|
.wp-debug-tab-content.active {
|
|
display: block;
|
|
}
|
|
|
|
/* Typography */
|
|
.wp-debug-panel-content h4 {
|
|
margin: 0 0 15px 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #1d2327;
|
|
border-bottom: 2px solid #2271b1;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.wp-debug-panel-content h5 {
|
|
margin: 20px 0 10px 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #1d2327;
|
|
}
|
|
|
|
.wp-debug-panel-content p {
|
|
margin: 10px 0;
|
|
color: #50575e;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Tables */
|
|
.wp-debug-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: #fff;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
margin: 10px 0 20px 0;
|
|
}
|
|
|
|
.wp-debug-table thead {
|
|
background: #f0f0f1;
|
|
}
|
|
|
|
.wp-debug-table th {
|
|
padding: 12px;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
color: #1d2327;
|
|
border-bottom: 2px solid #dcdcde;
|
|
}
|
|
|
|
.wp-debug-table td {
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid #f0f0f1;
|
|
font-size: 13px;
|
|
color: #50575e;
|
|
}
|
|
|
|
.wp-debug-table tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.wp-debug-table tr:hover {
|
|
background: #f9f9f9;
|
|
}
|
|
|
|
.wp-debug-table code {
|
|
background: #f0f0f1;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
color: #d63638;
|
|
font-family: "Courier New", Courier, monospace;
|
|
}
|
|
|
|
/* Lists */
|
|
.wp-debug-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.wp-debug-list li {
|
|
background: #fff;
|
|
padding: 10px 12px;
|
|
margin-bottom: 5px;
|
|
border-radius: 4px;
|
|
border-left: 3px solid #2271b1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-size: 13px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.wp-debug-list li.missing {
|
|
border-left-color: #d63638;
|
|
}
|
|
|
|
.wp-debug-list li.duplicate {
|
|
border-left-color: #dba617;
|
|
}
|
|
|
|
.wp-debug-list code {
|
|
background: #f0f0f1;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
font-family: "Courier New", Courier, monospace;
|
|
}
|
|
|
|
/* Module List */
|
|
.wp-debug-module-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.wp-debug-module-list li {
|
|
background: #fff;
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
/* Status Badges */
|
|
.status-active {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
background: #00a32a;
|
|
color: #fff;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.status-inactive {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
background: #dcdcde;
|
|
color: #50575e;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.status-error {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
background: #d63638;
|
|
color: #fff;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.template-type {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
background: #f0f0f1;
|
|
color: #2271b1;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Query Items */
|
|
.wp-debug-queries {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.query-item {
|
|
background: #fff;
|
|
padding: 12px;
|
|
border-radius: 4px;
|
|
border-left: 3px solid #2271b1;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.query-item.n-plus-one {
|
|
border-left-color: #d63638;
|
|
}
|
|
|
|
.query-time {
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
background: #f0f0f1;
|
|
color: #d63638;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.query-count {
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
background: #d63638;
|
|
color: #fff;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.query-sql {
|
|
display: block;
|
|
background: #f9f9f9;
|
|
padding: 8px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
color: #1d2327;
|
|
font-family: "Courier New", Courier, monospace;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.count {
|
|
background: #dba617;
|
|
color: #fff;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
.wp-debug-panel-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.wp-debug-panel-content::-webkit-scrollbar-track {
|
|
background: #f0f0f1;
|
|
}
|
|
|
|
.wp-debug-panel-content::-webkit-scrollbar-thumb {
|
|
background: #c3c4c7;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.wp-debug-panel-content::-webkit-scrollbar-thumb:hover {
|
|
background: #a7aaad;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.wp-debug-panel {
|
|
width: calc(100vw - 40px);
|
|
bottom: 80px;
|
|
right: 20px;
|
|
max-height: calc(100vh - 120px);
|
|
}
|
|
|
|
.wp-debug-panel-header {
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.wp-debug-panel-tabs {
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.wp-debug-tab {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.wp-debug-panel-close {
|
|
position: absolute;
|
|
top: 15px;
|
|
right: 15px;
|
|
}
|
|
|
|
.wp-debug-module-list {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.wp-debug-table {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.wp-debug-table th,
|
|
.wp-debug-table td {
|
|
padding: 8px;
|
|
}
|
|
}
|
|
|
|
/* Animation */
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.wp-debug-panel[data-visible="true"] {
|
|
animation: slideUp 0.3s ease;
|
|
}
|