Add new components
This commit is contained in:
parent
52c858fb48
commit
7b83a218e7
17
README.md
17
README.md
@ -1,7 +1,6 @@
|
|||||||
# Fias-face
|
# Fias-face
|
||||||
|
|
||||||
This README outlines the details of collaborating on this Ember application.
|
Простой фронт-энд для [fias-api](https://github.com/jar3b/py-phias), написан на Ember.js
|
||||||
A short introduction of this app could easily go here.
|
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@ -24,6 +23,20 @@ You will need the following things properly installed on your computer.
|
|||||||
|
|
||||||
* `ember server`
|
* `ember server`
|
||||||
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
||||||
|
* You can use nginx with config like this:
|
||||||
|
```
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name fias.example.com;
|
||||||
|
server_tokens off;
|
||||||
|
client_max_body_size 250M;
|
||||||
|
root /var/www/fias-face;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Code Generators
|
### Code Generators
|
||||||
|
|
||||||
|
5
app/components/found-item.js
Normal file
5
app/components/found-item.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
item: {}
|
||||||
|
});
|
3
app/templates/components/found-item.hbs
Normal file
3
app/templates/components/found-item.hbs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{{#ui-popup content=(concat "Ratio: " item.ratio) position='right center'}}
|
||||||
|
{{#ui-accordion-section title=item.text}}<p>AOID: {{ item.aoid }} </p>{{/ui-accordion-section}}
|
||||||
|
{{/ui-popup}}
|
@ -1,7 +1,7 @@
|
|||||||
<div class="ui main text container">
|
<div class="ui main text container">
|
||||||
<div class="ui piled segment">
|
<div class="ui piled segment">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{input type="text" placeholder=placeholder value=searchText action="search" on="key-up"}}
|
{{input type="text" placeholder=placeholder value=searchText action="search" on="enter"}}
|
||||||
<button {{action 'search' searchText}} class="ui icon button">
|
<button {{action 'search' searchText}} class="ui icon button">
|
||||||
<i class="search icon"></i>
|
<i class="search icon"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -11,9 +11,7 @@
|
|||||||
|
|
||||||
{{#ui-accordion class='styled fluid'}}
|
{{#ui-accordion class='styled fluid'}}
|
||||||
{{#each model as |aoitem|}}
|
{{#each model as |aoitem|}}
|
||||||
{{#ui-popup content=(concat "Ratio: " aoitem.ratio) position='right center'}}
|
{{found-item item=aoitem}}
|
||||||
{{#ui-accordion-section title=aoitem.text}}<p>AOID: {{ aoitem.aoid }} </p>{{/ui-accordion-section}}
|
|
||||||
{{/ui-popup}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/ui-accordion}}
|
{{/ui-accordion}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user