feat(tag): supports little screen
This commit is contained in:
parent
c79556fa85
commit
42edbe2732
4 changed files with 51 additions and 32 deletions
1
main.go
1
main.go
|
@ -79,6 +79,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if dev {
|
if dev {
|
||||||
|
slog.Info("Starting on http://localhost:8000/")
|
||||||
g.StartServer(":8000")
|
g.StartServer(":8000")
|
||||||
} else {
|
} else {
|
||||||
g.StartServer(":80")
|
g.StartServer(":80")
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
@use "../node_modules/reset-css/reset.css";
|
@use "../node_modules/reset-css/reset.css";
|
||||||
|
@use "tag";
|
||||||
$bp-mid: 1000px;
|
@import "vars";
|
||||||
$bp-little: 650px;
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--text-color: #000;
|
--text-color: #000;
|
||||||
|
@ -69,6 +68,9 @@ main {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
box-shadow: 0 0 70px 2px rgba(0,0,0,0.75);
|
box-shadow: 0 0 70px 2px rgba(0,0,0,0.75);
|
||||||
|
transition: .3s;
|
||||||
|
max-height: 75vh;
|
||||||
|
overflow: auto;
|
||||||
& h1, h2, h3 {
|
& h1, h2, h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +81,7 @@ main {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
max-height: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,35 +202,6 @@ h4 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
margin-top: 1rem;
|
|
||||||
column-gap: 2rem;
|
|
||||||
row-gap: 1rem;
|
|
||||||
& h4 {
|
|
||||||
//text-align: center;
|
|
||||||
}
|
|
||||||
& p {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
cursor: pointer;
|
|
||||||
& h4:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
&.active {
|
|
||||||
& h4 {
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
& p {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.credits-legal {
|
.credits-legal {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
|
|
42
scss/tag.scss
Normal file
42
scss/tag.scss
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
@import "vars";
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
margin-top: 1rem;
|
||||||
|
column-gap: 2rem;
|
||||||
|
row-gap: 1rem;
|
||||||
|
@media only screen and (max-width: $bp-little) {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
row-gap: 2rem;
|
||||||
|
}
|
||||||
|
& h4 {
|
||||||
|
@media only screen and (max-width: $bp-little) {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& p {
|
||||||
|
display: none;
|
||||||
|
@media only screen and (max-width: $bp-little) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
cursor: pointer;
|
||||||
|
@media only screen and (max-width: $bp-little) {
|
||||||
|
cursor: auto;
|
||||||
|
}
|
||||||
|
& h4:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
& h4 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
& p {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
scss/vars.scss
Normal file
2
scss/vars.scss
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
$bp-mid: 1000px;
|
||||||
|
$bp-little: 650px;
|
Loading…
Add table
Add a link
Reference in a new issue