Skip to content

Instantly share code, notes, and snippets.

@kezzbracey
kezzbracey / custom-font.css
Created July 26, 2021 05:50
Font face boilerplate
/*
CSS for the normal weight and style file for a custom font.
Attempts to load the file locally first.
Use the line that loads a woff2 version of the font if you have the required file,
or else delete that line and just use the woff file loading line.
Uses font-display:swap; to help the loading process.
*/
@font-face {
font-family: 'Custom Font';
src: local('Custom Font'),
@kezzbracey
kezzbracey / index.html
Last active January 3, 2017 09:07
Starter template code for Craft CMS personal page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://fonts.googleapis.com/css?family=PT+Serif|Varela" rel="stylesheet">
<style>
:root {
<!-- In "mainmenu.php" find this code on line 7 -->
<script type="text/javascript">
jQuery(document).ready( function(){
jQuery( '.mainmenuselect' ).change(function() {
window.location = jQuery(this).find( 'option:selected' ).val();
});
});
</script>
@kezzbracey
kezzbracey / gist:6758502
Created September 30, 2013 02:00
CSS to add to automatically align all content images in Polygonix Ghost themes.
/* Add to themename/SKINS/themename/css/default.css */
.postbody_nix img {
display: block;
margin-left: auto;
margin-right: auto;
}
@kezzbracey
kezzbracey / gist:6758471
Created September 30, 2013 01:56
Aligning images in markdown / Ghost post editor.
<!--To center an image-->
<p align="center">
![alt]()
</p>
<!--To right align an image-->
<p align="right">
![alt]()
</p>