Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 64eff708 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'dev' of dev.quiqqer.com:quiqqer/package-menu into dev

Übergeordnete c945cd20 d3361a9d
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
/*************/
/* variables */
/*************/
.quiqqer-floatedNav__size-medium {
--quiqqer-floatedNav-spacing: 0.75rem;
--quiqqer-floatedNav-fontSize: 1.75rem;
--quiqqer-floatedNav-size: 3rem;
}
.quiqqer-floatedNav__size-small {
--quiqqer-floatedNav-spacing: 0.5rem;
--quiqqer-floatedNav-fontSize: 1.25rem;
--quiqqer-floatedNav-size: 2rem;
}
.quiqqer-floatedNav__size-large {
--quiqqer-floatedNav-spacing: 1rem;
--quiqqer-floatedNav-fontSize: 2rem;
--quiqqer-floatedNav-size: 3.5rem;
}
/***********/
/* control */
/***********/
.quiqqer-floatedNav {
background: #fff;
position: fixed;
right: 0;
top: 50%;
transform: translateY(-50%);
z-index: 10;
}
.quiqqer-floatedNav-entry-inner {
background: var(--qui-color-main, #333);
border: var(--qui-border-width, 2px) solid var(--qui-color-main, #333);
color: var(--qui-color-main-contrast, #fff);
cursor: pointer;
display: block;
font-size: var(--quiqqer-floatedNav-fontSize);
line-height: var(--quiqqer-floatedNav-size);
text-align: center;
width: var(--quiqqer-floatedNav-size);
}
/* lang switch */
.quiqqer-floatedNav .quiqqer-bricks-languageswitch-flag {
font-size: calc(0.75 * var(--quiqqer-floatedNav-fontSize));
width: var(--quiqqer-floatedNav-size);
background: var(--qui-color-main, #333);
display: flex;
flex-direction: column;
}
.quiqqer-floatedNav .quiqqer-bricks-languageswitch-flag-entry {
line-height: calc(0.5 * var(--quiqqer-floatedNav-size));
padding: 0;
text-align: center;
color: var(--qui-color-main-contrast, #fff);
font-weight: bold;
text-transform: uppercase;
}
.quiqqer-floatedNav .quiqqer-bricks-languageswitch-flag-entry-text {
line-height: inherit;
display: block;
}
/***********/
/* Designs */
/***********/
/* Design: Bar with icons */
.quiqqer-floatedNav__iconsBar {
border-bottom-left-radius: 0.75rem;
border-top-left-radius: 0.75rem;
box-shadow: -3px 3px 8px rgb(0 0 0 / 30%);
padding: var(--quiqqer-floatedNav-spacing);
}
.quiqqer-floatedNav__iconsBar .quiqqer-floatedNav-entry-inner,
.quiqqer-floatedNav__iconsBar .quiqqer-bricks-languageswitch-flag {
border-radius: var(--qui-btn-border-radius, 5px);
}
.quiqqer-floatedNav__iconsBar .quiqqer-floatedNav-entry:not(:last-child) .quiqqer-floatedNav-entry-inner {
margin-bottom: var(--quiqqer-floatedNav-spacing);
}
/* Design: flat */
.quiqqer-floatedNav__flat .quiqqer-floatedNav-entry:not(:last-child) {
margin-bottom: 4px;
}
<nav class="quiqqer-floatedNav {$design} {$size}">
{foreach $children as $Child}
{assign var=hasUrl value=1}
{if !$Child->getUrl()}
{assign var=hasUrl value=0}
{/if}
{if $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0}
<div class="quiqqer-floatedNav-entry quiqqer-floatedNav-entry__id-{$Child->getIdentifier()} {if !$hasUrl}quiqqer-floatedNav-entry__noUrl{/if}">
{if $Child->getUrl()}
<a href="{$Child->getUrl()}"
class="quiqqer-floatedNav-entry-inner"
title="{$Child->getTitleAttribute()|escape:'html'}"
{if $Child->getTarget()}target="{$Child->getTarget()}"{/if}
>
{image src=$Child->getIcon() onlyicon=1}
</a>
{else}
<span class="quiqqer-floatedNav-entry-inner" title="{$Child->getTitleAttribute()|escape:'html'}">
{image src=$Child->getIcon() onlyicon=1}
</span>
{/if}
</div>
{/if}
{/foreach}
{if $LangSwitch}
{$LangSwitch->create()}
{/if}
</nav>
\ No newline at end of file
<?php
/**
* This file contains QUI\Menu\Controls\FloatedNav
*/
namespace QUI\Menu\Controls;
use QUI;
use QUI\Menu\Independent;
/**
* Class WallpaperText
*
* @package quiqqer/menu
*/
class FloatedNav extends QUI\Control
{
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = [])
{
// default options
$this->setAttributes([
'menuId' => false,
'size' => 'medium', // small, medium, large
'design' => 'iconBar', // iconBar, flat
]);
parent::__construct($attributes);
$this->addCSSFile(
dirname(__FILE__).'/FloatedNav.css'
);
}
/**
* (non-PHPdoc)
*
* @see \QUI\Control::create()
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$size = 'quiqqer-floatedNav__size-medium';
$design = 'quiqqer-floatedNav__iconsBar';
$showLangSwitch = false;
$IndependentMenu = Independent\Handler::getMenu($this->getAttribute('menuId'));
if (!$IndependentMenu) {
return '';
}
if ($this->getAttribute('size')) {
$size = 'quiqqer-floatedNav__size-'.$this->getAttribute('size');
}
if ($this->getAttribute('design')) {
$design = 'quiqqer-floatedNav__'.$this->getAttribute('design');
}
$showLangSwitch = true;
$LangSwitch = new QUI\Bricks\Controls\LanguageSwitches\Flags([
'showFlags' => 0
]);
$children = $IndependentMenu->getChildren();
$Engine->assign([
'this' => $this,
'children' => $children,
'size' => $size,
'design' => $design,
'showLangSwitch' => $showLangSwitch,
'LangSwitch' => $LangSwitch
]);
return $Engine->fetch(dirname(__FILE__).'/FloatedNav.html');
}
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
title="{$Child->getTitleAttribute()|escape:'html'}" title="{$Child->getTitleAttribute()|escape:'html'}"
{if $Child->getTarget()}target="{$Child->getTarget()}"{/if} {if $Child->getTarget()}target="{$Child->getTarget()}"{/if}
> >
{if $Child->getIcon() && $Child->getIcon()|strpos:'image' !== 'false' } {if $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 }
{image src=$Child->getIcon() onlyicon=1} {image src=$Child->getIcon() onlyicon=1}
{/if} {/if}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</a> </a>
{else} {else}
<span class="qui-menu-siteid-{$Child->getIdentifier()}"> <span class="qui-menu-siteid-{$Child->getIdentifier()}">
{if $Child->getIcon() && $Child->getIcon()|strpos:'image' !== 'false' } {if $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 }
{image src=$Child->getIcon() onlyicon=1} {image src=$Child->getIcon() onlyicon=1}
{/if} {/if}
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
title="{$Child->getTitleAttribute()|escape:'html'}" title="{$Child->getTitleAttribute()|escape:'html'}"
{if $Child->getTarget()}target="{$Child->getTarget()}"{/if} {if $Child->getTarget()}target="{$Child->getTarget()}"{/if}
> >
{if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image' !== 'false' } {if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 }
{image src=$Child->getIcon() onlyicon=1} {image src=$Child->getIcon() onlyicon=1}
{/if} {/if}
<span class="fa fa-angle-right"></span> <span class="fa fa-angle-right"></span>
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren