-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(citzenScienceExamples): styling and interaction for examples
- Loading branch information
Showing
11 changed files
with
206 additions
and
78 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
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
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
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,76 @@ | ||
|
||
.examples-container { | ||
text-align: center; | ||
} | ||
|
||
|
||
.label-examples { | ||
|
||
display: none; | ||
position: relative; | ||
padding: 8px; | ||
min-width: 410px; | ||
|
||
background: #ffffff; | ||
border-radius: 5px; | ||
-webkit-box-shadow: 3x 3px 5px rgba(0,0,0,0.3); | ||
-moz-box-shadow: 3x 3px 5px rgba(0,0,0,0.3); | ||
box-shadow: 3x 3px 5px rgba(0,0,0,0.3); | ||
|
||
|
||
&.selected { | ||
display: inline-block; | ||
} | ||
|
||
.citizen-science-example { | ||
|
||
display: none; | ||
|
||
|
||
|
||
&.selected { | ||
|
||
display: inline-block; | ||
|
||
|
||
} | ||
|
||
|
||
} | ||
|
||
|
||
h3 { | ||
text-align: center; | ||
font-size: 1.2em; | ||
max-width: 350px; | ||
padding-left: 50px; | ||
padding-right: 50px; | ||
position: relative; | ||
margin-left: auto; | ||
margin-right: auto; | ||
|
||
span { | ||
max-width: calc(100% - 100px); | ||
} | ||
|
||
.arrow { | ||
font-size: 1.4em; | ||
position: absolute; | ||
|
||
&.prev { | ||
left: 0px; | ||
} | ||
|
||
&.next { | ||
right: 0px; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
4 changes: 2 additions & 2 deletions
4
src/app/citizenScience/examples/citizenScienceExample.tpl.html
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,4 +1,4 @@ | ||
<div class="citizen-science-example"> | ||
THis is a citizen science example {{$ctrl.example.annotationId}} | ||
<div class="citizen-science-example" ng-class="{selected : ($ctrl.selected)}"> | ||
|
||
<annotation-item annotation="annotation"></annotation-item> | ||
</div> |
16 changes: 13 additions & 3 deletions
16
src/app/citizenScience/examples/citizenScienceExamples.tpl.html
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,7 +1,17 @@ | ||
<div id="examples"> | ||
<div ng-repeat="(key,label) in $ctrl.labels" ng-class="{selected : (labelSelected(label) > -1)}" ng-click="toggleLabel(label)"> | ||
|
||
<div class="examples-container"> | ||
<div ng-repeat="(key,label) in $ctrl.labels" class="label-examples" ng-if="label.examples.length" ng-class="{selected : label.showExamples}"> | ||
|
||
<h3> | ||
<i class="fa fa-arrow-left arrow prev" aria-hidden="true" ng-click="changeCurExample(key, -1)" ng-if="label.examples.length>1"></i> | ||
<span>{{label.label}} example{{(label.examples.length) > 1 ? 's' : ''}}</span> | ||
<i class="fa fa-arrow-right arrow next" aria-hidden="true" ng-click="changeCurExample(key, 1)" ng-if="label.examples.length>1"></i> | ||
</h3> | ||
|
||
|
||
<div ng-repeat="(key,example) in label.examples"> | ||
<citizen-science-example example="example"></citizen-science-example> | ||
<citizen-science-example example="example" selected="(key===label.curExample)" ></citizen-science-example> | ||
</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
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
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,68 @@ | ||
|
||
.citizen-science { | ||
|
||
#label-buttons { | ||
|
||
background: rgba(0, 0, 0, 0.6); | ||
width: 400px; | ||
margin: 0px auto 0px auto; | ||
text-align: center; | ||
border-radius: 8px; | ||
padding: 0px 20px 20px 20px; | ||
|
||
a { | ||
|
||
display: inline-block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
margin-top: 5px; | ||
width: auto; | ||
padding: 5px 8px 5px 8px; | ||
font-size: 18px; | ||
cursor: pointer; | ||
line-height: 1em; | ||
color: #fff; | ||
|
||
&.main-button { | ||
|
||
&:hover { | ||
color: #eee; | ||
|
||
.checkbox { | ||
border-color: #eee; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
&.example-toggle { | ||
text-decoration: none; | ||
|
||
&.selected { | ||
text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.8); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
.selected a { | ||
i { | ||
color: #8cc967; | ||
} | ||
} | ||
|
||
i { | ||
display: inline-block; | ||
text-align: left; | ||
width: 1.0em; | ||
font-size: 2em; | ||
position: relative; | ||
top: 0.25em; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
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
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,9 +1,9 @@ | ||
<div id="label-buttons"> | ||
<a ng-repeat="(key,label) in $ctrl.labels" ng-class="{selected : (labelSelected(key) > -1)}" ng-click="toggleLabel(key)"> | ||
|
||
<span ng-repeat="(key,label) in $ctrl.labels" ng-class="{selected : (labelSelected(key) > -1)}"> | ||
<a ng-click="toggleLabel(key)" class="main-button"> | ||
<i class="fa" | ||
ng-class="{true: 'fa-check-square-o', false : 'fa-square-o'}[labelSelected(key)]" | ||
aria-hidden="true"></i><span>{{label.label}}</span> | ||
</a> | ||
</ul> | ||
<a><a class="fa fa-eye example-toggle" aria-hidden="true" ng-click="toggleShowExamples(key)" ng-class="{selected : (label.showExamples)}" ng-if="label.examples.length"></a> | ||
</span> | ||
</div> |