From 4a647ea09aa6e7179349e9601239ab2eddff1e5c Mon Sep 17 00:00:00 2001 From: Filippos Karpouchtsis Date: Fri, 12 Apr 2024 12:35:58 +0100 Subject: [PATCH 1/2] [FIX] Remove Unnecessary Logout Button --- .../Private/Templates/Plugins/Felogin/Login/Logout.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/local_packages/psi/Resources/Private/Templates/Plugins/Felogin/Login/Logout.html b/local_packages/psi/Resources/Private/Templates/Plugins/Felogin/Login/Logout.html index 1c1d570..97b43cb 100644 --- a/local_packages/psi/Resources/Private/Templates/Plugins/Felogin/Login/Logout.html +++ b/local_packages/psi/Resources/Private/Templates/Plugins/Felogin/Login/Logout.html @@ -1,7 +1,5 @@ - -
From cecb7c2a4d91592b4a924fa88763ca1db47d3428 Mon Sep 17 00:00:00 2001 From: Filippos Karpouchtsis Date: Fri, 12 Apr 2024 15:09:43 +0100 Subject: [PATCH 2/2] [FEATURE] Add MenuSubpages ViewHelper & FE Template --- .../ViewHelpers/SubpagesViewHelper.php | 59 +++++++++++++++++++ .../Private/Language/es.locallang.xlf | 4 ++ .../Resources/Private/Language/locallang.xlf | 3 + .../Templates/Content/MenuSubpages.html | 42 ++++++++++++- .../psi/Resources/Public/Css/main.css | 35 ++++++++++- 5 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 local_packages/psi/Classes/ViewHelpers/SubpagesViewHelper.php diff --git a/local_packages/psi/Classes/ViewHelpers/SubpagesViewHelper.php b/local_packages/psi/Classes/ViewHelpers/SubpagesViewHelper.php new file mode 100644 index 0000000..9bbb01a --- /dev/null +++ b/local_packages/psi/Classes/ViewHelpers/SubpagesViewHelper.php @@ -0,0 +1,59 @@ +registerArgument('uid', 'int', 'the UID of the Page to Look for Subpages', true); + } + + /** + * @param array $arguments + * @param \Closure $renderChildrenClosure + * @param RenderingContextInterface $renderingContext + * @return string + */ + public static function renderStatic( + array $arguments, + \Closure $renderChildrenClosure, + RenderingContextInterface $renderingContext + ): array { + + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) + ->getQueryBuilderForTable('pages'); + $resultsArray = []; + $id = (int)$arguments['uid']; + + $results = $queryBuilder + ->select('*') + ->from('pages') + ->where( + $queryBuilder->expr()->eq( + 'pid', + $queryBuilder->createNamedParameter($id, Connection::PARAM_INT) + ) + ) + ->executeQuery(); + + while ($row = $results->fetchAssociative()) { + array_push($resultsArray, $row); + } + return $resultsArray; + } + +} diff --git a/local_packages/psi/Resources/Private/Language/es.locallang.xlf b/local_packages/psi/Resources/Private/Language/es.locallang.xlf index e2fc433..2105438 100644 --- a/local_packages/psi/Resources/Private/Language/es.locallang.xlf +++ b/local_packages/psi/Resources/Private/Language/es.locallang.xlf @@ -83,6 +83,10 @@ Download Descargar + + Read more + Sigue leyendo + diff --git a/local_packages/psi/Resources/Private/Language/locallang.xlf b/local_packages/psi/Resources/Private/Language/locallang.xlf index be9c29a..0989435 100644 --- a/local_packages/psi/Resources/Private/Language/locallang.xlf +++ b/local_packages/psi/Resources/Private/Language/locallang.xlf @@ -74,6 +74,9 @@ Download + + Read more + diff --git a/local_packages/psi/Resources/Private/Templates/Content/MenuSubpages.html b/local_packages/psi/Resources/Private/Templates/Content/MenuSubpages.html index 43124f4..6e20ed9 100644 --- a/local_packages/psi/Resources/Private/Templates/Content/MenuSubpages.html +++ b/local_packages/psi/Resources/Private/Templates/Content/MenuSubpages.html @@ -1 +1,41 @@ -{data.header} \ No newline at end of file +{namespace uzi=Jacuzzi\Psi\ViewHelpers} + + + + +
+
+
    + +
  • +
    + + +

    +
    +
    + + +

    {page.location}

    +
    +
    +
    +

    + {page.title} +

    + + + + + + + + +
  • +
    +
+
+
+
+
+ diff --git a/local_packages/psi/Resources/Public/Css/main.css b/local_packages/psi/Resources/Public/Css/main.css index d189b4d..cce4fc7 100644 --- a/local_packages/psi/Resources/Public/Css/main.css +++ b/local_packages/psi/Resources/Public/Css/main.css @@ -551,6 +551,7 @@ h5 { } .profile__image { + object-fit: cover; width: 200px; height: 200px; } @@ -921,19 +922,39 @@ h5 { padding: 30px; } -.downloads-wrap { +.latestnews-inner { + padding: 30px 0; +} + +.downloads-wrap, +.latestnews-wrap { align-items: center; display: flex; gap: 25px; } -.downloads-single { +.downloads-single, +.latestnews-single { background-color: #FFF; display: block; flex: 0 1 calc(100% / 2 - 25px); max-width: calc(100% / 2 - 25px); } +.latestnews-single-link { + align-items: center; + color: #000; + display: flex; + gap: 5px; + font-size: 18px; + font-weight: 700; + text-decoration: none; +} + +.latestnews-single-link svg { + max-width: 24px; +} + .downloads-single p { margin-bottom: 10px; } @@ -953,3 +974,13 @@ h5 { .download-cta { line-height: 24px; } + +.latestnews-single-header { + align-items: center; + display: flex; + gap: 15px; +} + +.latestnews-single-title { + padding: 15px 0; +}