first good looking code

This commit is contained in:
Christian Seyfferth 2020-12-05 00:53:45 +01:00
parent c8c10d4d45
commit 1fd53af165
16 changed files with 4823 additions and 95 deletions

View File

@ -1,5 +1,2 @@
// hello @import "Bootstrap/reboot";
@import "Bootstrap/bootstrap-grid.scss";
body {
background : black;
}

View File

@ -13,7 +13,7 @@ call_user_func(function()
*/ */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
$extensionKey, $extensionKey,
'Configuration/TsConfig/Page/All.tsconfig', 'Configuration/TSconfig/Page/All.tsconfig',
'Sitepackage' 'Sitepackage'
); );
}); });

View File

@ -1,7 +1,7 @@
# #
# PageTS for Sitepackage # PageTS for Sitepackage
# #
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/RTE.tsconfig"> <INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/RTE.tsconfig">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/TCEFORM.tsconfig"> <INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/TCEFORM.tsconfig">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/TCEMAIN.tsconfig"> <INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/TCEMAIN.tsconfig">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts.tsconfig"> <INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts.tsconfig">

View File

@ -1,4 +1,4 @@
# #
# BACKENDLAYOUTS # BACKENDLAYOUTS
# #
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts" extensions="tsconfig"> <INCLUDE_TYPOSCRIPT: source="DIR:EXT:sitepackage/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts" extensions="tsconfig">

View File

@ -0,0 +1,85 @@
# ###
# basic libs for page setup
# ###
# ###
# get page title (fallback to page)
# ###
lib.getHeadline = COA
lib.getHeadline {
wrap = <div id="headline">|</div>
# hide headline on specific pages
stdWrap.if.isInList.data = page:uid
stdWrap.if.value = {$site_package_base.content.getHeadline.hideOnPages}
stdWrap.if.negate = 1
10 < styles.content.get
10 {
# getting content of colPos = 3
select.where = colPos=3
stdWrap.ifEmpty.cObject = TEXT
stdWrap.ifEmpty.cObject {
data = page:title
wrap = <h1>|</h1>
}
}
20 = TEXT
20 {
data = page:subtitle
wrap = <p class="headline-subtitle">|</p>
required = 1
}
}
# get current sys_language
lib.getCurrentLanguage = COA
lib.getCurrentLanguage {
stdWrap.noTrimWrap = | lang-||
10 = TEXT
10 {
# @ToDo: this is currently not working
data = siteLanguage:twoLetterIsoCode
}
}
# test if current page is front page (= home)
lib.isFrontPage = COA
lib.isFrontPage {
10 = TEXT
10 {
# classes for !home
value = page
# classes for home
value.override = home
value.override.if {
equals.data = page:uid
value = {$sitepackage.website.rootUid}
}
noTrimWrap = | ||
}
20 < .10
20 {
# classes for !home
value = not-front-page
# classes for home
value.override = front-page
}
30 < .10
30 {
# classes for !home
value = singular
# classes for home
value.override = not-singular
}
}

View File

@ -20,3 +20,26 @@ page {
} }
} }
sitepackage {
website {
titleDelim = >
title = TYPO3-Template
rootUid = 1
}
navigation {
main {
levels = 3
}
breadcrumb {
hideOnPages =
}
meta {
uidList =
includeNotInMenu =
}
language {
languages =
}
}
}

View File

@ -0,0 +1,2 @@
EXT:fluid_styled_content/Configuration/TypoScript/,
EXT:content_elements/Configuration/TypoScript/

View File

