-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from danieljancar/develop
Minor Release
- Loading branch information
Showing
11 changed files
with
178 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
103 changes: 103 additions & 0 deletions
103
apps/frontend/src/app/shared/navigation/banner/news-banner.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
@if (!isDismissed) { | ||
<div | ||
class="relative isolate flex items-center gap-x-6 overflow-hidden bg-gray-50 px-6 py-2.5 sm:px-3.5 sm:before:flex-1" | ||
> | ||
<div | ||
class="absolute left-[max(-7rem,calc(50%-52rem))] top-1/2 -z-10 -translate-y-1/2 transform-gpu blur-2xl" | ||
aria-hidden="true" | ||
> | ||
<div | ||
class="aspect-[577/310] w-[36.0625rem] bg-gradient-to-r from-[#6760a2] to-[#655ae4] opacity-30" | ||
style=" | ||
clip-path: polygon( | ||
74.8% 41.9%, | ||
97.2% 73.2%, | ||
100% 34.9%, | ||
92.5% 0.4%, | ||
87.5% 0%, | ||
75% 28.6%, | ||
58.5% 54.6%, | ||
50.1% 56.8%, | ||
46.9% 44%, | ||
48.3% 17.4%, | ||
24.7% 53.9%, | ||
0% 27.9%, | ||
11.9% 74.2%, | ||
24.9% 54.1%, | ||
68.6% 100%, | ||
74.8% 41.9% | ||
); | ||
" | ||
></div> | ||
</div> | ||
<div | ||
class="absolute left-[max(45rem,calc(50%+8rem))] top-1/2 -z-10 -translate-y-1/2 transform-gpu blur-2xl" | ||
aria-hidden="true" | ||
> | ||
<div | ||
class="aspect-[577/310] w-[36.0625rem] bg-gradient-to-r from-[#655ae4] to-[#6760a2] opacity-30" | ||
style=" | ||
clip-path: polygon( | ||
74.8% 41.9%, | ||
97.2% 73.2%, | ||
100% 34.9%, | ||
92.5% 0.4%, | ||
87.5% 0%, | ||
75% 28.6%, | ||
58.5% 54.6%, | ||
50.1% 56.8%, | ||
46.9% 44%, | ||
48.3% 17.4%, | ||
24.7% 53.9%, | ||
0% 27.9%, | ||
11.9% 74.2%, | ||
24.9% 54.1%, | ||
68.6% 100%, | ||
74.8% 41.9% | ||
); | ||
" | ||
></div> | ||
</div> | ||
<p class="text-sm leading-6 text-gray-900"> | ||
<a | ||
href="https://dev.to/gr1ll/votevault-our-journey-from-a-lunchtime-idea-to-dapp-2opf" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
aria-label="Read our submission post for DEV Challenge!" | ||
aria-describedby="banner" | ||
> | ||
<strong class="font-semibold">DEV Challenge</strong> | ||
<svg | ||
viewBox="0 0 2 2" | ||
class="mx-2 inline h-0.5 w-0.5 fill-current" | ||
aria-hidden="true" | ||
> | ||
<circle cx="1" cy="1" r="1" /> | ||
</svg> | ||
See our submission post for VoteVault! <span aria-hidden="true" | ||
>→</span | ||
> | ||
</a> | ||
</p> | ||
<div class="flex flex-1 justify-end"> | ||
<button | ||
type="button" | ||
class="-m-3 p-3 focus-visible:outline-offset-[-4px]" | ||
(click)="dismiss()" | ||
> | ||
<span class="sr-only">Dismiss</span> | ||
<svg | ||
class="h-5 w-5 text-gray-900" | ||
viewBox="0 0 20 20" | ||
fill="currentColor" | ||
aria-hidden="true" | ||
> | ||
<path | ||
d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" | ||
/> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
apps/frontend/src/app/shared/navigation/banner/news-banner.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing' | ||
import { NewsBannerComponent } from './news-banner.component' | ||
|
||
describe('NewsBannerComponent', () => { | ||
let component: NewsBannerComponent | ||
let fixture: ComponentFixture<NewsBannerComponent> | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [NewsBannerComponent], | ||
}).compileComponents() | ||
|
||
fixture = TestBed.createComponent(NewsBannerComponent) | ||
component = fixture.componentInstance | ||
fixture.detectChanges() | ||
}) | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
25 changes: 25 additions & 0 deletions
25
apps/frontend/src/app/shared/navigation/banner/news-banner.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, OnInit } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
import { CookieService } from 'ngx-cookie-service' | ||
|
||
@Component({ | ||
selector: 'app-news-banner', | ||
standalone: true, | ||
imports: [CommonModule], | ||
templateUrl: './news-banner.component.html', | ||
styleUrl: './news-banner.component.css', | ||
}) | ||
export class NewsBannerComponent implements OnInit { | ||
protected isDismissed = false | ||
|
||
constructor(private cookieService: CookieService) {} | ||
|
||
ngOnInit() { | ||
this.isDismissed = this.cookieService.check('news-banner') | ||
} | ||
|
||
dismiss() { | ||
this.cookieService.set('news-banner', 'dismissed', 1) | ||
this.isDismissed = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters