Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased](https://github.com/shift72/core-template/compare/1.9.29...HEAD)

### Added
- Playback progress bars on media items (config: "media_item_show_playback_progress")

### Changed
- Added CSS vars for playback progress. Reduce default size from 6px to 3px (affects TV episode sub-items)


## [1.9.29](https://github.com/shift72/core-template/compare/1.9.28...1.9.29)

### Added
Expand Down
2 changes: 1 addition & 1 deletion site/styles/_availability-tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ s72-availability-label {

.availability-state {
@extend .mb-0;
line-height: 18px;
line-height: 22px;
&::before {
content: none;
}
Expand Down
12 changes: 0 additions & 12 deletions site/styles/_meta-sub-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,6 @@
}
}

.s72-playback-progress,
.s72-playback-progress-bar {
height: 6px;
}

.s72-playback-progress {
background-color: rgba(var(--body-bg-rgb), 0.5);
}

.s72-playback-progress-bar {
background-color: var(--secondary);
}

s72-show-hide-switcher {
display: block;
Expand Down
18 changes: 18 additions & 0 deletions site/styles/_playback-progress.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
s72-playback-progress {
// on top of the availability label, below the hover
z-index: 99;
}

.s72-playback-progress,
.s72-playback-progress-bar {
height: var(--playback-progress-bar-height);
}

.s72-playback-progress {
background-color: rgba(var(--body-bg-rgb), 0.5);
}

.s72-playback-progress-bar {
background-color: var(--playback-progress-bar-color);
border-radius: 2px;
}
6 changes: 6 additions & 0 deletions site/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@

--poster-skeleton-background-color: #3335;

// Playback progress bar shown on meta item and sub-items
--playback-progress-bar-height: 3px;
--playback-progress-bar-color: var(--secondary);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secondary color is the button hover color and usually just a ligher version of their brand colour. might make more sense to use the primary but will see how it looks in practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was what the existing core-template styles were doing (for the tv sub-item styling). Switching it to the primary accent colour might be fine though. I figured making it a variable meant it'd be much easier to customise in shared template or the theming ui if needed.

--playback-progress-bar-bg-color: rgba(var(--body-bg-rgb), 0.5);


// Detail player
--page-detail-player-padding-top: 140px;
--page-detail-player-padding-top-lg: 200px;
Expand Down
1 change: 1 addition & 0 deletions site/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
@import '_meta-item-tagline';
@import '_meta-item-title';
@import '_availability-tags';
@import '_playback-progress';

@import '_collections';
@import '_slider';
Expand Down
8 changes: 6 additions & 2 deletions site/templates/items/meta_item.jet
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,18 @@
<can-be-watched-button data-slug="{{item.InnerItem.Slug}}" data-url="{{canBeWatchedLink}}" data-label="{{canBeWatchedText | i18n}}"></can-be-watched-button>
</s72-user-known>
{{end}}

{{if len(externalPurchaseButtonLink) > 0}}
<external-purchase-button data-slug="{{item.InnerItem.Slug}}" data-url="{{externalPurchaseButtonLink}}" data-label="{{externalPurchaseButtonText | i18n}}"></external-purchase-button>
{{end}}
</div>
</div>
<s72-userwishlist-button data-slug="{{item.Slug}}" class="btn-wishlist"></s72-userwishlist-button>
</div>

{{if config("media_item_show_playback_progress") == "true"}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured we already had two configs for media_item_... that affect how this stuff gets displayed so I may as well match that naming.

<s72-playback-progress data-slug={{item.Slug}}></s72-playback-progress>
{{end}}
{{end}}
</div>
</a>
Expand All @@ -107,4 +111,4 @@
{{if wrapper_class != ""}}
</div>
{{end}}
{{end}}
{{end}}