This repository has been archived by the owner on Aug 5, 2018. It is now read-only.
-
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.
- Loading branch information
Showing
19 changed files
with
361 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,3 +291,6 @@ body { | |
div.alert > a { | ||
color: #600000; | ||
} | ||
#homepage-well { | ||
margin-bottom: 1rem !important; | ||
} |
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,196 @@ | ||
{% extends 'layout.html' %} | ||
|
||
{% block title %}CS4HS Christchurch 2015{% endblock %} | ||
|
||
{% block head %} | ||
{{ super() }} | ||
<link rel="stylesheet" href="css/display.css"> | ||
<!-- Reload page every 5 minutes to refresh timetable --> | ||
<meta http-equiv="refresh" content="300"> | ||
{% endblock head %} | ||
|
||
{% block body_start %} | ||
<body id="display-three-body"> | ||
{% endblock body_start %} | ||
|
||
{% block body %} | ||
<div class="row"> | ||
<div class="small-4 columns"> | ||
<h1 class="text-center">Upcoming Events</h1> | ||
{% raw %} | ||
<div id="current"> | ||
<script id="schedule-template" type="text/x-handlebars-template"> | ||
<div class="event"> | ||
{{#ifSameDate cells.DateTimeStart}} | ||
<h2 class="text-center event-day">{{prettifyDate cells.DateTimeStart "dddd Do MMMM"}}</h3> | ||
{{/ifSameDate}} | ||
{{#ifDifferentTimeLine cells.DateTimeStart}} | ||
<span class="small-12 columns underline"></span> | ||
{{else}} | ||
<span class="small-8 small-offset-2 medium-10 medium-offset-2 columns underline"></span> | ||
{{/ifDifferentTimeLine}} | ||
<div class="row current-event"> | ||
<span class="small-12 medium-4 columns medium-text-right"> | ||
{{#ifDifferentTime cells.DateTimeStart}} | ||
<h3 class="event-time">{{prettifyDate cells.DateTimeStart "h:mma"}}<br> | ||
<small>until {{prettifyDate cells.DateTimeEnd "h:mma"}}</small></h3> | ||
{{else}} | ||
<h4 class="text-center">or</h4> | ||
{{/ifDifferentTime}} | ||
<p> | ||
{{#if cells.Location}} | ||
<b>Location:</b> {{cells.Location}} | ||
{{/if}} | ||
{{#if cells.Speaker}} | ||
<br><b>Presenter:</b> {{cells.Speaker}} | ||
{{/if}} | ||
</p> | ||
</span> | ||
<span class="small-12 medium-8 columns"> | ||
<h4>{{cells.Title}}</h4> | ||
<p class="description">{{cells.Description}}</p> | ||
</span> | ||
</div> | ||
</div> | ||
</script> | ||
</div> | ||
{% endraw %} | ||
<div id="schedule-loading"> | ||
<h3 class="text-center">Loading events...</h3> | ||
</div> | ||
</div> | ||
<div class="small-4 columns text-center no-padding"> | ||
<div class="display-three-background"> | ||
<div class="display-three-align"> | ||
<h1 class="title display-three-large-text">CS<span class="logo-number">4</span>HS</h1> | ||
<h4 class="title display-three-small-text">Christchurch</h4> | ||
<h4 class="title display-three-small-text">30 Nov - 4 Dec</h4> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="small-2 columns text-center"> | ||
<h2>Sponsors</h2> | ||
<ul id="sponsor-slideshow" class="text-center"> | ||
<li><img src="./img/google-logo-colour.png"></img></li> | ||
<li><img src="./img/canterbury-logo.png"></img></li> | ||
<li><img src="./img/catalyst-logo.png"></img></li> | ||
<li><img src="./img/nzacditt-logo.png"></img></li> | ||
<li><img src="./img/microsoft-logo.png"></img></li> | ||
<li><img src="./img/telogis-logo.png"></img></li> | ||
<li><img src="./img/orion-health-logo.png"></img></li> | ||
<li><img src="./img/cerebral-fix-logo.png"></img></li> | ||
<li><img src="./img/allied-telesis-logo.png"></img></li> | ||
</ul> | ||
|
||
<h2>Updates</h2> | ||
<a class="twitter-timeline" | ||
href="https://twitter.com/UCCSEd" | ||
data-widget-id="525448302553083904" | ||
data-chrome="noheader nofooter noscrollbar transparent" | ||
height="1200"> | ||
</a> | ||
</div> | ||
<div class="small-2 columns text-center"> | ||
<h2>#CS4HSchch</h2> | ||
<a class="twitter-timeline" | ||
data-dnt="true" | ||
href="https://twitter.com/hashtag/CS4HSchch" | ||
data-widget-id="522159625521487872" | ||
data-chrome="noheader nofooter noscrollbar transparent" | ||
height="1200"> | ||
</a> | ||
</div> | ||
</div> | ||
{% endblock body %} | ||
|
||
{% block scripts %} | ||
<!-- Load Handlebars.js --> | ||
<script src="./js/sheetrock.min.js"></script> | ||
<!-- Load Handlebars.js --> | ||
<script src="./js/handlebars.min.js"></script> | ||
<!-- Load Moment.js --> | ||
<script src="./js/moment.min.js"></script> | ||
<script type="text/javascript"> | ||
// Compile the Handlebars template. | ||
var source = $('#schedule-template').html(); | ||
var CurrentTemplate = Handlebars.compile(source); | ||
|
||
var defaultDate = new Date(500); | ||
var SameDate = defaultDate; | ||
var SameDateTime = defaultDate; | ||
var Time = defaultDate; | ||
var TimeLine = defaultDate; | ||
|
||
function parseDate(date_string) { | ||
date = date_string.slice(5,-1); | ||
date = date.split(','); | ||
date = new Date(date[0], date[1], date[2], date[3], date[4], date[5]); | ||
return date; | ||
} | ||
|
||
Handlebars.registerHelper("prettifyDate", function(timestamp, formatString) { | ||
timestamp = parseDate(timestamp); | ||
return moment(timestamp).format(formatString); | ||
}); | ||
|
||
Handlebars.registerHelper('ifSameDate', function(v1, options) { | ||
v1 = parseDate(v1); | ||
if(v1.getDate() !== SameDate.getDate()) { | ||
SameDate = v1; | ||
return options.fn(this); | ||
} | ||
}); | ||
|
||
Handlebars.registerHelper('ifDifferentTime', function(v1, options) { | ||
v1 = parseDate(v1); | ||
if(v1 !== Time) { | ||
Time = v1; | ||
return options.fn(this); | ||
} else { | ||
return options.inverse(this); | ||
} | ||
}); | ||
|
||
Handlebars.registerHelper('ifDifferentTimeLine', function(v1, options) { | ||
v1 = parseDate(v1); | ||
if(v1 !== TimeLine) { | ||
TimeLine = v1; | ||
return options.fn(this); | ||
} else { | ||
return options.inverse(this); | ||
} | ||
}); | ||
|
||
var now = moment().format('YYYY-MM-DD HH:mm:ss'); | ||
|
||
// Load an entire sheet. | ||
$('#current').sheetrock({ | ||
url: 'https://docs.google.com/spreadsheets/d/15y3r_9IPnL9d6fa61T7-RtTQqyJc_Y2gXIJ9oGc_Y_w/edit#gid=0', | ||
query: 'select A,B,C,D,E,F where B >= datetime "' + now + '"', | ||
rowTemplate: CurrentTemplate, | ||
callback: removeLoading | ||
}); | ||
|
||
function removeLoading() { | ||
$("#schedule-loading").addClass('hide'); | ||
} | ||
</script> | ||
<!-- Twitter script --> | ||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> | ||
<!-- Slideshow script --> | ||
<script type="text/javascript" src="./js/responsiveslides.min.js"></script> | ||
<script> | ||
$(function() { | ||
$("#sponsor-slideshow").responsiveSlides({ | ||
auto: true, // Boolean: Animate automatically, true or false | ||
speed: 500, // Integer: Speed of the transition, in milliseconds | ||
timeout: 4000, // Integer: Time between slide transitions, in milliseconds | ||
pager: false, // Boolean: Show pager, true or false | ||
nav: false, // Boolean: Show navigation, true or false | ||
random: false, // Boolean: Randomize the order of the slides, true or false | ||
pause: false, // Boolean: Pause on hover, true or false | ||
pauseControls: false // Boolean: Pause when hovering controls, true or false | ||
}); | ||
}); | ||
</script> | ||
{% endblock scripts %} |
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
Binary file not shown.
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,22 @@ | ||
""" | ||
Python Chatbot based on javascript from: | ||
https://computationalthinkingcourse.withgoogle.com/unit?lesson=17&unit=7 | ||
""" | ||
def main(): | ||
print("Hello") | ||
chat() | ||
print("TTFN") | ||
|
||
def chat(): | ||
question = input().lower() | ||
while not("bye!" in question): | ||
if 'who' in question: | ||
print('My name is StupidBot.') | ||
elif 'when' in question: | ||
print('I was born in 2015.') | ||
elif 'you are' in question: | ||
ans = "Why do you say I am {}?".format(question.split('you are')[-1]) | ||
print(ans) | ||
else: | ||
print("I don't understand. Ask me another question.") | ||
question = input().lower() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
<div class="small-12 columns"> | ||
<h2>Register</h2> | ||
|
||
<p> | ||
Registrations are now open and will close on <strong>Friday, 6th November 2015</strong>. If you wish to attend CS4HS, but your school is having severe issues in funding you to attend: <a href="mailto:[email protected]">let us know</a> as hardship subsidies are available. | ||
</p> | ||
<div data-alert class="alert-box alert radius"> | ||
Registrations for the 2015 conference are now closed. Keep an eye on this website in early 2016 to reserve you place at our 2016 conference! | ||
</div> | ||
|
||
<div data-alert class="alert-box warning radius"> | ||
<!-- <div data-alert class="alert-box warning radius"> | ||
At present we still can provide all accommodation free of charge, however we are unable to provide a transport subsidy for travel costs. We are actively seeking more funding from sponsors, and if we receive sufficient funding, we may be able to provide a subsidy for your travel costs (subsidies are given on a first-in first-served basis, we will contact you if you become eligible). <a href="#" class="close">×</a> | ||
</div> | ||
|
@@ -22,7 +22,9 @@ <h2>Register</h2> | |
<p> | ||
It's ok to fine-tune parts of registration later e.g. changing the exact number of nights you'll be staying, contact <a href="mailto:[email protected]">Jack Morgan</a> if you need to change your registration. | ||
</p> | ||
</p> --> | ||
|
||
<h3>2015 Conference Events</h3> | ||
|
||
<div class="panel radius clearfix"> | ||
<h4 class="right">FREE</h4> | ||
|
Oops, something went wrong.