Timeline
A0021
Code With ACF Integration
HTML
<!-- A0021 -- Start ------------------------------>
<?php if (have_rows('a0021')) : ?>
<?php while (have_rows('a0021')) : the_row(); ?>
<section id="A0021">
<div class="wrapper-a0021">
<h1 class="header-a0021"><?php echo get_sub_field('header'); ?></h1>
<div class="timeline">
<?php while (have_rows('time_line')) : the_row(); ?>
<dl class="timeline--entry">
<dt class="timeline--entry__title"><?php echo get_sub_field('title'); ?></dt>
<dd class="timeline--entry__detail"><?php echo get_sub_field('text'); ?></dd>
</dl>
<?php endwhile; ?>
</div>
</div>
</section>
<?php endwhile; ?>
<?php endif; ?>
<!-- A0021 -- END ------------------------------>CSS
/* -- A0021 -- START ------------------------------ */
.wrapper-a0021 {
margin: 3.125em auto;
padding: 1em 5em 1em;
max-width: 1000px;
}
.header-a0021 {
color: #000;
font-family: "Open Sans", "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
text-align: center;
}
.timeline {
line-height: 1.5em;
font-size: 14px;
transition: all 0.4s ease;
position: relative;
counter-reset: section;
}
.timeline:before {
content: "";
width: 10px;
height: 100%;
background: #87ceeb;
position: absolute;
top: 0;
left: -3.313em;
border-radius: 40px 40px;
}
.timeline--entry {
position: relative;
background-color: #eeeeee;
}
.timeline--entry__title {
color: white;
background-color: #ec407a;
font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif;
font-weight: 300;
font-size: 1rem;
padding: 1em;
}
.timeline--entry__title:before {
content: "";
display: inline-block;
width: 1em;
height: 1em;
position: absolute;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
left: -1em;
border-right: 10px solid #ec407a;
}
.timeline--entry__detail {
background-color: #dddddd;
padding: 1em;
margin: 0;
}
.timeline--entry:before {
content: "";
font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
width: 3em;
height: 3em;
background-color: #87ceeb;
border: 0.2em solid white;
border-radius: 50%;
position: absolute;
counter-increment: section;
content: counter(section);
text-shadow: 0 1px 0 #424242;
left: -4.5em;
}
@supports (display: grid) {
@media (min-width: 768px) {
.timeline {
display: grid;
grid-gap: 4.75em;
grid-template-areas: ". entry1" "entry2 ." ". entry3" "entry4 ." ". entry5";
}
.timeline:before {
left: 49.5%;
}
.timeline--entry:nth-child(1) {
grid-area: entry1;
}
.timeline--entry:nth-child(2) {
grid-area: entry2;
}
.timeline--entry:nth-child(3) {
grid-area: entry3;
}
.timeline--entry:nth-child(4) {
grid-area: entry4;
}
.timeline--entry:nth-child(5) {
grid-area: entry5;
}
.timeline--entry:nth-of-type(odd):before {
left: -3.8em;
}
.timeline--entry:nth-of-type(even):not(:nth-of-type(odd)) .timeline--entry__title:before {
left: 100%;
border-left: 10px solid #ec407a;
border-right: 0;
}
.timeline--entry:nth-of-type(even):before {
left: 103%;
}
}
}
/* -- A0021 -- End ------------------------------ */Code Only (Without ACF Integration)
HTML
<section id="A0021">
<div class="wrapper-a0021">
<h1 class="header-a0021">Timeline</h1>
<div class="timeline">
<dl class="timeline--entry">
<dt class="timeline--entry__title">Title A</dt>
<dd class="timeline--entry__detail">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
</dd>
</dl>
<dl class="timeline--entry">
<dt class="timeline--entry__title">Title B</dt>
<dd class="timeline--entry__detail"> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
</dd>
</dl>
<dl class="timeline--entry">
<dt class="timeline--entry__title">Title C</dt>
<dd class="timeline--entry__detail">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
</dd>
</dl>
<dl class="timeline--entry">
<dt class="timeline--entry__title">Title D</dt>
<dd class="timeline--entry__detail">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
</dd>
</dl>
<dl class="timeline--entry">
<dt class="timeline--entry__title">Title D</dt>
<dd class="timeline--entry__detail">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
</dd>
</dl>
</div>
</div>
</section>CSS
/* -- A0021 -- START ------------------------------ */
.wrapper-a0021 {
margin: 3.125em auto;
padding: 1em 5em 1em;
max-width: 1000px;
}
.header-a0021 {
color: #000;
font-family: "Open Sans", "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
text-align: center;
}
.timeline {
line-height: 1.5em;
font-size: 14px;
transition: all 0.4s ease;
position: relative;
counter-reset: section;
}
.timeline:before {
content: "";
width: 10px;
height: 100%;
background: #87ceeb;
position: absolute;
top: 0;
left: -3.313em;
border-radius: 40px 40px;
}
.timeline--entry {
position: relative;
background-color: #eeeeee;
}
.timeline--entry__title {
color: white;
background-color: #ec407a;
font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif;
font-weight: 300;
font-size: 1rem;
padding: 1em;
}
.timeline--entry__title:before {
content: "";
display: inline-block;
width: 1em;
height: 1em;
position: absolute;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
left: -1em;
border-right: 10px solid #ec407a;
}
.timeline--entry__detail {
background-color: #dddddd;
padding: 1em;
margin: 0;
}
.timeline--entry:before {
content: "";
font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
width: 3em;
height: 3em;
background-color: #87ceeb;
border: 0.2em solid white;
border-radius: 50%;
position: absolute;
counter-increment: section;
content: counter(section);
text-shadow: 0 1px 0 #424242;
left: -4.5em;
}
@supports (display: grid) {
@media (min-width: 768px) {
.timeline {
display: grid;
grid-gap: 4.75em;
grid-template-areas: ". entry1" "entry2 ." ". entry3" "entry4 ." ". entry5";
}
.timeline:before {
left: 49.5%;
}
.timeline--entry:nth-child(1) {
grid-area: entry1;
}
.timeline--entry:nth-child(2) {
grid-area: entry2;
}
.timeline--entry:nth-child(3) {
grid-area: entry3;
}
.timeline--entry:nth-child(4) {
grid-area: entry4;
}
.timeline--entry:nth-child(5) {
grid-area: entry5;
}
.timeline--entry:nth-of-type(odd):before {
left: -3.8em;
}
.timeline--entry:nth-of-type(even):not(:nth-of-type(odd)) .timeline--entry__title:before {
left: 100%;
border-left: 10px solid #ec407a;
border-right: 0;
}
.timeline--entry:nth-of-type(even):before {
left: 103%;
}
}
}
/* -- A0021 -- End ------------------------------ */A0111
Code With ACF Integration
HTML
<!-- A0111 -- Start ------------------------------>
<?php if (have_rows('a0111')) : ?>
<?php while (have_rows('a0111')) : the_row(); ?>
<section id="A0111">
<div class="wrapper-a0111">
<h3 class="main-title-a0111"><?php echo get_sub_field('main_title'); ?></h3>
<h2 class="header-a0111"><?php echo get_sub_field('header'); ?></h2>
<div class="timeline">
<?php while (have_rows('time_line')) : the_row(); ?>
<dl class="timeline--entry">
<dt class="timeline--entry__icon"><img src="<?php echo get_sub_field('icon'); ?>"></dt>
<dt class="timeline--entry__title"><?php echo get_sub_field('title'); ?></dt>
<dd class="timeline--entry__detail"><?php echo get_sub_field('text'); ?></dd>
</dl>
<?php endwhile; ?>
</div>
</div>
</section>
<?php endwhile; ?>
<?php endif; ?>
<!-- A0111 -- END ------------------------------>
CSS
/* -- A0111 -- START ------------------------------ */
.wrapper-a0111 {
margin: 3.125em auto;
padding: 1em 5em 1em;
max-width: 1000px;
}
.header-a0111 {
color: #000;
font-family: "Open Sans", "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
text-align: center;
}
.main-title-a0111{
font-family: Scada;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 100%;
text-align: center;
margin-bottom: 15px;
color: #D72323;
}
.timeline--entry__icon{
padding: 25px 52px;
padding-bottom: 13px;
}
.timeline {
line-height: 1.5em;
font-size: 14px;
transition: all 0.4s ease;
position: relative;
counter-reset: section;
}
.timeline:before {
content: "";
width: 1px;
height: 100%;
background: #D72323;
position: absolute;
top: 0;
left: -3.313em;
border-radius: 0px 0px;
}
.timeline--entry {
padding: 10px;
position: relative;
background: #FFFFFF;
box-shadow: 0px 0px 13px 1px rgb(0 0 0 / 10%);
margin-top: -70px;
}
.timeline--entry__title {
font-family: Scada;
font-style: normal;
font-weight: normal;
font-size: 32px;
line-height: 100%;
color: #D72323;
margin-bottom: 12px;
}
.timeline--entry__detail {
margin: 0;
font-family: Yantramanav;
font-style: normal;
font-weight: normal;
font-size: 18px;
line-height: 100%;
color: #3A4750;
}
.timeline--entry:before {
margin-top: 60px;
content: "";
font-family: "Oswald", Georgia, Cambria, "Times New Roman", Times, serif;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
width: 0.5em;
height: 0.5em;
background-color: #f8f9fa;
border: 0.2em solid white;
border-radius: 50%;
position: absolute;
counter-increment: section;
content: "";
text-shadow: 0 1px 0 #424242;
left: -4.5em;
border: 1px solid #D72323;
}
.timeline--entry__detail b{
padding-top: 10px;
display: block;
}
@supports (display: grid) {
@media (min-width: 992px) {
.timeline {
margin-top: 130px;
display: grid;
grid-gap: 12.75em 4.75em;
grid-template-areas:
"entry1 ."
". entry2"
"entry3 ."
". entry4"
"entry5 .";
margin-bottom: 80px;
}
.timeline--entry {
margin-bottom: -80px;
}
.timeline:before {
left: 49.5%;
}
.timeline--entry:nth-child(1) {
grid-area: entry1;
float: right;
text-align: right;
}
.timeline--entry:nth-child(2) {
grid-area: entry2;
}
.timeline--entry:nth-child(3) {
grid-area: entry3;
float: right;
text-align: right;
}
.timeline--entry:nth-child(4) {
grid-area: entry4;
}
.timeline--entry:nth-child(5) {
grid-area: entry5;
float: right;
text-align: right;
}
.timeline--entry:nth-of-type(odd):before {
left: 106.2%;
}
.timeline--entry:nth-of-type(even):not(:nth-of-type(odd)) .timeline--entry__title:before {
left: 100%;
border-left: 10px solid #ec407a;
border-right: 0;
}
.timeline--entry:nth-of-type(even):before {
left: -3em;
}
}
}
@media (max-width: 992px) {
.timeline--entry {
margin-top: 0px;
}
.timeline:before {
content: "";
width: 1px;
height: 100%;
background: #D72323;
position: absolute;
top: 0;
left: -20px;
border-radius: 0px 0px;
}
.timeline--entry:before {
margin-left: 40px;
margin-top: 10px;
}
.wrapper-a0111 {
margin: 0px;
padding: 1em 20px 1em 40px;
max-width: 1000px;
}
}
/* -- A0111 -- End ------------------------------ */

