-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
208 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../../templates/components/es-footer/es-contributions'; | ||
import { contributorLinks } from '../../constants/es-footer'; | ||
import Component from 'sparkles-component'; | ||
|
||
export default Component.extend({ | ||
classNames: ['footer-contributions'], | ||
layout, | ||
contributorLinks | ||
}); | ||
export default class EsContributinos extends Component { | ||
|
||
} |
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 |
---|---|---|
@@ -1,19 +1,5 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../../templates/components/es-footer/es-info'; | ||
import { computed } from '@ember/object'; | ||
import { infoLinks } from '../../constants/es-footer'; | ||
import Component from 'sparkles-component'; | ||
|
||
export default class EsContributions extends Component { | ||
|
||
export default Component.extend({ | ||
classNames: ['footer-info'], | ||
layout, | ||
infoLinks, | ||
infoLinksLastIndex: computed('infoLinks.length', function() { | ||
return this.infoLinks.length - 1; | ||
}), | ||
|
||
init() { | ||
this._super(...arguments); | ||
this.currentYear = new Date().getUTCFullYear(); | ||
}, | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../../templates/components/es-footer/es-statement'; | ||
import { tagline, socialLinks } from '../../constants/es-footer'; | ||
import Component from 'sparkles-component'; | ||
|
||
export default Component.extend({ | ||
classNames: ['footer-statement'], | ||
layout, | ||
tagline, | ||
socialLinks | ||
}); | ||
export default class EsStatement extends Component { | ||
constructor() { | ||
super(...arguments) | ||
|
||
this.currentYear = new Date().getUTCFullYear(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* .es-footer.container { | ||
padding: 0; | ||
} */ | ||
|
||
.es-footer { | ||
& a { | ||
text-decoration: none; | ||
color: var(--color-dark); | ||
} | ||
|
||
& .footer-info { | ||
display: flex; | ||
padding: var(--spacing-2) 0; | ||
|
||
& .footer-logo { | ||
height: 5rem; | ||
} | ||
} | ||
|
||
& .footer-info-links { | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
grid-gap: 0.5rem; | ||
} | ||
|
||
& .footer-hr { | ||
border: 0; | ||
border-bottom: 2px solid var(--color-muted); | ||
margin: 0; | ||
} | ||
|
||
& .footer-statement { | ||
padding: var(--spacing-2) 0; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
& .footer-copyright { | ||
color: var(--color-gray); | ||
} | ||
|
||
& .footer-social { | ||
display: flex; | ||
align-items: center; | ||
|
||
& svg { | ||
fill: var(--color-gray); | ||
} | ||
} | ||
|
||
& .footer-contributions-wrapper { | ||
background-color: var(--color-muted); | ||
} | ||
|
||
& .footer-contributions { | ||
color: var(--color-gray); | ||
padding: 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,25 +1,15 @@ | ||
<footer class="es-footer" ...attributes> | ||
<div class="container"> | ||
{{!-- | ||
Pass footer properties to support | ||
{{es-footer tagline="My custom tagline" contributorLinks=myLinks}} | ||
--}} | ||
{{es-footer/es-info infoLinks=infoLinks}} | ||
|
||
{{yield | ||
(hash | ||
info = (component "es-footer/es-info") | ||
statement = (component "es-footer/es-statement") | ||
contributions = (component "es-footer/es-contributions") | ||
) | ||
}} | ||
<hr class="footer-hr"> | ||
|
||
{{#unless hasBlock}} | ||
{{es-footer/es-statement tagline=tagline socialLinks=socialLinks}} | ||
|
||
{{!-- | ||
Pass footer properties to support | ||
{{es-footer tagline="My custom tagline" contributorLinks=myLinks}} | ||
--}} | ||
{{es-footer/es-info infoLinks=infoLinks}} | ||
{{es-footer/es-statement tagline=tagline socialLinks=socialLinks}} | ||
{{es-footer/es-contributions contributorLinks=contributorLinks}} | ||
<hr class="footer-hr"> | ||
|
||
{{/unless}} | ||
|
||
</div> | ||
{{es-footer/es-contributions contributorLinks=contributorLinks}} | ||
</footer> |
23 changes: 11 additions & 12 deletions
23
addon/templates/components/es-footer/es-contributions.hbs
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
|
||
{{#if hasBlock}} | ||
{{yield}} | ||
{{else}} | ||
{{#each contributorLinks as |link|}} | ||
<div class="contributor"> | ||
<p>{{link.name}}</p> | ||
<a href={{link.href}} title={{link.title}} aria-label={{link.title}}> | ||
{{svg-jar link.class class="contributor-logo"}} | ||
</a> | ||
<div class="footer-contributions-wrapper"> | ||
<div class="footer-contributions container"> | ||
<span>Ember is generously supported by</span> | ||
<div> | ||
{{#each args.contributorLinks as |link|}} | ||
<a href={{link.href}} title={{link.title}} aria-label={{link.title}} class="icon-wrapper large margin-left-xsmall"> | ||
{{svg-jar link.class class="icon" }} | ||
</a> | ||
{{/each}} | ||
</div> | ||
{{/each}} | ||
{{/if}} | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,14 +1,9 @@ | ||
<div class="footer-info container"> | ||
<img src="/images/ember-logo.svg" alt="Ember Logo" class="footer-logo margin-right-medium"> | ||
|
||
Copyright {{currentYear}} | ||
{{#if hasBlock}} | ||
{{yield}} | ||
{{else}} | ||
{{#each infoLinks as |link index|}} | ||
<a href={{link.href}}>{{link.name}}</a> | ||
{{#if link.lineBreak}} | ||
<br> | ||
{{else if (not-eq index infoLinksLastIndex)}} | ||
| | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} | ||
<div class="footer-info-links"> | ||
{{#each args.infoLinks as |link|}} | ||
<a href={{link.href}} class="small margin-bottom-xsmall margin-left-xsmall">{{link.name}}</a> | ||
{{/each}} | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
|
||
{{#if hasBlock}} | ||
{{yield}} | ||
{{else}} | ||
<p class="footer-tagline">{{tagline}}</p> | ||
<div class="footer-statement container"> | ||
<div> | ||
<p class="footer-copyright"> | ||
© Copyright {{currentYear}} - <a href="https://www.tilde.io/" target="_blank" rel="noopener" class="footer-copyright">Tilde Inc.</a> | ||
</p> | ||
<p class="footer-tagline">{{args.tagline}}</p> | ||
</div> | ||
<div class="footer-social"> | ||
{{#each socialLinks as |link|}} | ||
<a href={{link.href}} title={{link.title}} aria-label={{link.label}}> | ||
{{svg-jar link.class}} | ||
{{#each args.socialLinks as |link|}} | ||
<a href={{link.href}} title={{link.title}} aria-label={{link.label}} class="icon-wrapper margin-xsmall small"> | ||
{{svg-jar link.class class="icon" }} | ||
</a> | ||
{{/each}} | ||
</div> | ||
{{/if}} | ||
</div> |
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 @@ | ||
export { default } from 'ember-styleguide/templates/components/es-footer/es-contributions'; |
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 @@ | ||
export { default } from 'ember-styleguide/templates/components/es-footer/es-info'; |
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 @@ | ||
export { default } from 'ember-styleguide/templates/components/es-footer/es-statement'; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.