terminar header, mal dibijado de la sombra en el menu de servicios especializados

This commit is contained in:
Kevin Muñoz 2024-05-15 14:45:34 -05:00
parent 2a5690f555
commit 1e692c97d9
No known key found for this signature in database
GPG Key ID: 3CA0B9DF1BE7CE09
6 changed files with 179 additions and 182 deletions

View File

@ -1,61 +0,0 @@
---
interface Props {
title: string;
body: string;
href: string;
}
const { href, title, body } = Astro.props;
---
<li class="link-card">
<a href={href}>
<h2>
{title}
<span>&rarr;</span>
</h2>
<p>
{body}
</p>
</a>
</li>
<style>
.link-card {
list-style: none;
display: flex;
padding: 1px;
background-color: #23262d;
background-image: none;
background-size: 400%;
border-radius: 7px;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: calc(1.5rem - 1px);
border-radius: 8px;
color: white;
background-color: #23262d;
opacity: 0.8;
}
h2 {
margin: 0;
font-size: 1.25rem;
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
p {
margin-top: 0.5rem;
margin-bottom: 0;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
background-image: var(--accent-gradient);
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent-light));
}
</style>

115
src/components/Header.astro Normal file
View File

@ -0,0 +1,115 @@
---
import { Image } from "astro:assets";
import LogoCondor from "../images/condorLogo.svg";
---
<header class="fixed w-screen bg-neutral-900 flex flex-col items-center">
<div class="h-28 w-full flex justify-between items-center px-32">
<div class="flex items-center">
<div
class="bg-white rounded-full p-2 flex w-16 h-16 items-center justify-center"
>
<Image src={LogoCondor} alt="logo condor" class="w-12" />
</div>
<div class="ml-4">
<div class="text-white text-xl font-semibold">
Condor Business Solutions
</div>
<div class="text-white text-sm">GROUP</div>
</div>
</div>
<div class="flex items-center space-x-8">
<nav class="flex space-x-8 text-white relative">
<a href="#inicio" class="hover:text-yellow-500">Inicio</a>
<a href="#quienes-somos" class="hover:text-yellow-500">Quiénes somos</a>
<div class="relative group">
<a
id="servicios-especializados-link"
href="#servicios-especializados"
class="hover:text-yellow-500">Servicios Especializados</a
>
<div
id="servicios-especializados-dropdown"
class="absolute hidden bg-neutral-900 text-white mt-2 py-2 rounded shadow-lg w-full"
>
<ul>
<li>
<a href="#servicio1" class="px-4 py-2 hover:bg-yellow-500"
>CiberSeguridad</a>
</li>
<li>
<a href="#servicio2" class="px-4 py-2 hover:bg-yellow-500"
>Minds</a>
</li>
<li>
<a href="#servicio3" class="px-4 py-2 hover:bg-yellow-500"
>MinOS</a>
</li>
<li>
<a href="#servicio4" class="px-4 py-2 hover:bg-yellow-500"
>Globalists</a>
</li>
</ul>
</div>
</div>
<a href="#blogs" class="hover:text-yellow-500">Blogs</a>
</nav>
<a
href="#contacto"
class="bg-yellow-500 text-black px-4 py-2 rounded hover:bg-yellow-600"
>Contacto</a
>
</div>
</div>
<div class="w-full bg-gray-300 py-2 flex justify-between items-center px-32">
<div class="text-gray-700 flex items-center">
<i class="nf nf-oct-mail"></i>
<span>contacto@condorbs.net</span>
</div>
<div class="flex space-x-4 text-gray-700">
<a href="#" class="hover:text-gray-900">
<i class="nf nf-fa-square_facebook"></i>
</a>
<a href="#" class="hover:text-gray-900">
<i class="nf nf-fa-linkedin_square"></i>
</a>
<a href="#" class="hover:text-gray-900">
<i class="nf nf-fa-whatsapp"></i>
</a>
</div>
</div>
</header>
<style>
@import url("https://www.nerdfonts.com/assets/css/webfont.css");
.absolute {
transition: opacity 1.5s ease-out;
}
.group:not(:hover) .absolute {
opacity: 0;
}
.group:hover .group-hover\:flex {
display: flex;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
const serviciosLink = document.getElementById(
"servicios-especializados-link"
);
const serviciosDropdown = document.getElementById(
"servicios-especializados-dropdown"
);
serviciosLink.addEventListener("click", function (event) {
event.preventDefault(); // Evitar el comportamiento por defecto del enlace
serviciosDropdown.classList.toggle("hidden"); // Alternar la visibilidad de la lista de entradas
});
});
</script>

