Skip to content

Instantly share code, notes, and snippets.

View taniarascia's full-sized avatar
💾

Tania Rascia taniarascia

💾
View GitHub Profile
@taniarascia
taniarascia / http-conf
Created September 17, 2015 17:40
Redirect from http conf
ServerName shawsoysterfest.com
ServerAlias www.shawsoysterfest.com
Redirect 301 / http://www.oysterfestchicago.com/
@taniarascia
taniarascia / hover.js
Created September 24, 2015 14:29
Hover Example
var image = document.getElementById("hover-example");
image.onmouseover = function() { image.src = "http://placehold.it/350x150/262626/ffffff"; }
image.onmouseout = function() { image.src = "http://placehold.it/350x150"; }
@taniarascia
taniarascia / header-scroll.js
Created September 30, 2015 16:41
Change Header Color on Scroll
var scroll_start = 0;
var startchange = $('#scroll-color');
var offset = startchange.offset();
$(document).scroll(function () {
scroll_start = $(this).scrollTop();
if (scroll_start > offset.top) {
$('.navigation').css('background', '#e63c2d');
} else {
$('.navigation').css('background', 'transparent');
}
@taniarascia
taniarascia / active.js
Created October 1, 2015 17:57
Active Scroll
var sections = $('section'),
links = $('nav ul li a'),
lis = $('nav ul > li');
$(window).scroll(function() {
var currentPosition = $(this).scrollTop();
links.removeClass('active');
lis.removeClass('active');
sections.each(function() {
@taniarascia
taniarascia / nav.html
Last active February 13, 2024 07:52
Responsive Dropdown Navigation Bar
<section class="navigation">
<div class="nav-container">
<div class="brand">
<a href="#!">Logo</a>
</div>
<nav>
<div class="nav-mobile">
<a id="nav-toggle" href="#!"><span></span></a>
</div>
<ul class="nav-list">
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
@taniarascia
taniarascia / index.php
Created October 18, 2015 00:54
Start Wordpress Tutorial
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
// Load Grunt
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Tasks
sass: { // Begin Sass Plugin
dist: {
options: {
sourcemap: 'none'
@taniarascia
taniarascia / category.php
Created October 27, 2015 00:03
Add category to post
<?php
foreach((get_the_category()) as $category) {
if ($category->cat_name != 'Uncategorized') {
echo '<a class="category-block" href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> '; }}
?>
Functions.php:
function get_custom(){
return 'http://www.custom.com';
}
<?php echo get_custom();?>