Skip to content

Instantly share code, notes, and snippets.

View bearduk's full-sized avatar

Chris Beard bearduk

  • Keele University
  • Keele, UK
View GitHub Profile
@bearduk
bearduk / countdown.js
Created March 15, 2019 08:45
Simple countdown clock
// Set the date we're counting down to
var countDownDate = new Date("May 25, 2020 00:00:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get todays date and time
var now = new Date().getTime();
// Find the distance between now an the count down date
@bearduk
bearduk / _text-html-programmable
Last active February 5, 2024 17:44
k- Banner Standard t4 programmable layout
try {
importClass(com.terminalfour.publish.utils.BrokerUtils); // this is so that you can process t4tags
importPackage(com.terminalfour.template);
importPackage(com.terminalfour.sitemanager);
var chosenFormatterTag = '<t4 type="content" name="Choose variant" output="normal" modifiers="" />'; // update tag info
var chosenFormatter = BrokerUtils.processT4Tags (dbStatement, publishCache, section, content, language, isPreview, chosenFormatterTag);
var tid = content.getTemplateID();

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

@bearduk
bearduk / microsite-nav
Created February 7, 2018 11:38
microsite-example-nav-t4-output
<!-- microsites are self contained in sections 4 levels deep in the CMS. This means that they have no sibling sections and so we're able to output the structure in exactly the same way as the main k-web site, we just start at level 4. Level 4 becomes 'currentbranch0' -->
<html>
<body>
<!-- navigation object : k-core-microsite-nav -->
<span class="currentbranch0">
<a href="/ts/micro-1/">Test microsite home 1</a>
</span>
<ul class="multilevel-linkul-0">
<li>
@bearduk
bearduk / README.md
Created November 15, 2017 09:26 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@bearduk
bearduk / course-finder.js
Created October 2, 2017 13:01
Algolia search in vue component
<template lang="html">
<div class="shield course-finder">
<div class="shield__content">
<svg class="svg-icon" height="40px" width="40px">
<use xlink:href="/media/svg/sprite.svg#icon-course-finder"></use></svg>
<h2>Find a course for you</h2>
<form action="/absolute/patterns/view/search-results" class="" id="" method="get" name="">
<div class="form__field floating-label">
<select id="field-level" name="field-level" required="">
<option disabled selected value="">