portfolio/src/pages/index.module.scss

86 lines
1.7 KiB
SCSS
Raw Normal View History

2018-04-03 22:35:53 +02:00
@import 'variables';
.projects {
2018-10-17 01:24:49 +02:00
display: grid;
grid-template-columns: 1fr;
2018-10-17 02:03:45 +02:00
grid-gap: $spacer * 3;
2018-10-17 01:24:49 +02:00
@media (min-width: $screen-md) {
grid-template-columns: 1fr 1fr;
2018-09-12 18:00:51 +02:00
max-width: calc(#{$projectImageMaxWidth} + #{$spacer * 2});
margin: 0 auto;
2018-10-17 01:24:49 +02:00
padding: $spacer $spacer * 3;
}
}
2018-09-20 18:33:32 +02:00
.title {
font-size: $font-size-h4;
opacity: 0;
position: absolute;
2018-09-21 22:01:48 +02:00
top: 15%;
2018-09-20 18:33:32 +02:00
left: 0;
margin: 0;
z-index: 2;
padding: $spacer / 3 $spacer;
2019-11-09 19:59:10 +01:00
background: rgba($brand-cyan, 0.9);
2018-09-21 22:01:48 +02:00
transform: translate3d(0, -1rem, 0);
2019-11-09 19:59:10 +01:00
transition: transform 0.2s ease-out;
2018-09-20 18:33:32 +02:00
}
2018-06-11 19:48:38 +02:00
.project {
position: relative;
2018-04-03 22:35:53 +02:00
2018-05-04 14:00:21 +02:00
a {
display: block;
position: relative;
2018-04-03 22:35:53 +02:00
&::after {
2018-05-04 14:00:21 +02:00
content: '';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
background: transparent;
2019-11-09 19:59:10 +01:00
transition: background 0.2s ease-out;
2018-05-04 14:00:21 +02:00
}
&:hover,
&:focus {
&::after {
2019-11-09 19:59:10 +01:00
background: rgba($brand-cyan, 0.05);
2018-05-04 14:00:21 +02:00
}
2018-09-20 18:33:32 +02:00
.title {
opacity: 1;
2018-09-21 22:01:48 +02:00
color: #fff;
2018-09-20 18:33:32 +02:00
transform: translate3d(0, 0, 0);
}
2018-11-24 17:36:16 +01:00
.imageCount {
opacity: 1;
transform: translate3d(0, 0, 0);
}
2018-04-03 22:35:53 +02:00
}
}
}
.imageCount {
position: absolute;
2019-11-12 22:20:34 +01:00
bottom: 5%;
right: 2%;
color: $brand-cyan;
2019-04-14 20:01:09 +02:00
font-size: $font-size-small;
2018-11-24 17:36:16 +01:00
z-index: 10;
opacity: 0;
transform: translate3d(0, $spacer / 2, 0);
2019-11-09 19:59:10 +01:00
transition: transform 0.25s ease-out;
svg {
2019-11-12 22:20:34 +01:00
fill: currentColor;
width: $font-size-base;
height: $font-size-base;
}
}