Skip to content

Commit ebede1c

Browse files
author
Marvin Kuhn
committed
Initial commit
0 parents  commit ebede1c

File tree

79 files changed

+5093
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5093
-0
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.{html,yml,yaml}]
15+
indent_size = 2
16+
17+
[*.xlf]
18+
insert_final_newline = false
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

Classes/Eel/Helper/SlickEelHelper.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
namespace Noerdisch\Slick\Eel\Helper;
3+
4+
use Neos\ContentRepository\Domain\Model\NodeInterface;
5+
use Neos\Eel\ProtectedContextAwareInterface;
6+
7+
class SlickEelHelper implements ProtectedContextAwareInterface
8+
{
9+
10+
/**
11+
* Returns all given properties as array
12+
*
13+
* @param NodeInterface $node
14+
* @param $properties array
15+
* @return array
16+
*/
17+
public function getPropertiesByKeys(NodeInterface $node, $properties)
18+
{
19+
return $this->keyValuesIntersect($node->getProperties(), $properties);
20+
}
21+
22+
/**
23+
* @param $values
24+
* @param $keys
25+
* @return array
26+
*/
27+
protected function keyValuesIntersect($values, $keys)
28+
{
29+
$intersection = [];
30+
31+
foreach ($keys as $key) {
32+
if (isset($values[$key])) {
33+
$intersection[$key] = $values[$key];
34+
}
35+
}
36+
37+
return $intersection;
38+
}
39+
40+
/**
41+
* All methods are considered safe, i.e. can be executed from within Eel
42+
*
43+
* @param string $methodName
44+
* @return boolean
45+
*/
46+
public function allowsCallOfMethod($methodName)
47+
{
48+
return true;
49+
}
50+
51+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
namespace Noerdisch\Slick\Fusion;
3+
4+
use Neos\Flow\Exception;
5+
use Neos\Fusion\FusionObjects\AbstractFusionObject;
6+
7+
class ConvertJsonImplementation extends AbstractFusionObject
8+
{
9+
10+
/**
11+
* @return false|string
12+
* @throws Exception
13+
*/
14+
public function evaluate()
15+
{
16+
$array = $this->fusionValue('value');
17+
18+
if (!is_array($array)) {
19+
throw new Exception(sprintf('Only array can be processed by this Fusion object, given: "%s".', gettype($array)), 1536828313);
20+
}
21+
22+
return \json_encode($array);
23+
}
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'Noerdisch.Slick:Content.Slide':
2+
superTypes:
3+
'Neos.Neos:Content': true
4+
'Neos.Neos:ContentCollection': true
5+
'Noerdisch.Slick:Mixin.BackgroundImage': true
6+
7+
ui:
8+
label: 'Slide'
9+
icon: 'image'
10+
inspector:
11+
groups:
12+
'slide':
13+
label: 'i18n'
14+
icon: 'icon-picture'
15+
tab: 'default'
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
'Noerdisch.Slick:Content.Slider':
2+
superTypes:
3+
'Neos.Neos:Content': true
4+
'Neos.Neos:ContentCollection': true
5+
# slider property mixins
6+
'Noerdisch.Slick:Mixin.Autoplay': true
7+
'Noerdisch.Slick:Mixin.SlidesToScroll': true
8+
'Noerdisch.Slick:Mixin.Infinite': true
9+
'Noerdisch.Slick:Mixin.Draggable': true
10+
'Noerdisch.Slick:Mixin.PauseOnHover': true
11+
'Noerdisch.Slick:Mixin.AnimationSpeed': true
12+
'Noerdisch.Slick:Mixin.Fade': false # take a look at the Readme.md
13+
'Noerdisch.Slick:Mixin.Arrows': true
14+
'Noerdisch.Slick:Mixin.Dots': true
15+
'Noerdisch.Slick:Mixin.SlidesToShow': true
16+
# the responsive mixins
17+
'Noerdisch.Slick:Mixin.Repsonsive.Sm': true
18+
'Noerdisch.Slick:Mixin.Repsonsive.Md': true
19+
'Noerdisch.Slick:Mixin.Repsonsive.Lg': true
20+
'Noerdisch.Slick:Mixin.Repsonsive.Xl': true
21+
22+
constraints:
23+
nodeTypes:
24+
'*': false
25+
'Noerdisch.Slick:Content.Slide': true
26+
27+
label: '${ I18n.translate(node.nodeType.label) + " (" + q(node).children().count() + " Slides)" }'
28+
29+
ui:
30+
label: 'Slick-Slider'
31+
icon: 'images'
32+
inspector:
33+
tabs:
34+
'slick':
35+
label: 'Slick '
36+
icon: 'icon-images'
37+
position: 'before slick-responsive'
38+
39+
'slick-responsive':
40+
label: 'Slick Responsive'
41+
icon: 'icon-mobile'
42+
position: 'before meta'
43+
groups:
44+
'slick-behavior':
45+
label: 'i18n'
46+
icon: 'icon-images'
47+
tab: 'slick'
48+
49+
'slick-appearance':
50+
label: 'i18n'
51+
icon: 'icon-images'
52+
tab: 'slick'
53+
54+
'slick-animation':
55+
label: 'i18n'
56+
icon: 'icon-images'
57+
tab: 'slick'
58+
59+
'slick-responsive-sm':
60+
label: 'i18n'
61+
icon: 'icon-mobile'
62+
tab: 'slick-responsive'
63+
64+
'slick-responsive-md':
65+
label: 'i18n'
66+
icon: 'icon-tablet'
67+
tab: 'slick-responsive'
68+
69+
'slick-responsive-lg':
70+
label: 'i18n'
71+
icon: 'icon-laptop'
72+
tab: 'slick-responsive'
73+
74+
'slick-responsive-xl':
75+
label: 'i18n'
76+
icon: 'icon-desktop'
77+
tab: 'slick-responsive'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'Noerdisch.Slick:Mixin.AnimationSpeed':
2+
abstract: true
3+
4+
properties:
5+
# speed of the animation
6+
speed:
7+
type: integer
8+
defaultValue: 300
9+
ui:
10+
reloadPageIfChanged: true
11+
label: 'i18n'
12+
inspector:
13+
group: 'slick-animation'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.Arrows':
2+
abstract: true
3+
4+
properties:
5+
arrows:
6+
type: boolean
7+
defaultValue: true
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-appearance'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'Noerdisch.Slick:Mixin.Autoplay':
2+
abstract: true
3+
4+
properties:
5+
autoplay:
6+
type: boolean
7+
defaultValue: false
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-behavior'
13+
14+
autoplaySpeed:
15+
type: integer
16+
defaultValue: 3000
17+
ui:
18+
reloadPageIfChanged: true
19+
label: 'i18n'
20+
inspector:
21+
group: 'slick-behavior'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'Noerdisch.Slick:Mixin.BackgroundImage':
2+
abstract: true
3+
4+
properties:
5+
backgroundImage:
6+
type: Neos\Media\Domain\Model\ImageInterface
7+
ui:
8+
label: 'i18n'
9+
inspector:
10+
group: 'slide'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.Dots':
2+
abstract: true
3+
4+
properties:
5+
dots:
6+
type: boolean
7+
defaultValue: false
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-appearance'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.Draggable':
2+
abstract: true
3+
4+
properties:
5+
draggable:
6+
type: boolean
7+
defaultValue: true
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-behavior'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.Fade':
2+
abstract: true
3+
4+
properties:
5+
fade:
6+
type: boolean
7+
defaultValue: false
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-animation'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.Infinite':
2+
abstract: true
3+
4+
properties:
5+
infinite:
6+
type: boolean
7+
defaultValue: true
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-behavior'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'Noerdisch.Slick:Mixin.PauseOnHover':
2+
abstract: true
3+
4+
properties:
5+
pauseOnHover:
6+
type: boolean
7+
defaultValue: true
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'i18n'
11+
inspector:
12+
group: 'slick-behavior'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
'Noerdisch.Slick:Mixin.Repsonsive.Lg':
2+
abstract: true
3+
4+
properties:
5+
lgEnabled:
6+
type: boolean
7+
defaultValue: false
8+
ui:
9+
reloadPageIfChanged: true
10+
label: 'Noerdisch.Slick:NodeTypes.Mixin.Responsive:properties.enabled'
11+
inspector:
12+
group: 'slick-responsive-lg'
13+
14+
lgSlidesToShow:
15+
type: integer
16+
defaultValue: 1
17+
ui:
18+
reloadPageIfChanged: true
19+
label: 'Noerdisch.Slick:NodeTypes.Mixin.SlidesToShow:properties.slidesToShow'
20+
inspector:
21+
group: 'slick-responsive-lg'
22+
23+
lgSlidesToScroll:
24+
type: integer
25+
defaultValue: 1
26+
ui:
27+
reloadPageIfChanged: true
28+
label: 'Noerdisch.Slick:NodeTypes.Mixin.SlidesToScroll:properties.slidesToScroll'
29+
inspector:
30+
group: 'slick-responsive-lg'
31+
32+
lgArrows:
33+
type: boolean
34+
defaultValue: true
35+
ui:
36+
reloadPageIfChanged: true
37+
label: 'Noerdisch.Slick:NodeTypes.Mixin.Arrows:properties.arrows'
38+
inspector:
39+
group: 'slick-responsive-lg'
40+
41+
lgDots:
42+
type: boolean
43+
defaultValue: false
44+
ui:
45+
reloadPageIfChanged: true
46+
label: 'Noerdisch.Slick:NodeTypes.Mixin.Dots:properties.dots'
47+
inspector:
48+
group: 'slick-responsive-lg'

0 commit comments

Comments
 (0)