BIN
src/images/condorLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

53
src/images/condorLogo.svg Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 906.00 1027.00">
<path fill="#1b1918" d="
M 0.59 0.00
L 4.86 0.00
Q 16.06 0.45 27.24 0.97
C 148.63 6.53 267.82 35.45 377.55 87.39
C 490.42 140.81 591.04 217.07 677.87 308.77
Q 703.41 335.73 724.29 360.67
Q 724.68 361.13 724.22 361.52
L 701.75 380.52
A 0.38 0.37 -40.2 0 1 701.22 380.48
C 623.46 288.22 531.83 207.81 428.73 148.56
Q 243.78 42.28 29.24 31.45
Q 14.64 30.71 0.00 30.25
L 0.00 23.93
L 0.59 0.00
Z"
/>
<path fill="#fdd938" d="
M 619.43 807.67
Q 567.93 777.75 520.45 741.60
Q 383.35 637.20 293.99 490.36
C 229.21 383.92 185.99 264.66 161.90 141.31
Q 161.80 140.81 162.29 140.71
L 191.25 134.96
A 0.31 0.31 0.0 0 1 191.61 135.20
C 211.79 237.12 244.75 335.87 292.74 426.58
Q 370.38 573.34 494.10 681.05
C 537.43 718.77 584.66 752.30 634.53 781.37
A 0.44 0.44 0.0 0 1 634.69 781.97
L 619.82 807.56
A 0.29 0.29 0.0 0 1 619.43 807.67
Z"
/>
<path fill="#9b9d9f" d="
M 207.99 1027.00
L 207.16 1027.00
L 203.57 997.31
Q 203.51 996.76 204.06 996.69
C 298.69 985.57 393.19 962.04 480.16 926.44
Q 644.33 859.24 768.07 737.35
Q 829.02 677.31 880.63 602.51
Q 880.94 602.07 881.39 602.37
L 905.48 618.83
Q 905.97 619.16 905.63 619.66
C 820.19 745.13 706.25 847.08 572.79 916.95
C 464.34 973.73 344.09 1009.10 221.99 1025.04
Q 214.99 1025.96 207.99 1027.00
Z"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,22 +1,24 @@
---
import Header from '../components/Header.astro';
interface Props {
description: string;
title: string;
}
const { title } = Astro.props;
const { description, title } = Astro.props;
---
<!doctype html>
<html lang="en">
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Astro description" />
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
<Header />
<slot />
</body>
</html>
@ -34,7 +36,7 @@ const { title } = Astro.props;
}
html {
font-family: system-ui, sans-serif;
background: #13151a;
background: #fff;
background-size: 224px;
}
code {

View File

@ -1,123 +1,11 @@
---
import Layout from '../layouts/Layout.astro';
import Card from '../components/Card.astro';
import Layout from "../layouts/Layout.astro";
---
<Layout title="Welcome to Astro.">
<main>
<svg
class="astro-a"
width="495"
height="623"
viewBox="0 0 495 623"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M167.19 364.254C83.4786 364.254 0 404.819 0 404.819C0 404.819 141.781 19.4876 142.087 18.7291C146.434 7.33701 153.027 0 162.289 0H332.441C341.703 0 348.574 7.33701 352.643 18.7291C352.92 19.5022 494.716 404.819 494.716 404.819C494.716 404.819 426.67 364.254 327.525 364.254L264.41 169.408C262.047 159.985 255.147 153.581 247.358 153.581C239.569 153.581 232.669 159.985 230.306 169.408L167.19 364.254ZM160.869 530.172C160.877 530.18 160.885 530.187 160.894 530.195L160.867 530.181C160.868 530.178 160.868 530.175 160.869 530.172ZM136.218 411.348C124.476 450.467 132.698 504.458 160.869 530.172C160.997 529.696 161.125 529.242 161.248 528.804C161.502 527.907 161.737 527.073 161.917 526.233C165.446 509.895 178.754 499.52 195.577 500.01C211.969 500.487 220.67 508.765 223.202 527.254C224.141 534.12 224.23 541.131 224.319 548.105C224.328 548.834 224.337 549.563 224.347 550.291C224.563 566.098 228.657 580.707 237.264 593.914C245.413 606.426 256.108 615.943 270.749 622.478C270.593 621.952 270.463 621.508 270.35 621.126C270.045 620.086 269.872 619.499 269.685 618.911C258.909 585.935 266.668 563.266 295.344 543.933C298.254 541.971 301.187 540.041 304.12 538.112C310.591 533.854 317.059 529.599 323.279 525.007C345.88 508.329 360.09 486.327 363.431 457.844C364.805 446.148 363.781 434.657 359.848 423.275C358.176 424.287 356.587 425.295 355.042 426.275C351.744 428.366 348.647 430.33 345.382 431.934C303.466 452.507 259.152 455.053 214.03 448.245C184.802 443.834 156.584 436.019 136.218 411.348Z"
fill="url(#paint0_linear_1805_24383)"></path>
<defs>
<linearGradient
id="paint0_linear_1805_24383"
x1="247.358"
y1="0"
x2="247.358"
y2="622.479"
gradientUnits="userSpaceOnUse"
>
<stop stop-opacity="0.9"></stop>
<stop offset="1" stop-opacity="0.2"></stop>
</linearGradient>
</defs>
</svg>
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
<p class="instructions">
To get started, open the directory <code>src/pages</code> in your project.<br />
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
</p>
<ul role="list" class="link-card-grid">
<Card
href="https://docs.astro.build/"
title="Documentation"
body="Learn how Astro works and explore the official API docs."
/>
<Card
href="https://astro.build/integrations/"
title="Integrations"
body="Supercharge your project with new frameworks and libraries."
/>
<Card
href="https://astro.build/themes/"
title="Themes"
body="Explore a galaxy of community-built starter themes."
/>
<Card
href="https://astro.build/chat/"
title="Community"
body="Come say hi to our amazing Discord community. ❤️"
/>
</ul>
</main>
<Layout title="Welcome to Condor Business Solutions." description="Description">
<main class="bg-white"></main>
</Layout>
<style>
main {
margin: auto;
padding: 1rem;
width: 800px;
max-width: calc(100% - 2rem);
color: white;
font-size: 20px;
line-height: 1.6;
}
.astro-a {
position: absolute;
top: -32px;
left: 50%;
transform: translatex(-50%);
width: 220px;
height: auto;
z-index: -1;
}
h1 {
font-size: 4rem;
font-weight: 700;
line-height: 1;
text-align: center;
margin-bottom: 1em;
}
.text-gradient {
background-image: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 400%;
background-position: 0%;
}
.instructions {
margin-bottom: 2rem;
border: 1px solid rgba(var(--accent-light), 25%);
background: linear-gradient(rgba(var(--accent-dark), 66%), rgba(var(--accent-dark), 33%));
padding: 1.5rem;
border-radius: 8px;
}
.instructions code {
font-size: 0.8em;
font-weight: bold;
background: rgba(var(--accent-light), 12%);
color: rgb(var(--accent-light));
border-radius: 4px;
padding: 0.3em 0.4em;
}
.instructions strong {
color: rgb(var(--accent-light));
}
.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
gap: 2rem;
padding: 0;
}
</style>