-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementing new footer #197
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 EsContributions 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/" 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why aren't we using fontawesome icons here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we've already discussed this a few times but the new branch for the redesign doesn't have font-awesome as a dependency and therefore doesn't use those icons.
Even regardless of this fact, this is no different to what is already being used in the current master branch: https://github.com/ember-learn/ember-styleguide/blob/master/addon/templates/components/es-footer/es-contributions.hbs#L9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh interesting. thanks for reminding me.