Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/Build/qs-6.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk authored Feb 8, 2024
2 parents 51b411b + fc230ee commit 7c196df
Show file tree
Hide file tree
Showing 18 changed files with 247 additions and 185 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: GruntComparison

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: './Build/package-lock.json'

- name: Install and run Grunt
working-directory: ./Build
run: |
npm install -g grunt-cli
npm audit fix
echo "Running `grunt less`"
grunt less
echo "Running `grunt terser`"
grunt terser
- name: Test for changes
working-directory: ./
run: |
git diff -- ./Resources/Public/
if [ -n "$(git status --porcelain -- ./Resources/Public/)" ]; then
echo "Changes detected in compiled files"
exit 1
else
echo "No changes detected in compiled files"
fi
2 changes: 1 addition & 1 deletion Configuration/RequestMiddlewares.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
return [
'frontend' => [
'dfgviewer/sru' => [
'target' => \Kitodo\Dlf\Middleware\SruMiddleware::class,
'target' => Slub\Dfgviewer\Middleware\SruMiddleware::class,
'after' => [
'typo3/cms-frontend/prepare-tsfe-rendering'
]
Expand Down
28 changes: 16 additions & 12 deletions Configuration/TypoScript/Plugins/kitodo.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ plugin.tx_dlf_tableofcontents {
menuConf {
expAll = 1
}
titleReplacements {
0 {
type = issue
fields = type,year
}
1 {
type = volume
fields = type,volume
}
}
}
}

Expand Down Expand Up @@ -164,7 +174,7 @@ plugin.tx_dlf_fulltexttool {
settings {
tools = fulltexttool
activateFullTextInitially = 0
fullTextScrollElement = html, body
fullTextScrollElement = #tx-dlf-fulltextselection
}
}

Expand All @@ -178,7 +188,8 @@ plugin.tx_dlf_imagemanipulationtool {
plugin.tx_dlf_pdfdownloadtool < plugin.tx_dlf_toolbox
plugin.tx_dlf_pdfdownloadtool {
settings {
tools = pdfdownloadtool
fileGrpsImageDownload = DEFAULT
tools = pdfdownloadtool,imagedownloadtool,fulltextdownloadtool
}
}

Expand All @@ -196,30 +207,23 @@ plugin.tx_dlf_audioplayer {
# newspaper navigation
# --------------------------------------------------------------------------------------------------------------------

[getDocumentType("{$config.storagePid}") == "ephemera" or getDocumentType("{$config.storagePid}") == "newspaper"]
[getDocumentType({$config.storagePid}) == "ephemera" or getDocumentType({$config.storagePid}) == "newspaper"]
page.10.variables {
isNewspaper = TEXT
isNewspaper.value = newspaper_anchor
}
[END]

[getDocumentType("{$config.storagePid}") == "year"]
[getDocumentType({$config.storagePid}) == "year"]
page.10.variables {
isNewspaper = TEXT
isNewspaper.value = newspaper_year
}
[END]

[getDocumentType("{$config.storagePid}") == "issue"]
[getDocumentType({$config.storagePid}) == "issue"]
page.10.variables {
isNewspaper = TEXT
isNewspaper.value = newspaper_issue
}
[END]

[getDocumentType("{$config.storagePid}") == "object"]
page.10.variables {
isObject3D = TEXT
isObject3D.value = object
}
[END]
1 change: 1 addition & 0 deletions Resources/Private/JavaScript/dfgviewerScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ $(document).ready(function() {

// add body class if any calendar is present
$('.tx-dfgviewer-newspaper-calendar').parents('body').addClass('calendar');
$('.tx-dfgviewer-newspaper-years').parents('body').addClass('calendar');

// Inject view switch functions for calendar/list view (initial show calendar)
$('.tx-dfgviewer-newspaper-calendar .calendar-list-selection a.select-calendar-view, .tx-dfgviewer-newspaper-calendar .calendar-view').addClass('active');
Expand Down
35 changes: 35 additions & 0 deletions Resources/Private/Less/components/controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
&.download-fulltext:before {
background-position: -280px -40px;
}
&.no-fulltext:before {
background-position: -280px -40px;
}
&.local-presentation:before {
background-position: -440px -80px;
}
Expand All @@ -137,9 +140,25 @@
&.persistence-page:before {
background-position: -320px -80px;
}
&.tx-dlf-tools-imagedownload:before {
background-position: -320px -40px;
}
&.tx-dlf-tools-imagedownload {
// override opacity from span
// because tx-dlf-tools-imagedownload is the only one here with span
opacity: 1;
// move over the empty space the hidden `::before` left:
a {
position: relative;
left: -40px;
}
}
}
span {
opacity: 0.5;
::before {
display: none;
}
}
}
}
Expand Down Expand Up @@ -940,3 +959,19 @@
color: black;
}
}

/* ==============[ hide page elements in calendar view ]====================================== */
body.dfgviewer.calendar {
.document-functions {
display: none;
}

.view-functions {
display: none;
}

.tx-dfgviewer-newspaper-calendar, .tx-dfgviewer-newspaper-years {
position: relative;
top: -80px;
}
}
78 changes: 77 additions & 1 deletion Resources/Private/Less/modules/gridview.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}


