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'
@ankedsgn
ankedsgn / .profile
Last active November 22, 2018 15:07
Show git branch in command line
# show git branch in prompt
# https://coderwall.com/p/pn8f0g/show-your-git-status-and-branch-in-color-at-the-command-prompt
# add to .profile of your user directory ( nano ~/.profile )
# reload with: source ~/.profile
COLOR_RED="\033[0;31m"
COLOR_YELLOW="\033[0;33m"
COLOR_GREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
COLOR_BLUE="\033[0;34m"
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.
@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>
/* 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>
{# extra supernested lookup table #}
{% set personinfo = {
'1198' : {
'color' : '#ff0099',
'number' : '9',
'title' : 'My fingers are cold',
'portraitsrc' : 'portrait_piet.png',
'imgsrc' : 'image_piet.png'
},