Skip to content

Commit

Permalink
Merge pull request #27 from RealEskalate/sami.chatbot_btn_fix
Browse files Browse the repository at this point in the history
Sami.chatbot btn fix
  • Loading branch information
samuel161415 authored Jul 18, 2024
2 parents 84acfa9 + d14ffff commit c50e4b6
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 52 deletions.
4 changes: 2 additions & 2 deletions dist/hacks-website/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/hacks-website/main.73c9f3f133e72ebb.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/hacks-website/main.e974d8887455428e.js

This file was deleted.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/app/shared/header/header.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* banner.component.css */
.custom-banner {
box-shadow: 0 4px 6px rgba(128, 0, 128, 0.5); /* Purple shadow with blur */
}

.custom-button {
border-color: rgba(128, 0, 128, 0.8); /* Purple border */
box-shadow: 0 4px 6px rgba(128, 0, 128, 0.5); /* Purple shadow with blur */
}
78 changes: 36 additions & 42 deletions src/app/shared/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
> -->

<a
(click)="scrollToSection('workshop')"
class="text-sm max-xl:text-[0.75rem] cursor-pointer font-semibold leading-6 hover:text-indigo-600 nav-item {{
currentSection.toString() == 'workshop'
? 'text-indigo-600'
: 'text-gray-200'
}} "
>Workshop </a
>
(click)="scrollToSection('workshop')"
class="text-sm max-xl:text-[0.75rem] cursor-pointer font-semibold leading-6 hover:text-indigo-600 nav-item {{
currentSection.toString() == 'workshop'
? 'text-indigo-600'
: 'text-gray-200'
}} "
>Workshop
</a>
<a
(click)="scrollToSection('info')"
class="text-sm max-xl:text-[0.75rem] cursor-pointer font-semibold leading-6 hover:text-indigo-600 nav-item {{
Expand Down Expand Up @@ -148,24 +148,6 @@
/>
</svg>
</a>
<!-- <a
class="ml-3 text-gray-100 hover:text-indigo-600 mr-2"
target="_blank"
href="https://discord.gg/RdQtKFQZu4"
>
<svg
fill="white"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
class="w-4 h-4 sm:w-5 sm:h-5"
viewBox="0 0 24 24"
>
<path
d="M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"
/>
</svg>
</a> -->

<a
class="text-gray-100 hover:text-indigo-600 mr-2"
Expand Down Expand Up @@ -409,14 +391,22 @@
</div>
</nav>

<div class="bg-yellow-600 text-white text-center py-2 px-5 py-3 m-auto w-full fixed z-50 shadow-md ">
🎉 <strong>Thank You!</strong> 🎉
We’ve exceeded our last year's record! With <strong>4,928 participants from 48 countries</strong> 🌍, A2SV Hackathon 2024 is officially the largest hackathon in Africa! 🚀🎉
</div>
<div class="pt-10">

<div
class=" text-white bg-yellow-600 text-center w-full fixed z-50 shadow-md custom-banner"
>
<div class="flex justify-center items-center py-2 px-2 md:px-4">
<span class="text-left">
The registration has now ended and you can register for the waitlist:
</span>
<button
(click)="onShowMentorsModal()"
class="ml-3 text-sm rounded-full px-8 py-2 text-white transition-all border border-white cursor-pointer ease-out duration-300 hover:bg-gradient-to-r from-purple-700 to-pink-500 custom-button"
>
<span>Waitlist </span>
</button>
</div>
</div>

<div class="pt-10"></div>

<!-- Mobile menu, show/hide based on menu open state.-->
<div
Expand Down Expand Up @@ -474,14 +464,14 @@
>A2SV Interview Partners</a
> -->
<a
(click)="scrollToSection('workshop')"
class="text-sm max-xl:text-[0.75rem] cursor-pointer font-semibold leading-6 hover:text-indigo-600 nav-item {{
currentSection.toString() == 'workshop'
? 'text-indigo-600'
: 'text-gray-200'
}} "
>Workshop </a
>
(click)="scrollToSection('workshop')"
class="text-sm max-xl:text-[0.75rem] cursor-pointer font-semibold leading-6 hover:text-indigo-600 nav-item {{
currentSection.toString() == 'workshop'
? 'text-indigo-600'
: 'text-gray-200'
}} "
>Workshop
</a>
<a
(click)="scrollToSection('info'); toggleMenu()"
class="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-200 hover:bg-gray-800"
Expand Down Expand Up @@ -513,5 +503,9 @@
</div>
</div>


<app-mentors-registration
[registrationLink]="mentorsRegistrationLink"
[showModal]="showMentorsModal"
(closeModalEvent)="onHideModal()"
></app-mentors-registration>
</header>
55 changes: 49 additions & 6 deletions src/app/shared/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Component, Input, HostListener, ElementRef, Output, EventEmitter } from "@angular/core";
import {
Component,
Input,
HostListener,
ElementRef,
Output,
EventEmitter,
} from "@angular/core";
import { ModalService } from "src/app/modal.service";
import { RegisterService } from "src/app/services/register.service";
@Component({
Expand All @@ -10,10 +17,18 @@ export class HeaderComponent {
showMenu: boolean = false;
isModalOpenArray: boolean = false;
@Input() currentSection: string = "home";
constructor(private elRef: ElementRef, private modalService: ModalService, private registerService: RegisterService) {}

constructor(
private elRef: ElementRef,
private modalService: ModalService,
private registerService: RegisterService
) {}

showMentorsModal = false;
mentorsRegistrationLink = "https://a2sv.typeform.com/to/wHajkVvJ";
showModal: boolean = false;
dropdownVisible: boolean = false;
showGetInvolvedModal = true;
@Output() toggleChatEvent = new EventEmitter<boolean>();

toggleMenu() {
this.showMenu = !this.showMenu;
Expand All @@ -29,6 +44,32 @@ export class HeaderComponent {
this.registerService.showEligibility();
}

onShowMentorsModal() {
this.toggleChatEvent.emit(false);
this.showMentorsModal = true;
this.showGetInvolvedModal = false;

document.body.classList.add("overflow-hidden", "z-0");
document.getElementById("prizes")?.classList.add("z-0");
document.getElementById("prizes")?.classList.remove("z-40");
}


onHideModal() {
this.toggleChatEvent.emit(true)
this.showModal = false;
this.showGetInvolvedModal = true;
this.showMentorsModal = false;
document.body.classList.remove('overflow-hidden', 'z-0' )
document.getElementById('prizes')?.classList.remove('z-0')
document.getElementById('prizes')?.classList.add('z-40')
document.getElementById('partners')?.classList.remove('hidden')
document.getElementById('info')?.classList.remove('hidden')
document.getElementById('judges')?.classList.remove('hidden')
document.getElementById('eligibility')?.classList.remove('hidden')
document.getElementById('about-us')?.classList.remove('hidden')
document.getElementById('footer')?.classList.remove('hidden')
}


scrollToSection(sectionId: string): void {
Expand All @@ -44,10 +85,12 @@ export class HeaderComponent {
setActiveButton(buttonName: string, link: string) {
window.open(link, "_blank");
}
navigateToEligiblity(){
const shareModal = window.document.getElementById('register_modal') as HTMLDialogElement;
navigateToEligiblity() {
const shareModal = window.document.getElementById(
"register_modal"
) as HTMLDialogElement;
shareModal?.close();
this.scrollToSection('eligibility')
this.scrollToSection("eligibility");
}
toggleDropdown() {
this.dropdownVisible = !this.dropdownVisible;
Expand Down

0 comments on commit c50e4b6

Please sign in to comment.