Skip to content

Commit

Permalink
[FEATURE] Use the new bootstrap 5 template from the extension t3docs/… (
Browse files Browse the repository at this point in the history
#177)

* [FEATURE] Use the new bootstrap 5 template from the extension t3docs/site-package

Releases: main

* Demonstrate the current step in a branch

Releases: main

* Replace wrong codesnippet
  • Loading branch information
linawolf authored Oct 5, 2024
1 parent 9939a9d commit 5d4a586
Show file tree
Hide file tree
Showing 24 changed files with 449 additions and 427 deletions.
29 changes: 13 additions & 16 deletions Documentation/CodeSnippets/Fluid/Header.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
:caption: EXT:site_package/Resources/Private/Templates/Partials/Header.html
:linenos:

<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<a class="navbar-brand" href="#">
<f:image src="{settings.mySitepackage.logo}" alt="{settings.mySitepackage.logo-alt}"/>
</a>
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarsExampleDefault"
aria-controls="navbarsExampleDefault"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<f:render partial="Navigation/Menu.html" arguments="{_all}"/>
<nav class="navbar navbar-expand-lg bg-body-tertiary mb-4">
<div class="container">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menuToggler" aria-controls="menuToggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="menuToggler">
<f:link.page pageUid="{site.rootPageId}" class="navbar-brand">
<f:image src="{settings.mySitepackage.logo}" alt="{settings.mySitepackage.logo-alt}" class="pe-3" />
{site.configuration.websiteTitle}
</f:link.page>

<f:render partial="Navigation/Menu" arguments="{_all}"/>
</div>
</div>
</nav>
16 changes: 11 additions & 5 deletions Documentation/CodeSnippets/Fluid/Layout.rst.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
.. Extracted from EXT:site_package/Resources/Private/Templates/Layouts/Default.html
.. Extracted from EXT:site_package/Resources/Private/Templates/Layouts/Layout.html
.. code-block:: html
:caption: EXT:site_package/Resources/Private/Templates/Layouts/Default.html
:caption: EXT:site_package/Resources/Private/Templates/Layouts/Layout.html
:linenos:

<f:render partial="Header" arguments="{_all}"/>
<f:render partial="Navigation/Breadcrumb" arguments="{_all}"/>
<f:render section="Main"/>
<f:asset.css identifier="bootstrap" href="EXT:site_package/Resources/Public/Libaries/bootstrap-5.3.3-dist/css/bootstrap.min.css" />
<f:asset.css identifier="main" href="EXT:site_package/Resources/Public/Css/main.css" />
<main>
<f:render partial="Header" arguments="{_all}"/>
<f:render section="Main"/>
<f:render partial="Footer" arguments="{_all}"/>
</main>
<f:asset.script identifier="bootstrap" src="EXT:site_package/Resources/Public/Libaries/bootstrap-5.3.3-dist/js/bootstrap.bundle.min.js" />
<f:asset.script identifier="main" src="EXT:site_package/Resources/Public/JavaScript/main.js" />
6 changes: 3 additions & 3 deletions Documentation/CodeSnippets/Fluid/Menu.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
:caption: EXT:site_package/Resources/Private/Templates/Partials/Navigation/Menu.html
:linenos:

<ul class="navbar-nav mr-auto">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<f:for each="{menu}" as="menuItem">
<li class="nav-item {f:if(condition: menuItem.active, then:'active')}">
<a class="nav-link"
<li class="nav-item">
<a class="nav-link {f:if(condition: menuItem.active, then:'active')}"
href="{menuItem.link}"
target="{menuItem.target}"
title="{menuItem.title}"
Expand Down
17 changes: 10 additions & 7 deletions Documentation/CodeSnippets/Fluid/PartialJumbotron.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
:caption: EXT:site_package/Resources/Private/Templates/Partials/Jumbotron.html
:linenos:

<div class="jumbotron">
<f:for each="{records}" as="record">
<div class="container">
<h1 class="display-3">{record.header}</h1>
<f:format.html>{record.bodytext}</f:format.html>
<f:for each="{records}" as="record">
<div class="container">
<div class="p-5 mb-4 bg-body-tertiary">
<div class="container-fluid py-5">
<h1 class="display-5 fw-bold">{record.header}</h1>
<p class="col-md-8 fs-4"><f:format.stripTags>{record.bodytext}</f:format.stripTags></p>
<button class="btn btn-dark btn-lg" role="button" href="#" id="exampleButton">Example button</button>
</div>
</div>
</f:for>
</div>
</div>
</f:for>
56 changes: 0 additions & 56 deletions Documentation/CodeSnippets/Fluid/StaticHtml.rst.txt

This file was deleted.

13 changes: 5 additions & 8 deletions Documentation/CodeSnippets/Fluid/TemplateDefault.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
:caption: EXT:site_package/Resources/Private/Templates/Pages/Default.html
:linenos:

<f:layout name="Default"/>
<f:layout name="Layout"/>
<f:section name="Main">

<main role="main">
<f:render partial="Jumbotron" arguments="{records: content.jumbotron.records}"/>
<f:render partial="Jumbotron" arguments="{records: content.jumbotron.records}"/>

<div class="container">
<f:render partial="Content" arguments="{records: content.main.records}"/>
</div>

</main>
<div class="container">
<f:render partial="Content" arguments="{records: content.main.records}"/>
</div>

</f:section>
27 changes: 0 additions & 27 deletions Documentation/CodeSnippets/Fluid/TemplateTwoColumns.rst.txt

This file was deleted.

This file was deleted.

18 changes: 2 additions & 16 deletions Documentation/CodeSnippets/codesnippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@
'caption' => 'EXT:site_package/Configuration/TypoScript/Setup/pageview.typoscript',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Configuration/TypoScript/Setup/Part2CssFileInclusion.typoscript',
'targetFileName' => 'TypoScript/Part2CssFileInclusion.rst.txt',
'caption' => 'EXT:site_package/Configuration/TypoScript/Setup/Part2CssFileInclusion.typoscript',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Configuration/TypoScript/Setup/Part4GlobalConfiguration.typoscript',
Expand Down Expand Up @@ -96,13 +89,6 @@
'caption' => 'EXT:site_package/Resources/Private/Templates/Pages/Default.html',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Pages/TwoColumns.html',
'targetFileName' => 'Fluid/TemplateTwoColumns.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/Templates/Pages/TwoColumns.html',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Partials/Jumbotron.html',
Expand All @@ -112,9 +98,9 @@
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Layouts/Default.html',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Layouts/Layout.html',
'targetFileName' => 'Fluid/Layout.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/Templates/Layouts/Default.html',
'caption' => 'EXT:site_package/Resources/Private/Templates/Layouts/Layout.html',
'showLineNumbers' => true
],
[
Expand Down
Loading

0 comments on commit 5d4a586

Please sign in to comment.