This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The basic idea: | |
* No more "mobile first", just take up the entire browser width when | |
* optimum line length gets near viewport width. | |
*/ | |
body | |
{ | |
width: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$render = function ($_path, $data) { | |
extract($data); | |
unset($data); | |
require $_path; | |
}; | |
ob_start(); | |
$render($_path, $data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace BarnabyWalters\Rest; | |
use Symfony\Component\Routing\Matcher\UrlMatcher as Matcher; | |
/** | |
* UrlMatcher | |
* | |
* A subclass of Symfony’s UrlMatcher which strips the extension from incoming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"alternates": [ | |
{ | |
"url": "http://example.org", | |
"rel": "home", | |
"media": "screen", | |
"hreflang": "en" | |
} | |
], | |
"rels": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="h-thing"> | |
<span class="e-content">< Things > &</span> | |
</span> | |
<span class="h-thing"> | |
<span class="p-content">< Things > &</span> | |
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on GET /notes | |
fetch the 20 most recent notes filtered by tag | |
show as h-feed | |
on GET /notes/new | |
the user must be an admin | |
show autofilled note-form | |
on GET /notes/{id} | |
fetch note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original post discovery (in progress) | |
var noteForms = document.querySelectorAll('.note-post-form'); | |
if (noteForms.length > 0) { | |
for (var i = 0;i < noteForms.length;i++) { | |
var form = noteForms[i]; | |
var inReplyToField = form.querySelector('.in-reply-to'); | |
bean.on(inReplyToField, 'blur', function(event) { | |
var url = event.target.value; | |
// TODO: Start loading indicator | |
promise.get('/services/original-post', {'url': url}).then(function (error, text, xhr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rels": { | |
"shortcut": [ | |
"https:\/\/abs.twimg.com\/favicons\/favicon.ico" | |
], | |
"icon": [ | |
"https:\/\/abs.twimg.com\/favicons\/favicon.ico" | |
], | |
"canonical": [ | |
"https:\/\/twitter.com\/BarnabyWalters" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function renderTemplate($template, array $__templateData = array()) { | |
$render = function ($__path, $render=null) use ($__templateData) { | |
ob_start(); | |
extract($__templateData); | |
unset($__templateData); | |
include __DIR__ . '/../templates/' . $__path . '.php'; | |
return ob_get_clean(); | |
}; | |
OlderNewer