aboutsummaryrefslogtreecommitdiff
path: root/web/style/nodecard.css
blob: 75546495a76d739308bb0020386d460ba91e37e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2023 metamuffin <metamuffin.org>
    Copyright (C) 2023 tpart
*/
.children {
    padding: 1em;
    padding-left: 3em;
    padding-right: 3em;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}
.children li {
    display: block;
}

.node.card {
    padding: 1em;
}

.node.card .poster,
.node.card .poster img {
    height: var(--card-size);
}
.node.card.aspect-port {
    width: calc(var(--card-size) / var(--port-poster-aspect));
}
.node.card.aspect-land {
    width: calc(var(--card-size) / var(--land-poster-aspect));
}
.node.card.aspect-thumb {
    width: calc(var(--card-size) / var(--land-thumb-aspect));
}
.node.card.aspect-square {
    width: calc(var(--card-size));
}

.node.card .poster a img {
    object-fit: cover;
    object-position: center;
    width: 100%;
}
.node.card .title {
    text-align: center;
    margin-top: 0.5em;
    text-align: center;
    text-overflow: ellipsis;
}
.node.card .title a {
    text-decoration-line: none;
}
.node.card .title a:hover {
    text-decoration-line: underline;
}
.node.card .poster {
    display: grid;
}
.node.card .poster a {
    grid-area: 1 / 1;
}

.node.card.poster .poster .cardhover.item {
    position: relative;
    pointer-events: none;
    grid-area: 1 / 1;
    transition: opacity 0.3s;
    background-color: var(--overlay-poster);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.node.card.poster .poster:hover .cardhover.item {
    opacity: 1;
}

.node.card.poster .poster a {
    overflow: hidden;
}

.node.card.poster .poster a img {
    transition: transform 0.3s;
}

.node.card.poster .poster:hover a img {
    transform: scale(1.1);
}

.node.card.poster .poster .cardhover.item a.play {
    text-decoration: none;
    width: 1em;
    height: 1em;
    line-height: 1;
    margin: auto;
    padding: 0.2em;
    border-radius: 50%;
    font-size: 2.2em;
    pointer-events: all;
    background-color: var(--overlay);
    transition: background-color 0.3s, font-size 0.3s;
}
.node.card.poster .poster .cardhover.item a.play:hover {
    background-color: var(--overlay-hover);
    font-size: 3em;
}
.node.card.poster .poster .cardhover.item .props {
    position: absolute;
    bottom: 0px;
    left: 0px;
}

@media (max-width: 750px) {
    nav .library {
        display: none;
    }
    .children {
        justify-content: center;
    }
}