Skip to content

Commit

Permalink
Built with Ember
Browse files Browse the repository at this point in the history
  • Loading branch information
zfir committed Dec 28, 2023
1 parent c6b0f1e commit a35fce5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 26 deletions.
56 changes: 30 additions & 26 deletions app/components/footer.hbs
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
{{!-- footer.hbs --}}
{{!-- app/components/footer.hbs --}}

<footer class="footer p-3">
{{#if @selected}}
<div class="d-flex justify-content-center mb-2">
{{#if this.previousItem}}
<button class="previous btn btn-outline-primary me-2" type="button" {{on "click" (fn this.select this.previousItem)}}>
{{this.previousItem.title}}
<FaIcon class="icon" @icon="arrow-left" />
</button>
{{else}}
<button class="back btn btn-outline-secondary" type="button" {{on "click" @handleBack}}>
Back to Blogs
</button>
{{/if}}
{{#if this.nextItem}}
<button class="next btn btn-outline-primary" type="button" {{on "click" (fn this.select this.nextItem)}}>
{{this.nextItem.title}}
<FaIcon class="icon" @icon="arrow-right" />
</button>
{{else}}
<button class="back btn btn-outline-secondary" type="button" {{on "click" @handleBack}}>
Back to Blogs
</button>
{{/if}}
</div>
<div class="d-flex justify-content-center mb-2">
{{#if this.previousItem}}
<button class="previous btn btn-outline-primary me-2" type="button" {{on "click" (fn this.select this.previousItem)}}>
<FaIcon class="icon" @icon="arrow-left" /> {{this.previousItem.title}}
</button>
{{else}}
<button class="back btn btn-outline-secondary" type="button" {{on "click" @handleBack}}>
Back to Blogs
</button>
{{/if}}
{{#if this.nextItem}}
<button class="next btn btn-outline-primary" type="button" {{on "click" (fn this.select this.nextItem)}}>
{{this.nextItem.title}} <FaIcon class="icon" @icon="arrow-right" />
</button>
{{else}}
<button class="back btn btn-outline-secondary" type="button" {{on "click" @handleBack}}>
Back to Blogs
</button>
{{/if}}
</div>
{{/if}}
<div class="d-flex justify-content-center align-items-center">
<p class="mb-0 me-3">{{@pageTitle}}</p>
<p class="mb-0">&copy; {{this.currentYear}}</p>
<div class="d-flex justify-content-between align-items-center w-100">
<div>
<p class="mb-0 small">{{@pageTitle}}</p>
<p class="mb-0 small">&copy; {{this.currentYear}}</p>
</div>
<div class="d-flex align-items-center">
<p class="mb-0 small">Built with</p>
<img src="ember.svg" alt="Custom Ember Logo" class="ember-logo"/>
</div>
</div>
</footer>
5 changes: 5 additions & 0 deletions app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ img {
.footer .next .icon {
float: right;
}

.footer .ember-logo {
height: 30px;
width: auto;
}
6 changes: 6 additions & 0 deletions public/ember.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a35fce5

Please sign in to comment.