Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PoTTii committed Feb 19, 2021
2 parents f84bedc + 4db588c commit 8b249b7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
24 changes: 22 additions & 2 deletions src/module/WidescreenMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export default class WidescreenMode {
this.displayBenisbar = Settings.get('WidescreenMode.settings.display_benisbar');
this.scrollMultiplicator = parseInt(Settings.get('WidescreenMode.settings.scroll_speed')) || 1;
this.displayBenisUntilTop = Settings.get("WidescreenMode.settings.display_benis_until_top");
this.biggerStreamNavIcons = Settings.get("WidescreenMode.settings.bigger_stream_nav_icons");
this.commentsLeft = Settings.get("WidescreenMode.settings.comments_left");
}


Expand Down Expand Up @@ -69,7 +71,6 @@ export default class WidescreenMode {
this.modifyLogo();
}


checkScoreDisplay() {
if (this.displayBenis) {
p.shouldShowScore = () => {
Expand All @@ -84,7 +85,7 @@ export default class WidescreenMode {
{
id: 'display_benis_until_top',
title: 'Benis bis beliebt anzeigen',
description: 'Zeigt an, wie viel Benis ungefähr bis beliebt fehlt. (Nur mit Benisbar möglich)'
description: 'Zeigt an, wie viel Benis ungefähr bis beliebt fehlt. (Nur mit Benisleiste möglich)'
},
{
id: 'display_benis',
Expand All @@ -106,12 +107,22 @@ export default class WidescreenMode {
title: 'Benisleiste anzeigen',
description: 'Zeigt die Benisverteilung als Leiste an.'
},
{
id: 'bigger_stream_nav_icons',
title: 'Post-Navigationslinks vergrößern',
description: 'Vergrößert die Links um zum nächsten/vorherigen Post zu kommen.'
},
{
id: 'scroll_speed',
title: 'Scrollgeschwindigkeit',
description: 'Definiere, wie schnell im Zoom gescrollt werden soll.',
type: 'number'
},
{
id: 'comments_left',
title: 'Kommentare auf der linken Seite',
description: 'Wenn deaktiviert werden Kommentare auf der rechten Seite des Bildschirms angezeigt.',
},
];
}

Expand Down Expand Up @@ -205,6 +216,15 @@ export default class WidescreenMode {

_this.addItemListener(this.$image, itemData);
document.body.classList.add('fixed');

if(_this.biggerStreamNavIcons) {
document.getElementsByClassName('stream-prev-icon')[0].classList.add('stream-prev-icon-xl');
document.getElementsByClassName('stream-next-icon')[0].classList.add('stream-next-icon-xl');
}

if(!_this.commentsLeft) {
document.getElementsByClassName('item-container-content')[0].classList.add('right');
}
},
remove: function () {
this.parent();
Expand Down
24 changes: 24 additions & 0 deletions src/style/widescreenMode.less
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,23 @@ body[class] {

.item-container-content {
display: flex;

&.right {
flex-direction: row-reverse;

.comments-switch {
transform: rotate(180deg);
}

.video-controls {
padding-left: 30px;
}

.stream-prev {
margin-left: 30px;
}
}

height: 100%;
width: 100%;

Expand Down Expand Up @@ -347,6 +364,13 @@ body[class] {
align-items: center;
justify-content: center;

.stream-prev-icon-xl,
.stream-next-icon-xl {
width: 8px;
min-height: 32px;
height: calc(100vh - 400px);
}

span:before {
opacity: .2;
font-size: 70px;
Expand Down
4 changes: 2 additions & 2 deletions src/template/streamItemComments.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="comment-count">
<div class="count"><span class="pict">c</span> {"Kommentar".inflect(commentCount)}</div>
<div class="comments-switch fa fa-chevron-right"></div>
<div class="comments-toggle fa fa-bars"></div>
<div class="comments-switch fa fa-chevron-right"></div>
<div class="comments-toggle fa fa-bars"></div>
</div>
<div class="comments-head">
<?js if( p.user.id ) {?>
Expand Down

0 comments on commit 8b249b7

Please sign in to comment.