PUBLISH: Add favorite star
This commit is contained in:
parent
6488acfb56
commit
aba362a6d2
12 changed files with 70 additions and 24 deletions
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
favorite: false
|
||||
draft: true
|
||||
rating: 5
|
||||
imdb: 0.0
|
||||
|
|
|
|||
|
|
@ -56,6 +56,16 @@
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.card-favorite-star {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 20px;
|
||||
top: 20px;
|
||||
padding: 10px;
|
||||
background: rgba(255,255,255,0.25);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
.card-content {
|
||||
transition: none;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BMTI1NzQ5MzU1OV5BMl5BanBnXkFtZTcwNzExODU0MQ@@._V1_SX800.jpg alt="No Reservations" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -83,6 +84,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -116,6 +118,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -139,6 +142,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -172,6 +176,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BMTI1NzQ5MzU1OV5BMl5BanBnXkFtZTcwNzExODU0MQ@@._V1_SX800.jpg alt="No Reservations" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -195,6 +200,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -225,32 +231,10 @@
|
|||
</header>
|
||||
<div class="carasol">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
<h3 class="subtitle">The French Dispatch</h3>
|
||||
</header>
|
||||
<div style="text-align: justify;">Authors for a New Yorker-esque magazine report on a small town in France</div>
|
||||
<div class="cluster spacing:between">
|
||||
<div class="cluster s1 align:center">
|
||||
<img src="https://caalden.github.io/film/imdb-logo-small.png" class="icon" alt="imbd logo">
|
||||
<span class="numbers">7.2</span>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button" href="/film/reviews/the-french-dispatch/">
|
||||
Read review
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BMTI1NzQ5MzU1OV5BMl5BanBnXkFtZTcwNzExODU0MQ@@._V1_SX800.jpg alt="No Reservations" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -271,6 +255,30 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
<h3 class="subtitle">The French Dispatch</h3>
|
||||
</header>
|
||||
<div style="text-align: justify;">Authors for a New Yorker-esque magazine report on a small town in France</div>
|
||||
<div class="cluster spacing:between">
|
||||
<div class="cluster s1 align:center">
|
||||
<img src="https://caalden.github.io/film/imdb-logo-small.png" class="icon" alt="imbd logo">
|
||||
<span class="numbers">7.2</span>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button" href="/film/reviews/the-french-dispatch/">
|
||||
Read review
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BMTI1NzQ5MzU1OV5BMl5BanBnXkFtZTcwNzExODU0MQ@@._V1_SX800.jpg alt="No Reservations" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BYTM3ZTllNzItNTNmOS00NzJiLTg1MWMtMjMxNDc0NmJhODU5XkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX800.jpg alt="Kingsman: The Secret Service" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -107,6 +108,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BMTI1NzQ5MzU1OV5BMl5BanBnXkFtZTcwNzExODU0MQ@@._V1_SX800.jpg alt="No Reservations" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -128,6 +130,7 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src=https://m.media-amazon.com/images/M/MV5BNmQxZTNiODYtNzBhYy00MzVlLWJlN2UtNTc4YWZjMDIwMmEzXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX800.jpg alt="The French Dispatch" />
|
||||
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
<div class="card">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" class="card-image" src={{ .Params.image }} alt="{{- .Title -}}" />
|
||||
{{ if .Params.favorite }}
|
||||
<div class="card-favorite-star">
|
||||
{{ partial "star.html" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="card-content">
|
||||
<header>
|
||||
|
|
@ -14,7 +19,7 @@
|
|||
<div class="cluster spacing:between">
|
||||
<div class="cluster s1 align:center">
|
||||
<img src="{{site.BaseURL}}imdb-logo-small.png" class="icon" alt="imbd logo">
|
||||
<span class="numbers">{{- .Params.imdb -}}</span>
|
||||
<span class="numbers">{{- lang.NumFmt 1 .Params.imdb -}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button" href="{{ .RelPermalink }}">
|
||||
|
|
|
|||
1
layouts/partials/star.html
Normal file
1
layouts/partials/star.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="yellow" stroke="gold" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
|
||||
|
After Width: | Height: | Size: 334 B |
|
|
@ -56,6 +56,16 @@
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.card-favorite-star {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 20px;
|
||||
top: 20px;
|
||||
padding: 10px;
|
||||
background: rgba(255,255,255,0.25);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
.card-content {
|
||||
transition: none;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue