Skip to content

Instantly share code, notes, and snippets.

View sakamies's full-sized avatar

Ville V. Vanninen sakamies

View GitHub Profile
@sakamies
sakamies / index.js
Last active April 5, 2017 19:44
Kinda sorta my accidental JS framework
Model = require('./model.js')
SomeModule = require('./somemodule.js')
const model = new Model()
const moduleOne = new SomeModule(document.querySelector('#stuff'), model)
const moduleDuo = new SomeModule(document.querySelector('#other-stuff'), model)
//Kick off the app by setting some initial data
model.set(initialData)

Trivial SVG graph

Trying to find the simplest way to make an SVG graph. No features really, just drawing a graph when given some data for x & y axes, with minimal manipulation and code.

A Pen by Ville V. Vanninen on CodePen.

License.

@sakamies
sakamies / headings.php
Last active July 1, 2017 13:27
Kirbytext combined heading tags
<?php
//Define the tag into a variable, so we can use it in multiple tags at the bottom of this file
$tagName = array(
'attr' => array(
'align',
'link',
'target',
'class'
),
@sakamies
sakamies / icon.php
Last active May 2, 2018 06:06
Kirby icon tag with svg sprites
<?php
kirbytext::$tags['icon'] = array(
'attr' => array(
'rel',
'link',
'target',
'width',
'height',
'class',
@sakamies
sakamies / dabblet.css
Last active August 29, 2015 14:00
Loading blobule
.blob {
display: block;
position: absolute;
top: 50%;
left: 50%;
width: 0px;
height: 0px;
margin-top: -30px;
margin-left: -30px;
background: green;
@sakamies
sakamies / gist:2757588
Created May 20, 2012 10:23
Sticky footer function
var updateFooter = function ($footer) {
var window_height = jQuery(window).height();
var body_offset_top = jQuery('body').offset().top;
var body_outer_height = jQuery('body').outerHeight();
var body_height = jQuery('body').height();
body_bottom = (body_offset_top + body_outer_height) - ((body_outer_height - body_height)/2);
var footer_height = $footer.outerHeight(true);
if (!$footer.hasClass('sticky') && window_height > body_bottom) {
$footer.addClass('sticky');
@sakamies
sakamies / dabblet.css
Created April 8, 2012 12:46
Transparent Tabs
/* Transparent Tabs */
.tabs {
list-style: none;
padding: 0;
overflow: hidden;
}
.tab {
display: block;
float: left;
@sakamies
sakamies / dabblet.css
Created March 28, 2012 10:37
Pixel Perfect CSS Rotation
/* Pixel Perfect CSS Rotation */
body {
text-align: center;
}
.clock {
display: inline-block;
background: black;
border-radius: 100%;
width: 101px;
height: 101px;