-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bc02301
Showing
8 changed files
with
853 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Sitegeist.PaperTrail:Content.StickyNote: | ||
ui: | ||
label: 'Sticky Note' | ||
icon: sticky-note | ||
inspector: | ||
groups: | ||
stickyNote: | ||
label: 'sticky note' | ||
tab: default | ||
icon: sticky-note | ||
|
||
superTypes: | ||
'Neos.Neos:Content': true | ||
properties: | ||
text: | ||
type: string | ||
ui: | ||
inlineEditable: true | ||
inline: | ||
editorOptions: | ||
placeholder: 'Enter note here...' | ||
autoparagraph: false | ||
formatting: | ||
strong: true | ||
em: true | ||
u: true | ||
del: true | ||
underline: true | ||
strikethrough: true | ||
removeFormat: true | ||
a: true | ||
color: | ||
type: string | ||
defaultValue: 'yellow' | ||
ui: | ||
label: 'Color' | ||
reloadIfChanged: true | ||
inspector: | ||
group: stickyNote | ||
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor' | ||
editorOptions: | ||
values: | ||
'yellow': | ||
label: 'yellow' | ||
'green': | ||
label: 'green' | ||
'orange' : | ||
label: 'orange' | ||
'pink' : | ||
label: 'pink' | ||
'blue' : | ||
label: 'blue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Neos: | ||
Neos: | ||
fusion: | ||
autoInclude: | ||
Sitegeist.PaperTrail: true |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Sitegeist.PaperTrail | ||
|
||
## Sticky notes for Neos CMS that can only be seen in the backend | ||
|
||
This allows editors to leave notes for colleagues, reviewers or their | ||
future self directly with the content. | ||
|
||
### Authors & Sponsors | ||
|
||
* Martin Ficzel - [email protected] | ||
|
||
*The development and the public-releases of this package is generously sponsored | ||
by our employer http://www.sitegeist.de.* | ||
|
||
## Installation | ||
|
||
Sitegeist.PaperTrail is available via packagist run `composer require sitegeist/papertrail`. | ||
We use semantic versioning so every breaking change will increase the major-version number. | ||
|
||
## Usage | ||
|
||
Create content elements "Sticky Note" and type your comment. | ||
|
||
## Contribution | ||
|
||
We will gladly accept contributions. Please send us pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
prototype(Sitegeist.PaperTrail:Component.StickyNote) < prototype(Neos.Fusion:Component) { | ||
|
||
identifier = ${node.identifier} | ||
text = '' | ||
color = 'yellow' | ||
|
||
|
||
renderer = Neos.Fusion:Component { | ||
@apply.props = ${props} | ||
|
||
hexColor = Neos.Fusion:Case { | ||
yellow { | ||
condition = ${props.color == 'yellow'} | ||
renderer = '#f9d10c' | ||
} | ||
|
||
green { | ||
condition = ${props.color == 'green'} | ||
renderer = '#d5e252' | ||
} | ||
|
||
orange { | ||
condition = ${props.color == 'orange'} | ||
renderer = '#fd9c45' | ||
} | ||
|
||
pink { | ||
condition = ${props.color == 'pink'} | ||
renderer = '#f05ea3' | ||
} | ||
|
||
blue { | ||
condition = ${props.color == 'blue'} | ||
renderer = '#579cf4' | ||
} | ||
|
||
default { | ||
condition = true | ||
renderer= '#f9d10c' | ||
} | ||
} | ||
|
||
css = ${' | ||
#note-' + props.identifier + ' { | ||
transform: rotate(-2.5deg); | ||
box-shadow: 0 0 10px rgba(0,0,0,.5); | ||
margin: 2em 0; | ||
padding: 2em; | ||
background: ' + this.hexColor + '; | ||
min-height: 5em;` | ||
color: black; | ||
} | ||
'} | ||
|
||
renderer = afx` | ||
<style>{props.css}</style> | ||
<div id={'note-' + props.identifier}>{props.text}</div> | ||
` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
prototype(Sitegeist.PaperTrail:Content.StickyNote) < prototype(Neos.Neos:ContentComponent) { | ||
|
||
renderer = Sitegeist.PaperTrail:Component.StickyNote { | ||
# ensure this is only visible in the backend | ||
@if.show = ${node.context.inBackend && node.context.currentRenderingMode.edit} | ||
|
||
identifier = ${node.identifier} | ||
|
||
text = Neos.Neos:Editable { | ||
property = 'text' | ||
block = false | ||
} | ||
|
||
color = ${q(node).property('color')} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include: **/*.fusion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"description": "Sticky Notes for Neos, only visible in the Backend", | ||
"type": "neos-package", | ||
"name": "sitegeist/papertrail", | ||
"license": "GPL-3.0-or-later", | ||
"require": { | ||
"neos/neos": "~5.0 || dev-master" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Sitegeist\\PaperTrail\\": "Classes/" | ||
} | ||
}, | ||
"extra": { | ||
"neos": { | ||
"package-key": "Sitegeist.PaperTrail" | ||
} | ||
} | ||
} |