Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbd4403c3e | |||
| c52079e882 | |||
| 7864e16ef3 | |||
| 4b06b633b8 | |||
| 12abd19936 | |||
| 281e7e8de1 | |||
| d325d583d4 | |||
| 63b03ae11e | |||
| ec50328f78 | |||
| 4146e9c2a1 | |||
| 76ecd6aeaa | |||
| ef22990f4b | |||
| c84ce6a615 | |||
| 9b060d1a4b | |||
| 26e737e2d7 | |||
| 67f27e0ef4 | |||
| a392bb07c0 | |||
| 58661508d4 | |||
| 5509b69908 | |||
| 51eccde659 | |||
| d0c072bee5 | |||
| 95f7eb5980 | |||
| 18314b260f | |||
| e3c159b4d6 | |||
| a48611edf4 | |||
| 5dde7ca850 | |||
| db2f7becae | |||
| 1715ae5d52 | |||
| 847fa23345 | |||
| 0495046d02 | |||
| 0474ef55e8 | |||
| 7c9653943a | |||
| 457bfc282b | |||
| 84c78538f0 | |||
| f0d17a61bd | |||
| fdbeaf6677 | |||
| 9d18b33715 | |||
| bfb2b5d819 | |||
| a6e789c859 | |||
| 0cceb03213 | |||
| 91db830ea7 |
@@ -0,0 +1,2 @@
|
||||
/js
|
||||
/node_modules
|
||||
@@ -0,0 +1,33 @@
|
||||
## Feature
|
||||
|
||||
### Description
|
||||
|
||||
...
|
||||
|
||||
### Benefits
|
||||
|
||||
...
|
||||
|
||||
---
|
||||
|
||||
## Issue
|
||||
|
||||
### Environment
|
||||
|
||||
* Side menu version: ...
|
||||
* PHP version: ...
|
||||
* Web server (Nginx, Apache2): ...
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
* ...
|
||||
* ...
|
||||
* ...
|
||||
|
||||
### Observed Results
|
||||
|
||||
...
|
||||
|
||||
### Expected Results
|
||||
|
||||
...
|
||||
@@ -1,8 +1,8 @@
|
||||
🤙 Nextcloud app / Side menu 🎨
|
||||
===============================
|
||||
|
||||
|
||||
This application moves the top menu of Nextcloud to the left side.
|
||||
Side menu allows you to modify the position of the main menu by creating a panel on the left of the interface.
|
||||
This application is rather suitable for instances that activate a lot of applications.
|
||||
|
||||
Comptatible with AppOrder.
|
||||
|
||||
@@ -35,17 +35,26 @@ $ rm -frv side_menu
|
||||
$ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
How to contribute?
|
||||
------------------
|
||||
|
||||
Fork the repository, go to `apps/`, clone your repository and run `npm install` inside.
|
||||
You can report a bug or request a feature by opening an issue: https://gitnet.fr/deblan/side_menu/issues
|
||||
|
||||
If you are a developer:
|
||||
|
||||
* fork the repository
|
||||
* install an instance of Nextcloud
|
||||
* go to `apps/` and clone your repository
|
||||
* go to `apps/side_menu` and run `npm install`
|
||||
|
||||
Build javascripts using `webpack --config ./webpack.js` (add `-w` to build them in real time).
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ use OCP\Util;
|
||||
|
||||
$config = \OC::$server->getConfig();
|
||||
$cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
||||
|
||||
|
||||
Util::addScript('side_menu', 'sideMenu');
|
||||
Util::addStyle('side_menu', 'sideMenu');
|
||||
|
||||
$stylesheet = \OC::$server->getURLGenerator()->linkToRoute(
|
||||
'side_menu.Css.stylesheet',
|
||||
[
|
||||
@@ -31,6 +36,13 @@ $stylesheet = \OC::$server->getURLGenerator()->linkToRoute(
|
||||
]
|
||||
);
|
||||
|
||||
$script = \OC::$server->getURLGenerator()->linkToRoute(
|
||||
'side_menu.Js.script',
|
||||
[
|
||||
'v' => $config->getAppValue('side_menu', 'cache', '0'),
|
||||
]
|
||||
);
|
||||
|
||||
Util::addHeader(
|
||||
'link',
|
||||
[
|
||||
@@ -40,13 +52,11 @@ Util::addHeader(
|
||||
''
|
||||
);
|
||||
|
||||
Util::addScript('side_menu', 'main');
|
||||
Util::addScript('side_menu', 'sideMenu');
|
||||
Util::addStyle('side_menu', 'sideMenu');
|
||||
// whitelist the URL to allow loading JS from this external domain
|
||||
// $CSPManager = \OC::$server->getContentSecurityPolicyManager();
|
||||
// $policy = new ContentSecurityPolicy();
|
||||
// $policy->addAllowedScriptDomain($url);
|
||||
// $policy->addAllowedImageDomain($url);
|
||||
// $policy->addAllowedConnectDomain($url);
|
||||
// $CSPManager->addDefaultPolicy($policy);
|
||||
Util::addHeader(
|
||||
'script',
|
||||
[
|
||||
'src' => $script,
|
||||
'nonce' => $cspnm->getNonce(),
|
||||
],
|
||||
''
|
||||
);
|
||||
|
||||
@@ -3,18 +3,26 @@
|
||||
<id>side_menu</id>
|
||||
<name>Side menu</name>
|
||||
<summary>Move the top menu to the left side.</summary>
|
||||
<description>Move the top menu to the left side.</description>
|
||||
<description><![CDATA[Side menu allows you to modify the position of the main menu by creating a panel on the left of the interface.
|
||||
This application is rather suitable for instances that activate a lot of applications.
|
||||
|
||||
Comptatible with AppOrder.
|
||||
|
||||
You can report a bug or request a feature by opening an issue.
|
||||
|
||||
]]></description>
|
||||
<licence>agpl</licence>
|
||||
<author mail="dev+sidemenu@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
||||
<version>1.2.4</version>
|
||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
||||
<version>1.5.0</version>
|
||||
<namespace>SideMenu</namespace>
|
||||
<category>customization</category>
|
||||
<website>https://gitnet.fr/deblan/side_menu</website>
|
||||
<bugs>https://gitnet.fr/deblan/side_menu/issues</bugs>
|
||||
<repository type="git">https://gitnet.fr/deblan/side_menu</repository>
|
||||
<screenshot>https://upload.deblan.org/u/2020-03/5e7fab2b.jpg</screenshot>
|
||||
<screenshot>https://upload.deblan.org/u/2020-03/5e81b219.jpg</screenshot>
|
||||
<screenshot>https://upload.deblan.org/u/2020-04/5e8ee1f7.jpg</screenshot>
|
||||
<screenshot>https://upload.deblan.org/u/2020-03/5e7fab2b.jpg</screenshot>
|
||||
<screenshot>https://upload.deblan.org/u/2020-05/5eb6b76e.png</screenshot>
|
||||
<screenshot>https://upload.deblan.org/u/2020-05/5eb6b78a.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="18" max-version="18"/>
|
||||
</dependencies>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
return [
|
||||
'routes' => [
|
||||
['name' => 'Css#stylesheet', 'url' => '/css/stylesheet.css', 'verb' => 'GET'],
|
||||
['name' => 'Css#stylesheet', 'url' => '/css/stylesheet', 'verb' => 'GET'],
|
||||
['name' => 'Js#script', 'url' => '/js/script', 'verb' => 'GET'],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#appmenu, #appmenu + nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#side-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -26,7 +22,7 @@
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
max-width: 250px;
|
||||
background: var(--side-menu-background-color, #333);
|
||||
background: linear-gradient(90deg, var(--side-menu-background-color, #333) 0%, var(--side-menu-background-color-to, #333) 100%);
|
||||
z-index: 3000;
|
||||
color: var(--side-menu-text-color, #fff);
|
||||
box-shadow: rgba(0, 0, 0, 0.22) 0px 25.6px 57.6px 0px, rgba(0, 0, 0, 0.18) 0px 4.8px 14.4px 0px;
|
||||
@@ -37,6 +33,10 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
#header .side-menu-opener {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.side-menu-opener {
|
||||
background: var(--side-menu-opener, url('../img/side-menu-opener.svg'));
|
||||
height: 40px;
|
||||
@@ -45,6 +45,10 @@
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#side-menu.hide-opener .side-menu-opener, .side-menu-opener.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.side-menu-apps-list {
|
||||
height: calc(100vh - 150px);
|
||||
z-index: 2200;
|
||||
@@ -57,15 +61,20 @@
|
||||
|
||||
.side-menu-app-icon {
|
||||
width: 20px;
|
||||
vertical-align: middle;
|
||||
vertical-align: top;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.side-menu-app-icon svg {
|
||||
vertical-align: middle;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.side-menu-app a {
|
||||
line-height: 30px;
|
||||
color: var(--side-menu-text-color, #fff);
|
||||
display: block;
|
||||
padding: 7px 0 7px 15px;
|
||||
padding: 7px 0 5px 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -89,8 +98,12 @@
|
||||
width: 100%;
|
||||
z-index: 2300;
|
||||
max-width: 250px;
|
||||
background: var(--side-menu-background-color, #333);
|
||||
position: fixed;
|
||||
padding-top: 2px;
|
||||
padding-left: 5px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#side-menu.hide-opener .side-menu-logo {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg935"
|
||||
sodipodi:docname="side-menu-opener-dark.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata941">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs939" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview937"
|
||||
showgrid="false"
|
||||
inkscape:zoom="8.34386"
|
||||
inkscape:cx="83.025045"
|
||||
inkscape:cy="14.304895"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg935" />
|
||||
<g
|
||||
transform="translate(.3 -286.074)"
|
||||
fill="#fff"
|
||||
color="#000"
|
||||
fill-opacity=".855"
|
||||
id="g933"
|
||||
style="fill:#000000;fill-opacity:0.89855075">
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="288.474"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect909" />
|
||||
<g
|
||||
transform="translate(-.13)"
|
||||
id="g915"
|
||||
style="fill:#000000;fill-opacity:0.89855075">
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect911" />
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect913" />
|
||||
</g>
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="290.631"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect917" />
|
||||
<g
|
||||
transform="translate(-.13 2.157)"
|
||||
id="g923"
|
||||
style="fill:#000000;fill-opacity:0.89855075">
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect919" />
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect921" />
|
||||
</g>
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="292.808"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect925" />
|
||||
<g
|
||||
transform="translate(-.13 4.334)"
|
||||
id="g931"
|
||||
style="fill:#000000;fill-opacity:0.89855075">
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect927" />
|
||||
<rect
|
||||
style="marker:none;fill:#000000;fill-opacity:0.89855075"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect929" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg1090"
|
||||
sodipodi:docname="side-menu-opener-hamburger-2-dark.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata1096">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1094" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview1092"
|
||||
showgrid="false"
|
||||
inkscape:zoom="8.34386"
|
||||
inkscape:cx="84.523455"
|
||||
inkscape:cy="12.270318"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1090" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#000000;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="2.787"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1082" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#000000;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="4.655"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1084" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#000000;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="6.54"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1086" />
|
||||
<path
|
||||
style="marker:none;fill:#000000;fill-opacity:1"
|
||||
d="M1.243.71A.469.469 0 0 0 .881.88a.469.469 0 0 0-.171.362V9.34c0 .146.067.275.171.362a.469.469 0 0 0 .362.171H9.34a.469.469 0 0 0 .362-.171.469.469 0 0 0 .171-.362V1.243a.469.469 0 0 0-.171-.362A.469.469 0 0 0 9.34.71zm.723 1.256h6.65v6.65h-6.65z"
|
||||
color="#000"
|
||||
overflow="visible"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="path1088" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg1443"
|
||||
sodipodi:docname="side-menu-opener-hamburger-2.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata1449">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1447" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview1445"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.9"
|
||||
inkscape:cx="90.508475"
|
||||
inkscape:cy="4.5762712"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1443" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="2.787"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1435" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="4.655"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1437" />
|
||||
<rect
|
||||
overflow="visible"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
width="4.806"
|
||||
height="1.256"
|
||||
x="2.888"
|
||||
y="6.54"
|
||||
rx="0"
|
||||
ry=".472"
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1439" />
|
||||
<path
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
d="M1.243.71A.469.469 0 0 0 .881.88a.469.469 0 0 0-.171.362V9.34c0 .146.067.275.171.362a.469.469 0 0 0 .362.171H9.34a.469.469 0 0 0 .362-.171.469.469 0 0 0 .171-.362V1.243a.469.469 0 0 0-.171-.362A.469.469 0 0 0 9.34.71zm.723 1.256h6.65v6.65h-6.65z"
|
||||
color="#000"
|
||||
overflow="visible"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
paint-order="stroke markers fill"
|
||||
id="path1441" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg1168"
|
||||
sodipodi:docname="side-menu-opener-hamburger-dark.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata1174">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1172" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview1170"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.9"
|
||||
inkscape:cx="112.71186"
|
||||
inkscape:cy="0.16949153"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1168" />
|
||||
<g
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
transform="translate(0 -286.417)"
|
||||
id="g1166"
|
||||
style="fill:#000000;fill-opacity:0.99637681">
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="288.816"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.99637681"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1160" />
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="290.973"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.99637681"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1162" />
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="293.15"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#000000;fill-opacity:0.99637681"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1164" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -1,7 +1,91 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 10.583 10.583">
|
||||
<g color="#000" fill="#fff" fill-opacity=".855" transform="translate(0 -286.417)">
|
||||
<rect ry=".545" rx="0" y="288.816" x="2.516" height="1.451" width="5.551" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect ry=".545" rx="0" y="290.973" x="2.516" height="1.451" width="5.551" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect ry=".545" rx="0" y="293.15" x="2.516" height="1.451" width="5.551" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg1382"
|
||||
sodipodi:docname="side-menu-opener-hamburger.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata1388">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1386" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview1384"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.9"
|
||||
inkscape:cx="108.13559"
|
||||
inkscape:cy="3.8983051"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1382" />
|
||||
<g
|
||||
color="#000"
|
||||
fill="#fff"
|
||||
fill-opacity=".855"
|
||||
transform="translate(0 -286.417)"
|
||||
id="g1380"
|
||||
style="fill:#ffffff;fill-opacity:1">
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="288.816"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1374" />
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="290.973"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1376" />
|
||||
<rect
|
||||
ry=".545"
|
||||
rx="0"
|
||||
y="293.15"
|
||||
x="2.516"
|
||||
height="1.451"
|
||||
width="5.551"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:1"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1378" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 2.4 KiB |
@@ -1,19 +1,172 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 10.583 10.583">
|
||||
<g transform="translate(.3 -286.074)" fill="#fff" color="#000" fill-opacity=".855">
|
||||
<rect ry="0" rx="0" y="288.474" x="4.266" height="1.451" width="1.451" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<g transform="translate(-.13)">
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="6.445" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="2.345" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 10.583 10.583"
|
||||
version="1.1"
|
||||
id="svg1321"
|
||||
sodipodi:docname="side-menu-opener.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata1327">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1325" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1008"
|
||||
id="namedview1323"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.9"
|
||||
inkscape:cx="78.983051"
|
||||
inkscape:cy="5.5932203"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="41"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1321" />
|
||||
<g
|
||||
transform="translate(.3 -286.074)"
|
||||
fill="#fff"
|
||||
color="#000"
|
||||
fill-opacity=".855"
|
||||
id="g1319"
|
||||
style="fill:#ffffff;fill-opacity:0.94565219">
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="288.474"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1295" />
|
||||
<g
|
||||
transform="translate(-.13)"
|
||||
id="g1301"
|
||||
style="fill:#ffffff;fill-opacity:0.94565219">
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1297" />
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1299" />
|
||||
</g>
|
||||
<rect ry="0" rx="0" y="290.631" x="4.266" height="1.451" width="1.451" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<g transform="translate(-.13 2.157)">
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="6.445" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="2.345" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="290.631"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1303" />
|
||||
<g
|
||||
transform="translate(-.13 2.157)"
|
||||
id="g1309"
|
||||
style="fill:#ffffff;fill-opacity:0.94565219">
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1305" />
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1307" />
|
||||
</g>
|
||||
<rect ry="0" rx="0" y="292.808" x="4.266" height="1.451" width="1.451" style="marker:none" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<g transform="translate(-.13 4.334)">
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="6.445" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect style="marker:none" width="1.451" height="1.451" x="2.345" y="288.474" rx="0" ry="0" overflow="visible" paint-order="stroke markers fill"/>
|
||||
<rect
|
||||
ry="0"
|
||||
rx="0"
|
||||
y="292.808"
|
||||
x="4.266"
|
||||
height="1.451"
|
||||
width="1.451"
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1311" />
|
||||
<g
|
||||
transform="translate(-.13 4.334)"
|
||||
id="g1317"
|
||||
style="fill:#ffffff;fill-opacity:0.94565219">
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="6.445"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1313" />
|
||||
<rect
|
||||
style="marker:none;fill:#ffffff;fill-opacity:0.94565219"
|
||||
width="1.451"
|
||||
height="1.451"
|
||||
x="2.345"
|
||||
y="288.474"
|
||||
rx="0"
|
||||
ry="0"
|
||||
overflow="visible"
|
||||
paint-order="stroke markers fill"
|
||||
id="rect1315" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.5 KiB |
@@ -51,19 +51,22 @@ class CssController extends Controller
|
||||
*/
|
||||
public function stylesheet()
|
||||
{
|
||||
$requestUri = $this->request->server['REQUEST_URI'];
|
||||
$assetsRoot = str_replace('/index.php', '', $requestUri);
|
||||
$assetsRoot = preg_replace('#apps/side_menu/.*#s', 'apps/side_menu', $assetsRoot);
|
||||
$backgroundColor = $this->config->getAppValue('side_menu', 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue('side_menu', 'background-color-to', $backgroundColor);
|
||||
|
||||
$parameters = [
|
||||
'vars' => [
|
||||
'background-color' => $this->config->getAppValue('side_menu', 'background-color', '#333333'),
|
||||
'background-color' => $backgroundColor,
|
||||
'background-color-to' => $backgroundColorTo,
|
||||
'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'),
|
||||
'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'),
|
||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||
],
|
||||
'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1),
|
||||
'assetsRoot' => $assetsRoot,
|
||||
'opener-only' => (bool) $this->config->getAppValue('side_menu', 'opener-only', 0),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0),
|
||||
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
|
||||
];
|
||||
|
||||
$response = new TemplateResponse('side_menu', 'css/stylesheet', $parameters, 'blank');
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCA\SideMenu\Controller;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Http\Response;
|
||||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
|
||||
class JsController extends Controller
|
||||
{
|
||||
|
||||
/** @var \OCP\IConfig */
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param IConfig $config
|
||||
*/
|
||||
public function __construct($appName, IRequest $request, IConfig $config)
|
||||
{
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function script()
|
||||
{
|
||||
$parameters = [
|
||||
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||
'opener-hover' => (bool) $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0),
|
||||
'force-light-icon' => (bool) $this->config->getAppValue('side_menu', 'force-light-icon', '0'),
|
||||
'hide-when-no-apps' => (bool) $this->config->getAppValue('side_menu', 'hide-when-no-apps', '0'),
|
||||
];
|
||||
|
||||
$response = new TemplateResponse('side_menu', 'js/script', $parameters, 'blank');
|
||||
$response->addHeader('Content-Type', 'text/javascript');
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@@ -47,13 +47,25 @@ class Admin implements ISettings
|
||||
*/
|
||||
public function getForm()
|
||||
{
|
||||
$backgroundColor = $this->config->getAppValue('side_menu', 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue('side_menu', 'background-color-to', $backgroundColor);
|
||||
|
||||
$parameters = [
|
||||
'background-color' => $this->config->getAppValue('side_menu', 'background-color', '#333333'),
|
||||
'background-color' => $backgroundColor,
|
||||
'background-color-to' => $backgroundColorTo,
|
||||
'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'),
|
||||
'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'),
|
||||
'force-light-icon' => $this->config->getAppValue('side_menu', 'force-light-icon', '0'),
|
||||
'cache' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||
'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'),
|
||||
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||
'opener-hover' => $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||
'opener-only' => $this->config->getAppValue('side_menu', 'opener-only', '0'),
|
||||
'hide-when-no-apps' => $this->config->getAppValue('side_menu', 'hide-when-no-apps', '0'),
|
||||
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
|
||||
'external-sites-in-top-menu' => $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', '0'),
|
||||
];
|
||||
|
||||
return new TemplateResponse('side_menu', 'settings/admin-form', $parameters, '');
|
||||
|
||||
@@ -30,6 +30,8 @@ const mountSideMenuComponent = () => {
|
||||
|
||||
if (sideMenuContainer) {
|
||||
sideMenu.$mount('#side-menu')
|
||||
|
||||
$('body').trigger('side-menu.ready')
|
||||
} else {
|
||||
window.setTimeout(mountSideMenuComponent, 50)
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<li v-for="app in apps" v-bind:class="{'side-menu-app': true, 'active': app.active}">
|
||||
<a v-bind:href="app.href">
|
||||
<span class="side-menu-app-icon" v-html="app.icon"></span>
|
||||
|
||||
{{ app.name }}
|
||||
<span class="side-menu-app-text" v-html="app.name"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -42,50 +41,77 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
apps: [],
|
||||
logo: null
|
||||
logo: null,
|
||||
forceLightIcon: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
retrieveApps() {
|
||||
this.apps = [];
|
||||
const links = document.querySelectorAll('#appmenu a');
|
||||
this.apps = []
|
||||
const links = document.querySelectorAll('#appmenu a')
|
||||
|
||||
for (let element of links) {
|
||||
let href = element.getAttribute('href')
|
||||
|
||||
if (this.ignoreExternalSites && element.parentNode.getAttribute('data-id').indexOf('external_index') !== -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (href !== '#') {
|
||||
let svg = element.querySelector('svg').outerHTML
|
||||
|
||||
svg = svg
|
||||
.replace(/(height|width)="20"/, '')
|
||||
.replace('id="invertMenuMain', 'id="invertSideMenu')
|
||||
.replace('url(#invertMenuMain', 'url(#invertSideMenu')
|
||||
|
||||
if (this.forceLightIcon) {
|
||||
svg = svg.replace(/filter="url[^"]+"/, '')
|
||||
}
|
||||
|
||||
this.apps.push({
|
||||
href: href,
|
||||
name: element.querySelector('span').innerHTML,
|
||||
icon: element.querySelector('svg').outerHTML,
|
||||
icon: svg,
|
||||
active: element.classList.contains('active')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
(function(apps) {
|
||||
window.setTimeout(function() {
|
||||
jQuery('body').trigger('side-menu.apps', [apps])
|
||||
}, 1000)
|
||||
})(this.apps)
|
||||
},
|
||||
retrieveLogo() {
|
||||
const ncLogo = document.querySelector('#nextcloud .logo')
|
||||
const ncLogo = document.querySelector('#nextcloud .logo')
|
||||
|
||||
if (ncLogo) {
|
||||
const url = window.getComputedStyle(ncLogo, null)
|
||||
.getPropertyValue('background-image')
|
||||
.replace('url("', '')
|
||||
.replace('")', '')
|
||||
if (ncLogo) {
|
||||
const url = window.getComputedStyle(ncLogo, null)
|
||||
.getPropertyValue('background-image')
|
||||
.replace('url("', '')
|
||||
.replace('")', '')
|
||||
|
||||
if (url && url !== 'none') {
|
||||
this.logo = url
|
||||
}
|
||||
}
|
||||
if (url && url !== 'none') {
|
||||
this.logo = url
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.retrieveApps();
|
||||
this.retrieveLogo();
|
||||
mounted() {
|
||||
this.retrieveApps()
|
||||
this.retrieveLogo()
|
||||
this.forceLightIcon = document.querySelector('#side-menu-container').getAttribute('data-forcelighticon') == 1;
|
||||
this.ignoreExternalSites = document.querySelector('#side-menu-container').getAttribute('data-externalsitesintopmenu') == 1;
|
||||
|
||||
const menu = document.querySelector('#appmenu')
|
||||
const config = {attributes: true, childList: true, subtree: true};
|
||||
const observer = new MutationObserver(this.retrieveApps);
|
||||
observer.observe(menu, config);
|
||||
|
||||
if (menu) {
|
||||
const config = {attributes: true, childList: true, subtree: true}
|
||||
const observer = new MutationObserver(this.retrieveApps)
|
||||
observer.observe(menu, config)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,11 +17,20 @@
|
||||
|
||||
const elements = [
|
||||
'side-menu-background-color',
|
||||
'side-menu-background-color-to',
|
||||
'side-menu-current-app-background-color',
|
||||
'side-menu-text-color',
|
||||
'side-menu-force-light-icon',
|
||||
'side-menu-opener',
|
||||
'side-menu-opener-position',
|
||||
'side-menu-opener-hover',
|
||||
'side-menu-opener-only',
|
||||
'side-menu-display-logo',
|
||||
'side-menu-hide-when-no-apps',
|
||||
'side-menu-size-icon',
|
||||
'side-menu-size-text',
|
||||
'side-menu-cache',
|
||||
'side-menu-external-sites-in-top-menu',
|
||||
];
|
||||
|
||||
const selector = '#side-menu-message';
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const sideMenuContainer = $('<div id="side-menu-container">')
|
||||
const sideMenuOpener = $('<button class="side-menu-opener"></button>')
|
||||
const sideMenu = $('<div id="side-menu">')
|
||||
|
||||
sideMenuContainer.append(sideMenu);
|
||||
|
||||
$('body').append(sideMenuContainer);
|
||||
|
||||
sideMenuOpener.insertBefore('#nextcloud');
|
||||
|
||||
$('body').on('click', '.side-menu-opener', () => {
|
||||
$('#side-menu').toggleClass('open');
|
||||
})
|
||||
@@ -1,24 +1,102 @@
|
||||
:root {
|
||||
<?php foreach ($_['vars'] as $key => $value): ?>
|
||||
<?php if ($key === 'opener'): ?>
|
||||
--side-menu-<?php echo $key ?>: url('<?php echo $_['assetsRoot'] ?>/img/<?php echo $value ?>.svg');
|
||||
--side-menu-<?php echo $key ?>: url('<?php print_unescaped(image_path('side_menu', $value.'.svg')); ?>');
|
||||
<?php else: ?>
|
||||
--side-menu-<?php echo $key ?>: <?php echo $value ?>;
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
}
|
||||
|
||||
<?php if ($_['display-logo'] === false): ?>
|
||||
.side-menu-logo {
|
||||
<?php if ($_['external-sites-in-top-menu'] === false): ?>
|
||||
#appmenu {
|
||||
display: none;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
#appmenu + nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.side-menu-header {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.side-menu-apps-list {
|
||||
height: calc(100vh - 60px);
|
||||
top: 60px;
|
||||
}
|
||||
<?php if ($_['opener-only'] === true): ?>
|
||||
#nextcloud {
|
||||
display: none;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['display-logo'] === false): ?>
|
||||
.side-menu-logo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.side-menu-header {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.side-menu-apps-list {
|
||||
height: calc(100vh - 49px);
|
||||
top: 49px;
|
||||
}
|
||||
|
||||
#side-menu.hide-opener .side-menu-header {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#side-menu.hide-opener .side-menu-apps-list {
|
||||
/* height: calc(100vh);
|
||||
top: 0; */
|
||||
}
|
||||
|
||||
<?php if ($_['size-text'] === 'hidden'): ?>
|
||||
#side-menu, .side-menu-apps-list {
|
||||
<?php if ($_['size-icon'] === 'big'): ?>
|
||||
width: 55px;
|
||||
<?php else: ?>
|
||||
width: 52px;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
#side-menu .side-menu-opener {
|
||||
<?php if ($_['size-icon'] === 'big'): ?>
|
||||
margin-left: 1px;
|
||||
<?php else: ?>
|
||||
margin-left: 0px;
|
||||
<?php endif; ?>
|
||||
}
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['size-icon'] === 'hidden'): ?>
|
||||
.side-menu-app-icon {
|
||||
display: none;
|
||||
}
|
||||
<?php elseif ($_['size-icon'] === 'small'): ?>
|
||||
.side-menu-app-icon svg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
<?php elseif ($_['size-icon'] === 'normal'): ?>
|
||||
.side-menu-app-icon svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
<?php elseif ($_['size-icon'] === 'big'): ?>
|
||||
.side-menu-app-icon svg {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['size-text'] === 'hidden'): ?>
|
||||
.side-menu-app-text {
|
||||
display: none;
|
||||
}
|
||||
<?php elseif ($_['size-text'] === 'small'): ?>
|
||||
.side-menu-app-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
<?php elseif ($_['size-text'] === 'big'): ?>
|
||||
.side-menu-app-text {
|
||||
font-size: 16px;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
(function() {
|
||||
var sideMenuContainer = $('<div id="side-menu-container">')
|
||||
var sideMenuOpener = $('<button class="side-menu-opener"></button>')
|
||||
var sideMenu = $('<div id="side-menu">')
|
||||
var body = $('body')
|
||||
var isTouchDevice = window.matchMedia("(pointer: coarse)").matches
|
||||
|
||||
<?php if ($_['force-light-icon']): ?>
|
||||
sideMenuContainer.attr('data-forcelighticon', '1')
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['external-sites-in-top-menu']): ?>
|
||||
sideMenuContainer.attr('data-externalsitesintopmenu', '1')
|
||||
|
||||
var externalSitesInTopMenu = function() {
|
||||
var items = $('#appmenu').find('li')
|
||||
|
||||
items.each(function(i, item) {
|
||||
var dataId = item.getAttribute('data-id')
|
||||
|
||||
if (dataId === null || dataId.indexOf('external_index') === -1) {
|
||||
item.style.display = 'none'
|
||||
item.classList.remove('hidden')
|
||||
} else {
|
||||
item.style.display = 'flex'
|
||||
item.classList.add('hidden')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(window).resize(externalSitesInTopMenu);
|
||||
|
||||
setInterval(externalSitesInTopMenu, 500);
|
||||
<?php endif; ?>
|
||||
|
||||
body.on('side-menu.apps', function(e, apps) {
|
||||
<?php if ($_['hide-when-no-apps']): ?>
|
||||
sideMenu = $('#side-menu')
|
||||
|
||||
if (apps.length === 0) {
|
||||
sideMenu.removeClass('open')
|
||||
sideMenuOpener.addClass('hide')
|
||||
} else {
|
||||
sideMenuOpener.removeClass('hide')
|
||||
}
|
||||
<?php endif; ?>
|
||||
})
|
||||
|
||||
body.on('side-menu.ready', function() {
|
||||
sideMenu = $('#side-menu')
|
||||
|
||||
var headerMenuOpener = $('#header .side-menu-opener')
|
||||
var sideMenuOpener = $('#side-menu .side-menu-opener')
|
||||
|
||||
<?php if ($_['opener-hover']): ?>
|
||||
var sideMenuMouseLeave = function() {
|
||||
sideMenu
|
||||
.removeClass('open')
|
||||
.off('mouseleave', sideMenuMouseLeave)
|
||||
}
|
||||
|
||||
var sideMenuMouseEnter = function() {
|
||||
sideMenu.on('mouseleave', sideMenuMouseLeave)
|
||||
}
|
||||
|
||||
var sideMenuOpenerMouseEnter = function() {
|
||||
sideMenu
|
||||
.addClass('open')
|
||||
.on('mouseenter', sideMenuMouseEnter)
|
||||
}
|
||||
|
||||
if (!isTouchDevice) {
|
||||
headerMenuOpener.on('mouseenter', sideMenuOpenerMouseEnter)
|
||||
|
||||
sideMenu.addClass('hide-opener')
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
headerMenuOpener.on('click', function() {
|
||||
sideMenu.addClass('open');
|
||||
})
|
||||
|
||||
sideMenuOpener.on('click', function() {
|
||||
sideMenu.removeClass('open');
|
||||
})
|
||||
})
|
||||
|
||||
body.append(sideMenuContainer)
|
||||
sideMenuContainer.append(sideMenu)
|
||||
|
||||
<?php if ($_['opener-position'] === 'before'): ?>
|
||||
sideMenuOpener.insertBefore('#nextcloud')
|
||||
<?php else: ?>
|
||||
sideMenuOpener.insertAfter('#nextcloud')
|
||||
<?php endif; ?>
|
||||
})();
|
||||
@@ -18,100 +18,274 @@
|
||||
|
||||
script('side_menu', 'admin');
|
||||
style('side_menu', 'admin');
|
||||
style('side_menu', 'support');
|
||||
|
||||
$choicesYesNo = [
|
||||
'No' => '0',
|
||||
'Yes' => '1',
|
||||
];
|
||||
|
||||
$choicesSizes = [
|
||||
'Hidden' => 'hidden',
|
||||
'Small' => 'small',
|
||||
'Normal' => 'normal',
|
||||
'Big' => 'big',
|
||||
];
|
||||
?>
|
||||
|
||||
<div id="side-menu-section" class="section">
|
||||
<h2 class="inlineblock"><?php p($l->t('Side menu settings')); ?></h2>
|
||||
<div id="side-menu-section">
|
||||
<div class="section">
|
||||
<h2>
|
||||
<?php p($l->t('Colors')); ?>
|
||||
</h2>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-background-color" class="settings-hint">
|
||||
<?php p($l->t('Background color')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-background-color"
|
||||
name="background-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['background-color']); ?>">
|
||||
<div>
|
||||
<label for="side-menu-background-color" class="settings-hint">
|
||||
<?php p($l->t('Background color')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-background-color"
|
||||
name="background-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['background-color']); ?>">
|
||||
<input
|
||||
id="side-menu-background-color-to"
|
||||
name="background-color-to"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['background-color-to']); ?>">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-current-app-background-color" class="settings-hint">
|
||||
<?php p($l->t('Background color of current app')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-current-app-background-color"
|
||||
name="current-app-background-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['current-app-background-color']); ?>">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-text-color" class="settings-hint">
|
||||
<?php p($l->t('Text color')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-text-color"
|
||||
name="text-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['text-color']); ?>">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener-only" class="settings-hint">
|
||||
<?php p($l->t('Force light icons')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-force-light-icon" name="force-light-icon">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['force-light-icon']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-current-app-background-color" class="settings-hint">
|
||||
<?php p($l->t('Background color of current app')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-current-app-background-color"
|
||||
name="current-app-background-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['current-app-background-color']); ?>">
|
||||
<div class="section">
|
||||
<h2>
|
||||
<?php p($l->t('Opener')); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
$choices = [
|
||||
'Default' => 'side-menu-opener',
|
||||
'Default (dark)' => 'side-menu-opener-dark',
|
||||
'Hamburger' => 'side-menu-opener-hamburger',
|
||||
'Hamburger (dark)' => 'side-menu-opener-hamburger-dark',
|
||||
'Hamburger 2' => 'side-menu-opener-hamburger-2',
|
||||
'Hamburger 2 (dark)' => 'side-menu-opener-hamburger-2-dark',
|
||||
];
|
||||
?>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('Icon')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-opener" name="opener">
|
||||
<?php foreach ($choices as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['opener']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$choices = [
|
||||
'Before the logo' => 'before',
|
||||
'After the logo' => 'after',
|
||||
];
|
||||
?>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener-position" class="settings-hint">
|
||||
<?php p($l->t('Position')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-opener-position" name="opener-position">
|
||||
<?php foreach ($choices as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-position']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener-only" class="settings-hint">
|
||||
<?php p($l->t('Show only the opener (hidden logo)')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-opener-only" name="opener-only">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-only']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-hide-when-no-apps" class="settings-hint">
|
||||
<?php p($l->t('Do not display the side menu and the opener if there is no application (eg: public pages).')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-hide-when-no-apps" name="hide-when-no-apps">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['hide-when-no-apps']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-text-color" class="settings-hint">
|
||||
<?php p($l->t('Text color')); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input
|
||||
id="side-menu-text-color"
|
||||
name="text-color"
|
||||
type="color"
|
||||
value="<?php print_unescaped($_['text-color']); ?>">
|
||||
<div class="section">
|
||||
<h2>
|
||||
<?php p($l->t('Panel')); ?>
|
||||
</h2>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('Open the menu when the mouse is hover the opener (automatically disabled on touch screens)')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-opener-hover" name="opener-hover">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-hover']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('Display the logo')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-display-logo" name="display-logo">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['display-logo']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="settings-hint">
|
||||
<?php p($l->t('Icons and texts')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-size-icon" name="size-icon">
|
||||
<?php foreach ($choicesSizes as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['size-icon']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?> icon
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
<select id="side-menu-size-text" name="size-text">
|
||||
<?php foreach ($choicesSizes as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['size-text']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?> text
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-external-sites-in-top-menu" class="settings-hint">
|
||||
<?php p($l->t('Do not move external sites in the side menu')); ?>
|
||||
<small><span class="warning">Experimental</span></small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-external-sites-in-top-menu" name="external-sites-in-top-menu">
|
||||
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['external-sites-in-top-menu']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('Opener icon')); ?>
|
||||
</label>
|
||||
<div class="section">
|
||||
<input type="hidden" id="side-menu-cache" name="cache" value="<?php print_unescaped($_['cache']); ?>">
|
||||
|
||||
<button id="side-menu-save" class="btn btn-primary"><?php p($l->t('Save')); ?></button>
|
||||
|
||||
<span id="side-menu-message" class="msg"></span>
|
||||
|
||||
<div style="height: 30px"></div>
|
||||
|
||||
<div>
|
||||
<span for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('You like this app and you want to support me?')); ?>
|
||||
|
||||
<a style="margin-left: 10px" target="_blank" href="https://www.buymeacoffee.com/deblan">
|
||||
<button>
|
||||
<?php p($l->t('Buy me a coffe ☕')); ?>
|
||||
</button>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$choices = [
|
||||
'Default' => 'side-menu-opener',
|
||||
'Hamburger' => 'side-menu-opener-hamburger',
|
||||
];
|
||||
?>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-opener" name="opener">
|
||||
<?php foreach ($choices as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['opener']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="side-menu-opener" class="settings-hint">
|
||||
<?php p($l->t('Display the logo')); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$choices = [
|
||||
'Yes' => '1',
|
||||
'No' => '0',
|
||||
];
|
||||
?>
|
||||
|
||||
<div>
|
||||
<select id="side-menu-display-logo" name="display-logo">
|
||||
<?php foreach ($choices as $label => $value): ?>
|
||||
<option value="<?php echo $value ?>" <?php if ($value === $_['display-logo']): ?>selected<?php endif; ?>>
|
||||
<?php echo $l->t($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="side-menu-cache" name="cache" value="<?php print_unescaped($_['cache']); ?>">
|
||||
|
||||
<button id="side-menu-save" class="btn btn-primary"><?php p($l->t('Save')); ?></button>
|
||||
|
||||
<span id="side-menu-message" class="msg"></span>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,6 @@ const StyleLintPlugin = require('stylelint-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
'main': path.join(__dirname, 'src', 'main.js'),
|
||||
'admin': path.join(__dirname, 'src', 'admin.js'),
|
||||
'sideMenu': path.join(__dirname, 'src', 'SideMenu.js'),
|
||||
},
|
||||
|
||||