Browse Source

add support for multiple templates to allow for addition of call for talks page (#64)

pull/68/head
Cian Butler 4 years ago
committed by GitHub
parent
commit
c41a94d0d3
21 changed files with 1144 additions and 912 deletions
  1. +17
    -0
      .babelrc
  2. +2
    -0
      .eslintignore
  3. +66
    -0
      .eslintrc
  4. +0
    -29
      bin/check-event-json
  5. +33
    -0
      bin/checkEventJson.js
  6. +34
    -26
      bin/generate.js
  7. +5
    -6
      config.json
  8. +107
    -100
      css/main.scss
  9. +0
    -175
      events/2017.json
  10. +42
    -47
      gulpfile.js
  11. +27
    -29
      js/main.js
  12. +26
    -65
      package.json
  13. +4
    -2
      pages/2014.md
  14. +4
    -2
      pages/2015.md
  15. +4
    -2
      pages/2016.md
  16. +29
    -0
      pages/CFT.md
  17. +115
    -0
      pages/index.md
  18. +25
    -52
      schema.json
  19. +36
    -0
      templates/message.hbs
  20. +6
    -6
      templates/schedule.hbs
  21. +562
    -371
      yarn.lock

+ 17
- 0
.babelrc View File

@@ -0,0 +1,17 @@
{
"presets": [
[
"es2015",
{
"modules": false
}
]
],
"compact": true,
"plugins": [
"add-module-exports",
"transform-object-assign",
"es6-promise",
"transform-async-to-generator"
]
}

+ 2
- 0
.eslintignore View File

@@ -0,0 +1,2 @@
node_modules/
dist

+ 66
- 0
.eslintrc View File

@@ -0,0 +1,66 @@
{
"extends": "standard",
"env": {
"es6": true,
"jest": true,
"browser": true,
"node": true,
"jquery": true
},
"plugins": [
"json"
],
"globals": {
"GENTLY": true,
"start": true
},
"rules": {
"no-console": 0,
"no-multi-spaces": 0,
"comma-dangle": [
"error",
"always-multiline"
],
"key-spacing": [
"error",
{
"multiLine": {
"beforeColon": false,
"afterColon": true
},
"align": {
"beforeColon": false,
"afterColon": true,
"on": "colon",
"mode": "strict"
}
}
],
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-var": [
"error"
],
"prefer-const": [
"error",
{
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
]
}
}

+ 0
- 29
bin/check-event-json View File

@@ -1,29 +0,0 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const file = process.argv[2];
const glob = require('glob');

if(file !== undefined && file !== null) {
checkJson(file);
} else {
glob('**/*.json', {'ignore': 'node_modules'}, function (er, files) {
if(er) {
console.error(er);
process.exit(1);
}
for(const i of files) {
checkJson(i);
}
process.exit(0);
});
}

function checkJson (filename) {
try {
JSON.parse(fs.readFileSync(filename, 'utf8'));
} catch (err) {
console.error(filename, err);
process.exit(1);
}
}

+ 33
- 0
bin/checkEventJson.js View File

@@ -0,0 +1,33 @@
#!/usr/bin/env node
const fs = require('fs');
const glob = require('glob');
const fm = require('json-front-matter');
const path = require('path');
const validate = require('jsonschema').validate;
const schema = require(path.join(process.cwd(), 'schema.json'));
const config = require(path.join(process.cwd(), 'config.json'));

glob(path.join(process.cwd(), config.source, '*'), {
ignore: 'node_modules',
}, (err, files) => {
if (err) throw err;
for (const i of files) {
fs.readFile(i, 'utf-8', (err, data) => {
if (err) throw err;
const file = fm.parse(data);
const json = file.attributes;
if (json.template === 'schedule') {
checkJson(i, json);
}
});
}
});

function checkJson (filename, json) {
try {
validate(json, schema, { throwError: true });
} catch (err) {
console.error(filename, err);
process.exit(1);
}
}

+ 34
- 26
bin/generate.js View File

@@ -1,43 +1,51 @@
'use strict';
#!/usr/bin/env node
const Handlebars = require('handlebars');
const fs = require('fs');
const path = require('path');
const config = require(__dirname + '/../config.json');
const template = fs.readFileSync(__dirname + '/../template.handlebars', 'utf-8');

let pages = path.join(__dirname, '..', 'pages');
if(config.folder) {
pages = path.join(__dirname, '..', config.folder);
}

let outputDir = path.join(__dirname, '..', 'dist');
if (config.output) {
outputDir = path.join(__dirname, '..', config.output);
}
const fm = require('json-front-matter');
const marked = require('marked');
const config = require(path.join(process.cwd(), 'config.json'));
const source = path.join(process.cwd(), config.source || 'source');
const outputDir = path.join(process.cwd(), config.output || 'public');

function render (template, page, url) {
const output = (Handlebars.compile(template))(page);
if (!fs.existsSync(outputDir)) { fs.mkdirSync(outputDir); }
template = `${template}.hbs`;
const output = Handlebars.compile(
fs.readFileSync(path.join(process.cwd(), 'templates', template), 'utf-8')
)(page);
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir);
}
let dir = outputDir;
if (url) {
if (url !== 'index') {
dir = path.join(dir, url);
if (!fs.existsSync(dir)){
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
}
fs.writeFile(path.join(dir, 'index.html'), output, 'utf8', (err) => { if (err) throw err; });
fs.writeFile(path.join(dir, 'index.html'), output, 'utf8', err => {
if (err) throw err;
});
}

Handlebars.registerHelper('splitTitle', function(title) {
Handlebars.registerHelper('splitTitle', title => {
const middle = Math.floor(title.length / 2);
const s1 = title.substr(0, middle);
const s2 = title.substr(middle);
return s1 + '</span>' + s2;
return `${s1}</span>${s2}`;
});

for (const page of config.pages) {
const json = require(path.join(pages, page.file));
json.pages = config.pages;
json.title = config.title;
render(template, json, page.url);
}
fs.readdir(source, (err, pages) => {
if (err) throw err;
for (const page of pages) {
const url = path.parse(page).name;
fs.readFile(path.join(source, page), 'utf-8', (err, data) => {
if (err) throw err;
const file = fm.parse(data);
const json = file.attributes;
json.site = config;
json.body = marked(file.body);
render(json.template, json, url);
});
}
});

+ 5
- 6
config.json View File

@@ -1,24 +1,23 @@
{
"title": "TechWeek",
"folder": "events",
"source": "pages",
"output": "dist",
"pages": [
"menu": [
{
"title": "Home",
"file": "2017.json",
"url": ""
}, {
"title": "2016",
"file": "2016.json",
"url": "2016"
}, {
"title": "2015",
"file": "2015.json",
"url": "2015"
}, {
"title": "2014",
"file": "2014.json",
"url": "2014"
}, {
"title": "Call For Talks",
"url": "CFT"
}
]
}

+ 107
- 100
css/main.scss View File

@@ -3,170 +3,177 @@
@import '../node_modules/materialize-css/sass/materialize.scss';

body {
background-color: $color-primary;
.wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;

.sub-wrap {
.title {
margin: $title-margin;
text-align: center;

&__text {
margin: $text-margin;
font-size: $title-font-size;
font-weight: $title-font-weight;

&__colour {
color: $color-red;
font-weight: $title-colored-font-weight;
}

a {
color: $color-black;
}
}

.menu {
list-style-type: none;
margin: $menu-margin;
padding: 0;
overflow: hidden;
display: flex;
flex-wrap: wrap;
justify-content: center;

&__item {
float: left;
padding: 0 8px;
}
}
}
background-color: $color-primary;
.wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;

.sub-wrap {
.title {
margin: $title-margin;
text-align: center;

&__text {
margin: $text-margin;
font-size: $title-font-size;
font-weight: $title-font-weight;

&__colour {
color: $color-red;
font-weight: $title-colored-font-weight;
}

a {
color: $color-black;
}
}

.menu {
list-style-type: none;
margin: $menu-margin;
padding: 0;
overflow: hidden;
display: flex;
flex-wrap: wrap;
justify-content: center;

&__item {
float: left;
padding: 0 8px;
}
}
}
}
}

.day {
.card-message {
margin: 2em 0;
display: flex;
align-items: center;
justify-content: center;
}
}

.day {
margin-top: 1vh;

&__title {
width: auto;
display: inline;
font-weight: $day-title-font-weight;
width: auto;
display: inline;
font-weight: $day-title-font-weight;

&__bold {
font-weight: $day-title-font-weight-bold;
}
&__bold {
font-weight: $day-title-font-weight-bold;
}
}
}
}

.event-card {
.event-card {
display: flex;

&__time {
float: left;
display: inline-block;
font-size:$event-time-font-size;
width: 15%;
margin: $event-time-margin;
max-width: 5em;
float: left;
display: inline-block;
font-size:$event-time-font-size;
width: 15%;
margin: $event-time-margin;
max-width: 5em;
}

&__event {
display: inline-block;
width: 80%;
display: inline-block;
width: 80%;
}

&__place {
display: inline-block;
color: $color-black;
float: right;
display: inline-block;
color: $color-black;
float: right;
}
}
}

p {
p {
font-weight: $p-font-weight;
}
}

ul {
ul {
margin: $ul-margin;
}
}

.collapsible-header {
.collapsible-header {
height: initial;
-webkit-transition: all .2s;
border-bottom: 0;
line-height: 1.5rem;
padding: 1em;
}
}

.collapsible-body {
.collapsible-body {
border-top: 0;
border-bottom: 0;

.collapsible {
box-shadow: 0 0;
border: 0;
box-shadow: 0 0;
border: 0;
}

.collapsible-body, .collapsible-header {
border-top: $collapsible-body-border;
border-top: $collapsible-body-border;
}
}
}

.countdown {
.countdown {
display: none;
text-align: center;

&__counter {
display: flex;
flex-wrap: wrap;
flex-direction: column;
font-size: medium;
span {
display: block;
font-size: $countdown-font-size;
}
display: flex;
flex-wrap: wrap;
flex-direction: column;
font-size: medium;
span {
display: block;
font-size: $countdown-font-size;
}
}
}
}

.livestream {
.livestream {
display: none;
width: 80%;
}
}

.playlist {
.playlist {
display: block;
width: 100%;
}
}

.collapsible.popout > li {
.collapsible.popout > li {
background-color: $color-white;
margin: $popout-element-margin;

&.active {
margin: $popout-element-margin-active;
margin: $popout-element-margin-active;
}
}
}

.card-container {
.card-container {
display: flex;
align-items: center;
justify-content: center;
width: 560px;

&__events {
width: 80%;
width: 80%;

@media screen and (max-width: $large-phone) {
width: 100%;
}
@media screen and (max-width: $large-phone) {
width: 100%;
}

@media screen and (min-width: 800px) {
width: $card-width;
}
@media screen and (min-width: 800px) {
width: $card-width;
}
}
}
}

+ 0
- 175
events/2017.json View File

@@ -1,175 +0,0 @@
{
"location": "Dublin City University",
"start": 24,
"end": 28,
"month": "March",
"year": 2017,
"live": "2017-03-24T12:00:00",
"archive": "false",
"video": "https://www.youtube.com/embed/videoseries?list=PLPaLJSHTDMFhbDmyUeik6IHXmzVtWQQxu",
"days": [{
"day": "Monday",
"description": "Data",
"events": [{
"name": "Opening Event",
"by": "Redbrick DCU's Computer Networking Society",
"time": "11:45",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Opening of TechWeek 2017"
}, {
"name": "TBA",
"by": "TBA",
"time": "12:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "Lunch",
"by": "Food",
"time": "14:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Lunch Time!"
}, {
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Tuesday",
"description": "Mobile Development",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "12:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "Lunch",
"by": "Food",
"time": "14:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Lunch Time!"
}, {
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Wednesday",
"description": "Networks and IoT",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "12:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "Lunch",
"by": "Food",
"time": "14:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Lunch Time!"
}, {
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Thursday",
"description": "STEM",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "12:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "Lunch",
"by": "Food",
"time": "14:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Lunch Time!"
}, {
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Friday",
"description": "Lightning Talks",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "12:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "Lunch",
"by": "Food",
"time": "14:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "Lunch Time!"
}, {
"name": "TBA",
"by": "TBA",
"time": "16:00",
"place": {
"id": "The Mezz",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}]
}

+ 42
- 47
gulpfile.js View File

@@ -5,67 +5,62 @@ const cleanCSS = require('gulp-clean-css');
const minify = require('gulp-minify');
const rename = require('gulp-rename');
const connect = require('gulp-connect');
const jsonSchema = require('gulp-json-schema');
const babel = require('gulp-babel');
const shell = require('gulp-shell');
const htmlmin = require('gulp-htmlmin');

gulp.task('dev', ['webserver'], function () {
gulp.watch(['./css/*.scss', './js/*.js', './**/*.handlebars', './**/*.json'], ['scss', 'compress', 'generate', 'html']);
gulp.task('dev', ['webserver'], () => {
gulp.watch(['./css/*.scss', './js/*.js', './templates/*.hbs', './**/*.json', './**/*.md'], [
'scss',
'compress',
'generate',
'html',
]);
});

gulp.task('compress', function() {
return gulp.src(['./node_modules/jquery/dist/jquery.js', './js/*.js', './node_modules/materialize-css/dist/js/materialize.js'])
gulp.task('compress', () => gulp
.src([
'./node_modules/jquery/dist/jquery.js',
'./js/*.js',
'./node_modules/materialize-css/dist/js/materialize.js',
])
.pipe(concat('main.js'))
.pipe(babel())
.pipe(minify({
ext:{
min:'.min.js'
},
exclude: ['tasks'],
noSource: true,
ignoreFiles: ['.combo.js', '*.min.js']
}))
.pipe(gulp.dest('dist/js'));
});
.pipe(
minify({
ext: {
min: '.min.js',
},
exclude : ['tasks'],
noSource : true,
ignoreFiles: ['.combo.js', '*.min.js'],
})
)
.pipe(gulp.dest('dist/js')));

gulp.task('scss', function() {
return gulp.src('css/main.scss')
.pipe(sass())
.pipe(cleanCSS({compatibility: 'ie8', processImport: false}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist/css'));
});
gulp.task('scss', () =>
gulp
.src('css/main.scss')
.pipe(sass())
.pipe(cleanCSS({ compatibility: 'ie8', processImport: false }))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('dist/css')));

gulp.task('webserver',['default'], function() {
gulp.task('webserver', ['default'], () => {
connect.server({
port: 8000,
root: 'dist',
host: 'techweek.dev',
livereload: true
port : 8000,
root : 'dist',
host : 'techweek.dev',
livereload: true,
});
});

gulp.task('fonts', () =>
gulp.src('./node_modules/materialize-css/fonts/**').pipe(gulp.dest('dist/fonts')));

gulp.task('fonts', function() {
return gulp.src('./node_modules/materialize-css/fonts/**')
.pipe(gulp.dest('dist/fonts'));
});

gulp.task('html', function() {
return gulp.src('./**/*.html')
.pipe(connect.reload());
});

gulp.task('validate', function() {
return gulp.src(['./events/*.json'])
.pipe(jsonSchema('schema.json'));
});
gulp.task('html', () => gulp.src('./**/*.html').pipe(connect.reload()));

gulp.task('generate', ['validate'], shell.task('node bin/generate.js'));
gulp.task('generate', shell.task('node bin/generate.js'));

gulp.task('default', ['generate', 'compress', 'scss', 'fonts'], function () {
return gulp.src('dist/**/*.html')
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['generate', 'compress', 'scss', 'fonts'], () =>
gulp.src('dist/**/*.html').pipe(htmlmin({ collapseWhitespace: true })).pipe(gulp.dest('dist')));

+ 27
- 29
js/main.js View File

@@ -1,13 +1,13 @@
$(document).ready( function() {
$(document).ready(() => {
const currHash = getHash();
$('h5').each( function( c ) {
$(this).css({color: colors[(views+c) % 5]});
$('h5').each(function (c) {
$(this).css({color: colors[(views + c) % 5]});
});
$('.collapsible').collapsible();
$('header h1 span').css({color: colors[(views + 3) % 5]});

if (typeof(currHash) !== 'boolean') {
$('li[data-hash="' + currHash + '"] > div').trigger('click');
if (typeof currHash !== 'boolean') {
$(`li[data-hash="${currHash}"] > div`).trigger('click');
}

$('.card-container__events > li').on('click', function () {
@@ -16,27 +16,22 @@ $(document).ready( function() {
});
});

// This is a conditional (Ternary) Operator. It assigns a value based on some other value
localStorage['visited'] = localStorage['visited'] ? +localStorage['visited']+1 : 1;

localStorage['visited'] = localStorage['visited'] ? +localStorage['visited'] + 1 : 1;
const views = +localStorage['visited'];

// Define an array of colours, based on Material Design Color recommendations
const colors = ['#f44336', '#009688', '#4caf50', '#ffc107', '#e91e63'];

let now = (new Date()).getTime();
let now = new Date().getTime();
let liveShown = false;

// Set the constants for the amount of time in each time period
const _second = 1000;
const _minute = _second * 60;
const _hour = _minute * 60;
const _day = _hour * 24;

setInterval(function() {

// Check is current time + 10 minutes smaller than the starting time
if(now + _minute * 10 < start) {
setInterval(() => {
if (now + _minute * 10 < start) {
$('.countdown').show(400);
} else {
showLive();
@@ -45,35 +40,38 @@ setInterval(function() {

const dist = start - now;
const days = Math.floor(dist / _day);
const hours = Math.floor( (dist % _day) / _hour );
const mins = Math.floor( (dist % _hour) / _minute );
const secs = Math.floor( (dist % _minute) / _second );
const hours = Math.floor(dist % _day / _hour);
const mins = Math.floor(dist % _hour / _minute);
const secs = Math.floor(dist % _minute / _second);

let str = (days > 0) ? '<span>' + days + ' Days</span>' : '';
str += (hours > 0) ? '<span>' + hours + ' Hours</span>' : '';
str += (mins > 0) ? '<span>' + mins + ' Minutes</span>' : '';
str += '<span>' + secs + ' Seconds</span>';
let str = days > 0 ? `<span>${days} Days</span>` : '';
str += hours > 0 ? `<span>${hours} Hours</span>` : '';
str += mins > 0 ? `<span>${mins} Minutes</span>` : '';
str += `<span>${secs} Seconds</span>`;

$('.countdown .countdown__counter').html(str);
}, 1000);

function showLive() {
if(!liveShown){
$('.countdown').hide(400, function() {
$('.livestream').show(0, function() {
function showLive () {
if (!liveShown) {
$('.countdown').hide(400, () => {
$('.livestream').show(0, () => {
$('video').height(0);
$('video').animate({height: $('video').width() * (9 / 16), display: 'block'}, 1000);
$('video').animate({
height : $('video').width() * (9 / 16),
display: 'block',
}, 1000);
});
});
liveShown = true;
}
}

function getHash() {
function getHash () {
const currHash = window.location.hash;
return (currHash !== '') ? currHash : false;
return currHash !== '' ? currHash : false;
}

function setHash(hash) {
function setHash (hash) {
window.location.hash = hash;
}

+ 26
- 65
package.json View File

@@ -4,11 +4,12 @@
"description": "This repository contains the Techweek website",
"main": "gulpfile.js",
"scripts": {
"test": "eslint js/* bin/* && bin/check-event-json && gulp",
"test": "eslint js/* bin/* && node bin/checkEventJson.js && gulp",
"dev": "gulp dev",
"postinstall": "gulp",
"lint": "eslint",
"build": "gulp"
"lint": "eslint .",
"build": "gulp",
"fix": "eslint . --fix"
},
"repository": {
"type": "git",
@@ -21,78 +22,38 @@
},
"homepage": "https://github.com/redbrick/techweek.dcu.ie#readme",
"dependencies": {
"babel-preset-es2015": "^6.16.0",
"glob": "^7.1.0",
"handlebars": "^4.0.6",
"jquery": "^2.2.4",
"json-front-matter": "^1.0.0",
"jsonschema": "^1.1.1",
"marked": "^0.3.6",
"materialize-css": "^0.97.7"
},
"devDependencies": {
"babel-cli": "6.23.0",
"babel-core": "6.23.1",
"babel-eslint": "7.1.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-es6-promise": "1.1.1",
"babel-plugin-syntax-async-functions": "6.13.0",
"babel-plugin-transform-async-to-generator": "6.22.0",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-preset-es2015": "6.22.0",
"eslint": "^3.6.1",
"eslint-plugin-json": "^1.2.0",
"glob": "^7.1.0",
"eslint-config-standard": "6.2.1",
"eslint-plugin-promise": "3.4.2",
"eslint-plugin-standard": "2.0.1",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-clean-css": "^2.0.12",
"gulp-concat": "^2.6.0",
"gulp-connect": "^5.0.0",
"gulp-htmlmin": "^3.0.0",
"gulp-json-schema": "^1.0.0",
"gulp-minify": "0.0.14",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.2",
"gulp-shell": "^0.5.2",
"handlebars": "^4.0.6",
"jquery": "^2.2.4",
"materialize-css": "^0.97.7"
},
"eslintConfig": {
"plugins": [
"json"
],
"env": {
"browser": true,
"es6": true,
"node": true,
"jquery": true
},
"globals": {
"start": true
},
"extends": "eslint:recommended",
"rules": {
"no-console": 0,
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-var": [
"error"
],
"prefer-const": [
"error",
{
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
]
}
},
"babel": {
"presets": [
[
"es2015",
{
"modules": false
}
]
],
"compact": true
"gulp-shell": "^0.5.2"
}
}

events/2014.json → pages/2014.md View File

@@ -1,4 +1,6 @@
{
{{{
"title": "2014",
"template": "schedule",
"location": "Dublin City University",
"start": 3,
"end": 7,
@@ -190,4 +192,4 @@
"description": "Alan Neville is also a Senior Reverse Engineer and Malware expert working in Symantec. This talk will follow up on Andrea's with a higher level view of where reverse engineering fits into a malware attack response team. This will use real world case studies, Providing expert insight into threat analysis and some of the massive cyber attacks we would never otherwise hear about."
}]
}]
}
}}}

events/2015.json → pages/2015.md View File

@@ -1,4 +1,6 @@
{
{{{
"title": "2015",
"template": "schedule",
"location": "Dublin City University",
"start": 9,
"end": 13,
@@ -298,4 +300,4 @@
"description": "From your command line to production environment just hitting a key. How can this be achieved? A brief introduction to CI/CD, some tools and an example on how this could be done promoting your package from one environment to the other until it reaches production. Tools: git, maven, Jenkins and shell script."
}]
}]
}
}}}

events/2016.json → pages/2016.md View File

@@ -1,4 +1,6 @@
{
{{{
"title": "2016",
"template": "schedule",
"location": "Dublin City University",
"start": 15,
"end": 19,
@@ -262,4 +264,4 @@
"description": "Somewhere in DCU"
}]
}]
}
}}}

+ 29
- 0
pages/CFT.md View File

@@ -0,0 +1,29 @@
{{{
"title": "Call For Talks",
"template": "message"
}}}

Redbrick are looking for people to come and talk to our members, and we’d like to hear from you! We’d like people to come and talk to us about all aspects of software engineering, operations, networking, or anything that you’re passionate about. Some talks we’ve had in the past that we’ve enjoyed have included:

- Security
- Internet of Things (IoT)
- Virtualisation
- Mobile Development
- Development tools
- Web Design
- Distributed Systems
- Open Source Software
- Networking
- Linux
- Hardware
- Frameworks

###### What we want?
We want people to come and talk to us! We’d love to hear about any relevant topic that you’re passionate about, or want to spread the word about. We’re open to any ideas, so if you think that you have an idea for a talk, just email us at committee@redbrick.dcu.ie with a short description and we’ll see what we can organise.

We hold weekly tutorials and talks, usually run by members of the committee, but often by our associate members (former students and staff of DCU) and other people from the industry.

Since we’re a college society, we tend to try organise talks during the semester, and to work around lecture schedules. Typically this is from September to December, and February to June. We normally meet on Monday/Tuesday/Thursday between 4 and 6pm, or on Wednesday between 2 and 5pm. We’re flexible though, so don’t let that put you off!

###### Who are we?
Redbrick is the Computer Networking society in DCU. We started in 1996, and since then we’ve been building a community of members with a common interest: All things tech. We aim to make a great environment to learn new skills and technologies and to meet other people with a common interest.

+ 115
- 0
pages/index.md View File

@@ -0,0 +1,115 @@
{{{
"title": "Home",
"template": "schedule",
"location": "Dublin City University",
"start": 15,
"end": 29,
"month": "March",
"year": 2017,
"live": "2017-03-15T17:00:00",
"archive": "false",
"video": "https://www.youtube.com/embed/videoseries?list=PLPaLJSHTDMFhbDmyUeik6IHXmzVtWQQxu",
"days": [{
"day": "Wednesday-15th",
"description": "Security",
"events": [{
"name": "Opening Event",
"by": "Redbrick DCU's Computer Networking Society",
"time": "15:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "Opening of TechWeek 2017"
}, {
"name": "TBA",
"by": "TBA",
"time": "15:05",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "TBA",
"by": "TBA",
"time": "16:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA!"
}, {
"name": "TBA",
"by": "TBA",
"time": "17:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Wednesday-22th",
"description": "Dev Tools",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "TBA",
"by": "TBA",
"time": "16:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA!"
}, {
"name": "TBA",
"by": "TBA",
"time": "17:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}, {
"day": "Wednesday-29th",
"description": "Mobile Development",
"events": [{
"name": "TBA",
"by": "TBA",
"time": "15:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}, {
"name": "TBA",
"by": "TBA",
"time": "16:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA!"
}, {
"name": "TBA",
"by": "TBA",
"time": "17:00",
"place": {
"id": "LG26",
"map": "Somewhere in DCU"
},
"description": "TBA"
}]
}]
}}}

+ 25
- 52
schema.json View File

@@ -1,14 +1,20 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Root schema.",
"description": "An explanation about the purpose of this instance.",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"default": "Home"
},
"template": {
"type": "string",
"minLength": 1,
"default": "schedule"
},
"location": {
"type": "string",
"minLength": 1,
"title": "Location schema.",
"description": "An explanation about the purpose of this instance.",
"default": "Dublin City University"
},
"start": {
@@ -18,9 +24,7 @@
"minimum": 1,
"exclusiveMaximum": false,
"exclusiveMinimum": false,
"title": "Start schema.",
"description": "An explanation about the purpose of this instance.",
"default": 24
"default": 15
},
"end": {
"type": "integer",
@@ -29,15 +33,11 @@
"minimum": 1,
"exclusiveMaximum": false,
"exclusiveMinimum": false,
"title": "End schema.",
"description": "An explanation about the purpose of this instance.",
"default": 28
"default": 29
},
"month": {
"type": "string",
"minLength": 1,
"title": "Month schema.",
"description": "An explanation about the purpose of this instance.",
"default": "March"
},
"year": {
@@ -47,102 +47,71 @@
"minimum": 1,
"exclusiveMaximum": false,
"exclusiveMinimum": false,
"title": "Year schema.",
"description": "An explanation about the purpose of this instance.",
"default": 2017
},
"live": {
"type": "string",
"minLength": 1,
"title": "Live schema.",
"description": "An explanation about the purpose of this instance.",
"default": "2017-03-24T12:00:00"
"default": "2017-03-15T17:00:00"
},
"archive": {
"type": "string",
"minLength": 1,
"title": "Archive schema.",
"description": "An explanation about the purpose of this instance.",
"default": "false"
},
"video": {
"type": "string",
"minLength": 1,
"title": "Video schema.",
"description": "An explanation about the purpose of this instance.",
"default": ""
"default": "https://www.youtube.com/embed/videoseries?list=PLPaLJSHTDMFhbDmyUeik6IHXmzVtWQQxu"
},
"days": {
"type": "array",
"uniqueItems": false,
"title": "Days schema.",
"description": "An explanation about the purpose of this instance.",
"items": {
"type": "object",
"title": "4 schema.",
"description": "An explanation about the purpose of this instance.",
"properties": {
"day": {
"type": "string",
"minLength": 1,
"title": "Day schema.",
"description": "An explanation about the purpose of this instance.",
"default": "Friday"
"default": "Wednesday 29th"
},
"description": {
"type": "string",
"title": "Description schema.",
"description": "An explanation about the purpose of this instance.",
"default": "Lightning Talks"
"minLength": 1,
"default": "Mobile Development"
},
"events": {
"type": "array",
"uniqueItems": false,
"title": "Events schema.",
"description": "An explanation about the purpose of this instance.",
"items": {
"type": "object",
"title": "3 schema.",
"description": "An explanation about the purpose of this instance.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"title": "Name schema.",
"description": "An explanation about the purpose of this instance.",
"default": "TBA"
},
"by": {
"type": "string",
"minLength": 1,
"title": "By schema.",
"description": "An explanation about the purpose of this instance.",
"default": "TBA"
},
"time": {
"type": "string",
"minLength": 1,
"title": "Time schema.",
"description": "An explanation about the purpose of this instance.",
"default": "16:00"
"default": "17:00"
},
"place": {
"type": "object",
"title": "Place schema.",
"description": "An explanation about the purpose of this instance.",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"title": "Id schema.",
"description": "An explanation about the purpose of this instance.",
"default": "The Mezz"
"default": "LG26"
},
"map": {
"type": "string",
"minLength": 1,
"title": "Map schema.",
"description": "An explanation about the purpose of this instance.",
"default": "Somewhere in DCU"
}
},
@@ -154,8 +123,6 @@
"description": {
"type": "string",
"minLength": 1,
"title": "Description schema.",
"description": "An explanation about the purpose of this instance.",
"default": "TBA"
}
},
@@ -171,17 +138,23 @@
},
"required": [
"day",
"description",
"events"
]
}
}
},
"required": [
"title",
"template",
"location",
"start",
"end",
"month",
"year",
"live",
"archive",
"video",
"days"
]
}

+ 36
- 0
templates/message.hbs View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ site.title }} | {{ title }}</title>
<link type="text/css" rel="stylesheet" href="/css/main.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
</head>
<body>
<div class="wrapper">
<div class="sub-wrap">
<header class="title">
<h1 class="title__text"><a href="/"><span class="title__text__colour">{{{ splitTitle site.title }}}</a></h1>
<ul class="menu">{{#each site.menu}}
<li class="menu__item">
<a href="/{{ url }}">{{ title }}</a>
</li>
{{/each}}</ul>
</header>
<main>
<div class="card-message">
<div class="container" >
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title"> {{ title }} </span>
{{{ body }}}
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script type="text/javascript" src="/js/main.min.js"></script>
</body>
</html>

template.handlebars → templates/schedule.hbs View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ title }} {{ year }}| {{ Location }}</title>
<title>{{ site.title }} {{ year }} | {{ location }}</title>
<link type="text/css" rel="stylesheet" href="/css/main.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
@@ -10,9 +10,9 @@
<div class="wrapper">
<div class="sub-wrap">
<header class="title">
<h1 class="title__text"><a href="/"><span class="title__text__colour">{{{ splitTitle title }}}</a></h1>
<h1 class="title__text"><a href="/"><span class="title__text__colour">{{{ splitTitle site.title }}}</a></h1>
<p>{{ location }} {{ start }} - {{ end }} {{ month }} {{ year }}</p>
<ul class="menu">{{#each pages}}
<ul class="menu">{{~#each site.menu~}}
<li class="menu__item">
<a href="/{{ url }}">{{ title }}</a>
</li>
@@ -37,17 +37,17 @@
</div>
<!-- All events are loaded into this element -->
<div class="card-container">
<ul class="collapsible popout card-container__events" data-collapsible="accordion">{{#each days}}
<ul class="collapsible popout card-container__events" data-collapsible="accordion">{{~#each days~}}
<div class="card-container">
<ul class="collapsible popout card-container__events" data-collapsible="accordion">
<li data-hash="#{{ day }}" class="active">
<div id="#{{ day }}" class="collapsible-header container day">
<h5 class="day__title" data-position="right" style="color: rgb(233, 30, 99);">
<span class="day__title__bold">{{ day }}</span> - {{ description }}
<span class="day__title__bold">{{ day }}</span> | {{ description }}
</h5>
</div>
<div class="collapsible-body" style="display: block;">
<ul id="{{ day }}-events" class="collapsible sub-collapsible" data-collepsible="accordion"> {{#each events}}
<ul id="{{ day }}-events" class="collapsible sub-collapsible" data-collepsible="accordion"> {{~#each events~}}
<li>
<div class="collapsible-header event-card">
<div class="event-card__time"> {{ time }} </div>

+ 562
- 371
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save