0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-19 05:32:42 +00:00

i love grid template area

This commit is contained in:
Víctor Losada Hernández
2024-01-23 22:55:36 +01:00
parent 0dc1b46466
commit c50042c1e7

View File

@@ -1,6 +1,16 @@
body {
height: 100vh;
.content {
height: 100%;
}
}
.archivePage { .archivePage {
overflow-y: hidden;
height: 100%; height: 100%;
background-color: #2C3E50; background-color: #2C3E50;
.content { .content {
display: grid; display: grid;
grid-template-rows: 20vh 1fr; grid-template-rows: 20vh 1fr;
@@ -45,6 +55,7 @@
label { label {
margin-right: 10px; margin-right: 10px;
} }
input+button { input+button {
margin-left: 20px; margin-left: 20px;
} }
@@ -54,7 +65,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-left: 2px solid; border-left: 2px solid;
height:76.8vh; height: 100%;
.title { .title {
height: 100px; height: 100px;
@@ -75,7 +86,7 @@
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
min-height: 500px; min-height: 500px;
height:max-content; height: 100%;
padding: 50px; padding: 50px;
padding-bottom: unset; padding-bottom: unset;
@@ -86,36 +97,147 @@
display: flex; display: flex;
color: white; color: white;
background: #707070; background: #707070;
overflow: visible;
.text { .text {
min-height: unset; min-height: unset;
width: 20vw; width: 20vw;
padding-inline:10px;
display: grid;
align-content: center;
h2 {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
display:grid;
align-content:center;
h2 {
font-size: 20px; font-size: 20px;
font-weight: 900; font-weight: 900;
} }
} }
hr { hr {
display: none; display: none;
} }
.info { .info {
width: 100%; width: 100%;
display: grid; display: grid;
grid-template-columns: 3fr 1fr 70px 70px 150px 50px; grid-template-areas: "tags authors views pages update storage";
align-items:center; justify-content: end;
align-content: space-around;
grid-template-columns: 3fr 150px 70px 70px 200px 50px;
br { br {
display: none; display: none;
} }
&:not(:has(.brewTags)) { .brewTags{
grid-template-columns:3fr 70px 70px 150px 50px; display:inline-block;
grid-area: tags;
}
[title*="Authors:"] {
display:inline-block;
grid-area: authors;
}
[title*="Last"] {
display:inline-block;
grid-area: views;
}
[title*="Page"] {
display:inline-block;
grid-area: pages;
}
[title*="Created"] {
display:inline-block;
grid-area: update;
} }
[title*="Storage"] {
display:inline-block;
grid-area: storage;
filter:drop-shadow(0 0 10px white);
}
.brewTags {
padding-left: 10px;
}
.brewTags:has(span:nth-of-type(4)) {
position: relative;
overflow: hidden;
display: flex;
flex-wrap: wrap;
span:nth-of-type(n+2) {
display: none;
}
&:hover {
overflow: visible;
position: absolute;
top: 0;
background:#707070;
height: max-content;
z-index: 100;
width:min-content;
span:nth-of-type(n+4) {
display: block;
}
&:after {
position: absolute;
top: 48px;
right: 0;
left:0;
bottom:0;
content: '';
display: block;
height: calc(100% - 48px);
background: #707070;
border-inline: 1px solid gold;
border-bottom: 1px solid gold;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
z-index: -1;
}
}
}
}
.links {
opacity: 1;
background: none;
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
height: 100%;
width: 100px;
.editLink,
.deleteLink {
display: none;
}
>a {
opacity: .8;
&:hover {
opacity: 1;
}
}
.shareLink {
color: deepskyblue;
}
.downloadLink {
color: coral;
}
} }
} }
} }
@@ -124,11 +246,3 @@
} }
} }
} }