This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unixTimeBetween = function(d1, d2) { | |
var today = d2.getTime() / 1000 | |
var diff = Math.abs(d1 - (d2.getTime() / 1000)); | |
var result = diff / (60 * 60 * 24); | |
console.log('Result: ' + result); | |
if(result * 24 * 60 * 60 < 60) | |
console.log('Seconds ago: ' + Math.trunc(result * 24 * 60 * 60)); | |
else if(result * 24 * 60 < 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Case: When working with dark colors in your app's header section, the default black color of the iOS native signal/status bar can create a disturbing and hard to read appereance. Changing this to white gives the app a more user-friendly tone. | |
// Todo: In your app.component.ts you will find the following funtion inside of 'export class xyz'... | |
initializeApp() { | |
this.platform.ready().then(() => { | |
// ...change this line and add '.styleLightContent()' at the end instead of 'this.statusBar.styleDefault()' | |
this.statusBar.styleLightContent(); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _stepper.pug | |
mixin stepper(title, name, val, inactive) | |
p.c-hitlist__label= title | |
if inactive | |
.stepper__wrapper.disabled__wrapper(id=name+'Stepper') | |
// Decrease value (disabled/default) | |
button.stepper__dec(type='button', disabled) | |
img(src=IMG_pfad+'icons/ih-iconset/minus-676767.svg') | |
// Textinput for direct value-manipulation (inactive + predefined value/default) | |
if val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unslider.js from release v.2.0.3 (1e6558f) - Contains a critical bugfix, PR pending | |
// See this issue for more info on this custom version: https://github.com/idiot/unslider/issues/511 | |
/** | |
* Unslider | |
* version 2.0 | |
* by @idiot and friends | |
*/ | |
(function($) { |