1
0
mirror of https://github.com/kremalicious/Badged.git synced 2024-12-27 15:17:43 +01:00

separate options page css

This commit is contained in:
Matthias Kretschmann 2013-08-06 21:29:15 +02:00
parent 313bdee0ac
commit 79024f0098
3 changed files with 66 additions and 56 deletions

View File

@ -45,26 +45,38 @@ if (function_exists('load_plugin_textdomain')) {
}
/**
* Plugin version, used for cache-busting of style and script file references.
*
* @since 1.0.0
*
* @var string
*/
$version = '1.0.0';
/**
* Register the styles depending on options
*
*/
function badged_init() {
badged_register_settings();
wp_enqueue_style( 'badged-admin-styles', plugins_url( 'css/options.css', BADGED_PLUGIN_FILE), false, $version );
if ( get_option('menu') == 'yes') {
wp_register_style('badged-menu-css', plugins_url('css/badged-menu.css', BADGED_PLUGIN_FILE), false, '9001');
wp_register_style('badged-menu-css', plugins_url('css/badged-menu.css', BADGED_PLUGIN_FILE), false, $version);
wp_enqueue_style('badged-menu-css');
}
if ( get_option('bar') == 'yes') {
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', BADGED_PLUGIN_FILE), false, '9001');
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', BADGED_PLUGIN_FILE), false, $version);
wp_enqueue_style('badged-bar-css');
}
}
function badged_bar_only_init() {
if ( get_option('bar') == 'yes') {
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', BADGED_PLUGIN_FILE), false, '9001');
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', BADGED_PLUGIN_FILE), false, $version);
wp_enqueue_style('badged-bar-css');
}
}

View File

@ -91,59 +91,6 @@
}
/* ============================================================== */
/* The Options Page */
/* ============================================================== */
#badgedoptions a,
input.button-primary {
text-decoration: none;
-webkit-transition: all .2s ease-in-out 0s;
-moz-transition: all .2s ease-in-out 0s;
-o-transition: all .2s ease-in-out 0s;
-ms-transition: all .2s ease-in-out 0s;
transition: all .2s ease-in-out 0s;
}
#badgedoptions form h2 {
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
margin-top: .5em;
padding: 10px 0;
}
#badgedoptions footer {
border-top: 1px solid #eee;
color: #666;
}
#badgedoptions .icon32 {
background-image: url(../img/icon-badged-32.png);
background-repeat: no-repeat;
}
#badgedoptions p.submit {
background: #fcfcfc;
padding: .7em .5em;
border-top: 1px solid #f7f7f7;
margin-top: 4em;
margin-bottom: 3em;
}
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and ( min--moz-device-pixel-ratio: 1.5),
only screen and ( -o-min-device-pixel-ratio: 3/2),
only screen and ( min-device-pixel-ratio: 1.5) {
#badgedoptions .icon32 {
background-image: url(../img/icon-badged-32@2x.png) !important;
-webkit-background-size: 32px 32px;
-moz-background-size: 32px 32px;
background-size: 32px 32px;
}
}
/* ============================================================== */
/* IE 8 Only Styles */
/* ============================================================== */

51
css/options.css Normal file
View File

@ -0,0 +1,51 @@
/* ============================================================== */
/* The Options Page */
/* ============================================================== */
#badgedoptions a,
input.button-primary {
text-decoration: none;
-webkit-transition: all .2s ease-in-out 0s;
-moz-transition: all .2s ease-in-out 0s;
-o-transition: all .2s ease-in-out 0s;
-ms-transition: all .2s ease-in-out 0s;
transition: all .2s ease-in-out 0s;
}
#badgedoptions form h2 {
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
margin-top: .5em;
padding: 10px 0;
}
#badgedoptions footer {
border-top: 1px solid #eee;
color: #666;
}
#badgedoptions .icon32 {
background-image: url(../img/icon-badged-32.png);
background-repeat: no-repeat;
}
#badgedoptions p.submit {
background: #fcfcfc;
padding: .7em .5em;
border-top: 1px solid #f7f7f7;
margin-top: 4em;
margin-bottom: 3em;
}
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and ( min--moz-device-pixel-ratio: 1.5),
only screen and ( -o-min-device-pixel-ratio: 3/2),
only screen and ( min-device-pixel-ratio: 1.5) {
#badgedoptions .icon32 {
background-image: url(../img/icon-badged-32@2x.png) !important;
-webkit-background-size: 32px 32px;
-moz-background-size: 32px 32px;
background-size: 32px 32px;
}
}