Skip to content

Commit

Permalink
Merge pull request #8 from zfir-dev/lint-fix-2
Browse files Browse the repository at this point in the history
Lint Fix
  • Loading branch information
zfir authored Dec 28, 2023
2 parents 22393f5 + cd12dcd commit 111382d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 48 deletions.
8 changes: 4 additions & 4 deletions app/components/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
{{#if @selected}}
<div class="d-flex justify-content-center mb-2">
{{#if this.previousItem}}
<button class="previous btn btn-outline-primary me-2" {{on "click" (fn this.select 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" {{on "click" @handleBack}}>
<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" {{on "click" (fn this.select 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" {{on "click" @handleBack}}>
<button class="back btn btn-outline-secondary" type="button" {{on "click" @handleBack}}>
Back to Blogs
</button>
{{/if}}
Expand Down
22 changes: 11 additions & 11 deletions app/components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';

export default class FooterComponent extends Component {
@tracked currentYear = new Date().getFullYear();
@tracked currentYear = new Date().getFullYear();

get previousItem() {
return this.args.items[parseInt(this.args.selected) - 1];
}
get previousItem() {
return this.args.items[parseInt(this.args.selected) - 1];
}

get nextItem() {
return this.args.items[parseInt(this.args.selected) + 1];
}
get nextItem() {
return this.args.items[parseInt(this.args.selected) + 1];
}

@action
select(item) {
this.args.handleSelected(item);
}
@action
select(item) {
this.args.handleSelected(item);
}
}
64 changes: 32 additions & 32 deletions app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */

img {
width: 100%;
width: 100%;
}

.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
background-color: #ffffff;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
background-color: #fff;
}

.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
background-color: #fff;
}

.blogs,
.blog {
padding-top: 80px;
padding-bottom: 56px;
padding-top: 80px;
padding-bottom: 56px;
}

.blog {
padding-bottom: 114px;
padding-bottom: 114px;
}

.blog .title {
overflow: hidden;
overflow: hidden;
}

.header .icon {
width: 50px;
width: 50px;
}

.blogs .category-span-container {
display: inline-block;
line-height: 2.5em;
display: inline-block;
line-height: 2.5em;
}

.blogs .category-span {
background-color: #0d6efd;
color: #ffffff;
border-radius: 5px;
padding: 5px;
background-color: #0d6efd;
color: #fff;
border-radius: 5px;
padding: 5px;
}

.footer .previous,
.footer .next,
.footer .back {
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.9em;
margin-right: 10px;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.9em;
margin-right: 10px;
}

.footer .previous .icon {
float: left;
float: left;
}

.footer .next .icon {
float: right;
float: right;
}
7 changes: 6 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ module.exports = function (defaults) {
},
},
dotEnv: {
clientAllowedKeys: ['PAGE_TITLE', 'ICON_URL', 'MEDIUM_URL', 'RSS_2_JSON_API_KEY'],
clientAllowedKeys: [
'PAGE_TITLE',
'ICON_URL',
'MEDIUM_URL',
'RSS_2_JSON_API_KEY',
],
},
});

Expand Down

0 comments on commit 111382d

Please sign in to comment.