Skip to content

Instantly share code, notes, and snippets.

<div class="row" ng-init="show=false">
<div class="col-sm-4">
<div ng-click="show=!show">
Display/Hide something on click
</div>
</div>
<div class="col-sm-8" ng-if="show==true">
<p>
{{1990-16-01}}: this is a non-formatted date.
</p>
<ods-dataset-context context="nobel,nobelf" nobel-dataset="nobel-prize-laureates" nobel-domain="public" nobel-parameters="{'disjunctive.category':true}" nobelf-dataset="nobel-prize-laureates@public" nobelf-parameters="{'disjunctive.category':true,'refine.gender':'female'}">
<div ods-aggregation="total, totalf"
ods-aggregation-total-context="nobel"
ods-aggregation-total-function="COUNT"
ods-aggregation-totalf-context="nobelf"
ods-aggregation-totalf-function="COUNT">
There have been <strong>{{total}}</strong> laureates of the Nobel prize, but only <strong>{{totalf}}</strong>
prizes have been awarded to women, which represents <strong>{{totalf/total*100 | number:2}}%</strong> of the total.
</div>
</ods-dataset-context>
<ods-dataset-context context="nobel" nobel-dataset="nobel-prize-laureates" nobel-domain="public" nobel-parameters="{'disjunctive.category':true}">
<p>
Display the filters applied to a dataset. It can be very useful when creating a page because it will help debug the code if necessary.
</p>
<ods-facets context="nobel">
<h3>
Category
</h3>
<ods-facet name="category"></ods-facet>
</ods-facets>
<p>Your text: <input ng-model="text"></p>
<p>Below, the text that you entered:</p>
<h3>{{text}}</h3>
.tallblue {
background-color: lightblue;
height: 300px;
}
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-6 col-lg-4 tallblue">
<ul>
<li>I take the whole row if the screen is less than 768px wide</li>
<li>I take 8 columns if the screen is less than 992px but more than 768px wide</li>
<li>I take 6 columns if the screen is less than 1200px but more than 992px wide</li>
<li>I take 4 row if the screen is more than 1200px wide</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-8 col-sm-6 blue">
I take 3 columns on large screens, 8 on medium, 6 on small, and 12 on very small.
</div>
<div class="col-lg-9 col-md-4 col-sm-6 red">
I take 9 columns on large screens, 4 on medium, 6 on small, and 12 on very small.
</div>
</div>
.red {
background-color: salmon;
height: 100px;
}
.blue {
background-color: lightblue;
height: 100px;
}
<div class="row">
<div class="col-xs-6 red">
col-xs-6
</div>
<div class="col-xs-6 blue">
col-xs-6
</div>
</div>
<div class="row">
<div class="fixedwidth orange">
.red {
background-color: salmon;
height: 100px;
}
.blue {
background-color: lightblue;
height: 100px;
}