feat(list): add list route
adds ability to see titles, names, and images lists closes https://github.com/zyachel/libremdb/issues/6
This commit is contained in:
31
src/styles/modules/components/list/images.module.scss
Normal file
31
src/styles/modules/components/list/images.module.scss
Normal file
@ -0,0 +1,31 @@
|
||||
@use '../../../abstracts' as helper;
|
||||
|
||||
.container {
|
||||
--min-width: 22rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--min-width), 1fr));
|
||||
|
||||
gap: var(--spacer-1);
|
||||
|
||||
@include helper.bp('bp-900') {
|
||||
--min-width: 18rem;
|
||||
}
|
||||
@include helper.bp('bp-700') {
|
||||
--min-width: 15rem;
|
||||
}
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
--min-width: 12rem;
|
||||
}
|
||||
}
|
||||
|
||||
.imgContainer {
|
||||
position: relative;
|
||||
|
||||
aspect-ratio: 2 / 3;
|
||||
}
|
||||
|
||||
.img {
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
18
src/styles/modules/components/list/meta.module.scss
Normal file
18
src/styles/modules/components/list/meta.module.scss
Normal file
@ -0,0 +1,18 @@
|
||||
.container {
|
||||
display: grid;
|
||||
gap: var(--spacer-1);
|
||||
}
|
||||
|
||||
.list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
& * + *::before {
|
||||
content: '\00b7';
|
||||
padding-inline: var(--spacer-0);
|
||||
font-weight: 900;
|
||||
line-height: 0;
|
||||
font-size: var(--fs-5);
|
||||
}
|
||||
}
|
86
src/styles/modules/components/list/names.module.scss
Normal file
86
src/styles/modules/components/list/names.module.scss
Normal file
@ -0,0 +1,86 @@
|
||||
@use '../../../abstracts' as helper;
|
||||
|
||||
|
||||
.names {
|
||||
display: grid;
|
||||
gap: var(--spacer-6);
|
||||
--min-width: 55rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--min-width), 1fr));
|
||||
|
||||
@include helper.bp('bp-700') {
|
||||
grid-template-columns: auto;
|
||||
gap: var(--spacer-5);
|
||||
}
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
gap: var(--spacer-3);
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
--image-dimension: 18rem;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: var(--image-dimension) auto;
|
||||
|
||||
@include helper.bp('bp-700') {
|
||||
--dimension: 15rem;
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: var(--image-dimension) auto;
|
||||
}
|
||||
}
|
||||
.imgContainer {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.img {
|
||||
object-fit: cover;
|
||||
object-position: center 25%; // most of the time, person's face is visible at 1/4 of height in a potrait image.
|
||||
}
|
||||
|
||||
.imgNA {
|
||||
width: 80%;
|
||||
fill: var(--clr-fill-muted);
|
||||
}
|
||||
|
||||
.info {
|
||||
display: grid;
|
||||
padding: var(--spacer-3);
|
||||
gap: var(--spacer-0);
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
padding: var(--spacer-1);
|
||||
}
|
||||
|
||||
& :empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: var(--fs-4);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
.basicInfo {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
|
||||
& * + ::before {
|
||||
content: '\00b7';
|
||||
padding-inline: var(--spacer-1);
|
||||
font-weight: 900;
|
||||
line-height: 0;
|
||||
font-size: var(--fs-5);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
18
src/styles/modules/components/list/pagination.module.scss
Normal file
18
src/styles/modules/components/list/pagination.module.scss
Normal file
@ -0,0 +1,18 @@
|
||||
.nav {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
|
||||
gap: var(--spacer-3);
|
||||
|
||||
[aria-hidden="true"] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
li {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
133
src/styles/modules/components/list/titles.module.scss
Normal file
133
src/styles/modules/components/list/titles.module.scss
Normal file
@ -0,0 +1,133 @@
|
||||
@use '../../../abstracts' as helper;
|
||||
|
||||
.titles {
|
||||
display: grid;
|
||||
gap: var(--spacer-6);
|
||||
--min-width: 55rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--min-width), 1fr));
|
||||
|
||||
@include helper.bp('bp-700') {
|
||||
grid-template-columns: auto;
|
||||
gap: var(--spacer-5);
|
||||
}
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
gap: var(--spacer-3);
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
--image-dimension: 18rem;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: var(--image-dimension) auto;
|
||||
|
||||
@include helper.bp('bp-700') {
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: var(--image-dimension) auto;
|
||||
}
|
||||
@include helper.bp('bp-450') {
|
||||
--image-dimension: 15rem;
|
||||
}
|
||||
}
|
||||
|
||||
.imgContainer {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.img {
|
||||
object-fit: cover;
|
||||
object-position: center 20%;
|
||||
}
|
||||
|
||||
.imgNA {
|
||||
width: 80%;
|
||||
fill: var(--clr-fill-muted);
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
padding: var(--spacer-3);
|
||||
gap: var(--spacer-0);
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
padding: var(--spacer-2);
|
||||
}
|
||||
|
||||
& :empty:not(svg, use, img) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.heading {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ratings {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacer-2);
|
||||
}
|
||||
|
||||
.rating {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
// place-content: center;
|
||||
|
||||
&__icon {
|
||||
--dim: 1.3em;
|
||||
fill: var(--clr-fill);
|
||||
height: var(--dim);
|
||||
width: var(--dim);
|
||||
max-width: initial;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: var(--fs-4);
|
||||
font-weight: var(--fw-medium);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__text {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 0.9em;
|
||||
color: var(--clr-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.basicInfo {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
|
||||
& * + ::before {
|
||||
content: '\00b7';
|
||||
padding-inline: var(--spacer-1);
|
||||
font-weight: 900;
|
||||
line-height: 0;
|
||||
font-size: var(--fs-5);
|
||||
}
|
||||
}
|
||||
|
||||
.plot {
|
||||
padding-block: var(--spacer-0);
|
||||
|
||||
span {
|
||||
font-weight: var(--fw-medium);
|
||||
}
|
||||
}
|
||||
|
||||
.otherInfo {
|
||||
list-style: none;
|
||||
|
||||
span {
|
||||
font-weight: var(--fw-medium);
|
||||
}
|
||||
}
|
19
src/styles/modules/pages/list/list.module.scss
Normal file
19
src/styles/modules/pages/list/list.module.scss
Normal file
@ -0,0 +1,19 @@
|
||||
@use '../../../abstracts' as helper;
|
||||
|
||||
.list {
|
||||
--doc-whitespace: var(--spacer-8);
|
||||
--comp-whitespace: var(--spacer-3);
|
||||
|
||||
display: grid;
|
||||
|
||||
gap: var(--doc-whitespace);
|
||||
padding: var(--doc-whitespace);
|
||||
|
||||
@include helper.bp('bp-700') {
|
||||
--doc-whitespace: var(--spacer-5);
|
||||
}
|
||||
|
||||
@include helper.bp('bp-450') {
|
||||
padding: var(--spacer-3);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user