Update plugin header to modern WordPress style: - Make header full width with bottom shadow only - Remove top padding and adjust spacing - Add contained settings area - Match WooCommerce header style
This commit is contained in:
@ -1,18 +1,18 @@
|
|||||||
.wpa-superstar-wrap {
|
.wpa-superstar-wrap {
|
||||||
max-width: 1100px;
|
max-width: none;
|
||||||
margin: 25px 40px 0 20px;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpa-superstar-header {
|
.wpa-superstar-header {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #ccd0d4;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
border-radius: 3px;
|
box-shadow: 0 1px 0 rgba(0,0,0,.04);
|
||||||
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
margin: 0 0 20px -20px;
|
||||||
margin-bottom: 20px;
|
padding: 20px;
|
||||||
padding: 15px 20px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: calc(100% + 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpa-superstar-header h1 {
|
.wpa-superstar-header h1 {
|
||||||
@ -36,6 +36,11 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wpa-settings-container {
|
||||||
|
padding: 0 20px;
|
||||||
|
max-width: 1100px;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-tab-wrapper {
|
.nav-tab-wrapper {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
@ -48,76 +48,78 @@ function wpa_superstar_settings_page() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wpa-superstar-nav">
|
<div class="wpa-settings-container">
|
||||||
<h2 class="nav-tab-wrapper">
|
<div class="wpa-superstar-nav">
|
||||||
<a href="?page=wpa-superstar&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
<h2 class="nav-tab-wrapper">
|
||||||
<?php esc_html_e( 'General', 'wpa-superstar' ); ?>
|
<a href="?page=wpa-superstar&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
||||||
</a>
|
<?php esc_html_e( 'General', 'wpa-superstar' ); ?>
|
||||||
<a href="?page=wpa-superstar&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
</a>
|
||||||
<?php esc_html_e( 'Advanced', 'wpa-superstar' ); ?>
|
<a href="?page=wpa-superstar&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
||||||
</a>
|
<?php esc_html_e( 'Advanced', 'wpa-superstar' ); ?>
|
||||||
</h2>
|
</a>
|
||||||
</div>
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="wpa-settings-content">
|
<div class="wpa-settings-content">
|
||||||
<?php settings_fields( 'wpa-superstar-settings' ); ?>
|
<?php settings_fields( 'wpa-superstar-settings' ); ?>
|
||||||
<?php do_settings_sections( 'wpa-superstar-settings' ); ?>
|
<?php do_settings_sections( 'wpa-superstar-settings' ); ?>
|
||||||
|
|
||||||
<?php if ( $active_tab == 'general' ) : ?>
|
<?php if ( $active_tab == 'general' ) : ?>
|
||||||
<div class="wpa-superstar-toggle">
|
<div class="wpa-superstar-toggle">
|
||||||
<label for="wpa_superstar_lazy_load">
|
<label for="wpa_superstar_lazy_load">
|
||||||
<div class="wpa-toggle-switch">
|
<div class="wpa-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wpa_superstar_lazy_load"
|
id="wpa_superstar_lazy_load"
|
||||||
name="wpa_superstar_lazy_load"
|
name="wpa_superstar_lazy_load"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked( get_option( 'wpa_superstar_lazy_load', 1 ) ); ?>
|
<?php checked( get_option( 'wpa_superstar_lazy_load', 1 ) ); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wpa-toggle-slider"></span>
|
<span class="wpa-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<?php esc_html_e( 'Enable lazy loading for images', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Enable lazy loading for images', 'wpa-superstar' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php esc_html_e( 'Improves page load time by loading images only when they enter the viewport.', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Improves page load time by loading images only when they enter the viewport.', 'wpa-superstar' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ( $active_tab == 'advanced' ) : ?>
|
<?php elseif ( $active_tab == 'advanced' ) : ?>
|
||||||
<div class="wpa-superstar-toggle">
|
<div class="wpa-superstar-toggle">
|
||||||
<label for="wpa_superstar_minify_css">
|
<label for="wpa_superstar_minify_css">
|
||||||
<div class="wpa-toggle-switch">
|
<div class="wpa-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wpa_superstar_minify_css"
|
id="wpa_superstar_minify_css"
|
||||||
name="wpa_superstar_minify_css"
|
name="wpa_superstar_minify_css"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked( get_option( 'wpa_superstar_minify_css', 0 ) ); ?>
|
<?php checked( get_option( 'wpa_superstar_minify_css', 0 ) ); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wpa-toggle-slider"></span>
|
<span class="wpa-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<?php esc_html_e( 'Enable CSS minification', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Enable CSS minification', 'wpa-superstar' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php esc_html_e( 'Minifies CSS files to reduce file size and improve load times.', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Minifies CSS files to reduce file size and improve load times.', 'wpa-superstar' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wpa-superstar-toggle">
|
<div class="wpa-superstar-toggle">
|
||||||
<label for="wpa_superstar_minify_js">
|
<label for="wpa_superstar_minify_js">
|
||||||
<div class="wpa-toggle-switch">
|
<div class="wpa-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wpa_superstar_minify_js"
|
id="wpa_superstar_minify_js"
|
||||||
name="wpa_superstar_minify_js"
|
name="wpa_superstar_minify_js"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked( get_option( 'wpa_superstar_minify_js', 0 ) ); ?>
|
<?php checked( get_option( 'wpa_superstar_minify_js', 0 ) ); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wpa-toggle-slider"></span>
|
<span class="wpa-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<?php esc_html_e( 'Enable JS minification', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Enable JS minification', 'wpa-superstar' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php esc_html_e( 'Minifies JavaScript files to reduce file size and improve load times.', 'wpa-superstar' ); ?>
|
<?php esc_html_e( 'Minifies JavaScript files to reduce file size and improve load times.', 'wpa-superstar' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
Reference in New Issue
Block a user