Skip to content

Instantly share code, notes, and snippets.

@wrightmartin
wrightmartin / gist:52edbeae88030c220a5d
Created February 13, 2015 09:35
Vagrant up PopIt
==> default: npm
==> default:
==> default: ERR! Error: 400 Bad Request
==> default: npm
==> default: ERR! at WriteStream.<anonymous> (/usr/lib/node_modules/npm/lib/utils/fetch.js:58:12)
==> default: npm ERR!
==> default: at WriteStream.emit (events.js:117:20)
==> default: npm ERR!
==> default: at evalmachine.<anonymous>:1609:14
==> default: npm ERR! at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:102:5
<div class="sidebar__unit sidebar__list">
<h2>What we did</h2>
<p>User Experience Design, Visual Design, Responsive Design, Front-end Development</p>
</div>
<div class="sidebar__unit sidebar__list">
<h2>Team members</h2>
<p>Steve Day, Mike Thompson, Zarino Zappia</p>
</div>
<div class="sidebar__unit sidebar__list">
<h2>Date</h2>
@wrightmartin
wrightmartin / gist:4d83e19997b4427f34bc
Created February 3, 2015 11:18
Get featured post url
<div class="case-study__screenshot"
<?php if($latest_case_study->has_post_thumbnail()) {
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium', true);
$thumb_url = $thumb_url_array[0];
?>
style="background-image: url(<?php $thumb_url ?>);"
<?php } ?>
>
</div>
.navigation:before {
content:'';
display: block;
height: 4px; /* whatever height it needs to be */
width: 100%;
background-image: url('../path-to-image.png');
background-repeat: repeat; /* Just repeat both ways so it can be as big as we want */
background-position: top left;
}
<a href="#" data-dropdown="drop1">English</a> <!-- selected locale -->
<ul id="drop1" class="f-dropdown" data-dropdown-content>
<li><a href="#">Cymraeg</a></li> <!-- available locale -->
<li><a href="#">Klingon</a></li> <!-- available locale -->
<li><a href="#">etc...</a></li> <!-- available locale -->
</ul>