Skip to content

Commit 610d0bd

Browse files
committed
Work on navigation menu
1 parent 91ec07d commit 610d0bd

3 files changed

Lines changed: 86 additions & 2 deletions

File tree

7.35 KB
Loading

tailwind/Example2/dist/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@
99
</head>
1010

1111
<body>
12-
<nav class="relative container mx-auto p-8">
13-
<div class="flex items-center justify-between">Logo</div>
12+
<nav class="relative container mx-auto p-3">
13+
<div class="flex items-center justify-between">
14+
<!-- Logo -->
15+
<img src="./img/logo.JPG" alt="Logo">
16+
<!-- menu items-->
17+
<div class="hidden md:flex space-x-6">
18+
<a href="#" class="hover:text-darkGrayishBlue">Pricing</a>
19+
<a href="#" class="hover:text-darkGrayishBlue">Services</a>
20+
<a href="#" class="hover:text-darkGrayishBlue">About Us</a>
21+
<a href="#" class="hover:text-darkGrayishBlue">Careers</a>
22+
<a href="#" class="hover:text-darkGrayishBlue">Contact</a>
23+
</div>
24+
<a href="#" class="p-3 px-6 pt-2 text-white bg-brightRed rounded-full hover:bg-brightRedLight">Sign Up</a>
25+
26+
</div>
1427
</nav>
1528

1629
</html>

tailwind/Example2/dist/styles.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,10 @@ video {
595595
display: flex;
596596
}
597597

598+
.hidden {
599+
display: none;
600+
}
601+
598602
.items-center {
599603
align-items: center;
600604
}
@@ -603,6 +607,22 @@ video {
603607
justify-content: space-between;
604608
}
605609

610+
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
611+
--tw-space-x-reverse: 0;
612+
margin-right: calc(1.5rem * var(--tw-space-x-reverse));
613+
margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
614+
}
615+
616+
.space-x-3 > :not([hidden]) ~ :not([hidden]) {
617+
--tw-space-x-reverse: 0;
618+
margin-right: calc(0.75rem * var(--tw-space-x-reverse));
619+
margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
620+
}
621+
622+
.rounded-full {
623+
border-radius: 9999px;
624+
}
625+
606626
.bg-blue-400 {
607627
--tw-bg-opacity: 1;
608628
background-color: rgb(96 165 250 / var(--tw-bg-opacity));
@@ -613,6 +633,57 @@ video {
613633
background-color: rgb(30 58 138 / var(--tw-bg-opacity));
614634
}
615635

636+
.bg-brightRed {
637+
--tw-bg-opacity: 1;
638+
background-color: hsl(12 88% 59% / var(--tw-bg-opacity));
639+
}
640+
616641
.p-8 {
617642
padding: 2rem;
618643
}
644+
645+
.p-4 {
646+
padding: 1rem;
647+
}
648+
649+
.p-2 {
650+
padding: 0.5rem;
651+
}
652+
653+
.p-3 {
654+
padding: 0.75rem;
655+
}
656+
657+
.px-6 {
658+
padding-left: 1.5rem;
659+
padding-right: 1.5rem;
660+
}
661+
662+
.pt-2 {
663+
padding-top: 0.5rem;
664+
}
665+
666+
.text-white {
667+
--tw-text-opacity: 1;
668+
color: rgb(255 255 255 / var(--tw-text-opacity));
669+
}
670+
671+
.hover\:bg-brightRedLight:hover {
672+
--tw-bg-opacity: 1;
673+
background-color: hsl(12 88% 69% / var(--tw-bg-opacity));
674+
}
675+
676+
.hover\:text-darkGrayishBlue:hover {
677+
--tw-text-opacity: 1;
678+
color: hsl(227 12% 61% / var(--tw-text-opacity));
679+
}
680+
681+
@media (min-width: 768px) {
682+
.md\:block {
683+
display: block;
684+
}
685+
686+
.md\:flex {
687+
display: flex;
688+
}
689+
}

0 commit comments

Comments
 (0)