diff --git a/assets/article/css/draggable-menu-default.css b/assets/article/css/draggable-menu-default.css new file mode 100644 index 0000000..f78529a --- /dev/null +++ b/assets/article/css/draggable-menu-default.css @@ -0,0 +1,121 @@ +#toolbar::-webkit-scrollbar-track +{ + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: 10px; + background-color: #F5F5F5; +} + +#aside-toolbar .draggable-menu::-webkit-scrollbar +{ + width: 6px; + background-color: #F5F5F5; +} + +#aside-toolbar .draggable-menu::-webkit-scrollbar-thumb +{ + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #555; +} + +nav .drop-down { + -webkit-transition: max-height 0.5s; + -moz-transition: max-height 0.5s; + -ms-transition: max-height 0.5s; + -o-transition: max-height 0.5s; + transition: max-height 0.5s; + max-height: 800px; + list-style: none; + margin: 0 auto; + padding: 0; + text-align: center; +} + +.overflow-hidden { + overflow: hidden; +} + +nav .drop-down.closed { + -webkit-transition: max-height 0.5s; + -moz-transition: max-height 0.5s; + -ms-transition: max-height 0.5s; + -o-transition: max-height 0.5s; + transition: max-height 0.5s; + max-height: 35px; + overflow: hidden; +} + +nav .drop-down a { + display: block; + color: #ffffff; +} + +#aside-toolbar .draggable-menu +{ + width: 107px; + overflow-x: visible; + position: relative; + background-color: #4c6e91; + border-radius: 7px; +} + +#aside-toolbar .item-title +{ + flex: none; + font-size: 12px; +} + +#aside-toolbar +{ + top: 125px; +} + +#aside-toolbar .arx-popup-stack-grid +{ + display: block; + background-color: #FFFFFF; + border-radius: 15px; + margin-top: 15px; + margin-bottom: 15px; +} + +#aside-toolbar div.arx-popup-item-container +{ + color: #FFFFFF; +} + +#aside-toolbar div.arx-popup-item-container:hover +{ + color: rgba(0,0,0,.7); +} + + +.draggable-img { + width: 100%; + transition: all .2s ease-in-out; + cursor: pointer; + margin-top: 8px; + margin-bottom: 8px; + position: relative; +} + +.draggable-img:hover { + -webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + transform: scale(4, 4); + z-index: 10; + overflow: visible; +} + +.heading-item +{ + width: 100%; + background-color:rgba(0,0,0,.7); + color: #F6E4E5; + border-radius: 5px; + text-align: center; + padding-top: 4px; + padding-bottom: 4px; + font-size: inherit; +} \ No newline at end of file diff --git a/assets/article/js/draggable-menu.js b/assets/article/js/draggable-menu.js new file mode 100644 index 0000000..03d8ffc --- /dev/null +++ b/assets/article/js/draggable-menu.js @@ -0,0 +1,26 @@ +(function() { + // Bind Click event to the drop down navigation button + document.querySelectorAll('.nav-button').forEach(function(navButton) { + navButton.addEventListener('click', function() { + var currentSection = this.parentNode.parentNode; + // Autorise only one draggable section to open up at a time + document.querySelectorAll('.drop-down').forEach(function(dropDown) { + if (dropDown.classList.contains('closed') == false && dropDown != currentSection) { + dropDown.classList.toggle('overflow-hidden'); + dropDown.classList.toggle('closed'); + } + }, null, currentSection); + + var active = this.parentNode.parentNode + if (active.classList.contains('closed')) { + setTimeout(function() { + active.classList.toggle('closed'); + setTimeout(function(){ + active.classList.toggle('overflow-hidden'); + }, 500, active); + }, 500, active); + } + + }); + }); +})(); \ No newline at end of file diff --git a/config/config.yaml b/config/config.yaml index 5d189dd..6580fb4 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -4,6 +4,8 @@ default: plugins: [ blockcode, buttonlink, definedlinks, inlineformat, reorder, tags, underline ] source: true + # custom: + # css: ['/theme/base-2021/css/tailwind.css', '/assets/article/css/bolt-additions.css'] grid: classname: 'article-grid' columns: 12 @@ -12,8 +14,49 @@ default: '4|8': 'col-4|col-8' '6|6': 'col-6|col-6' '8|4': 'col-8|col-4' + image: thumbnail: 1000×1000×max + # Draggable Menu Example for Tailwindcss + # + # Uncomment these lines to enable draggable settings with some draggable tailwindcss componants + # Override templates folder in 'config/packages/extension_article.yaml' to use your favorite tailwindcss components in draggable menu + # + # + # draggable_menu: + # template: '@draggable/_draggable_menu.twig' + # css: 'assets/article/css/draggable-menu-default.css' + # js: 'assets/article/js/draggable-menu.js' + # + # draggable: + # 'card-01': '@draggable/components/card/_card_01.twig' + # 'card-02': '@draggable/components/card/_card_02.twig' + # 'paragraph': '@draggable/components/general/_paragraph.twig' + # 'text': '