Skip to content

Commit a660fb4

Browse files
committed
Design Fixes 🤷‍♂️
1 parent a7fa184 commit a660fb4

File tree

4 files changed

+30
-135
lines changed

4 files changed

+30
-135
lines changed

assets/admin/css/admin-styles.css

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ button {
5757
.switch {
5858
position: relative;
5959
display: block;
60-
width: 75px;
60+
width: 57px;
6161
height: 30px;
6262
padding: 3px;
6363
border-radius: 18px;
@@ -84,7 +84,7 @@ button {
8484
}
8585

8686
.switch-input:checked~.switch-handle {
87-
left: 48px;
87+
left: 34px;
8888
box-shadow: -3px 0 5px rgba(0, 0, 0, 0.3);
8989
}
9090

@@ -127,35 +127,21 @@ button {
127127

128128
.switch-label,
129129
.switch-handle {
130-
transition: all 0.5s ease;
130+
transition: all 0.5s cubic-bezier(0.85, -0.28, 0, 1.38);
131131
}
132132

133133
.switch-handle {
134134
position: absolute;
135-
top: 4px;
136-
left: 4px;
137-
width: 28px;
138-
height: 28px;
135+
top: 6px;
136+
left: 5px;
137+
width: 24px;
138+
height: 24px;
139139
background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
140140
background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
141141
border-radius: 100%;
142142
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
143143
}
144144

145-
.switch-handle:before {
146-
content: "";
147-
position: absolute;
148-
top: 50%;
149-
left: 50%;
150-
margin: -6px 0 0 -6px;
151-
width: 12px;
152-
height: 12px;
153-
background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
154-
background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
155-
border-radius: 6px;
156-
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
157-
}
158-
159145
.button.ma-btn {
160146
background: #5A00F0;
161147
color: #fff;
@@ -243,8 +229,9 @@ button {
243229
}
244230

245231
#mtbody-content {
246-
max-width: 1200px;
232+
max-width: 100%;
247233
margin: auto;
234+
margin: 20px 40px 0 20px;
248235
}
249236

250237
.ma-settings {
@@ -397,7 +384,7 @@ button {
397384
.ma-element-container {
398385
display: grid;
399386
grid-gap: 15px;
400-
grid-template-columns: repeat(3, 1fr);
387+
grid-template-columns: repeat(4, 1fr);
401388
}
402389

403390
.ma-element-container.show-free-element .ma-element {
@@ -491,7 +478,6 @@ button {
491478
visibility: visible;
492479
opacity: 1;
493480
transform: translate(-50%, -130%);
494-
z-index: 9;
495481
}
496482

497483
.ma-ele-info-link span {
@@ -569,6 +555,7 @@ button {
569555

570556
.ma-gl-cnt-right {
571557
text-align: right;
558+
margin: 10px;
572559
}
573560

574561
.ma-gl-cnt-enable,
@@ -602,4 +589,8 @@ button {
602589

603590
.text-center {
604591
text-align: center !important;
592+
}
593+
594+
#mighty-settings .ma-cta-save {
595+
margin-top: 30px;
605596
}

classes/panel.php

Lines changed: 4 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class DashboardPanel {
8585
'icon' => 'mf mf-heading'
8686
],
8787
'flipbox' => [
88-
'title' => 'MT FlipBox',
88+
'title' => 'MT Flip Box',
8989
'description' => '',
9090
'enable' => true,
9191
'class' => 'MT_Flipbox',
@@ -134,7 +134,7 @@ public static function add_menu() {
134134
__( 'Mighty Widgets', 'mighty-addons' ),
135135
__( 'Widgets', 'mighty-addons' ),
136136
'manage_options',
137-
'mighty-addons-widget',
137+
'mighty-addons-widgets',
138138
[ __CLASS__, 'generate_widgets_page' ]
139139
);
140140

@@ -143,7 +143,7 @@ public static function add_menu() {
143143
__( 'Mighty Extension', 'mighty-addons' ),
144144
__( 'Extension', 'mighty-addons' ),
145145
'manage_options',
146-
'mighty-addons-extension',
146+
'mighty-addons-extensions',
147147
[ __CLASS__, 'generate_extensions_page' ]
148148
);
149149
}
@@ -191,93 +191,6 @@ public static function enqueue_scripts( $hook ) {
191191
);
192192
}
193193

194-
public static function mighty_addons() {
195-
$widgets = [
196-
'testimonial' => [
197-
'title' => 'MT Testimonial',
198-
'description' => '',
199-
'enable' => true,
200-
'class' => 'MT_Testimonial',
201-
'slug' => 'testimonial',
202-
'icon' => 'mf mf-testimonial'
203-
],
204-
'team' => [
205-
'title' => 'MT Team',
206-
'description' => '',
207-
'enable' => true,
208-
'class' => 'MT_Team',
209-
'slug' => 'team',
210-
'icon' => 'mf mf-team'
211-
],
212-
'progressbar' => [
213-
'title' => 'MT Progressbar',
214-
'description' => '',
215-
'enable' => true,
216-
'class' => 'MT_Progressbar',
217-
'slug' => 'progressbar',
218-
'icon' => 'mf mf-progressbar'
219-
],
220-
'counter' => [
221-
'title' => 'MT Counter',
222-
'description' => '',
223-
'enable' => true,
224-
'class' => 'MT_Counter',
225-
'slug' => 'counter',
226-
'icon' => 'mf mf-counter'
227-
],
228-
'buttongroup' => [
229-
'title' => 'MT Button Group',
230-
'description' => '',
231-
'enable' => true,
232-
'class' => 'MT_Buttongroup',
233-
'slug' => 'buttongroup',
234-
'icon' => 'mf mf-button'
235-
],
236-
'accordion' => [
237-
'title' => 'MT Accordion',
238-
'description' => '',
239-
'enable' => true,
240-
'class' => 'MT_Accordion',
241-
'slug' => 'accordion',
242-
'icon' => 'mf mf-accordion'
243-
],
244-
'beforeafter' => [
245-
'title' => 'MT Before After',
246-
'description' => '',
247-
'enable' => true,
248-
'class' => 'MT_Beforeafter',
249-
'slug' => 'beforeafter',
250-
'icon' => 'mf mf-beforeafter'
251-
],
252-
'gradientheading' => [
253-
'title' => 'MT Gradient Heading',
254-
'description' => '',
255-
'enable' => true,
256-
'class' => 'MT_Gradientheading',
257-
'slug' => 'gradientheading',
258-
'icon' => 'mf mf-heading'
259-
],
260-
'flipbox' => [
261-
'title' => 'MT FlipBox',
262-
'description' => '',
263-
'enable' => true,
264-
'class' => 'MT_Flipbox',
265-
'slug' => 'flipbox',
266-
'icon' => 'mf mf-flipbox'
267-
],
268-
'openinghours' => [
269-
'title' => 'MT Opening Hours',
270-
'description' => '',
271-
'enable' => true,
272-
'class' => 'MT_Openinghours',
273-
'slug' => 'openinghours',
274-
'icon' => 'mf mf-openinghours'
275-
],
276-
];
277-
278-
return $widgets;
279-
}
280-
281194
private static function load_html( $page ) {
282195
$file = MIGHTY_ADDONS_DIR_PATH . 'panel/' . $page . '.php';
283196
if ( is_readable( $file ) ) {
@@ -416,7 +329,7 @@ public static function mighty_addons_status() {
416329
'icon' => 'mf mf-heading'
417330
],
418331
'flipbox' => [
419-
'title' => 'MT FlipBox',
332+
'title' => 'MT Flip Box',
420333
'description' => '',
421334
'enable' => intval( $settings['flipbox'] ? 1 : 0 ),
422335
'class' => 'MT_Flipbox',

panel/includes/tabs.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ul class="ma-tabs">
2-
<li <?php echo $page == "home" ? 'class="active"' : ''; ?>><a href="#general"><span>General</span></a></li>
3-
<li <?php echo $page == "widgets" ? 'class="active"' : ''; ?>><a href="#widgets"><span>Widgets</span></a></li>
4-
<li <?php echo $page == "extensions" ? 'class="active"' : ''; ?>><a href="#extensions"><span>Extensions</span></a></li>
2+
<li <?php echo $page == "home" ? 'class="active"' : ''; ?>><a href="admin.php?page=mighty-addons-home"><span>General</span></a></li>
3+
<li <?php echo $page == "widgets" ? 'class="active"' : ''; ?>><a href="admin.php?page=mighty-addons-widgets"><span>Widgets</span></a></li>
4+
<li <?php echo $page == "extensions" ? 'class="active"' : ''; ?>><a href="admin.php?page=mighty-addons-extensions"><span>Extensions</span></a></li>
55
<li><a href="#GoPro"><span>Go Pro</span></a></li>
66
</ul>

panel/widget-settings.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,14 @@
1515
<div id="widgets" class="ma-tabs-content">
1616
<div class="ma-row">
1717
<div class="ma-col-full">
18-
<div class="ma-gl-cnt-wrap">
19-
<div class="ma-gl-cnt-left">
20-
<h4 class="title">Content Elements</h4>
21-
<div class="ma-btn-group">
22-
<button type="button" class="ma-btn ma-btn-action active" data-filter="*">All</button>
23-
<button type="button" class="ma-btn ma-btn-action" data-filter="free">Free</button>
24-
<button type="button" class="ma-btn ma-btn-action" data-filter="pro">Pro</button>
25-
</div>
26-
</div>
27-
<div class="ma-gl-cnt-right">
28-
<h4 class="title">Global Control</h4>
29-
<div class="ma-btn-group">
30-
<button id="enable-all" type="button" class="ma-btn ma-btn-action ma-gl-cnt-enable">Enable All</button>
31-
<button id="disable-all" type="button" class="ma-btn ma-btn-action ma-gl-cnt-disable">Disable All</button>
32-
</div>
18+
19+
<div class="ma-gl-cnt-right">
20+
<div class="ma-btn-group">
21+
<button id="enable-all" type="button" class="ma-btn ma-btn-action ma-gl-cnt-enable">Enable All</button>
22+
<button id="disable-all" type="button" class="ma-btn ma-btn-action ma-gl-cnt-disable">Disable All</button>
3323
</div>
3424
</div>
25+
3526
<form id="mighty-settings" action="" method="POST" name="mighty-settings">
3627
<div class="ma-element-container">
3728
<?php foreach( $widgets as $widget => $props ) : ?>
@@ -55,15 +46,15 @@
5546
<div class="ma-ele-switch">
5647
<label class="switch">
5748
<input class="switch-input" type="checkbox" name="<?php echo $props['slug']; ?>" id="<?php echo $props['slug']; ?>" <?php checked( 1, $props['enable'], true ); ?> />
58-
<span class="switch-label" data-on="On" data-off="Off"></span>
49+
<span class="switch-label"></span>
5950
<span class="switch-handle"></span>
6051
</label>
6152
</div>
6253
</div>
6354
<?php endforeach; ?>
6455
</div>
6556

66-
<div class="text-center">
57+
<div class="text-center ma-cta-save">
6758
<button type="submit" class="button ma-btn js-ma-settings-save ma-btn ma-save-button"><?php echo __('Save Settings', 'mighty-addons'); ?></button>
6859
</div>
6960
</form>

0 commit comments

Comments
 (0)