Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Apr 6, 2023
1 parent 15c7bb4 commit ac3149a
Show file tree
Hide file tree
Showing 27 changed files with 851 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# silverstripe-contentelement
# Contentelement# contentelement-module
Empty file added _config.php
Empty file.
173 changes: 173 additions & 0 deletions _config/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
---
Name: contentelement
---
MoritzSauer\ContentElement:
#Defines all Layouts
Layouts:
TextOnly:
#id of layout needs to be the same as the key of this layout
#id defines also the name for the special template
id: 'TextOnly'
# enable / disable this layout
enabled: true
# title of this layout. Will be used to identify this in the cms
title: 'Nur Text'
# path to Image which will be used in the cms
imgPath: 'client/images/TextOnly.jpg'
# defines, if this layout has media like images or videos
# if this is false, the "Medien"-Tab won't be shown in cms
hasMedia: false
# define all fields available in the cms for this layout
# in some cases you can set here globally settings
# example: disable video-autoplay project wide (for this layout) by setting it here to false
FieldsVisible:
TextCenter: true
SubTitle: true
SubTitleBelowTitle: true
Content: true
SecondContent: false
ButtonCaption: true
ExternalLink: true
LinkedPageID: true
ImageID: false
ImageFormat: false
VideoAutoPlay: false
VideoLoop: false
VideoMuted: false
VideoControls: false
PreviewImageID: false
VideoMP4ID: false
VideoOGVID: false
VideoWEBMID: false
GalleryImages: false
GalleryArrows: false
BadgePosition: false
BadgeID: false
ShowImageCaption: false
TwoColumns:
id: 'TwoColumns'
enabled: true
title: 'Zweispaltig'
imgPath: 'client/images/TwoColumns.jpg'
hasMedia: false
FieldsVisible:
TextCenter: false
SubTitle: true
SubTitleBelowTitle: true
Content: true
SecondContent: true
ButtonCaption: true
ExternalLink: true
LinkedPageID: true
ImageID: false
ImageFormat: false
VideoAutoPlay: false
VideoLoop: false
VideoMuted: false
VideoControls: false
PreviewImageID: false
VideoMP4ID: false
VideoOGVID: false
VideoWEBMID: false
GalleryImages: false
GalleryArrows: false
BadgePosition: false
BadgeID: false
ShowImageCaption: false
TextMediaRight:
id: 'TextMediaRight'
enabled: true
title: 'Text links, Medien rechts'
imgPath: 'client/images/MediaRight.jpg'
hasMedia: true
FieldsVisible:
TextCenter: true
SubTitle: true
SubTitleBelowTitle: true
Content: true
SecondContent: false
ButtonCaption: true
ExternalLink: true
LinkedPageID: true
ImageID: true
ImageFormat: true
VideoAutoPlay: true
VideoLoop: true
VideoMuted: true
VideoControls: true
PreviewImageID: true
VideoMP4ID: true
VideoOGVID: true
VideoWEBMID: true
GalleryImages: true
GalleryArrows: true
BadgePosition: true
BadgeID: true
ShowImageCaption: true
TextMediaLeft:
id: 'TextMediaLeft'
enabled: true
title: 'Text rechts, Medien links'
imgPath: 'client/images/MediaLeft.jpg'
hasMedia: true
FieldsVisible:
TextCenter: true
SubTitle: true
SubTitleBelowTitle: true
Content: true
SecondContent: false
ButtonCaption: true
ExternalLink: true
LinkedPageID: true
ImageID: true
ImageFormat: true
VideoAutoPlay: true
VideoLoop: true
VideoMuted: true
VideoControls: true
PreviewImageID: true
VideoMP4ID: true
VideoOGVID: true
VideoWEBMID: true
GalleryImages: true
GalleryArrows: true
BadgePosition: true
BadgeID: true
ShowImageCaption: true
MediaFullscreen:
id: 'MediaFullscreen'
enabled: true
title: 'Medien Vollbreite'
imgPath: 'client/images/MediaFullscreen.jpg'
hasMedia: true
FieldsVisible:
TextCenter: true
SubTitle: true
SubTitleBelowTitle: true
Content: true
SecondContent: false
ButtonCaption: true
ExternalLink: true
LinkedPageID: true
ImageID: true
ImageFormat: true
VideoAutoPlay: true
VideoLoop: true
VideoMuted: true
VideoControls: true
PreviewImageID: true
VideoMP4ID: true
VideoOGVID: true
VideoWEBMID: true
GalleryImages: true
GalleryArrows: true
BadgePosition: true
BadgeID: true
ShowImageCaption: false
# settings for some fields
FieldSettings:
# height and width of the layout-select images in cms
ImageHeight: 100
ImageWidth: 195
# description to the layout-select in the cms
FieldDescription: 'Nach der Auswahl zuerst speichern.'
7 changes: 7 additions & 0 deletions _config/extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Name: contentelement_extensions
---

DNADesign\Elemental\Models\ElementContent:
extensions:
- MoritzSauer\ContentElement\ElementContentExtension
Binary file added client/images/MediaFullscreen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/images/MediaLeft.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/images/MediaRight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/images/TextOnly.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/images/TwoColumns.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions client/scss/_contentelement.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

.media__badge {
position: absolute;
z-index: 20;

&.TopLeft {
top: -2rem;
left: -2rem;
}

&.TopRight {
top: -2rem;
right: -2rem;
}

&.BottomLeft {
bottom: -2rem;
left: -2rem;
}

&.BottomRight {
bottom: -2rem;
right: -2rem;
}
}
33 changes: 33 additions & 0 deletions client/scss/_gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

.swiper-container {
position: relative;

.swiper__controls {
position: absolute;
top: 50%;
left: 0;
width: 100%;
transform: translateY(-50%);
z-index: 100;

.prev,
.next {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 35px;
}

.prev {
left: 2rem;
}

.next {
right: 2rem;
}

.swiper-button-disabled {
opacity: 0.5;
}
}
}
32 changes: 32 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name":"moritz-sauer-13/contentelement",
"description": "Content Element",
"authors": [
{
"name":"Moritz Sauer",
"email": "[email protected]"
}
],
"require":{
"silverstripe/recipe-cms": "^4",
"xddesigners/silverstripe-events": "^0.1.7",
"tractorcow/silverstripe-colorpicker": "^4.1",
"axllent/silverstripe-scss": "^1.8",
"dnadesign/silverstripe-elemental": "^4",
"unclecheese/silverstripe-image-optionset": "^2.0",
"bummzack/sortablefile": "^2"
},
"autoload": {
"psr-4": {
"ContentElement\\": "src/"
}
},
"extra": {
"expose": [
"client/css",
"client/images",
"client/js",
"client/scss"
]
}
}
3 changes: 3 additions & 0 deletions lang/de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
de:
ContentElement:
READMORE: 'Mehr erfahren'
Loading

0 comments on commit ac3149a

Please sign in to comment.