Skip to content

Commit 5dd9afd

Browse files
committed
Work on Hero section
1 parent 610d0bd commit 5dd9afd

2 files changed

Lines changed: 105 additions & 1 deletion

File tree

tailwind/Example2/dist/index.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</head>
1010

1111
<body>
12+
<!-- NAV -->
1213
<nav class="relative container mx-auto p-3">
1314
<div class="flex items-center justify-between">
1415
<!-- Logo -->
@@ -22,8 +23,28 @@
2223
<a href="#" class="hover:text-darkGrayishBlue">Contact</a>
2324
</div>
2425
<a href="#" class="p-3 px-6 pt-2 text-white bg-brightRed rounded-full hover:bg-brightRedLight">Sign Up</a>
25-
2626
</div>
2727
</nav>
2828

29+
<!-- HERO -->
30+
<section id="hero">
31+
<div class="container flex felx-col-reverse items-center px-6 mx-auto mt-10 space-y-0 md:space-y:0 md:flex-row" >
32+
<div class="flex flex-col mb-32 space-y-12 md:w-1/2">
33+
<h1 class="max-w-md text-4xl font-bold text-center md:text-5xl ">
34+
Building Great Apps
35+
</h1>
36+
<p class="max-w-sm text-left text-darkGrayishBlue md:text-center">
37+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque aliquet varius accumsan.
38+
</p>
39+
<div class="flex justify-center md:justify-start">
40+
<a href="#" class="p-3 px-6 pt-2 text-white bg-brightRed rounded-full hover:bg-brightRedLight">Get Started</a>
41+
</div>
42+
</div>
43+
<div class="flex justify-center md:w-1/2">
44+
<img src="https://picsum.photos/id/42/200/300" alt="Image">
45+
</div>
46+
</div>
47+
48+
</section>
49+
2950
</html>

tailwind/Example2/dist/styles.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,14 @@ video {
591591
margin-right: auto;
592592
}
593593

594+
.mt-10 {
595+
margin-top: 2.5rem;
596+
}
597+
598+
.mb-32 {
599+
margin-bottom: 8rem;
600+
}
601+
594602
.flex {
595603
display: flex;
596604
}
@@ -599,10 +607,26 @@ video {
599607
display: none;
600608
}
601609

610+
.max-w-md {
611+
max-width: 28rem;
612+
}
613+
614+
.max-w-sm {
615+
max-width: 24rem;
616+
}
617+
618+
.flex-col {
619+
flex-direction: column;
620+
}
621+
602622
.items-center {
603623
align-items: center;
604624
}
605625

626+
.justify-center {
627+
justify-content: center;
628+
}
629+
606630
.justify-between {
607631
justify-content: space-between;
608632
}
@@ -619,6 +643,18 @@ video {
619643
margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
620644
}
621645

646+
.space-y-0 > :not([hidden]) ~ :not([hidden]) {
647+
--tw-space-y-reverse: 0;
648+
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
649+
margin-bottom: calc(0px * var(--tw-space-y-reverse));
650+
}
651+
652+
.space-y-12 > :not([hidden]) ~ :not([hidden]) {
653+
--tw-space-y-reverse: 0;
654+
margin-top: calc(3rem * calc(1 - var(--tw-space-y-reverse)));
655+
margin-bottom: calc(3rem * var(--tw-space-y-reverse));
656+
}
657+
622658
.rounded-full {
623659
border-radius: 9999px;
624660
}
@@ -663,11 +699,33 @@ video {
663699
padding-top: 0.5rem;
664700
}
665701

702+
.text-left {
703+
text-align: left;
704+
}
705+
706+
.text-center {
707+
text-align: center;
708+
}
709+
710+
.text-4xl {
711+
font-size: 2.25rem;
712+
line-height: 2.5rem;
713+
}
714+
715+
.font-bold {
716+
font-weight: 700;
717+
}
718+
666719
.text-white {
667720
--tw-text-opacity: 1;
668721
color: rgb(255 255 255 / var(--tw-text-opacity));
669722
}
670723

724+
.text-darkGrayishBlue {
725+
--tw-text-opacity: 1;
726+
color: hsl(227 12% 61% / var(--tw-text-opacity));
727+
}
728+
671729
.hover\:bg-brightRedLight:hover {
672730
--tw-bg-opacity: 1;
673731
background-color: hsl(12 88% 69% / var(--tw-bg-opacity));
@@ -686,4 +744,29 @@ video {
686744
.md\:flex {
687745
display: flex;
688746
}
747+
748+
.md\:w-1\/2 {
749+
width: 50%;
750+
}
751+
752+
.md\:flex-row {
753+
flex-direction: row;
754+
}
755+
756+
.md\:justify-start {
757+
justify-content: flex-start;
758+
}
759+
760+
.md\:text-left {
761+
text-align: left;
762+
}
763+
764+
.md\:text-center {
765+
text-align: center;
766+
}
767+
768+
.md\:text-5xl {
769+
font-size: 3rem;
770+
line-height: 1;
771+
}
689772
}

0 commit comments

Comments
 (0)