.tx-dlf-pagegrid .f3-widget-paginator {
.tx-dlf-pagegrid .pagination {
position: absolute;
bottom: 15px;
height: 1px;
Expand Down Expand Up @@ -139,6 +139,14 @@
display: none;
}
}
li.next, li.previous {
a,
a:first-child,
a:last-child {
width: 60px;
height: 30px;
}
}
}
@media screen and (min-width: @desktopViewportWidth) {
font-size: 18px;
Expand All @@ -149,5 +157,73 @@
width: 40px;
height: 40px;
}
li.next, li.previous {
a,
a:first-child,
a:last-child {
width: 90px;
height: 40px;
}
}
}
}

// Pagination Box
.tx-dlf-pagegrid ul.pagination {
position: absolute;
left: 25px;
right: 40px;
bottom: 12px;
padding-top: 8px;
opacity: .95;
background-color: @base-blue;
border-radius: 5px;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

// Pagination elements
.tx-dlf-pagegrid ul.pagination li {
display: inline-block;
text-align: center;
vertical-align: middle;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;
line-height: 1.4;
transform-origin: center bottom;
margin-right: 10px;
margin-bottom: 8px;
border: 1px solid @base-blue;
border-radius: 20px;
background-color: white;
width: 40px;
height: 40px;
}

.tx-dlf-pagegrid ul.pagination li span, .tx-dlf-pagegrid ul.pagination li a {
display: inline-block;
padding-left: 10px;
padding-right: 10px;
width: 100%;
padding-top: 8px;
padding-bottom: 8px;
}

// Pagination elements: previous and next
.tx-dlf-pagegrid ul.pagination li.previous, .tx-dlf-pagegrid ul.pagination li.next {
width: 140px;
height: 40px;
}

// Pagination elements: disabled
.tx-dlf-pagegrid ul.pagination li.disabled {
opacity: 0.4;
}

// Pagination elements: current
.tx-dlf-pagegrid ul.pagination li.current a {
color: white;
background-color: @light-blue;
border: 1px solid white;
border-radius: 20px;
}
52 changes: 52 additions & 0 deletions Resources/Private/Less/website/searchlist.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,58 @@
}
}
}

.pagination {
// Pagination elements
li {
display: inline-block;
text-align: center;
vertical-align: middle;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;
transform-origin: center bottom;
border: 1px solid @base-blue;
border-radius: 15px;
width: 40px;
height: 40px;
padding-left: 0px;
}

li::before {
display: none;
}

li span, li a {
display: inline-block;
padding-left: 10px;
padding-right: 10px;
width: 100%;
padding-top: 7px;
}

// Pagination elements: previous and next
li.previous, li.next {
width: 140px;
height: 40px;
}

// Pagination elements: disabled
li.disabled {
opacity: 0.3;
}

// Pagination elements: current
li.current a {
color: white;
background-color: @light-blue;
opacity: 0.5;
border: 1px solid @base-blue;
border-radius: 15px;
width: 40px;
height: 40px;
}
}
}
}
}
18 changes: 6 additions & 12 deletions Resources/Private/Partials/PageView.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@ <h2>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_newspapercalendar" />
</f:then>
<f:else>
<f:if condition="{isObject3D} == 'object'">
<f:then>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_view3d" />
</f:then>
<f:else>
<f:if condition="{isNewspaper} == 'newspaper_issue'">
<f:if condition="{isNewspaper} == 'newspaper_issue'">
<!-- it's a newspaper! -->
</f:if>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pageview" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_audioplayer" />
<div class="fulltext-container"><div id="tx-dlf-fulltextselection"></div></div>
</f:else>
</f:if>
</f:if>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pageview" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_audioplayer" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_view3d" />
<div class="fulltext-container"><div id="tx-dlf-fulltextselection"></div></div>
</f:else>
</f:if>
</f:else>
Expand Down
Loading

0 comments on commit 7c196df

Please sign in to comment.