Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fixed: ordering of videos has been fixed at: /videos to show episodes in correct order #2084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Paulie-Aditya wants to merge 5 commits into git:gh-pages
base: gh-pages
Choose a base branch
Loading
from Paulie-Aditya:fix/video-order
Open
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
49 changes: 40 additions & 9 deletions assets/sass/layout.scss
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,48 @@ aside {
border: solid 1px var(--main-border);
@include border-radius(5px);

.two-column {
@include clearfix;

.column-left {
width: 47%;
float: left;
.video-grid {
padding: 1rem 0;

.video-thumbnails {
display: grid;
grid-template-columns: 1fr;
gap: 2rem;
list-style: none;
padding: 0;
margin: 0;

@media (min-width: 600px) {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
}

.column-right {
width: 47%;
float: right;
.video-card {
display: flex;
flex-direction: column;
text-decoration: none;
color: inherit;
height: 100%;
transition: transform 0.2s ease;

&:hover {
transform: translateY(-3px);
}

img {
width: 100%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We better also add box-sizing: border-box due to this.

height: auto;
aspect-ratio: 16/9;
object-fit: cover;
}

h4 {
margin: 0.75rem 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we do here:

&::before {
 content: counter(--video-index) ".";
 font-weight: normal;
}

And on .video-thumbnails li do counter-increment: --video--index;, we would have counters on the videos.

Image


.description {
margin-top: auto;
}
}
}

Expand Down
47 changes: 13 additions & 34 deletions layouts/shortcodes/videos.html
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,20 @@
{{ $dimensions = .Get "dimensions" }}
{{ end }}

<div class="two-column">
<div class="column-left">
<div class="video-grid">
<ul class="video-thumbnails">
{{ range $i, $video := $videos }}
{{ $group := mod $i 2 }}
{{ if eq $group 1 }}
<li>
<a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
<h4>
<a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
</h4>
<p class="description">
<strong>Length:</strong> {{ $video.Params.length }}
</p>
</li>
{{ end }}
{{ end }}
</ul>
</div>
<div class="column-right">
<ul class="video-thumbnails">
{{ range $i, $video := $videos }}
{{ $group := mod $i 2 }}
{{ if eq $group 0 }}
<li>
<a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
<h4>
<a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
</h4>
<p class="description">
<strong>Length:</strong> {{ $video.Params.length }}
</p>
</li>
{{ end }}
{{ range $video := $videos }}
<li>
<a href="{{ relURL "video" }}/{{ $video.Params.link }}" class="video-card">
<img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}>
<h4>
<span>{{ $video.Params.video_title }}</span>
</h4>
<p class="description">
<strong>Length:</strong> {{ $video.Params.length }}
</p>
</a>
</li>
{{ end }}
</ul>
</div>
</div>
Loading

AltStyle によって変換されたページ (->オリジナル) /