Skip to content

Instantly share code, notes, and snippets.

@loleg
Last active January 19, 2018 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loleg/50b3ff0a7ce8d8a32cc1ace61c68e433 to your computer and use it in GitHub Desktop.
Save loleg/50b3ff0a7ce8d8a32cc1ace61c68e433 to your computer and use it in GitHub Desktop.
Dribdat configuration for a Open Food Data event

Description:

At the «Open Food Data Hackdays» diverse food-interested actors, including big data specialists, software engineers, nutrition experts, farmers, app designers, students and entrepreneurs, are united. This potential is combined with publicly available data on the production, movement, consumption and impact of food, in order to enable groundbreaking projects.

Guide to datasets:

# Data resources

We are preparing a [collection of data packages](https://openfood.schoolofdata.ch) for use at the Hackdays. At the Hackdays, you are free to use these, your own, or other data - just remember to always properly **attribute your sources** and respect each license. Be aware of the Terms of Use before you dig in. Your experience and support will help us to open more data according to the [Open Definition](http://opendefinition.org/) and [open licenses](http://licenses.opendefinition.org/)! 

Find out how to **contribute your own** at [schoolofdata.ch](https://schoolofdata-ch.github.io/2018/01/01/Food-Data-Expedition.html), and reach out to [the organisers](mailto:food@opendata.ch) if you have any questions. 

<div id="datacentral" class="list-group list-datapackage"><a class="btn btn-primary">List data packages</a></div>
<script>window.onload = function() { 
var dc_home = 'https://openfood.schoolofdata.ch'; var dc_elem = $('#datacentral');
dc_elem.find('a').on('click', function() { 
$(this).parent().html('Loading ...'); 
$.getJSON(dc_home + '/api.json', function(data) { dc_elem.empty();
 $.each(data, function() { infos = [];
  if (this.licenses && typeof this.licenses[0].type != 'undefined') infos.push('License: ' + this.licenses[0].type);
  if (this.format) infos.push('Format: ' + this.format.toUpperCase());
  if (this.last_modified) infos.push('Updated: ' + this.last_modified);
  dc_elem.append(
    '<a href="' + dc_home + '/' + this.name + '" class="list-group-item" target="_blank">' + this.title + '' +
    '<div class="list-infos">' + infos.join(" / ") + '</div></a>'
  ); });
}); /* YES, YES, THIS SCRIPT WILL BE MOVED SOON! */
}); }</script>

Community code

<p>Connect to our community on
<a href="https://enguete.schoolofdata.ch/signup_user_complete/?id=d5sor7paep8gtxtbah94yozjea" target="_blank"><img height="36" src="https://www.mattermost.org/wp-content/uploads/2016/04/mattermost-live-icon.gif" hspace="10">Mattermost</a>
| <a href="http://twitter.com/opendatach" target="_blank">Twitter</a>
| <a href="http://facebook.com/opendatach" target="_blank">Facebook</a>
</p>

<br><p><a rel="license" href="http://creativecommons.org/licenses/by/4.0/" target="_blank"><img align="left" style="margin-right:1em" alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>The contents of this website, unless otherwise stated, are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>.</p>

Custom CSS

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);

.navbar-inverse { background: #0C0944; }
body {
    font-family: Open Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
    color: #444;
    border-top: 10px solid #ff6942;
    background-image: url(https://food.opendata.ch/wp-content/themes/food.opendata.ch/images/OpenData_Banner_02.jpg);
    background-repeat: no-repeat;
    background-position: top center;
    background-attachment: fixed;
    background-color: #f7f7f7;
}
footer { background: white; height: 3em; }
div[role=main] { 
    overflow-x: hidden;
    padding: 0px;
}
.container .jumbotron {
    background: rgba(255,255,255,0.7);
}

/* Center the logo */
.section.section-centered { text-align: center; }
.section-header .section-header-logo { position: fixed; }

/* .list-datapackage { max-height: 14.7em; overflow: auto } */
#datacentral .btn { color: white; }
.list-datapackage .list-group-item {
    border-left: none; border-right: none; border-top: none;
    border-bottom: 1px solid #333; border-radius: 0px;
    background: transparent;
}
@media (min-width: 1000px) {
div[role=main] { background: white; padding:2em; }
.list-datapackage .list-group-item {
    width: 100%;
    display: inline-block;
    min-height: 3em;
    line-height: 2em;
    padding-top: 0.4em;
}
a.list-group-item:nth-child(2) {
    border-top: 1px solid #333;
}
}
a.list-group-item:nth-child(1) {
    border-top: 1px solid #333;
}
.list-datapackage .list-infos {
    font-size: 80%; color: #999;
}

/* Hexagons and embedding */
.project .hexagontent {
    font-size: 1.0rem;
    overflow: visible;
}
.embed-event .event-countdown {
    bottom: 0px;
    position: absolute;
    transform: scale(0.5);
    display: block;
}
.embed-view .honeycomb { transform: none; margin-top: 20px; }
.embed-event .hexagon { zoom: 0.4; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment