Skip to content

Commit 4f5faad

Browse files
committed
Code Improvement & Refactor LESS styles
1 parent f0fb624 commit 4f5faad

File tree

4 files changed

+57
-31
lines changed

4 files changed

+57
-31
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Magento 2 Core Extension by ManiyaTech",
44
"type": "magento2-module",
55
"license": "proprietary",
6-
"version": "1.0.1",
6+
"version": "1.0.2",
77
"authors": [
88
{
99
"name": "ManiyaTech",

etc/acl.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* ManiyaTech
5+
*
6+
* @author Milan Maniya
7+
* @package ManiyaTech_Core
8+
*/
9+
-->
10+
11+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
12+
<acl>
13+
<resources>
14+
<resource id="Magento_Backend::admin">
15+
<!-- Main ManiyaTech Menu -->
16+
<resource id="ManiyaTech_Core::core" title="ManiyaTech Menu" translate="title" sortOrder="10"/>
17+
18+
<!-- System Config Menu Entry -->
19+
<resource id="Magento_Backend::stores">
20+
<resource id="Magento_Backend::stores_settings">
21+
<resource id="Magento_Config::config">
22+
<resource id="ManiyaTech_Core::config" title="ManiyaTech Extension Settings" translate="title" sortOrder="100"/>
23+
</resource>
24+
</resource>
25+
</resource>
26+
</resource>
27+
</resources>
28+
</acl>
29+
</config>

view/adminhtml/layout/default.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

view/adminhtml/web/css/maniyatech.css renamed to view/adminhtml/web/css/source/_module.less

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,56 @@
55
* @package ManiyaTech_Core
66
*/
77

8+
@color-green-light: #d0e5a9;
9+
@color-green-dark: #5b8116;
10+
@color-green-text: #185b00;
11+
12+
@color-red-light: #f9d4d4;
13+
@color-red-dark: #e22626;
14+
@color-red-text: #e22626;
15+
16+
@color-submenu-group-bg: fade(@color-white, 5%);
17+
@color-submenu-parent-bg: fade(@color-white, 2%);
18+
819
/* Admin menu icon for ManiyaTech core menu */
920
#menu-maniyatech-core-core > a::before {
10-
content: url('../images/maniyatech.ico');
21+
content: url('@{baseDir}ManiyaTech_Core/images/maniyatech.ico');
1122
display: inline-block;
1223
margin-bottom: 5px;
1324
}
1425

1526
/* Background styling for submenu groups */
1627
.admin__menu #menu-maniyatech-core-core .submenu .parent .submenu-group-title {
17-
background-color: rgba(255, 255, 255, 0.05);
28+
background-color: fade(@color-white, 5%);
1829
}
1930

2031
.admin__menu #menu-maniyatech-core-core .submenu .parent {
21-
background-color: rgba(255, 255, 255, 0.02);
32+
background-color: fade(@color-white, 2%);
2233
}
2334

2435
/* Configuration section icon for ManiyaTech tab */
2536
.maniyatech-extensions-tab .admin__page-nav-title::before {
26-
content: '';
27-
background-image: url('../images/maniyatech.ico');
37+
background-image: url('@{baseDir}ManiyaTech_Core/images/maniyatech.ico');
38+
background-position: 0 0;
2839
background-repeat: no-repeat;
2940
background-size: 30px 30px;
30-
background-position: 0 0;
41+
content: '';
42+
height: 30px;
3143
position: absolute;
3244
top: 6px;
3345
width: 30px;
34-
height: 30px;
3546
}
3647

3748
/* Adjust spacing for title text */
3849
.maniyatech-extensions-tab .admin__page-nav-title strong {
3950
margin-left: 40px;
4051
}
4152

42-
/* Set Enabled/Disable status color */
53+
/* Status labels */
4354
.status-enabled {
44-
background: #d0e5a9 none repeat scroll 0 0;
45-
border: 1px solid #5b8116;
46-
color: #185b00;
55+
background: @color-green-light;
56+
border: 1px solid @color-green-dark;
57+
color: @color-green-dark;
4758
display: block;
4859
font-weight: bold;
4960
line-height: 17px;
@@ -52,15 +63,16 @@
5263
text-transform: uppercase;
5364
width: 80px;
5465
}
66+
5567
.status-disabled {
56-
background: #f9d4d4 none repeat scroll 0 0;
57-
border: 1px solid #e22626;
58-
color: #e22626;
68+
background: @color-red-light;
69+
border: 1px solid @color-red-dark;
70+
color: @color-red-dark;
5971
display: block;
6072
font-weight: bold;
6173
line-height: 17px;
6274
padding: 0 3px;
6375
text-align: center;
6476
text-transform: uppercase;
6577
width: 80px;
66-
}
78+
}

0 commit comments

Comments
 (0)