Refactor CSS for experiences section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2023-08-04 08:02:29 +06:00
parent 6eb8bf43dd
commit 81cdb970fc
3 changed files with 119 additions and 218 deletions

View file

@ -1,24 +1,19 @@
.experiences-section { .experiences-section {
padding-bottom: 1rem; padding-bottom: 1rem;
.timeline { h1 > span {
margin-top: 1.5rem !important;
}
h1 > span{
margin-top: -55px; /* Size of fixed header */ margin-top: -55px; /* Size of fixed header */
padding-bottom:55px; padding-bottom: 55px;
display: block; display: block;
} }
ul { ul {
padding-left: 1rem; padding-left: 1rem;
} & > li {
ul > li {
margin-left: 0; margin-left: 0;
color: #3c4858; color: #3c4858;
} }
}
.designation { .designation {
font-weight: 600; font-weight: 600;
@ -33,139 +28,92 @@
z-index: 2; z-index: 2;
} }
.timeline .vertical-line { .timeline {
align-self: stretch; margin-top: 1.5rem !important;
}
.timeline .vertical-line::after { .vertical-line {
content: ""; align-self: stretch;
&::after {
content: '';
position: absolute; position: absolute;
border-left: 3px solid #248aaa; border-left: 3px solid #248aaa;
z-index: 1; z-index: 1;
height: 100%; height: 100%;
left: 50%; left: 50%;
} }
&:nth-child(even)::after {
.timeline .vertical-line:nth-child(even)::after {
left: calc(50% - 3px) !important; left: calc(50% - 3px) !important;
} }
}
.timeline .horizontal-line div { .horizontal-line {
div {
padding: 0; padding: 0;
height: 40px; height: 40px;
} }
hr {
.timeline .horizontal-line hr {
border-top: 3px solid #248aaa; border-top: 3px solid #248aaa;
margin: 0; margin: 0;
top: 17px; top: 17px;
position: relative; position: relative;
} }
.timeline-side-div {
.timeline .horizontal-line .timeline-side-div {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
} }
.corner {
.timeline .horizontal-line .corner {
border: 3px solid #248aaa; border: 3px solid #248aaa;
width: 100%; width: 100%;
position: relative; position: relative;
border-radius: 15px; border-radius: 15px;
} }
}
.timeline .row:nth-child(2n) div:nth-child(1) .corner { .row {
&:nth-child(2n) {
div {
&:nth-child(1) .corner {
left: 50%; left: 50%;
top: -50%; top: -50%;
} }
&:nth-child(3) .corner {
.timeline .row:nth-child(2n) div:nth-child(3) .corner {
left: -50%; left: -50%;
top: calc(50% - 3px); top: calc(50% - 3px);
} }
}
.timeline .row:nth-child(4n) div:nth-child(1) .corner { }
&:nth-child(4n) {
div {
&:nth-child(1) .corner {
left: 50%; left: 50%;
top: calc(50% - 3px); top: calc(50% - 3px);
} }
&:nth-child(3) .corner {
.timeline .row:nth-child(4n) div:nth-child(3) .corner {
left: -50%; left: -50%;
top: -50%; top: -50%;
} }
}
/* ============= Device specific fixes ======= */ }
}
/* Large screens such as TV */
@media only screen and (min-width: 1824px) {
} }
/* Extra large devices (large desktops, 1200px and up) */ @include media('<=medium') {
@media (max-width: 1400px) {
}
@media (max-width: 1200px) {
}
/* IPad Pro */
@media (max-width: 1024px) {
}
/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
}
/* Medium devices (tablets, 768px and up) */
@media only screen and (max-width: 768px) {
.container { .container {
max-width: 100%; max-width: 100%;
} }
} }
/* Small devices (landscape phones, 576px and up) */ @include media('<=small') {
.container {
@media only screen and (max-width: 576px) { padding-left: 0px;
padding-right: 0px;
} }
.timeline {
/* iPhoneX, iPhone 6,7,8 */ .vertical-line {
@media only screen and (max-width: 375px) { visibility: hidden;
.timeline .row:nth-child(4n) div:nth-child(3) .corner {
left: -55%;
top: -50%;
} }
.horizontal-line {
.timeline .row:nth-child(2n) div:nth-child(1) .corner { visibility: hidden;
left: 55%;
top: -50%;
} }
} }
/* Galaxy S5, Moto G4 */
@media only screen and (max-width: 360px) {
.timeline .row:nth-child(4n) div:nth-child(3) .corner {
left: -60%;
top: -50%;
}
.timeline .row:nth-child(2n) div:nth-child(1) .corner {
left: 60%;
top: -50%;
}
}
/* iPhone 5 or before */
@media only screen and (max-width: 320px) {
.timeline .row:nth-child(4n) div:nth-child(3) .corner {
left: -64%;
top: -50%;
}
.timeline .row:nth-child(2n) div:nth-child(1) .corner {
left: 64%;
top: -50%;
}
} }
} }

View file

@ -1,5 +1,10 @@
.skills-section { .skills-section {
.card .card-head { .card {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
height: 100%;
.card-head {
background-color: #f9fafc; background-color: #f9fafc;
height: -moz-fit-content; height: -moz-fit-content;
height: fit-content; height: fit-content;
@ -8,58 +13,23 @@
border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.125); border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.125);
} }
h1 > span{ .card-body {
margin-top: -55px; /* Size of fixed header */
padding-bottom:55px;
display: block;
}
.skill-card-link {
text-decoration: none;
}
.card .card-img-xs {
margin-right: 0.5rem;
margin-bottom: 0.75rem;
}
.card {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
height: 100%;
}
.card .card-body {
padding-top: 0.2rem; padding-top: 0.2rem;
padding-left: 0.7rem; padding-left: 0.7rem;
} }
.card-img-xs {
/* ============= Device specific fixes ======= */ margin-right: 0.5rem;
margin-bottom: 0.75rem;
/* Large screens such as TV */ }
@media only screen and (min-width: 1824px) {
} }
/* Extra large devices (large desktops, 1200px and up) */ h1 > span {
margin-top: -55px; /* Size of fixed header */
@media (max-width: 1400px) { padding-bottom: 55px;
display: block;
} }
@media (max-width: 1200px) { @include media('<=medium') {
}
/* IPad Pro */
@media (max-width: 1024px) {
}
/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
}
/* Medium devices (tablets, 768px and up) */
@media only screen and (max-width: 768px) {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
@ -67,21 +37,4 @@
max-width: 95%; max-width: 95%;
} }
} }
/* Small devices (landscape phones, 576px and up) */
@media only screen and (max-width: 576px) {
}
/* iPhoneX, iPhone 6,7,8 */
@media only screen and (max-width: 375px) {
}
/* Galaxy S5, Moto G4 */
@media only screen and (max-width: 360px) {
}
/* iPhone 5 or before */
@media only screen and (max-width: 320px) {
}
} }

View file

@ -1,5 +1,5 @@
<div class="col-xs-12 col-sm-6 col-lg-4 pt-2"> <div class="col-xs-12 col-sm-6 col-lg-4 pt-2">
<a class="skill-card-link" {{ if .url }}href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"{{ end }}> <a class="text-decoration-none" {{ if .url }}href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"{{ end }}>
<div class="card"> <div class="card">
<div class="card-head d-flex"> <div class="card-head d-flex">
{{ if .logo }} {{ if .logo }}