An example of how to implement (full) auto-rebuilds and browser sync with Metalsmith
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<style> | |
* { box-sizing: border-box; } | |
html, body { background: #ccc; padding: 0; margin: 0; position: relative; } | |
#container { width: 960px; max-width: 100%; padding: 32px; margin: 32px auto; } | |
#contents { width: 600px; max-width: 100%; padding: 32px; margin: 0px auto; background: white; } |
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
{ | |
"name": "metalsmith-resume", | |
"version": "0.0.1", | |
"description": "A professional online & print resume powered by metalsmith", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"serve": "node_modules/.bin/serve dist", | |
"start": "node index && npm run serve" | |
}, |
Adds a context menu entry upon right-clicking folders to open the folder as a clean workspace in Notepad++, like many other modern editors allow.
Requires Notepad++ 7.8 or higher.
Run install.cmd
as administrator, or open regedit
and manually import the .reg
file.
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
<?php | |
if (myself(false) === 'load.php' && @$_GET['id'] === 'i18n_base') { | |
add_action('page-access', 'i18n_base_pages_access'); | |
} | |
add_filter('permissions-css', 'i18n_base_permissions_css'); | |
function i18n_base_pages_access() { | |
$usermgr = usermgr(); | |
$current_user = current_user(); |
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
/* standard CSS. Add position:relative to elements which get an anchor hash */ | |
html { scroll-behavior: smooth; } | |
.anchorize-hash { outline: none; text-decoration: none; position: absolute; left: 0; cursor: hand; cursor: pointer; color: inherit; opacity: 0.3; transition: opacity .1s; } | |
.anchorize-hash:hover { opacity: 1; } | |
h2, h3 { position: relative; padding-left: 1em; } |
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 vEl = function(element, options) { | |
var root = document.createElement(element); | |
for (var option in options) { | |
if (option === 'events') { | |
for (var event in options.events) | |
root.addEventListener(event, options.events[event], false); | |
} else if (option === 'children') { | |
for (var i = 0, len = options.children.length; i < len; i++) | |
root.appendChild(options.children[i]); | |
} else if (root.hasOwnProperty(option)) { |
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
/** | |
* @module ko.extenders.filters | |
* @desc Allows for cumulative filters on Knockout observable arrays | |
* @version 1 | |
* @author Kevin Van Lierde (Tyblitz) | |
* @license MIT license, Copyright (c) 2015, Kevin Van Lierde (https://opensource.org/licenses/MIT) | |
*/ | |
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CKEditor Toolbar builder</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<style> | |
body { font-family: sans-serif; font-size: 14px; padding: 0; margin: 0;} | |
#statusbar { position: absolute; right: 0; background: white; padding: 5px; width: 200px; border: 1px solid #c0c0c0; border-top-width: 0; border-right-width: 0; border-bottom-left-radius: 3px; height: 1em; top: 0;} |
NewerOlder