Skip to content

Commit eefc663

Browse files
author
Salma Alam-Naylor
committed
Add support links
1 parent d754db7 commit eefc663

File tree

12 files changed

+147
-10
lines changed

12 files changed

+147
-10
lines changed

apps/fretonator-web/src/app/common/footer/footer.component.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h6 class="footer__creditsTitle">Fretonator is open source</h6>
2121
rel="nofollow noopener noreferrer"
2222
target="_blank"
2323
class="footer__creditsListItemLink"
24-
>Jim Drury</a
24+
>Jim Drury</a
2525
>
2626
- all things Angular
2727
</li>
@@ -31,7 +31,7 @@ <h6 class="footer__creditsTitle">Fretonator is open source</h6>
3131
rel="nofollow noopener noreferrer"
3232
target="_blank"
3333
class="footer__creditsListItemLink"
34-
>Elliot Brooks</a
34+
>Elliot Brooks</a
3535
>
3636
- audio playback
3737
</li>
@@ -41,7 +41,18 @@ <h6 class="footer__creditsTitle">Fretonator is open source</h6>
4141
href="https://github.com/ishythefishy/fretonator"
4242
rel="nofollow noopener noreferrer"
4343
target="_blank"
44-
>View on GitHub</a
45-
>
44+
>View on GitHub</a>
45+
46+
<a href="https://www.buymeacoffee.com/fretonator"
47+
rel="nofollow noopener noreferrer"
48+
target="_blank"
49+
class="footer__support">
50+
<span class="footer__support__svg">
51+
<app-coffee-svg></app-coffee-svg>
52+
</span>
53+
Buy me a coffee
54+
</a>
55+
4656
<p class="footer__copyright">&copy; {{ date | date: 'yyyy' }} Fretonator</p>
57+
4758
</footer>

apps/fretonator-web/src/app/common/footer/footer.component.scss

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,42 @@
4949
}
5050

5151
.footer__copyright {
52-
color: var(--offwhite);
52+
color: var(--grey);
5353
font-size: pxToRem(12);
5454
letter-spacing: var(--letter-spacing-display);
5555
font-weight: var(--font-weight-bold);
5656
text-transform: uppercase;
5757
display: block;
58+
margin-top: pxToRem($grid-unit * 4);
5859
margin-bottom: pxToRem($grid-unit * 2);
5960
}
6061

6162
.footer__viewGithub {
6263
@include hard_button_base();
6364
margin-bottom: pxToRem($grid-unit * 2);
6465
}
66+
67+
.footer__support {
68+
@include chip_button_base();
69+
margin-left: auto;
70+
margin-right: auto;
71+
display: flex;
72+
flex-direction: row;
73+
justify-content: center;
74+
align-items: center;
75+
background-color: var(--black);
76+
margin-top: pxToRem($grid-unit * 4);
77+
padding: pxToRem($grid-unit / 2) pxToRem($grid-unit * 2);
78+
color: var(--yellow);
79+
border-color: var(--yellow);
80+
81+
&:focus {
82+
border-color: transparent;
83+
}
84+
}
85+
86+
.footer__support__svg {
87+
height: pxToRem(24);
88+
width: pxToRem(24);
89+
display: inline-flex;
90+
}

apps/fretonator-web/src/app/common/footer/footer.module.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { FooterComponent } from './footer.component';
44
import { RouterModule } from '@angular/router';
5+
import { CoffeeModule } from '../svgs/coffee/coffee.module';
6+
import { CoffeeComponent } from '../svgs/coffee/coffee.component';
57

68
@NgModule({
79
declarations: [FooterComponent],
8-
imports: [CommonModule, RouterModule],
9-
exports: [FooterComponent],
10+
imports: [
11+
CommonModule,
12+
RouterModule,
13+
CoffeeModule,
14+
],
15+
exports: [
16+
FooterComponent,
17+
CoffeeComponent
18+
]
1019
})
11-
export class FooterModule {}
20+
export class FooterModule {
21+
}

apps/fretonator-web/src/app/common/fret-map/fret-map.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
NoteExtenderString,
1010
NoteObject,
1111
NoteSymbol,
12-
SimilarMode,
1312
SimilarModes
1413
} from '../../util/types';
1514
import {

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, Input } from '@angular/core';
2-
import { Mode, ModeMap, Scale } from '../../../util/types';
2+
import { Mode, ModeMap } from '../../../util/types';
33
import { NotePlaybackService } from '../../playback/note-playback.service';
44

55
enum ScaleDegreesToggleText {

apps/fretonator-web/src/app/common/header/__snapshots__/header.component.spec.ts.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ exports[`HeaderComponent should match snapshot 1`] = `
6666
About
6767
</a>
6868
</li>
69+
<li
70+
class="header__linksItem"
71+
>
72+
<a
73+
class="header__linksItemLink"
74+
href="https://www.buymeacoffee.com/fretonator"
75+
rel="nofollow noopener noreferrer"
76+
target="_blank"
77+
>
78+
Support
79+
</a>
80+
</li>
6981
</ul>
7082
</header>
7183
</app-header>

apps/fretonator-web/src/app/common/header/header.component.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,11 @@
3838
>About</a
3939
>
4040
</li>
41+
<li class="header__linksItem">
42+
<a href="https://www.buymeacoffee.com/fretonator"
43+
rel="nofollow noopener noreferrer"
44+
class="header__linksItemLink"
45+
target="_blank">Support</a>
46+
</li>
4147
</ul>
4248
</header>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 36" class="svg">
2+
<g fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">
3+
<g transform="translate(.56)">
4+
<path fill="#FF9100" d="M11.275 6.655l-8.739-.052 4.292 27.113h10.455l4.292-27.113z"/>
5+
<path fill="#FD0" d="M11.275 6.655l-8.739-.052 4.292 27.113H15.099L19.39 6.603z"/>
6+
<path fill="#FFF" d="M.039 6.603h22.55V4.102H.039z"/>
7+
<path stroke="#000" stroke-width="1.17" d="M.039 6.603h22.55V4.102H.039z"/>
8+
<path fill="#FFF" d="M18.22.039H4.253L2.614 3.79h17.244z"/>
9+
<g stroke-width="1.17" transform="translate(.936)">
10+
<path stroke="#050505" d="M17.283.039H3.316L1.678 3.79h17.244z"/>
11+
<path stroke="#000" d="M10.339 6.655l-10.3-.052 4.292 27.113h12.016l4.292-27.113z"/>
12+
</g>
13+
<path fill="#FFF" d="M21.887 14.26H.585l1.923 10.783 8.728-.094 8.728.094z"/>
14+
<path stroke="#000" stroke-width="1.17"
15+
d="M21.887 14.26H.585l1.923 10.783 8.728-.094 8.728.094z"/>
16+
</g>
17+
</g>
18+
</svg>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.svg {
2+
height: 100%;
3+
width: 100%;
4+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { CoffeeComponent } from './coffee.component';
4+
5+
describe('CoffeeComponent', () => {
6+
let component: CoffeeComponent;
7+
let fixture: ComponentFixture<CoffeeComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ CoffeeComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(CoffeeComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});

0 commit comments

Comments
 (0)