Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix excerpts
  • Loading branch information
staydecent committed Aug 13, 2015
1 parent 4c76dc0 commit b4da40c
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 52 deletions.
4 changes: 2 additions & 2 deletions functions.php
Expand Up @@ -200,8 +200,8 @@ public static function findHeaderTerminatorOffset($data) {
* @return int
*/
public static function findExcerpt($data) {
if (($offset = strpos($data, "\n\n")) !== false) {
$out = explode("\n\n", $data);
if (($offset = strpos($data, "\n")) !== false) {
$out = explode("\n", $data);
return $out[0];
}

Expand Down
@@ -1,6 +1,4 @@
<p class="big">Since I missed the chance to see one of my all-time favourite
people live, in Vancouver, I had an all-too-good reason to visit Seattle for
the first time.</p>
Since I missed the chance to see one of my all-time favourite people live, in Vancouver, I had an all-too-good reason to visit Seattle for the first time.

Grinderman, the newest project of Nick Cave and most of the Bad Seeds, is
finishing up their North American tour. It seems the show in Vancouver sold
Expand Down
Expand Up @@ -2,9 +2,7 @@ title: The Unforeseen Consequence of Being Self-Taught
author: Adrian Unger
---

<p class="big">I had yet to notice any drawbacks of working in a field where
I have either taught myself what I need to know or learned through work
experience. Until now.</p>
I had yet to notice any drawbacks of working in a field where I have either taught myself what I need to know or learned through work experience. Until now.

Hopefully you have realized, that I am a Web Designer & Developer. And,
I'll now let you know, that I learned nearly everything for this career with
Expand Down
@@ -1,6 +1,4 @@
<p class="big">The most difficult part of installing Google App Engine on
Windows is the SSL module. But I've decided to compile a very simple guide
for the whole process.</p>
The most difficult part of installing Google App Engine on Windows is the SSL module. But I've decided to compile a very simple guide for the whole process.

I am not going to cover any sort of usage guides. This is just a list to
installing everything required(on Windows) to deploy an App to the GAE
Expand Down
@@ -1,9 +1,7 @@
title: Publishing By Email With Google App Engine
---

<p class="big">I really like the Posterous approach
to publishing online—I often write my ideas down in GMail. So I
decided to enable posting by email on my blog.</p>
I really like the Posterous approach to publishing online—I often write my ideas down in GMail. So I decided to enable posting by email on my blog.

The concept needs some work, but could very easily be adapted to a
multi-user environment. In that case, some serious security work would be
Expand Down
@@ -1,9 +1,7 @@
title: Minor Update to Task Thing
---

<p class="big">While remaining rather minimal, Task Thing has a new
feature—more specifically a helpful piece of data is now
displayed on completed tasks.</p>
While remaining rather minimal, Task Thing has a new feature—more specifically a helpful piece of data is now displayed on completed tasks.

For anyone who is unaware, I created a little app called [Task
Thing](http://taskthing.appspot.com) a [few months
Expand Down
4 changes: 1 addition & 3 deletions src/entries/code/2011-01-29-managing-coworking/content.md
@@ -1,6 +1,4 @@
<p class="big">When I was working in a team of about ~15 at an
Advertising Agency, we were commonly trying to perfect how we all
interacted with each other.</p>
When I was working in a team of about ~15 at an Advertising Agency, we were commonly trying to perfect how we all interacted with each other.

Building off of 37Signals concept that work doesn't get done at work,
we wanted to prevent intrusive chit-chatting and undelivered IMs. The
Expand Down
@@ -1,8 +1,7 @@
title: Omtask, A Simpler Task List
---

<p class="big">Omtask is an omnibox task manager for people that want
to finish tasks, not organize them.</p>
Omtask is an omnibox task manager for people that want to finish tasks, not organize them.

### Why Omtask?

Expand Down
4 changes: 1 addition & 3 deletions src/entries/code/2011-06-12-responsive-web-design/content.md
@@ -1,6 +1,4 @@
<p class="big">The implementation and advocacy of responsive web
design is increasing, and possibly fully manifested in the web design
community. Are you taking part?</p>
The implementation and advocacy of responsive web design is increasing, and possibly fully manifested in the web design community. Are you taking part?

### What Is Responsive Design?

Expand Down
Expand Up @@ -3,7 +3,7 @@ title: Authenticating LoopBack AngularJS SDK Routes

I am currently working on writing an API backend with [LoopBack](http://loopback.io/). This API is a rewrite of an older Python codebase which has an AngularJS client. While the backend needs improving the current AngularJS client is holding up just fine.

[ExpressJS]() was the front-runner since the whole team has experience with it.But, when I came across LoopBack, which is a framework built on top of ExpressJS for quickly creating dynamic REST APIs, it seemed like a perfect fit. Not only do you get the time saving JSON based API generation, but also the [LoopBack AngularJS SDK](https://docs.strongloop.com/display/public/LB/AngularJS+JavaScript+SDK).
[ExpressJS](http://expressjs.com/) was the front-runner since the whole team has experience with it.But, when I came across LoopBack, which is a framework built on top of ExpressJS for quickly creating dynamic REST APIs, it seemed like a perfect fit. Not only do you get the time saving JSON based API generation, but also the [LoopBack AngularJS SDK](https://docs.strongloop.com/display/public/LB/AngularJS+JavaScript+SDK).

The AngularJS SDK will auto-generate AngularJS services for accessing your models and remote methods on the server. It's basically an ORM for your RESTful API endpoints. And, you can always keep it up-to-date by re-running the CLI tool or by using the Grunt build plugin.

Expand Down
2 changes: 1 addition & 1 deletion src/layout/header.php
Expand Up @@ -96,7 +96,7 @@
<nav class="container">
<a href="/" id="site-title">staydecent.ca</a> &mdash;
<br />
<a href="<?php echo SITE_URL ?>archives" title="Infrequent thoughts on almost anything">Thoughts</a>
<a href="<?php echo SITE_URL ?>blog" title="Infrequent thoughts on almost anything">Thoughts</a>
&nbsp;
<a href="<?php echo SITE_URL ?>code" title="Blog posts about programming and web development">Devlog</a>
&nbsp;
Expand Down
54 changes: 29 additions & 25 deletions src/pages/blog.php
@@ -1,29 +1,33 @@
<?php include $config['dirs']['layout'].'/header.php' ?>

<div role="main" id="main" class="container-fluid">

<h1>Blog</h1>
<p class="centre">Ongoing stream of thoughts on design, nature, technology, etc.</p>

<ol class="styled">
<?php
$posts = $entries['blog'];
krsort($posts);
$limit = 0;

foreach ($posts as $date => $entry)
{
if (++$limit > 44) break;
?>
<li>
<a href="<?php echo $entry['url']; ?>"><?php echo $entry['title'] ?></a>
&nbsp;&middot;
<span class="meta date"><?php echo date("M j, Y", $date) ?></span>
</li>
<?php
}
?>
</ol>
<div role="main" id="main">

<article>
<header>
<h1>Thoughts</h1>
</header>

<div class="container-fluid">
<ol class="styled">
<?php
$posts = $entries['blog'];
krsort($posts);
$limit = 0;
foreach ($posts as $date => $entry)
{
if (++$limit > 100) break;
?>
<li>
<h3><a href="<?php echo $entry['url']; ?>"><?php echo $entry['title'] ?></a></h3>

<p><?php echo $entry['excerpt'] ?><p>
</li>
<?php
}
?>
</ol>
</div>
</article>

</div>

Expand All @@ -34,4 +38,4 @@
$next['text'] = 'About me';
?>

<?php include $config['dirs']['layout'].'/footer.php' ?>
<?php include $config['dirs']['layout'].'/footer.php' ?>

0 comments on commit b4da40c

Please sign in to comment.