summaryrefslogtreecommitdiff
path: root/src/components/widgets/ContactHeader.astro
blob: e3433b1fafece735cfbf9fdfac36a00795daffe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
// ContactHeader - A simple header component with phone number and social media links
// This is different from the main navigation Header component
import { Icon } from 'astro-icon/components';
import { SITE } from 'astrowind:config';

interface Link {
  text?: string;
  href?: string;
  ariaLabel?: string;
  icon?: string;
}

interface Links {
  text?: string;
  href?: string;
  links?: Array<Link>;
}

export interface ContactHeaderProps {
  links?: Array<Links>;
  actions?: Array<Link>;
  isSticky?: boolean;
  showRssFeed?: boolean;
  showToggleTheme?: boolean;
  position?: string;
}

const { isSticky = false } = Astro.props;
---

<header
  id="header"
  class="bg-black text-white py-2 px-4 relative z-50"
  {...isSticky ? { 'data-aw-sticky-header': '' } : {}}
>
  <div class="max-w-7xl mx-auto flex items-center justify-between">
    <div class="flex items-center space-x-2">
      <Icon name="tabler:phone" class="w-4 h-4" />
      <a href="tel:+48790209770" class="text-sm font-medium hover:text-gray-300 transition-colors cursor-pointer">
        +48 790-209-770
      </a>
    </div>
    {
      SITE.social && (SITE.social.facebook || SITE.social.instagram) && (
        <div class="flex items-center space-x-3">
          {SITE.social.facebook && (
            <a
              href={SITE.social.facebook}
              aria-label="Facebook"
              class="text-white hover:text-gray-300 transition-colors cursor-pointer"
              target="_blank"
              rel="noopener noreferrer"
            >
              <Icon name="tabler:brand-facebook" class="w-4 h-4" />
            </a>
          )}
          {SITE.social.instagram && (
            <a
              href={SITE.social.instagram}
              aria-label="Instagram"
              class="text-white hover:text-gray-300 transition-colors cursor-pointer"
              target="_blank"
              rel="noopener noreferrer"
            >
              <Icon name="tabler:brand-instagram" class="w-4 h-4" />
            </a>
          )}
        </div>
      )
    }
  </div>
</header>