@ -1,9 +1,24 @@
# ###
# LIB
# ###
@import 'EXT:sitepackage/Configuration/TypoScript/Libs/Libs.typoscript'
############## ##############
#### PAGE #### #### PAGE ####
############## ##############
page = PAGE
page { page {
typeNum = 0
# set new body tag
bodyTag >
bodyTagCObject =< lib.bodyTag
includeCSS { includeCSS {
theme = EXT:sitepackage/Resources/Public/Stylesheets/styles.css theme = EXT:sitepackage/Resources/Public/StyleSheets/styles.css
} }
includeJSLibs { includeJSLibs {
@ -25,7 +40,7 @@ page {
config { config {
# better page title, noPageTitle is not a good idea since most extensions add own title # better page title, noPageTitle is not a good idea since most extensions add own title
pageTitle { pageTitle {
noTrimWrap = || {$site_package_base.website.titleDelim} {$site_package_base.website.title}| noTrimWrap = || {$sitepackage.website.titleDelim} {$sitepackage.website.title}|
override.cObject = TEXT override.cObject = TEXT
override.cObject { override.cObject {
@ -40,4 +55,117 @@ page {
admPanel = 1 admPanel = 1
} }
10 = FLUIDTEMPLATE
10 {
# template names will be generated automatically by converting the applied
# backend_layout, there is no explicit mapping necessary anymore.
#
# example:
# subnavigation_right_2_columns -> SubnavigationRight2Columns.html
templateName = TEXT
templateName {
cObject = TEXT
cObject {
data = pagelayout
required = 1
case = uppercamelcase
split {
token = pagets__
cObjNum = 1
1.current = 1
}
}
ifEmpty = Default
}
layoutRootPaths {
10 = EXT:sitepackage/Resources/Private/Layouts/Page/
}
templateRootPaths {
10 = EXT:sitepackage/Resources/Private/Templates/Page/
}
partialRootPaths {
10 = EXT:sitepackage/Resources/Private/Partials/Page/
}
# can be accessed directly within the layouts/ templates/ partials via {settings.myVariable}
settings {
}
variables {
rootPage = TEXT
rootPage.data = leveluid:0
content < styles.content.get
main-content< styles.content.get
main-content.select.where = colPos=0
marginal-content < styles.content.get
marginal-content.select.where = colPos=1
footer-content < styles.content.get
footer-content.select.where = colPos=200
footer-content.slide = -1
# breadcrumbSingleRecordEntry is used to extend the breadcrumb path
# it allows us to display the title of a single record (like tx_news detail page)
breadcrumbSingleRecordEntry = COA
breadcrumbSingleRecordEntry {
}
}
# data processors for navigation
dataProcessing {
# main navigation
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
# right now, 3 levels are supported
levels = {$sitepackage.navigation.main.levels}
as = navigationMain
expandAll = 1
}
# breadcrumb
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
special = rootline
special.range = 0|-1
includeNotInMenu = 1
as = breadcrumb
if {
isInList.data = page:uid
value = {$sitepackage.navigation.breadcrumb.hideOnPages}
negate = 1
}
}
# meta navigation
30 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
30 {
special = {$sitepackage.navigation.meta.type}
special.value = {$sitepackage.navigation.meta.uidList}
includeNotInMenu = {$sitepackage.navigation.meta.includeNotInMenu}
as = navigationMeta
if {
isTrue = {$sitepackage.navigation.meta.uidList}
}
}
# language navigation
40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
40 {
languages = {$sitepackage.navigation.language.languages}
as = navigationLanguage
}
}
}
} }

View File

@ -0,0 +1,8 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div id="main">
<div class="container">
<f:render section="Main"/>
</div>
</div>
</html>

View File

@ -0,0 +1,32 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">
<div id="content" class="container">
<div class="row">
<f:if condition="{marginal-content}">
<f:then>
<article class="content col-12 col-md-8">
<f:cObject typoscriptObjectPath="lib.getHeadline" />
{main-content -> f:format.raw()}
</article>
<aside class="marginal col-12 col-md-4">
{marginal-content -> f:format.raw()}
</aside>
</f:then>
<f:else>
<article class="content col-12 col-md-8">
<f:cObject typoscriptObjectPath="lib.getHeadline" />
{main-content -> f:format.raw()}
</article>
</f:else>
</f:if>
</div>
</div>
<footer>
{footer-content -> f:format.raw()}
</footer>
</f:section>
</html>

View File

@ -1,22 +0,0 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">
<div class="container">
<div class="alert alert-info">
<dl>
<dt>Template file</dt>
<dd>
<code>typo3conf/ext/sitepackage/Resources/Private/Templates/Page/Example.html</code>
</dd>
<dt>Backend Configuration</dt>
<dd>
<code>typo3conf/ext/sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts/example.tsconfig</code>
</dd>
</dl>
</div>
</div>
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '0'}" />
</f:section>
</html>

View File

@ -0,0 +1,13 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default"/>
<f:section name="Main">
<article class="content">
<f:cObject typoscriptObjectPath="lib.getHeadline"/>
{main-content -> f:format.raw()}
</article>
<footer>
{footer-content -> f:format.raw()}
</footer>
</f:section>
</html>

View File

@ -1,64 +1,10 @@
/******/ (() => { // webpackBootstrap /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./StyleSheets/styles.scss":
/*!*********************************!*\ /*!*********************************!*\
!*** ./StyleSheets/styles.scss ***! !*** ./StyleSheets/styles.scss ***!
\*********************************/ \*********************************/
/*! namespace exports */ /*! namespace exports */
/*! exports [not provided] [no usage info] */ /*! exports [not provided] [no usage info] */
/*! runtime requirements: __webpack_require__.r, __webpack_exports__, __webpack_require__.* */ /*! runtime requirements: */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { throw new Error("Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):\nModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nSassError: Undefined variable.\n ╷\n29 │ -webkit-tap-highlight-color: rgba($black, 0); // 5\n │ ^^^^^^\n ╵\n StyleSheets/Bootstrap/_reboot.scss 29:37 @import\n StyleSheets/styles.scss 1:9 root stylesheet\n at processResult (/var/www/html/Packages/sitepackage/Build/node_modules/webpack/lib/NormalModule.js:583:19)\n at /var/www/html/Packages/sitepackage/Build/node_modules/webpack/lib/NormalModule.js:676:5\n at /var/www/html/Packages/sitepackage/Build/node_modules/loader-runner/lib/LoaderRunner.js:397:11\n at /var/www/html/Packages/sitepackage/Build/node_modules/loader-runner/lib/LoaderRunner.js:252:18\n at context.callback (/var/www/html/Packages/sitepackage/Build/node_modules/loader-runner/lib/LoaderRunner.js:124:13)\n at /var/www/html/Packages/sitepackage/Build/node_modules/sass-loader/dist/index.js:62:7\n at Function.call$2 (/var/www/html/Packages/sitepackage/Build/node_modules/sass/sass.dart.js:90547:16)\n at _render_closure1.call$2 (/var/www/html/Packages/sitepackage/Build/node_modules/sass/sass.dart.js:79617:12)\n at _RootZone.runBinary$3$3 (/var/www/html/Packages/sitepackage/Build/node_modules/sass/sass.dart.js:27035:18)\n at _FutureListener.handleError$1 (/var/www/html/Packages/sitepackage/Build/node_modules/sass/sass.dart.js:25563:19)");
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/ // startup
/******/ // Load entry module
/******/ __webpack_require__("./StyleSheets/styles.scss");
/******/ // This entry module used 'exports' so it can't be inlined
/******/ })() /******/ })()
; ;
//# sourceMappingURL=styles.js.map

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
body{background:#000}