This commit is contained in:
2026-04-22 13:20:32 +02:00
parent 94569539d7
commit 27fc4829e0
6 changed files with 142 additions and 250 deletions
+1 -5
View File
@@ -173,7 +173,7 @@ function statpress_goals_page() {
</small>
</td>
<td>
<div class="statpress-progress-bar-container">
<div class="statpress-progress-bar-container small">
<div class="statpress-progress-bar" style="width: <?php echo esc_attr( $percentage ); ?>%;"></div>
</div>
<small><?php echo $current_formatted; ?> z <?php echo $target_formatted; ?> (<?php echo round( $percentage, 1 ); ?>%)</small>
@@ -191,9 +191,5 @@ function statpress_goals_page() {
</div>
</div>
</div>
<style>
.statpress-progress-bar-container { background: #e8eaed; border-radius: 10px; height: 12px; width: 100%; overflow: hidden; margin-bottom: 4px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.statpress-progress-bar { background: #1a73e8; height: 100%; border-radius: 10px; transition: width 0.5s ease-in-out; }
</style>
<?php
}
@@ -245,10 +245,6 @@ function statpress_yearly_summary_page() {
</ul>
</div>
</div>
<style>
.statpress-goals-list { list-style: none; margin: 0; padding: 0; } .statpress-goal-item { margin-bottom: 15px; } .statpress-goal-info { display: flex; justify-content: space-between; margin-bottom: 5px; }
.statpress-progress-bar-container { background: #e8eaed; border-radius: 10px; height: 20px; width: 100%; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); } .statpress-progress-bar { background: #1a73e8; height: 100%; border-radius: 10px; transition: width 0.5s ease-in-out; text-align: center; color: white; font-size: 12px; line-height: 20px; font-weight: 500; }
</style>
<?php endif; ?>
<div class="postbox" style="margin-bottom: 20px;">
-45
View File
@@ -68,41 +68,6 @@ function statpress_shortcode_handler( $atts ) {
// Rozpoczęcie buforowania wyjścia
ob_start();
?>
<style>
.statpress-md-container { font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.statpress-md-container h3 { color: #202124; font-weight: 400; margin: 24px 0 16px; font-size: 20px; }
/* Karty podsumowania */
.statpress-summary-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.statpress-summary-card { background: #fff; border-radius: 8px; padding: 20px; flex: 1; min-width: 140px; box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15); border-left: 4px solid #1a73e8; }
.statpress-summary-card-title { font-size: 12px; color: #5f6368; text-transform: uppercase; font-weight: 500; margin-bottom: 8px; letter-spacing: 0.5px; }
.statpress-summary-card-value { font-size: 28px; color: #202124; font-weight: 400; }
/* Karty aktywności */
.statpress-activity-list { display: flex; flex-direction: column; gap: 16px; }
.statpress-activity-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15); display: flex; padding: 16px 20px; align-items: center; flex-wrap: wrap; gap: 20px; transition: transform 0.2s, box-shadow 0.2s; }
.statpress-activity-card:hover { transform: translateY(-2px); box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15); }
.statpress-activity-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.statpress-activity-icon .material-icons { font-size: 24px; }
.statpress-activity-info { flex: 1; min-width: 200px; }
.statpress-activity-title { font-size: 16px; font-weight: 500; color: #202124; margin: 0 0 6px 0; line-height: 1.3; }
.statpress-activity-meta { font-size: 13px; color: #5f6368; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.statpress-activity-meta-dot { font-size: 8px; color: #dadce0; }
.statpress-activity-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.statpress-stat-item { display: flex; flex-direction: column; }
.statpress-stat-label { font-size: 11px; color: #5f6368; text-transform: uppercase; font-weight: 500; margin-bottom: 2px; }
.statpress-stat-value { font-size: 15px; color: #202124; font-weight: 500; }
/* Responsywność */
@media (max-width: 600px) {
.statpress-activity-card { align-items: flex-start; padding: 16px; gap: 16px; }
.statpress-activity-stats { width: 100%; justify-content: space-between; border-top: 1px solid #f1f3f4; padding-top: 16px; margin-top: 4px; }
.statpress-summary-card { min-width: 100%; border-left: none; border-top: 4px solid #1a73e8; }
}
</style>
<div class="statpress-shortcode-container statpress-md-container">
@@ -340,16 +305,6 @@ function statpress_single_activity_shortcode_handler( $atts ) {
}
?>
<style>
.statpress-single-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15); padding: 24px; margin-bottom: 24px; font-family: 'Roboto', -apple-system, sans-serif; }
.statpress-single-header { border-bottom: 1px solid #e8eaed; padding-bottom: 16px; margin-bottom: 20px; }
.statpress-single-header h4 { margin: 0 0 8px 0; font-size: 22px; color: #202124; font-weight: 400; }
.statpress-single-header p { margin: 0; color: #5f6368; font-size: 14px; }
.statpress-single-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.statpress-single-data-item { display: flex; flex-direction: column; }
.statpress-single-data-label { font-size: 12px; color: #5f6368; text-transform: uppercase; font-weight: 500; margin-bottom: 4px; }
.statpress-single-data-value { font-size: 16px; color: #202124; font-weight: 500; }
</style>
<div class="statpress-single-activity-shortcode statpress-single-card" id="<?php echo esc_attr( $unique_id ); ?>">
<div class="statpress-single-header">