| @@ -1,15 +1,17 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | - * Page Name: CSS Code | |
| 3 | + * Page Name: CSS | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | use WPCoder\Dashboard\Field; |
| 7 | 7 | use WPCoder\Dashboard\FolderManager; |
| 8 | +use WPCoder\Dashboard\Option; | |
| 8 | 9 | |
| 9 | 10 | defined( 'ABSPATH' ) || exit; |
| 10 | 11 | |
| 11 | 12 | $default = Field::getDefault(); |
| 13 | +$opt = include( 'options/css-code.php' ); | |
| 12 | 14 | |
| 13 | 15 | $css_link = ''; |
| 14 | 16 | if ( ! empty( $default['css_code'] ) ) { |
| 15 | 17 | $css_link = FolderManager::path_upload_url() . 'style-' . $default['id'] . '.css'; |
| @@ -15,43 +17,41 @@ | ||
| 15 | 17 | $css_link = FolderManager::path_upload_url() . 'style-' . $default['id'] . '.css'; |
| 16 | 18 | } |
| 17 | 19 | |
| 18 | 20 | ?> |
| 21 | + <div class="wowp-settings__page"> | |
| 22 | + <div class="wowp-settings__page-sidebar"> | |
| 19 | 23 | |
| 20 | - <h4> | |
| 21 | - <span class="wowp-icon wowp-icon-css3"></span> | |
| 22 | - <?php esc_html_e( 'CSS Code', 'wpcoder' ); ?> | |
| 23 | - </h4> | |
| 24 | + <?php Option::init( [ | |
| 25 | + $opt['inline'], | |
| 26 | + $opt['minified'], | |
| 27 | + ] ); ?> | |
| 24 | 28 | |
| 25 | - <fieldset> | |
| 26 | - <legend><?php esc_html_e( 'Settings', 'wpcoder' ); ?></legend> | |
| 29 | + <button class="button-editor button" | |
| 30 | + id="cssnav"><?php esc_html_e( 'Add NAV Comment', 'wp-coder' ); ?></button> | |
| 27 | 31 | |
| 28 | - <div class="wowp-field has-chackbox"> | |
| 29 | - <span class="label"><?php esc_html_e( 'Inline', 'wpcoder' ); ?></span> | |
| 30 | - <?php Field::checkbox( '[inline_css]' ); ?> | |
| 31 | - <label for="inline_css">Enable</label> | |
| 32 | + <ol id="cssNavigationMenu" class="wowp-php-nav-menu"></ol> | |
| 33 | + | |
| 32 | 34 | </div> |
| 33 | 35 | |
| 34 | - <div class="wowp-field has-chackbox"> | |
| 35 | - <span class="label"><?php esc_html_e( 'Minified', 'wpcoder' ); ?></span> | |
| 36 | - <?php Field::checkbox( '[minified_css]' ); ?> | |
| 37 | - <label for="minified_css">Enable</label> | |
| 38 | - </div> | |
| 36 | + <div class="wowp-settings__page-content"> | |
| 39 | 37 | |
| 40 | - </fieldset> | |
| 38 | + <?php Field::textarea( 'css_code' ); ?> | |
| 41 | 39 | |
| 40 | + <div class="wowp-notification notification-info"> | |
| 41 | + Just enter the CSS content. You don’t need to include <code><style></code> — it's already on the page. | |
| 42 | + </div> | |
| 42 | 43 | |
| 43 | -<?php Field::textarea( 'css_code' ); ?> | |
| 44 | + <?php if ( ! empty( $css_link ) ): ?> | |
| 45 | + <div class="wowp-field has-addon"> | |
| 46 | + <span class="label"><?php esc_html_e( 'CSS File URL', 'wp-coder' ); ?></span> | |
| 47 | + <label for="tag" class="label is-addon"><span | |
| 48 | + class="dashicons dashicons-admin-links"></span></label> | |
| 49 | + <input type="url" id="url-css-file" readonly="readonly" value="<?php echo esc_url( $css_link ); ?>"> | |
| 50 | + </div> | |
| 51 | + <?php endif; ?> | |
| 44 | 52 | |
| 45 | -<?php if ( ! empty( $css_link ) ): ?> | |
| 46 | - <div class="wowp-fields-group has-mt"> | |
| 47 | - <div class="wowp-field is-full has-addon border-default"> | |
| 48 | - <label for="url-css-file" class="is-addon"> | |
| 49 | - <span class="dashicons dashicons-admin-links"></span> | |
| 50 | - </label> | |
| 51 | - <input type="url" id="url-css-file" readonly="readonly" value="<?php echo esc_url( $css_link ); ?>"> | |
| 52 | - <span class="label"><?php esc_html_e( 'URL to the CSS file', 'wpcoder' ); ?></span> | |
| 53 | 53 | </div> |
| 54 | + </div> | |
| 54 | 55 | |
| 55 | - </div> | |
| 56 | -<?php endif; | |
| 56 | +<?php | |
| 57 | 57 | |