From 44b4b240bea484536805e8307f1974fa4cf00a36 Mon Sep 17 00:00:00 2001 From: Silvergrund Date: Fri, 3 Apr 2020 13:55:02 +0200 Subject: [PATCH 01/11] Added icon dependency to accordion --- src/Component/Accordion/accordion.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Component/Accordion/accordion.json b/src/Component/Accordion/accordion.json index 47a6009..4a9c5e4 100644 --- a/src/Component/Accordion/accordion.json +++ b/src/Component/Accordion/accordion.json @@ -28,7 +28,8 @@ "dependency": { "sass": { "components": [ - "accordion" + "accordion", + "icon" ] } } From 80000995c83802634ce1afe00aa0de26625a507a Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 7 Apr 2020 10:34:48 +0200 Subject: [PATCH 02/11] Component Sass Dependencies - add sass dependencies --- src/Component/Alert/alert.json | 1 + src/Component/Avatar/avatar.json | 2 +- src/Component/Button/button.json | 10 +++++++++- src/Component/Calendar/calendar.json | 11 ++++++++++- src/Component/Comment/comment.json | 3 ++- src/Component/Date/date.json | 8 ++++---- src/Component/Fab/fab.json | 3 ++- src/Component/Fileinput/fileinput.json | 3 ++- src/Component/Footer/footer.json | 3 ++- src/Component/Form/form.json | 4 +++- src/Component/Image/image.json | 4 +++- src/Component/Link/link.json | 8 +++++--- src/Component/Loader/loader.json | 3 ++- src/Component/Modal/modal.json | 3 ++- src/Component/Navbar/navbar.json | 5 ++++- src/Component/Notification/notification.json | 3 ++- src/Component/Pagination/pagination.json | 4 +++- src/Component/Segment/segment.json | 10 +++++++++- src/Component/Sidebar/sidebar.json | 11 ++++++++++- src/Component/Slider/slider.json | 1 + src/Component/Splitbutton/splitbutton.json | 2 ++ src/Component/Steppers/steppers.json | 4 +++- src/Component/Stripe/stripe.json | 4 +++- src/Component/Tags/tags.json | 4 +++- src/Component/Tile/tile.json | 9 ++++++++- src/Component/Video/video.json | 11 ++++++++--- 26 files changed, 104 insertions(+), 30 deletions(-) diff --git a/src/Component/Alert/alert.json b/src/Component/Alert/alert.json index b5d1fc0..0beae24 100644 --- a/src/Component/Alert/alert.json +++ b/src/Component/Alert/alert.json @@ -20,6 +20,7 @@ "dependency": { "sass": { "components": [ + "alert", "button", "typography" ] diff --git a/src/Component/Avatar/avatar.json b/src/Component/Avatar/avatar.json index 0e48f54..9142e9e 100644 --- a/src/Component/Avatar/avatar.json +++ b/src/Component/Avatar/avatar.json @@ -16,7 +16,7 @@ "dependency": { "sass": { "components": [ - "image", + "avatar", "icon" ] } diff --git a/src/Component/Button/button.json b/src/Component/Button/button.json index a39104e..b696eec 100644 --- a/src/Component/Button/button.json +++ b/src/Component/Button/button.json @@ -36,7 +36,15 @@ "style": "The type of appearance, can be basic, filled or outlined.", "reversePositions": "Reverse the position of icon and text." }, - "view":"button.blade.php" + "view":"button.blade.php", + "dependency": { + "sass": { + "components": [ + "button", + "icon" + ] + } + } } diff --git a/src/Component/Calendar/calendar.json b/src/Component/Calendar/calendar.json index 4cde8bd..57ad057 100644 --- a/src/Component/Calendar/calendar.json +++ b/src/Component/Calendar/calendar.json @@ -13,7 +13,16 @@ "description":{ }, - "view":"calendar.blade.php" + "view":"calendar.blade.php", + "dependency": { + "sass": { + "components": [ + "calendar", + "modal", + "button" + ] + } + } } diff --git a/src/Component/Comment/comment.json b/src/Component/Comment/comment.json index 20187f0..5e60ecd 100644 --- a/src/Component/Comment/comment.json +++ b/src/Component/Comment/comment.json @@ -28,7 +28,8 @@ "components": [ "comment", "avatar", - "typography" + "typography", + "link" ] } } diff --git a/src/Component/Date/date.json b/src/Component/Date/date.json index 79c6e7c..740a0a7 100644 --- a/src/Component/Date/date.json +++ b/src/Component/Date/date.json @@ -13,9 +13,9 @@ "view": "date.blade.php", "dependency": { "sass": { + "components": [ + "date" + ] } } -} - - - \ No newline at end of file +} \ No newline at end of file diff --git a/src/Component/Fab/fab.json b/src/Component/Fab/fab.json index 2dbf238..3189d40 100644 --- a/src/Component/Fab/fab.json +++ b/src/Component/Fab/fab.json @@ -15,7 +15,8 @@ "sass": { "components": [ "fab", - "button" + "button", + "icon" ] } } diff --git a/src/Component/Fileinput/fileinput.json b/src/Component/Fileinput/fileinput.json index 22671aa..fc34893 100644 --- a/src/Component/Fileinput/fileinput.json +++ b/src/Component/Fileinput/fileinput.json @@ -25,7 +25,8 @@ "sass": { "components": [ "fileInput", - "icon" + "icon", + "listing" ] } } diff --git a/src/Component/Footer/footer.json b/src/Component/Footer/footer.json index e2e14cd..4ee7adb 100644 --- a/src/Component/Footer/footer.json +++ b/src/Component/Footer/footer.json @@ -13,7 +13,8 @@ "dependency": { "sass": { "components": [ - "footer" + "footer", + "typography" ] } } diff --git a/src/Component/Form/form.json b/src/Component/Form/form.json index 6842bfc..676d13b 100644 --- a/src/Component/Form/form.json +++ b/src/Component/Form/form.json @@ -11,7 +11,9 @@ "view":"form.blade.php", "dependency": { "sass": { - + "components": [ + "form" + ] } } } \ No newline at end of file diff --git a/src/Component/Image/image.json b/src/Component/Image/image.json index 09cf291..1c853ad 100644 --- a/src/Component/Image/image.json +++ b/src/Component/Image/image.json @@ -27,7 +27,9 @@ "dependency": { "sass": { "components": [ - "image" + "image", + "modal", + "button" ] } } diff --git a/src/Component/Link/link.json b/src/Component/Link/link.json index bfe0843..4db62c9 100644 --- a/src/Component/Link/link.json +++ b/src/Component/Link/link.json @@ -12,8 +12,10 @@ }, "view":"link.blade.php", "dependency": { - "sass": { - - } + "sass": { + "components": [ + "link" + ] + } } } diff --git a/src/Component/Loader/loader.json b/src/Component/Loader/loader.json index b2c19dc..f62dbbd 100644 --- a/src/Component/Loader/loader.json +++ b/src/Component/Loader/loader.json @@ -18,7 +18,8 @@ "dependency": { "sass": { "components": [ - "loader" + "loader", + "typography" ] } } diff --git a/src/Component/Modal/modal.json b/src/Component/Modal/modal.json index 25db785..8c51c66 100644 --- a/src/Component/Modal/modal.json +++ b/src/Component/Modal/modal.json @@ -30,7 +30,8 @@ "modal", "icon", "typography", - "button" + "button", + "stepper" ] } } diff --git a/src/Component/Navbar/navbar.json b/src/Component/Navbar/navbar.json index 4e9e106..b01c526 100644 --- a/src/Component/Navbar/navbar.json +++ b/src/Component/Navbar/navbar.json @@ -19,7 +19,10 @@ "components": [ "navbar", "image", - "button" + "button", + "icon", + "grid", + "typography" ] } } diff --git a/src/Component/Notification/notification.json b/src/Component/Notification/notification.json index 0de20c5..d77bc16 100644 --- a/src/Component/Notification/notification.json +++ b/src/Component/Notification/notification.json @@ -18,7 +18,8 @@ "components": [ "notification", "notice", - "button" + "button", + "icon" ] } } diff --git a/src/Component/Pagination/pagination.json b/src/Component/Pagination/pagination.json index f04e6b2..d7099bc 100644 --- a/src/Component/Pagination/pagination.json +++ b/src/Component/Pagination/pagination.json @@ -24,7 +24,9 @@ "dependency": { "sass": { "components": [ - "pagination" + "pagination", + "button", + "icon" ] } } diff --git a/src/Component/Segment/segment.json b/src/Component/Segment/segment.json index 6e703de..55cfd3c 100755 --- a/src/Component/Segment/segment.json +++ b/src/Component/Segment/segment.json @@ -22,5 +22,13 @@ "overlay": "An overlay of the background", "overlay_opacity": "Sets the opacity of the overlay" }, - "view": "segment.blade.php" + "view": "segment.blade.php", + "dependency": { + "sass": { + "components": [ + "segment", + "typography" + ] + } + } } \ No newline at end of file diff --git a/src/Component/Sidebar/sidebar.json b/src/Component/Sidebar/sidebar.json index 48a1595..c2e3cc4 100644 --- a/src/Component/Sidebar/sidebar.json +++ b/src/Component/Sidebar/sidebar.json @@ -10,5 +10,14 @@ "items": "An array of links", "showHideButton": "Option to display the button to hide sidebar, otherwise just clicking outside the drawer will close it." }, - "view":"sidebar.blade.php" + "view":"sidebar.blade.php", + "dependency": { + "sass": { + "components": [ + "sidebar", + "icon", + "image" + ] + } + } } \ No newline at end of file diff --git a/src/Component/Slider/slider.json b/src/Component/Slider/slider.json index c7a9534..786510b 100644 --- a/src/Component/Slider/slider.json +++ b/src/Component/Slider/slider.json @@ -12,6 +12,7 @@ "components": [ "slider", "button", + "icon", "steppers" ] } diff --git a/src/Component/Splitbutton/splitbutton.json b/src/Component/Splitbutton/splitbutton.json index 68559d3..72f344a 100755 --- a/src/Component/Splitbutton/splitbutton.json +++ b/src/Component/Splitbutton/splitbutton.json @@ -18,7 +18,9 @@ "dependency": { "sass": { "components": [ + "splitbutton", "button", + "buttongroup", "typography", "dropdown", "icon" diff --git a/src/Component/Steppers/steppers.json b/src/Component/Steppers/steppers.json index cc65da0..82ea312 100644 --- a/src/Component/Steppers/steppers.json +++ b/src/Component/Steppers/steppers.json @@ -11,7 +11,9 @@ "view": "steppers.blade.php", "dependency": { "sass": { - + "components": [ + "steppers" + ] } } } \ No newline at end of file diff --git a/src/Component/Stripe/stripe.json b/src/Component/Stripe/stripe.json index 14c1023..35c0ed7 100644 --- a/src/Component/Stripe/stripe.json +++ b/src/Component/Stripe/stripe.json @@ -9,7 +9,9 @@ "view": "stripe.blade.php", "dependency": { "sass": { - + "components": [ + "stripe" + ] } } } diff --git a/src/Component/Tags/tags.json b/src/Component/Tags/tags.json index 3b0f8fb..3c86fce 100644 --- a/src/Component/Tags/tags.json +++ b/src/Component/Tags/tags.json @@ -14,7 +14,9 @@ "dependency": { "sass": { "components": [ - "icon" + "tags", + "icon", + "link" ] } } diff --git a/src/Component/Tile/tile.json b/src/Component/Tile/tile.json index aa37955..d2e6a72 100644 --- a/src/Component/Tile/tile.json +++ b/src/Component/Tile/tile.json @@ -9,5 +9,12 @@ "width": "Array with following keys: largeImage, smallImage, caption and alt", "height": "Array with following keys: largeImage, smallImage, caption and alt" }, - "view": "tile.blade.php" + "view": "tile.blade.php", + "dependency": { + "sass": { + "components": [ + "tile" + ] + } + } } \ No newline at end of file diff --git a/src/Component/Video/video.json b/src/Component/Video/video.json index f023ae3..7cc290b 100644 --- a/src/Component/Video/video.json +++ b/src/Component/Video/video.json @@ -11,8 +11,13 @@ }, "view":"video.blade.php", "dependency": { - "sass": { - - } + "sass": { + "components": [ + "video", + "notice", + "button", + "icon" + ] + } } } \ No newline at end of file From de238498a33800d2d7e5900d1e9a829d45f98877 Mon Sep 17 00:00:00 2001 From: Eric Rosenborg Date: Tue, 7 Apr 2020 11:43:53 +0200 Subject: [PATCH 03/11] Divider component Add new component for dividing content. It's essentially just a div with a border that can be configured for both size and style. --- src/Component/Divider/Divider.php | 16 ++++++++++++++++ src/Component/Divider/divider.blade.php | 2 ++ src/Component/Divider/divider.json | 23 +++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 src/Component/Divider/Divider.php create mode 100644 src/Component/Divider/divider.blade.php create mode 100644 src/Component/Divider/divider.json diff --git a/src/Component/Divider/Divider.php b/src/Component/Divider/Divider.php new file mode 100644 index 0000000..11df5c9 --- /dev/null +++ b/src/Component/Divider/Divider.php @@ -0,0 +1,16 @@ +data); + } +} diff --git a/src/Component/Divider/divider.blade.php b/src/Component/Divider/divider.blade.php new file mode 100644 index 0000000..9ff8915 --- /dev/null +++ b/src/Component/Divider/divider.blade.php @@ -0,0 +1,2 @@ +<{{$componentElement}} class="{{$class}} {{$class}}--{{$style}} {{$class}}--{{$size}} "> + \ No newline at end of file diff --git a/src/Component/Divider/divider.json b/src/Component/Divider/divider.json new file mode 100644 index 0000000..4a07988 --- /dev/null +++ b/src/Component/Divider/divider.json @@ -0,0 +1,23 @@ +{ + "slug": "divider", + "default": { + "componentElement": "div", + "style": "dashed", + "size": "md" + }, + "description": { + "componentElement": "The tag to use for this component.", + "style": "Either dashed, solid or dotted.", + "size": "The length of the divider. Either sm, md or lg." + }, + "view": "dropdown.blade.php", + "dependency": { + "sass": { + "components": [ + "divider" + ] + } + } +} + + From 7df8625e0f693e6411b2939dd7c39362567cefbf Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 7 Apr 2020 15:24:11 +0200 Subject: [PATCH 04/11] Signature Component - add signature component blade - add signature component json - add signature component php --- src/Component/Signature/Signature.php | 13 ++++++ src/Component/Signature/signature.blade.php | 52 +++++++++++++++++++++ src/Component/Signature/signature.json | 18 +++++++ 3 files changed, 83 insertions(+) create mode 100644 src/Component/Signature/Signature.php create mode 100644 src/Component/Signature/signature.blade.php create mode 100644 src/Component/Signature/signature.json diff --git a/src/Component/Signature/Signature.php b/src/Component/Signature/Signature.php new file mode 100644 index 0000000..93f25b6 --- /dev/null +++ b/src/Component/Signature/Signature.php @@ -0,0 +1,13 @@ +data); + } +} diff --git a/src/Component/Signature/signature.blade.php b/src/Component/Signature/signature.blade.php new file mode 100644 index 0000000..a28a3ac --- /dev/null +++ b/src/Component/Signature/signature.blade.php @@ -0,0 +1,52 @@ +
+
+ @avatar([ + 'image' => ($avatar) ? $avatar : false, + 'name' => $author, + 'size' => $avatar_size + ]) + @endavatar +
+ +
+ @typography([ + "variant" => "subtitle", + "classList" => [ + $baseClass.'__author' + ] + ]) + {{$author}} + @endtypography + + @typography([ + "variant" => "byline", + "classList" => [ + $baseClass.'__title' + ] + ]) + Skribent + @endtypography + + @if ($published) + @typography([ + "variant" => "byline", + "classList" => [ + $baseClass.'__published' + ] + ]) + Published: @date(['action' => 'formatDate','timestamp' => $published])@enddate + @endtypography + @endif + + @if ($updated) + @typography([ + "variant" => "byline", + "classList" => [ + $baseClass.'__updated' + ] + ]) + Updated: @date(['action' => 'formatDate','timestamp' => $updated])@enddate + @endtypography + @endif +
+
\ No newline at end of file diff --git a/src/Component/Signature/signature.json b/src/Component/Signature/signature.json new file mode 100644 index 0000000..e7baf28 --- /dev/null +++ b/src/Component/Signature/signature.json @@ -0,0 +1,18 @@ +{ + "slug":"signature", + "default":{ + "author": "", + "avatar": "", + "avatar_size": "md", + "published": "", + "updated": "" + }, + "description":{ + "author": "The name of the author", + "avatar": "Link to an image", + "avatar_size": "Size of the avatar", + "published": "A formatted published date", + "updated": "A formatted update date" + }, + "view":"signature.blade.php" + } \ No newline at end of file From 8c66c2342bbde859b4e4c7c6ea2b74694b1a8cb0 Mon Sep 17 00:00:00 2001 From: Eric Rosenborg Date: Wed, 15 Apr 2020 14:25:01 +0200 Subject: [PATCH 05/11] Dynamic child items Add child-items-url paramter to config. --- src/Component/Sidebar/Sidebar.php | 4 ++++ src/Component/Sidebar/item.blade.php | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Component/Sidebar/Sidebar.php b/src/Component/Sidebar/Sidebar.php index 15ef5c9..b350914 100644 --- a/src/Component/Sidebar/Sidebar.php +++ b/src/Component/Sidebar/Sidebar.php @@ -9,5 +9,9 @@ public function init() { //Extract array for eazy access (fetch only) extract($this->data); + + if(isset($childItemsUrl)) { + $this->data['attributeList']['child-items-url'] = $childItemsUrl; + } } } diff --git a/src/Component/Sidebar/item.blade.php b/src/Component/Sidebar/item.blade.php index b46e46e..bb2e13c 100644 --- a/src/Component/Sidebar/item.blade.php +++ b/src/Component/Sidebar/item.blade.php @@ -13,19 +13,23 @@ {{$item['label']}} - @if (isset($item['children'])) + @if ($item['children']) @php $rndId = uniqid(); @endphp
- - @include ('Sidebar.item', array('items' => $item['children'], 'appendID' => $rndId, 'top_level' => false)) + @if(!isset($childItemsUrl)) + @include ('Sidebar.item', array('items' => $item['children'], 'appendID' => $rndId, 'top_level' => false)) + @endif @endif @endforeach From a8d5a408441e1958914a2114aeaab3f9a5785212 Mon Sep 17 00:00:00 2001 From: Silvergrund Date: Thu, 16 Apr 2020 16:47:20 +0200 Subject: [PATCH 06/11] Rearanged block order, removed var, added parameters --- src/Component/Comment/comment.blade.php | 29 ++++++++++++++----------- src/Component/Comment/comment.json | 6 +++-- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/Component/Comment/comment.blade.php b/src/Component/Comment/comment.blade.php index b175abe..c0a40a4 100644 --- a/src/Component/Comment/comment.blade.php +++ b/src/Component/Comment/comment.blade.php @@ -1,14 +1,6 @@ -<{{$componentElement}} id="{{ $id }}" class="{{ $class }}" href="{{ $href }}" {!! $attribute !!}> +<{{$componentElement}} id="{{ $id }}" class="{{ $class }}" {!! $attribute !!}>
- @avatar([ - 'name' => $author, - 'icon' => [ - 'name' => $icon, - 'size' => 'lg' - ], - 'image' => $author_image - ]) - @endavatar + @if ($author_url) @link([ @@ -16,7 +8,7 @@ 'classList' => ['c-comment__link'] ]) @endif - + @typography([ "variant" => "title", "element" => "h6", @@ -28,7 +20,7 @@ @if ($author_url) @endlink @endif - + @if ($date) @typography([ @@ -45,7 +37,18 @@ @endif
-
+ +
+ @avatar([ + 'name' => $author, + 'icon' => [ + 'name' => $icon, + 'size' => 'lg' + ], + 'image' => $author_image + ]) + @endavatar + @typography([ "variant" => "body", "element" => "p" diff --git a/src/Component/Comment/comment.json b/src/Component/Comment/comment.json index 5e60ecd..dc44642 100644 --- a/src/Component/Comment/comment.json +++ b/src/Component/Comment/comment.json @@ -6,8 +6,9 @@ "author_image": "", "text": "", "icon": "", - + "bubble_color": "dark", "date": "01/02/2019", + "date_suffix": "", "componentElement": "div", "is_reply": false }, @@ -17,8 +18,9 @@ "author_image": "A link to an image", "text": "Content of the comment", "icon": "Which icon to show", - + "bubble_color": "Color for comment bubble background: light or dark", "date": "The date when the comment was posted", + "date_suffix": "Time elapsed 'since' ", "componentElement": "Element of the component", "is_reply": "If true the comment will be displayed as a reply" }, From 85e5bbc553f20dbe80f8e0f6c07445177f8a7037 Mon Sep 17 00:00:00 2001 From: Alexander Boman Skoug Date: Thu, 16 Apr 2020 17:45:44 +0200 Subject: [PATCH 07/11] Modal Buttons - add corrected buttons --- src/Component/Modal/modal.blade.php | 34 +++++++++-------------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/Component/Modal/modal.blade.php b/src/Component/Modal/modal.blade.php index 94eeff3..5ad1d47 100644 --- a/src/Component/Modal/modal.blade.php +++ b/src/Component/Modal/modal.blade.php @@ -10,17 +10,14 @@ {{$heading}} @endtypography @endif - + @button([ - 'type' => 'basic', - 'href' => '#btn-3', - 'type' => 'basic', + 'text' => '', 'icon' => 'close', - 'size' => 'lg', - 'color' => 'secondary', + 'color' => 'default', + 'style' => 'basic', 'attributeList' => ['data-close' => ''], 'classList' => [$baseClass . "__close"], - 'hasRipple' => true ]) @endbutton @@ -30,15 +27,10 @@ {{-- Previous button --}} @if ($navigation) @button([ - 'type' => 'basic', - 'href' => '#previous', - 'isOutlined' => false, - 'isIconButton' => true, + 'text' => '', 'icon' => 'chevron_left', - 'reverseIcon' => false, - 'size' => 'md', - 'color' => 'secondary', - 'floating' => ['animate' => true, 'hover' => true], + 'color' => 'default', + 'style' => 'basic', 'attributeList' => ['data-prev' => ''], 'classList' => [$baseClass . "__prev"], 'label' => 'Slide to previous' @@ -52,19 +44,13 @@ {{-- Next button --}} @if ($navigation) @button([ - 'type' => 'basic', - 'href' => '#next', - 'isOutlined' => false, - 'isIconButton' => true, + 'text' => '', 'icon' => 'chevron_right', - 'reverseIcon' => false, - 'size' => 'md', - 'color' => 'secondary', - 'floating' => ['animate' => true, 'hover' => true], + 'color' => 'default', + 'style' => 'basic', 'attributeList' => ['data-next' => ''], 'classList' => [$baseClass . "__next"], 'label' => 'Slide to next' - ]) @endbutton @endif From a611775497ad9c647aa8b499a95c51f73e278d79 Mon Sep 17 00:00:00 2001 From: Alexander Boman Skoug Date: Mon, 20 Apr 2020 11:00:06 +0200 Subject: [PATCH 08/11] Slider Buttons - add corrected buttons --- src/Component/Slider/slider.blade.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Component/Slider/slider.blade.php b/src/Component/Slider/slider.blade.php index e04e356..1a6e68c 100644 --- a/src/Component/Slider/slider.blade.php +++ b/src/Component/Slider/slider.blade.php @@ -4,28 +4,30 @@
@button([ - 'type' => 'basic', + 'text' => '', 'icon' => 'chevron_left', - 'size' => 'md', - 'color' => 'primary', + 'color' => 'default', + 'style' => 'basic', 'attributeList' => ['js-slider-btn' => 'prev'], 'classList' => [ 'c-slider__button', 'c-slider__button--prev' - ] + ], + 'label' => 'Slide to previous' ]) @endbutton @button([ - 'type' => 'basic', + 'text' => '', 'icon' => 'chevron_right', - 'size' => 'md', - 'color' => 'primary', + 'color' => 'default', + 'style' => 'basic', 'attributeList' => ['js-slider-btn' => 'next'], 'classList' => [ 'c-slider__button', 'c-slider__button--next' - ] + ], + 'label' => 'Slide to previous' ]) @endbutton From 99e371b2c10d0a664c74f0bc7ab5f344c225f642 Mon Sep 17 00:00:00 2001 From: Alexander Boman Skoug Date: Mon, 20 Apr 2020 13:24:38 +0200 Subject: [PATCH 09/11] Splitbutton - remove unsued values - add class to buttongroup --- src/Component/Splitbutton/splitbutton.blade.php | 6 +++++- src/Component/Splitbutton/splitbutton.json | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Component/Splitbutton/splitbutton.blade.php b/src/Component/Splitbutton/splitbutton.blade.php index 5d874c7..5129aca 100755 --- a/src/Component/Splitbutton/splitbutton.blade.php +++ b/src/Component/Splitbutton/splitbutton.blade.php @@ -1,5 +1,9 @@ -@buttonGroup(['attributeList' => ['js-split' => '']]) +@buttonGroup([ + 'borderColor' => 'default', + 'attributeList' => ['js-split' => ''], + 'classList' => [$class] +]) @button(['text' => $buttonText]) @endbutton @dropdown([ diff --git a/src/Component/Splitbutton/splitbutton.json b/src/Component/Splitbutton/splitbutton.json index 72f344a..212ea09 100755 --- a/src/Component/Splitbutton/splitbutton.json +++ b/src/Component/Splitbutton/splitbutton.json @@ -1,15 +1,11 @@ { "slug": "splitbutton", "default": { - "background": "primary", - "borderColor": "primary", "buttonText": "Pick an item", "icon": "arrow-drop-down", "dropdownDirection": "bottom" }, "description": { - "background": "Background of the splitbutton.", - "borderColor": "Color of the border around the splitbutton", "buttonText": "The text on the actionbutton", "icon": "The icon for the dropdown", "dropdownDirection": "In which direction the dropdown opens" From f7fa8d408254ef0f55d0398ef0ea1b11a8345f28 Mon Sep 17 00:00:00 2001 From: Eric Rosenborg Date: Wed, 22 Apr 2020 14:49:54 +0200 Subject: [PATCH 10/11] Dynamic navbar Add possibility to configure the navbar with an endpoint, pageID and pageParentID to dynamically render items in expanded menu on page load with the help of a js-script. --- src/Component/Navbar/Navbar.php | 27 +++++++++++++++++++ src/Component/Navbar/navbar.json | 3 ++- .../Navbar/sub/expanded_grid.blade.php | 6 ++++- .../Navbar/sub/expanded_main.blade.php | 3 ++- .../Navbar/sub/expanded_menu.blade.php | 20 +++++++------- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/src/Component/Navbar/Navbar.php b/src/Component/Navbar/Navbar.php index 6208276..9ac3992 100644 --- a/src/Component/Navbar/Navbar.php +++ b/src/Component/Navbar/Navbar.php @@ -12,5 +12,32 @@ public function init() { // Extract array for eazy access (fetch only) extract($this->data); + + if($this->data['isDynamic']) { + + + $this->data['attributeList']['js-is-dynamic'] = ''; + + if(isset($childItemsUrl)) { + + + $this->data['attributeList']['js-child-items-url'] = $childItemsUrl; + } + } + + if(isset($this->data['multiDimenexpanded_menusional'])) { + foreach($this->data['expanded_menu'] as $key => $value){ + $this->data['expanded_menu'][$key]['id'] = isset($this->data['expanded_menu'][$key]['id']) ? $this->data['expanded_menu'][$key]['id'] : null; + } + } + + if(isset($this->data['pageID'])) { + $this->data['attributeList']['data-page-id'] = $this->data['pageID']; + } + + if(isset($this->data['pageParentID'])) { + $this->data['attributeList']['data-page-parent-id'] = $this->data['pageParentID']; + } + } } diff --git a/src/Component/Navbar/navbar.json b/src/Component/Navbar/navbar.json index b01c526..4e4ac41 100644 --- a/src/Component/Navbar/navbar.json +++ b/src/Component/Navbar/navbar.json @@ -4,7 +4,8 @@ "logo": "", "items": [], "sidebar": false, - "expanded_menu": false + "expanded_menu": false, + "isDynamic": false }, "description":{ diff --git a/src/Component/Navbar/sub/expanded_grid.blade.php b/src/Component/Navbar/sub/expanded_grid.blade.php index d648fc5..eacc16a 100644 --- a/src/Component/Navbar/sub/expanded_grid.blade.php +++ b/src/Component/Navbar/sub/expanded_grid.blade.php @@ -1,3 +1,5 @@ + + @grid([ "classList" => [ $baseClass.'__expanded_grid' @@ -8,8 +10,9 @@ "col_gap" => "5", "row_gap" => "9" ]) - + @foreach ($expanded_menu as $key => $item) + @grid([ 'element' => 'a', 'classList' => [ @@ -38,4 +41,5 @@ @endgrid @endforeach + @endgrid \ No newline at end of file diff --git a/src/Component/Navbar/sub/expanded_main.blade.php b/src/Component/Navbar/sub/expanded_main.blade.php index 6558ed1..816b01b 100644 --- a/src/Component/Navbar/sub/expanded_main.blade.php +++ b/src/Component/Navbar/sub/expanded_main.blade.php @@ -7,13 +7,14 @@ 'color' => 'default', 'size' => 'lg', 'style' => 'basic', + 'href' => '#', 'classList' => [ $baseClass.'__prev' ] ]) @endbutton @endif - + @typography([ "element" => "h2", "variant" => "marketing", diff --git a/src/Component/Navbar/sub/expanded_menu.blade.php b/src/Component/Navbar/sub/expanded_menu.blade.php index f01280e..23e20fe 100644 --- a/src/Component/Navbar/sub/expanded_menu.blade.php +++ b/src/Component/Navbar/sub/expanded_menu.blade.php @@ -7,13 +7,15 @@ "col_gap" => "4" ]) - @foreach ($expanded_menu as $key => $item) - @grid([]) - @link([ - 'href' => $item['href'] - ]) - {{$key}} - @endbutton - @endgrid - @endforeach + @if(!$isDynamic) + @foreach ($expanded_menu as $key => $item) + @grid([]) + @link([ + 'href' => $item['href'] + ]) + {{$key}} + @endbutton + @endgrid + @endforeach + @endif @endgrid \ No newline at end of file From ee8e496a3146bf96ab50846089ce8ce4e09b3e70 Mon Sep 17 00:00:00 2001 From: Silvergrund Date: Wed, 22 Apr 2020 15:03:55 +0200 Subject: [PATCH 11/11] date suffix --- src/Component/Comment/comment.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Component/Comment/comment.blade.php b/src/Component/Comment/comment.blade.php index c0a40a4..732e642 100644 --- a/src/Component/Comment/comment.blade.php +++ b/src/Component/Comment/comment.blade.php @@ -35,6 +35,7 @@ @enddate @endtypography @endif + @if ($date_suffix) {{$date_suffix}} @endif