Merge branch 'develop' into feature/issue-12

This commit is contained in:
Simon Vieille 2020-04-29 08:44:10 +02:00
commit 76ecd6aeaa
9 changed files with 40 additions and 3 deletions

View file

@ -39,7 +39,7 @@ $ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip
![](https://upload.deblan.org/u/2020-03/5e81b219.jpg)
![](https://upload.deblan.org/u/2020-04/5ea42d1a.png)
![](https://upload.deblan.org/u/2020-04/5ea68025.png)
How to contribute?

View file

@ -13,7 +13,7 @@ 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.3.3</version>
<version>1.3.4</version>
<namespace>SideMenu</namespace>
<category>customization</category>
<website>https://gitnet.fr/deblan/side_menu</website>
@ -21,7 +21,7 @@ You can report a bug or request a feature by opening an issue
<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/5ea42d1a.png</screenshot>
<screenshot>https://upload.deblan.org/u/2020-04/5ea68025.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="18"/>
</dependencies>

View file

@ -37,6 +37,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;
@ -96,6 +100,7 @@
max-width: 250px;
position: fixed;
padding-top: 2px;
padding-left: 5px;
top: 0;
}

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 10.583 10.583">
<rect overflow="visible" style="marker:none" 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"/>
<rect overflow="visible" style="marker:none" 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"/>
<rect overflow="visible" style="marker:none" 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"/>
<path style="marker:none" 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"/>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -63,6 +63,7 @@ class CssController extends Controller
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
],
'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1),
'opener-only' => (bool) $this->config->getAppValue('side_menu', 'opener-only', 0),
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
];

View file

@ -60,6 +60,7 @@ class Admin implements ISettings
'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'),
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
];

View file

@ -23,6 +23,7 @@ const elements = [
'side-menu-opener',
'side-menu-opener-position',
'side-menu-opener-hover',
'side-menu-opener-only',
'side-menu-display-logo',
'side-menu-size-icon',
'side-menu-size-text',

View file

@ -8,6 +8,12 @@
<?php endforeach; ?>
}
<?php if ($_['opener-only'] === true): ?>
#nextcloud {
display: none;
}
<?php endif; ?>
<?php if ($_['display-logo'] === false): ?>
.side-menu-logo {
display: none;

View file

@ -93,6 +93,7 @@ $choicesSizes = [
$choices = [
'Default' => 'side-menu-opener',
'Hamburger' => 'side-menu-opener-hamburger',
'Hamburger 2' => 'side-menu-opener-hamburger-2',
];
?>
@ -134,6 +135,22 @@ $choicesSizes = [
<?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>
<div class="section">