-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
<!-- Add the issue number that is fixed by this PR (In the form Fixes #123) --> Fixes #825 #### Checklist - [x] I have read the [Contribution & Best practices Guide](https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia) and my PR follows them. - [x] My branch is up-to-date with the Upstream `development` branch. - [ ] I have added necessary documentation (if appropriate) ### Preview Link - **Replace XXX with your PR no** - Link to live demo: http://pr-826-fossasia-badgeyay.surge.sh #### Changes proposed in this pull request: - Added background component -
- Loading branch information
Showing
16 changed files
with
1,058 additions
and
444 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 |
---|---|---|
|
@@ -28,6 +28,9 @@ indent_size = 2 | |
[*.css] | ||
indent_size = 4 | ||
|
||
[*.scss] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
|
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
5 changes: 5 additions & 0 deletions
5
frontend/app/components/background-component/color-bg-component.js
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,5 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
}); | ||
|
11 changes: 11 additions & 0 deletions
11
frontend/app/components/background-component/def-image-component.js
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,11 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
init() { | ||
// To be inflated from the backend data | ||
this.image = ''; | ||
// this.images = [{ 'id': 0, 'name': 'Test 0' }, { 'id': 1, 'name': 'Test 1' }]; | ||
return this._super(...arguments); | ||
} | ||
}); | ||
|
5 changes: 5 additions & 0 deletions
5
frontend/app/components/background-component/image-component.js
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,5 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
}); | ||
|
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 |
---|---|---|
|
@@ -13,3 +13,8 @@ footer { | |
padding-bottom: 30px; | ||
padding-top: 30px; | ||
} | ||
|
||
.center-width { | ||
max-width: 42%; | ||
} | ||
|
5 changes: 5 additions & 0 deletions
5
frontend/app/templates/components/background-component/color-bg-component.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="field"> | ||
<label>Select from a custom color</label> | ||
{{col-pick-input value=defColor}} | ||
</div> | ||
|
15 changes: 15 additions & 0 deletions
15
frontend/app/templates/components/background-component/def-image-component.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="field"> | ||
<label>Select from default backgrounds</label> | ||
{{#ui-dropdown class="selection" selected="Bob" onChange=(action (mut image))}} | ||
<div class="default text">Select background from list</div> | ||
<i class="dropdown icon"></i> | ||
<div class="menu"> | ||
{{#each images as |image|}} | ||
<div data-value="{{gender.id}}" class="item"> | ||
{{image.name}} | ||
</div> | ||
{{/each}} | ||
</div> | ||
{{/ui-dropdown}} | ||
</div> | ||
|
5 changes: 5 additions & 0 deletions
5
frontend/app/templates/components/background-component/image-component.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="field"> | ||
<label>Upload Background Image</label> | ||
<input name="bg-image" type="file" accept="image/*"> | ||
</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,36 @@ | ||
<div class="ui hidden divider"></div> | ||
<div class="ui raised segment"> | ||
<div class="ui form"> | ||
<div class="column"> | ||
{{ data-component/csv-component sendCSV=(action 'mutateCSV') }} | ||
<div class="center-width"> | ||
<div class="ui raised segment"> | ||
<div class="ui form width-container"> | ||
<div class="center aligned column"> | ||
{{ data-component/csv-component sendCSV=(action 'mutateCSV') }} | ||
</div> | ||
<div class="ui horizontal divider"> | ||
Or | ||
</div> | ||
<div class="center aligned column"> | ||
{{ data-component/text-component sendText=(action 'mutateText') }} | ||
</div> | ||
</div> | ||
<div class="ui horizontal divider"> | ||
Or | ||
</div> | ||
<div class="ui raised segment"> | ||
<div class="ui form width-container"> | ||
<div class="center aligned column"> | ||
{{ background-component/def-image-component }} | ||
</div> | ||
<div class="ui horizontal divider"> | ||
Or | ||
</div> | ||
<div class="center aligned column"> | ||
{{ background-component/color-bg-component }} | ||
</div> | ||
<div class="ui horizontal divider"> | ||
Or | ||
</div> | ||
<div class="center aligned column"> | ||
{{ background-component/image-component }} | ||
</div> | ||
</div> | ||
<div class="center aligned column"> | ||
{{ data-component/text-component sendText=(action 'mutateText') }} | ||
</div> | ||
</div> | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "badgeyay", | ||
"dependencies": { | ||
"colpick": "2.0.2" | ||
} | ||
} |
Oops, something went wrong.