Skip to content

Instantly share code, notes, and snippets.

View melissacabral's full-sized avatar

Melissa Cabral melissacabral

View GitHub Profile
@melissacabral
melissacabral / admin-style.css
Last active December 17, 2015 22:49
Admin Panel starter for wp310 blog demo
@charset "utf-8";
@import url(http://fonts.googleapis.com/css?family=Coustard|Droid+Sans:400,700);
/* =RESET */
body,html {
margin: 0;
padding: 0;
height: 100%;
font-size: 100%;
font-family: 'Droid Sans', Arial, Helvetica, sans-serif;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 Starter</title>
<link rel="stylesheet" href="assets/css/main.css" type="text/css" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<?php
//creates db object
$db = new mysqli('localhost', 'user', 'pass', 'demo');
if($db->connect_errno > 0){
die('Unable to connect to database');
}
//set up query
$query = 'SELECT *
<?php
// A helper function to make generating the HTML for an error message easier
function sticky_field($field){
if(isset($field)){
echo $field;
}
}
function print_error($key, $errors) {
if (isset($errors[$key])) {
<article class="tile cf graphic-design hentry PUT WORDPRESS POST_CLASS HERE">
<div class="resource-image thumbnail"> <img src="http://placekitten.com/352/198" alt="TITLE"/>
<div class="category-icon"> <i class="icon-magic"></i> </div>
<div class="popularity"><a href="#"><i class="icon-heart"></i></a> 9999</div>
</div>
<h3 class="entry-title">TITLE OF RESOURCE</h3>
<p class="entry-content">Short description of resource</p>
<div class="postmeta">
TAGS
<article class="tile no-image cf graphic-design PUT WORDPRESS POST_CLASS HERE">
<div class="popularity"><a href="#"><i class="icon-heart"></i></a> 9999</div>
<div class="category-icon"> <a href="CATEGORY ARCHIVE"><i class="icon-magic"></i></a> </div>
<h3 class="entry-title"><a href="PERMALINK">TITLE OF RESOURCE</a></h3>
<div class="postmeta">
<span class="username"><a href="#">AUTHOR</a></span> |
<time datetime="2012-02-17" class="time-ago">a long time ago</time>
</div>
</article>
@melissacabral
melissacabral / anthill-visual-tile.html
Created May 4, 2013 00:27
use for tiles with an image
<article class="tile cf graphic-design @TODO PUT WORDPRESS POST_CLASS HERE">
<div class="resource-image thumbnail">
<a href="PERMALINK">
<img src="http://placekitten.com/352/198" alt="TITLE" />
</a>
<div class="popularity"><a href="#"><i class="icon-heart"></i></a> 9999</div>
<div class="category-icon"> <a href="CATEGORY ARCHIVE"><i class="icon-magic"></i></a> </div>
</div>
<h3 class="entry-title"><a href="PERMALINK">TITLE OF RESOURCE</a></h3>
@melissacabral
melissacabral / wp-admin-table-markup.html
Created April 30, 2013 18:17
Wordpress Admin Panel Markup starter
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row">
<label>Option 1</label>
</th>
<td>
INPUT 1
</td>
</tr>
@melissacabral
melissacabral / editor-style.css
Last active December 16, 2015 03:09
editor style for awesomeco
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,700);
/*
== meyer reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@melissacabral
melissacabral / wp-login.php
Last active December 14, 2015 13:28
wordpress login form. place anywhere in your theme templates to display the form
<?php
//show the form if the user is not logged in
if( !is_user_logged_in() ):
wp_login_form();
else:
$redirect = home_url();
echo '<a href="'.wp_logout_url( $redirect ).'">Log Out</a>';
endif;
?>