feat: restyle unauthenticated screens #1103
|
@ -50,28 +50,28 @@ const motd = computed(() => store.state.config.motd)
|
|||
min-height: 60vh;
|
||||
display: flex;
|
||||
background-color: var(--white);
|
||||
konrad marked this conversation as resolved
Outdated
|
||||
border-radius: $radius;
|
||||
box-shadow: var(--shadow-md);
|
||||
overflow: hidden;
|
||||
konrad marked this conversation as resolved
Outdated
dpschen
commented
Use mobile first:
=> no need to reset the border-radius for mobile Use mobile first:
```scss
@media screen and (min-width: $desktop) {
border-radius: $radius;
}
```
=> no need to reset the border-radius for mobile
|
||||
|
||||
konrad marked this conversation as resolved
Outdated
dpschen
commented
Just checked this: The llama is so nice, it's too bad it's not visivle on mobile. How about adding a padding-bottom for mobile? Just checked this: The llama is so nice, it's too bad it's not visivle on mobile. How about adding a padding-bottom for mobile?
|
||||
@media screen and (max-width: $desktop) {
|
||||
border-radius: 0;
|
||||
@media screen and (min-width: $desktop) {
|
||||
border-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
.image {
|
||||
konrad marked this conversation as resolved
Outdated
dpschen
commented
Use mobile first:
Compress image and load with something like https://github.com/JonasKruckenberg/imagetools Use mobile first:
```scss
.image {
@media screen and (max-width: $tablet) {
display: none;
}
@media screen and (min-width: $tablet) {
width: 40%;
background: url('@/assets/no-auth-image.jpg') no-repeat bottom/cover;
position: relative;
}
@media screen and (min-width: $desktop) {
width: 60%;
}
}
```
Compress image and load with something like https://github.com/JonasKruckenberg/imagetools
konrad
commented
With the vite wrapper and use it for other images as well? > Compress image and load with something like https://github.com/JonasKruckenberg/imagetools
With the vite wrapper and use it for other images as well?
dpschen
commented
Yes. But maybe let's move this to a new issue. Yes. But maybe let's move this to a new issue.
konrad
commented
yeah I think we should. yeah I think we should.
|
||||
width: 60%;
|
||||
background: url('@/assets/no-auth-image.jpg') no-repeat bottom;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
|
||||
@media screen and (max-width: $desktop) {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $tablet) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: $tablet) {
|
||||
width: 40%;
|
||||
background: url('@/assets/no-auth-image.jpg') no-repeat bottom/cover;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media screen and (min-width: $desktop) {
|
||||
width: 60%;
|
||||
}
|
||||
konrad marked this conversation as resolved
dpschen
commented
Move these rules to the
Move media queries before If you change Move these rules to the `@media screen and (min-width: $tablet)` media query
=> makes it clearer that it just appies there.
```scss
width: 50%;
padding: 1rem;
display: flex;
flex-direction: column;
justify-content: flex-end;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .2);
z-index: 10;
}
> * {
z-index: 20;
}
```
Move media queries before `&::after` and `> *`
=> those are styling other elements
=> move styles together that style the same stuff
If you change `&::after` in `&::before` you can remove the z-index if you replace
`z-index: 20;` with `position: relative` (this creates a new [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).
=> less complexity with managing z-index.
konrad
commented
Done! Done!
|
||||
}
|
||||
|
||||
.overlay {
|
||||
|
|
Why overflow: hidden?
To prevent the background from overflowing in the (rounded) corners.