Skip to content

Commit

Permalink
[TASK] Add set support
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Oct 16, 2024
1 parent 879107d commit cc85356
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 59 deletions.
2 changes: 2 additions & 0 deletions Configuration/Sets/Base/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: syntax/base
label: 'Syntax'
37 changes: 37 additions & 0 deletions Configuration/Sets/Base/setup.typoscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
tt_content.syntax =< lib.contentElement
tt_content.syntax {
templateName = Syntax
templateRootPaths {
1 = EXT:syntax/Resources/Private/Templates/ContentElements/
}
partialRootPaths {
1 = EXT:syntax/Resources/Private/Partials/ContentElements/
}
layoutRootPaths {
1 = EXT:syntax/Resources/Private/Layouts/ContentElements/
}
settings {
syntax {
theme = {$plugin.tx_syntax.settings.theme}
plugins {
linenumbers = {$plugin.tx_syntax.settings.plugins.linenumbers}
}
}
}
}

page {
includeCSSLibs {
syntax_theme = EXT:syntax/Resources/Public/Css/prism{$plugin.tx_syntax.settings.theme}.min.css
syntax_plugins_linenumbers = EXT:syntax/Resources/Public/Css/prism-plugin-linenumbers.min.css
syntax_plugins_linenumbers.if.isTrue = {$plugin.tx_syntax.settings.plugins.linenumbers}
syntax_plugins_toolbar = EXT:syntax/Resources/Public/Css/prism-plugin-toolbar.min.css
}
includeJSFooter {
syntax_prism = EXT:syntax/Resources/Public/JavaScript/prism.min.js
syntax_plugins_linenumbers = EXT:syntax/Resources/Public/JavaScript/prism-plugin-linenumbers.min.js
syntax_plugins_linenumbers.if.isTrue = {$plugin.tx_syntax.settings.plugins.linenumbers}
syntax_plugins_showlanguage = EXT:syntax/Resources/Public/JavaScript/prism-plugin-showlanguage.min.js
syntax_plugins_toolbar = EXT:syntax/Resources/Public/JavaScript/prism-plugin-toolbar.min.js
}
}
35 changes: 0 additions & 35 deletions Configuration/TypoScript/ContentElement/Syntax.typoscript

This file was deleted.

25 changes: 1 addition & 24 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,24 +1 @@
###################################
#### CONTENT ELEMENT RENDERING ####
###################################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:syntax/Configuration/TypoScript/ContentElement/Syntax.typoscript">


##############
#### PAGE ####
##############
page {
includeCSSLibs {
syntax_theme = EXT:syntax/Resources/Public/Css/prism{$plugin.tx_syntax.settings.theme}.min.css
syntax_plugins_linenumbers = EXT:syntax/Resources/Public/Css/prism-plugin-linenumbers.min.css
syntax_plugins_linenumbers.if.isTrue = {$plugin.tx_syntax.settings.plugins.linenumbers}
syntax_plugins_toolbar = EXT:syntax/Resources/Public/Css/prism-plugin-toolbar.min.css
}
includeJSFooter {
syntax_prism = EXT:syntax/Resources/Public/JavaScript/prism.min.js
syntax_plugins_linenumbers = EXT:syntax/Resources/Public/JavaScript/prism-plugin-linenumbers.min.js
syntax_plugins_linenumbers.if.isTrue = {$plugin.tx_syntax.settings.plugins.linenumbers}
syntax_plugins_showlanguage = EXT:syntax/Resources/Public/JavaScript/prism-plugin-showlanguage.min.js
syntax_plugins_toolbar = EXT:syntax/Resources/Public/JavaScript/prism-plugin-toolbar.min.js
}
}
@import 'EXT:syntax/Configuration/Sets/Base/setup.typoscript'

0 comments on commit cc85356

Please sign in to comment.