Skip to content

Commit

Permalink
feat(daffio): add sponsor link to nav and footer (#2599)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Nov 15, 2023
1 parent 5aec495 commit 80b8c9f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="daffio-simple-footer__grid">
<div class="daffio-simple-footer__menu">
<a routerLink="{{ link.path }}" *ngFor="let link of links" class="daffio-simple-footer__link">{{ link.title }}</a>
<a class="daffio-simple-footer__link" href="https://github.com/sponsors/graycoreio" target="_blank">Sponsor</a>
</div>
<a class="daffio-simple-footer__logo" routerLink="/">
<daff-branding-logo type="icon"></daff-branding-logo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,4 @@ describe('DaffioSimpleFooterComponent', () => {
expect(logo.componentInstance.type).toEqual('icon');
});
});

it('renders a menu link for every link defined', () => {
const footerLinks = fixture.debugElement.queryAll(By.css('.daffio-simple-footer__menu a'));

expect(footerLinks.length).toEqual(component.links.length);
});

it('renders a social link for every link defined', () => {
const socialLinks = fixture.debugElement.queryAll(By.css('.daffio-simple-footer__social a'));

expect(socialLinks.length).toEqual(component.links.length);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</a>
<daff-theme-switch-button theme-toggle></daff-theme-switch-button>
<a daffioHeaderItem routerLink="{{ link.path }}" *ngFor="let link of links">{{ link.title }}</a>
<a daffioHeaderItem href="https://github.com/sponsors/graycoreio" target="_blank">Sponsor</a>
<a daff-button color="theme-contrast" href="https://github.com/graycoreio/daffodil" rel="noopener noreferrer" target="_blank" quickstart-button>Get Started</a>
<button daff-icon-button color="theme-contrast" aria-label="Open Main Navigation Sidebar"
sidebar-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,4 @@ describe('DaffioHeaderContainer', () => {
expect(store.dispatch).toHaveBeenCalledWith(new ToggleSidebar());
});
});

it('renders a [daffioHeaderItemm] for every links defined', () => {
const headerItems = fixture.debugElement.queryAll(By.css('[daffioHeaderItem]'));

expect(headerItems.length).toEqual(daffioHeaderContainer.links.length);
});
});

0 comments on commit 80b8c9f

Please sign in to comment.