|
1 | 1 | <div class="container text-center">
|
2 |
| - <form data-ng-submit="fireColorReader()" class="form-inline"> |
3 |
| - <div class="form-group"> |
4 |
| - <label for="colorField" class="landing__label">Below enter color in HEX format</label> |
5 |
| - <input type="text" ng-model="selectedColor" class="form-control" id="colorField" required> |
6 |
| - </div> |
7 |
| - </form> |
| 2 | + <div class="form-group"> |
| 3 | + <label for="colorField" class="landing__label">Below enter color in HEX format or chose new color</label> |
| 4 | + <input type="text" ng-model="selectedColor" class="form-control" id="colorField" required> |
| 5 | + </div> |
8 | 6 |
|
9 | 7 | <div class="landing__colorsample-container">
|
10 | 8 | <div class="landing__colorsample-left">
|
11 |
| - <div class="landing__colorsample-left-box" style="background-color: #{{selectedColor}}; filter: brightness(80%);"></div> |
12 |
| - <div class="landing__colorsample-left-box" style="background-color: #{{selectedColor}}; filter: brightness(60%);"></div> |
13 |
| - <div class="landing__colorsample-left-box" style="background-color: #{{selectedColor}}; filter: brightness(40%);"></div> |
| 9 | + <div class="landing__colorsample-left-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(80%);"></div> |
| 10 | + <div class="landing__colorsample-left-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(60%);"></div> |
| 11 | + <div class="landing__colorsample-left-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(40%);"></div> |
14 | 12 | </div>
|
15 | 13 | <div class="landing__colorsample-main">
|
16 |
| - <div class="landing__colorsample" style="background-color: #{{selectedColor}}"> |
17 |
| - <ul class="list-unstyled landing__colorsample__list"> |
18 |
| - <li data-ng-repeat="n in convertedColors | orderBy: reverse : true | limitTo: 1"> |
19 |
| - {{n.colorInHEX}} <br> {{n.colorInHSL}} <br> {{n.colorInRGB}} |
20 |
| - <li> |
21 |
| - </ul> |
| 14 | + <div class="landing__colorsample" data-ng-style="{ 'background-color': '#' + selectedColor }"> |
| 15 | + <h3 class="landing__colorsample-heading"> |
| 16 | + {{ selectedColor }} |
| 17 | + </h3> |
22 | 18 | <color-picker ng-model="selectedColor" api="api" options="options"></color-picker>
|
23 | 19 | </div>
|
24 | 20 | </div>
|
25 | 21 | <div class="landing__colorsample-right">
|
26 |
| - <div class="landing__colorsample-right-box" style="background-color: #{{selectedColor}}; filter: brightness(120%);"></div> |
27 |
| - <div class="landing__colorsample-right-box" style="background-color: #{{selectedColor}}; filter: brightness(140%);"></div> |
28 |
| - <div class="landing__colorsample-right-box" style="background-color: #{{selectedColor}}; filter: brightness(160%);"></div> |
| 22 | + <div class="landing__colorsample-right-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(120%);"></div> |
| 23 | + <div class="landing__colorsample-right-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(140%);"></div> |
| 24 | + <div class="landing__colorsample-right-box" data-ng-style="{ 'background-color': '#' + selectedColor }" style="filter: brightness(160%);"></div> |
29 | 25 | </div>
|
30 | 26 | </div>
|
31 | 27 |
|
|
42 | 38 | </select>
|
43 | 39 | </button>
|
44 | 40 | <button class="btn btn-default" data-ng-click="saveToPalette(selectedColor)">Save to palette</button>
|
45 |
| - <button class="btn btn-default">Set as background</button> |
46 |
| - <button class="btn btn-default">Set as background 50%</button> |
| 41 | + <button class="btn btn-default" data-ng-click="setBackground('bgEntire')">Set as background</button> |
| 42 | + <button class="btn btn-default" data-ng-click="setBackground('bgTop')">Set as background 50% top</button> |
| 43 | + <button class="btn btn-default" data-ng-click="setBackground('bgBottom')">Set as background 50% bottom</button> |
| 44 | + <button class="btn btn-default" data-ng-click="setBackground('clear')">Clear backgrounds</button> |
47 | 45 | </div>
|
48 | 46 | </div>
|
49 | 47 |
|
50 |
| -{{ palette }} |
51 |
| - |
52 |
| -<!-- |
53 |
| -<div class="container landing__palette"> |
54 | 48 | <div class="palette">
|
55 |
| - <p class="help-block">Hey you! Your colors will stay in palette until you clear cache or click button below! {{ palette }}</p> |
| 49 | + <p class="help-block">Hey you! Your colors will stay in palette until you clear cache or click button below!</p> |
56 | 50 | <div class="palette__container">
|
57 | 51 | <div class="palette__record"
|
58 |
| - data-ng-repeat="n in palette | orderBy: reverse : true | limitTo: 8" |
59 |
| - style="background-color: {{n.inHEX}}"> |
60 |
| - <p class="landing__palette__record__paragraph text-center"> |
61 |
| - {{n.inHSL}} <br> {{n.inHEX}} <br> |
62 |
| - </p> |
| 52 | + data-ng-repeat="n in palette track by $index" |
| 53 | + data-ng-style="{'background-color':'#'+n}"> |
63 | 54 | </div>
|
64 | 55 | </div>
|
65 | 56 | </div>
|
66 |
| -</div> |
67 |
| ---> |
68 |
| - |
69 | 57 |
|
70 | 58 | <div class="landing__buttons">
|
71 |
| - <button class="btn btn-success landing__palette__button--success" data-ng-click="clearCache()">Clear Palette</button> |
| 59 | + <button class="btn btn-success landing__palette__button--success" data-ng-click="clearEntirePalette()">Clear Palette</button> |
72 | 60 | <button data-ng-if="logged" class="btn btn-success landing__palette__button--success" data-ng-click="savePalette()">Save Palette</button>
|
73 | 61 | <button data-ng-if="!logged" class="btn btn-success landing__palette__button--success" data-ng-click="openLogin()">Save Palette</button>
|
74 | 62 | </div>
|
0 commit comments