Skip to content

Instantly share code, notes, and snippets.

@peterbucher
Forked from jonnitto/Overwrite.fusion
Created September 7, 2016 16:44
Show Gist options
  • Save peterbucher/0dc446a8a7a7b37568966205ccc2a2bf to your computer and use it in GitHub Desktop.
Save peterbucher/0dc446a8a7a7b37568966205ccc2a2bf to your computer and use it in GitHub Desktop.

Revisions

  1. @jonnitto jonnitto revised this gist Jul 25, 2016. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions ShowContentDimensions.ts2
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    prototype(Theme:ShowContentDimensions) < prototype(TypoScript:Array) {
    prototype(Foo.Bar:ShowContentDimensions) < prototype(TYPO3.TypoScript:Array) {
    @context.dimensions = ${Configuration.setting('TYPO3.TYPO3CR.contentDimensions')}
    @context.targetLanguage = ${node.context.targetDimensions.language}
    @context.targetRegion = ${node.context.targetDimensions.region}
    @context.currentLanguage = ${node.dimensions.language[0]}
    @context.currentRegion = ${node.dimensions.region[0]}

    box = TypoScript:Array {
    box = TYPO3.TypoScript:Array {
    @context.labelLanguage = ${dimensions.language.presets[node.dimensions.language[0]].label}
    @context.labelRegion = ${dimensions.region.presets[node.dimensions.region[0]].label}
    @context.needLanguage = ${targetLanguage != currentLanguage ? true : false}
    @@ -21,9 +21,9 @@ prototype(Theme:ShowContentDimensions) < prototype(TypoScript:Array) {
    value = ${value}
    }

    prototype(Neos:Content) {
    prototype(Content) {
    @process.contentDimensions {
    expression = Theme:ShowContentDimensions
    expression = Foo.Bar:ShowContentDimensions
    @position = 'end'
    @if.isEnabled = ${node.context.inBackend}
    }
  2. @jonnitto jonnitto revised this gist Jul 9, 2016. No changes.
  3. @jonnitto jonnitto created this gist Jul 9, 2016.
    13 changes: 13 additions & 0 deletions ShowContentDimensions.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    .neos.content-dimensions-backend {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 5px 5px 8px;
    }
    .neos.content-dimensions-backend span {
    display: inline-block;
    padding: 0 10px;
    }
    .neos.content-dimensions-backend i {
    padding-right: 5px;
    }
    30 changes: 30 additions & 0 deletions ShowContentDimensions.ts2
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    prototype(Theme:ShowContentDimensions) < prototype(TypoScript:Array) {
    @context.dimensions = ${Configuration.setting('TYPO3.TYPO3CR.contentDimensions')}
    @context.targetLanguage = ${node.context.targetDimensions.language}
    @context.targetRegion = ${node.context.targetDimensions.region}
    @context.currentLanguage = ${node.dimensions.language[0]}
    @context.currentRegion = ${node.dimensions.region[0]}

    box = TypoScript:Array {
    @context.labelLanguage = ${dimensions.language.presets[node.dimensions.language[0]].label}
    @context.labelRegion = ${dimensions.region.presets[node.dimensions.region[0]].label}
    @context.needLanguage = ${targetLanguage != currentLanguage ? true : false}
    @context.needRegion = ${targetRegion != currentRegion ? true : false}
    divStart = '<div class="content-dimensions-backend neos">'
    language = ${' <span><i class="icon-language"></i>' + labelLanguage + '</span> '}
    [email protected] = ${needLanguage}
    region = ${' <span><i class="icon-globe"></i>' + labelRegion + '</span> '}
    [email protected] = ${needRegion}
    divEnd = '</div>'
    @if.needBox = ${needLanguage || needRegion}
    }
    value = ${value}
    }

    prototype(Neos:Content) {
    @process.contentDimensions {
    expression = Theme:ShowContentDimensions
    @position = 'end'
    @if.isEnabled = ${node.context.inBackend}
    }
    }