Skip to content

Instantly share code, notes, and snippets.

View B-iggy's full-sized avatar
🌪️
Ambition

RexXxuS B-iggy

🌪️
Ambition
View GitHub Profile
@B-iggy
B-iggy / header.html
Created May 22, 2019 13:28
Discourse TOC Anchor Links - Copy to Clipboard
<script type="text/discourse-plugin" version="0.1">
const computed = require("ember-addons/ember-computed-decorators").default;
const minimumOffset = require("discourse/lib/offset-calculator").minimumOffset;
const { iconHTML } = require("discourse-common/lib/icon-library");
const { run } = Ember;
const mobileView = $("html").hasClass("mobile-view");
const isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
const scrollElemnt = isSafari ? "body" : "html";
@B-iggy
B-iggy / inline-svg.scss
Created September 17, 2015 19:53
Inline SVG styles [SASS]
$rating-small: 'small';
$rating-medium: 'medium';
$rating-large: 'large';
$windowsphone-fallback-small: 15px 15px;
$windowsphone-fallback-medium: 20px 20px;
$windowsphone-fallback-large: 25px 25px;
$given-parameter1: 'review';
$given-parameter2: 'shop';
@B-iggy
B-iggy / inline-svg-function.scss
Last active December 13, 2020 11:53
Inline SVG function [SASS]
// set svg d path used as fallback (star)
$svg-d-path: 'm25,1l6,17l18,0l-14,11l5,17l-15,-10l-15,10l5,-17l-14,-11l18,0l6,-17z' !default;
// functions to urlencode the svg string
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
@B-iggy
B-iggy / css-pseudo-element-umlaute
Last active August 29, 2015 14:21
CSS Umlaute in pseudo-elementen
/**
Dies sind die ISO codes
ä - \00e4
ö - \00f6
ü - \00fc
*/
/**
Dies ist ein schöner Tag an dem ich am liebsten schwimmen gehen würde.
@B-iggy
B-iggy / sublime-sass-build-partial
Created May 6, 2015 19:15
Sublime Text 3 Build Main Scss File Even If Editing Only Partial File [Code]
// compressed version
"cmd": ["sass", "--update", "${file_path}\\..\\style.scss:${project_path}\\themes\\ignaz-biegler\\css\\style.min.css", "--stop-on-error", "--no-cache", "--style", "compressed"],
// normal version
"cmd": ["sass", "--update", "${file_path}\\..\\style.scss:${project_path}\\themes\\ignaz-biegler\\css\\style.css", "--stop-on-error", "--no-cache"],