All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.maven.macros.config-macros.vm Maven / Gradle / Ivy

#*
 * The MIT License (MIT)
 * 
 * Copyright (c) 2015-2021 Bernardo Martínez Garrido
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *###
#*--------------------------------------------------*###
#*--------------------------------------------------*###
#**
 * Loads shine configuration.
 *
 * Receives:
 *        shine: value where the CSS color shine will be stored
 *        bgshine: value where the CSS color shine for the background will be stored
 *        figshine: value where the CSS color shine for the figures will be stored
 *
 * Makes use of the following variables:
 *        config.shine: value of the style color shine
 *
 * The shine will be generated from the skin configuration. If no configuration is set, then
 * the shine will be "light".
 *
 *###
#*--------------------------------------------------*###
#macro( loadShineConfig $shine $bgshine $figshine )##

#**##if ( $config.shine )##
#*    *##set( $shine = $config.shine.getValue() )##
#**##else##
#*    *##set( $shine = "light" )##
#**##end##
#**##if ( $config.bgshine )##
#*    *##set( $bgshine = $config.bgshine.getValue() )##
#**##elseif ( $config.shine )##
#*    *##if ( $config.shine.getValue() == "dark" )##
#*        *##set( $bgshine = "primary" )##
#*    *##else##
#*        *##set( $bgshine = $config.shine.getValue() )##
#*    *##end##
#**##else##
#*    *##set( $bgshine = "light" )##
#**##end##
#**##if ( $config.figshine )##
#*    *##set( $figshine = $config.figshine.getValue() )##
#**##elseif ( $config.shine )##
#*    *##if ( $config.shine.getValue() == "dark" )##
#*        *##set( $figshine = "dark" )##
#*    *##else##
#*        *##set( $figshine = $config.figshine.getValue() )##
#*    *##end##
#**##else##
#*    *##set( $figshine = "white" )##
#**##end##
#end##
#*



*###
#*--------------------------------------------------*###
#**
 * Loads the top navigation menu list.
 *
 * Receives:
 *        elements: collection where the menu items will be stored
 *
 * Makes use of the following variables:
 *        config.topNav: list of menu items for the top navigation, from the site configuration file
 *        decoration.body.menus: list of menu items, from the site configuration file
 *
 * The menu list will be loaded from the decoration menus. Only those defined in the topNav
 * option, in the skin configuration, will be used. If this option is not set then all
 * the menus will be loaded.
 *
 *###
#*--------------------------------------------------*###
#macro( loadTopNavMenuList $elements )##
#**##if( $config.topNav && $decoration.body.menus )##
#*    *##filterByName( $decoration.body.menus, $config.topNav.getChildren(), $elements )##
#**##elseif( $decoration.body.menus )##
#*    *##set( $elements = $decoration.body.menus )##
#**##end##
#end##
#*



*###
#*--------------------------------------------------*###
#**
 * Loads the top navigation menu list.
 *
 * Receives:
 *        elements: collection where the menu items will be stored
 *
 * Makes use of the following variables:
 *        config.bottomNav: list of menu items for the bottom navigation, from the site configuration file
 *        decoration.body.menus: list of menu items, from the site configuration file
 *
 * The menu list will be loaded from the decoration menus. Only those defined in the bottomNav
 * option, in the skin configuration, will be used. If this option is not set then all
 * the menus will be loaded.
 *
 *###
#*--------------------------------------------------*###
#macro( loadBottomNavMenuList $elements )##
#**##if( $config.bottomNav )##
#*    *##filterByName( $decoration.body.menus, $config.bottomNav.children, $elements )##
#**##end##
#end##
#*



*###
#*--------------------------------------------------*###
#**
 * Loads the icon navigation menu list.
 *
 * Receives:
 *        elements: collection where the menu items will be stored
 *
 * Makes use of the following variables:
 *        config.iconNav: list of menu items for the icon navigation, from the site configuration file
 *        decoration.body.menus: list of menu items, from the site configuration file
 *
 * The menu list will be loaded from the decoration menus. Only those defined in the iconNav
 * option, in the skin configuration, will be used. If this option is not set then all
 * the menus will be loaded.
 *
 *###
#*--------------------------------------------------*###
#macro( loadIconNavMenuList $elements )##
#**##if( $config.iconNav )##
#*    *##filterByName( $decoration.body.menus, $config.iconNav.children, $elements )##
#**##end##
#end##
#*



*###




© 2015 - 2025 Weber Informatics LLC | Privacy Policy