Skip to content

Instantly share code, notes, and snippets.

View taniarascia's full-sized avatar
💾

Tania Rascia taniarascia

💾
View GitHub Profile
// Variables
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Instafeed</title>
<style>
body {
margin: 0;
padding: 0;
@taniarascia
taniarascia / inline-mixin.scss
Created February 9, 2016 17:00
Inline block mixin
@mixin inline-block-lr($container,$left,$right){
#{$container}{
text-align: justify;
&:after{
content: '';
display: inline-block;
width: 100%;
height: 0;
font-size:0;
@taniarascia
taniarascia / active-scroll.js
Created January 8, 2016 01:27
Active Scroll Highlight
$(document).ready(function () {
$(document).on("scroll", onScroll);
// Smooth scroll
$('a[href^="#"]').on('click', function (e) {
e.preventDefault();
$(document).off("scroll");
$('a').each(function () {
$(this).removeClass('active');
})
@taniarascia
taniarascia / margins.scss
Created January 8, 2016 01:12
Add margins in between columns
/* Adding margins instead of padding based
.no-collapse {
> [class*="column"] ~ [class*="column"] {
margin-left: .5rem;
}
}
[class*="column"] ~ [class*="column"] {
margin-left: 0;
}
@include large-screen {
@taniarascia
taniarascia / forloop.scss
Created January 8, 2016 01:01
SCSS For Loop
@for $i from 1 through 8 {
$width: percentage(1 / $i)
.col-#{$i} {
width: $width;
}
}
@taniarascia
taniarascia / mail.php
Created December 30, 2015 16:49
Mail test
<?php
$to = 'trascia@leye.com';
$subject = 'Test email using PHP';
$message = 'This is a test email message';
$headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: trascia@leye.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers, '-fwebmaster@example.com');
@taniarascia
taniarascia / thumb.php
Created December 14, 2015 05:49
Echo Thumbnail of Featured Image
<?php if(get_post_thumbnail_id()) {?><div class="flex-responsive"><div class="box _25 pad">
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' );
$url = $thumb['0']; ?>
@taniarascia
taniarascia / emoji.php
Created December 14, 2015 04:26
Disable Emojis
function disable_wp_emojicons() {
// all actions related to emojis
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
@taniarascia
taniarascia / google-fonts.php
Created December 14, 2015 04:25
Google Fonts
// Google Fonts
function load_fonts() {
wp_register_style('OpenSans', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800');
wp_register_style('NotoSerif', 'http://fonts.googleapis.com/css?family=Noto+Serif:400,700');
wp_register_style('RobotoMono', 'http://fonts.googleapis.com/css?family=Roboto+Mono:400,300,500,700');
wp_enqueue_style( 'OpenSans');
wp_enqueue_style( 'NotoSerif');
wp_enqueue_style( 'RobotoMono');
}