Skip to content

Instantly share code, notes, and snippets.

View ankedsgn's full-sized avatar

Anke ankedsgn

  • Flink
View GitHub Profile
/***********************************************
HULPJE
***********************************************/
footer {
:after {
content: "content";
@ankedsgn
ankedsgn / gist:6032472191b55f99cab6300b8224b677
Created May 2, 2017 08:34
Gebruik ck editor longdescription voor figure + figcaption
$(function() {
$('.body img[longdesc]').each(function() {
var caption = $(this).attr('longdesc');
var style = $(this).attr('style');
var replacement = "<figure style='" + style + "' >" + $(this).prop('outerHTML') + "<figcaption>" + caption + "</figcaption>" + "</figure>";
replacement = $(replacement).css('height', 'auto').css('width', 'auto');
$(this).parent().replaceWith(replacement);
});
{#
MADE FOR A SPECIFIC SITE, BUT THE ICS IDEA IS PROBABLY CLEAR HERE - AW 2017
#}
{% if (item.start_event is not empty) and (item.end_event is not empty) %}
{# when no times, we make no add to calendar blokkie #}
{% set icslink =
'data:text/calendar;
charset=utf8,
<section class="download-module">
<ul>
{% for item in record.attachments %}
<li> <a href="{{ asset(item.filename, 'files') }}">
<svg class="icon icon-download">
<use xlink:href="#icon-download"></use>
</svg>
{{ item.title }}
<div class="meta">
{% set fileinfo = imageinfo(item.filename) %}
In contenttype.yml
imagelicense:
label: "Image License"
type: select
values:
'Public-Domain' : 'Public Domain'
'CC0' : 'CC0'
'CC-BY' : 'CC BY'
'CC-BY-SA' : 'CC BY-SA'
wysiwyg:
images: false # Allow users to insert images in the content.
anchor: false # Adds a button to create internal anchors to link to.
tables: true # Adds a button to insert and modify tables in the content.
fontcolor: false # Allow users to mess around with font coloring.
align: false # Adds buttons for 'align left', 'align right', etc.
subsuper: false # Adds buttons for subscript and superscript, using `<sub>` and `<sup>`.
embed: false # Allows the user to insert embedded video's from Youtube, Vimeo, etc.
underline: false # Adds a button to underline text, using the `<u>`-tag.
ruler: false # Adds a button to add a horizontal ruler, using the `<hr>`-tag.
/* sauce: https://www.paulirish.com/2009/random-hex-color-code-snippets/ */
<script>
bgcolor = '';
bgcolor = '#'+Math.floor(Math.random()*16777215).toString(16);
coverimg += 'background-color:' + bgcolor;
$('.background').removeAttr('style').attr('style', coverimg);
</script>
@ankedsgn
ankedsgn / Get raw menu from bolt settings
Last active May 7, 2018 12:50
Get raw menu from Bolt, no submenus, do something after halfway through loop
{% set footerthemamenu = app.config.get('menu/samen-verder') %}
<ul>
{% for item in footerthemamenu %}
{# Get record of the menu item, to create the real routes #}
{% setcontent itemrecord = item.path %}
<li>
<a href="{{ itemrecord.link }}">{{ item.label }}</a>
</li>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-XXXXXXX', 'auto');
ga('set', 'forceSSL', true);
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
<script async="" src="https://www.google-analytics.com/analytics.js"></script>
@ankedsgn
ankedsgn / Google Tag manager with anonimyzed IP
Last active May 29, 2018 08:50
Google Tag manager with anonimyzed IP
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXX-XX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'XX-XXXXXX-XX', { 'anonymize_ip': true });
</script>