<!doctype html>
<html>
<head>
	<title>Rid - Cabbit Media and Design</title>
	<link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
	<script type="text/javascript">
function isNormalInteger(str) {
    return /^\+?(0|[1-9]\d*)$/.test(str);
}

function wheedNotFound() {
  var $result = $('#primary');
  document.title = 'Not Found - ' + document.title;
  $result.append(
    '<h3>Not Found</h3>'
  );
}

function wheedDisplayPost(data) {
  var $result = $('#primary');
  var post = data;
  if (post.error == "not found" || post.author != "rid" || post.tags.indexOf('personal') == -1) {
    wheedNotFound();
    return;
  }
  document.title = post.title + ' - ' + document.title;
      $result.append(
        '<div class="entry-head">' +
        '<h3 class="entry-title"><a href="/' + post.slug + '" class="post-title">' + post.title + '</a></h3>' +
        '<p class="entry-meta"><em><span class="chronodata"><abbr class="published">Posted on ' + post.published_at + '</abbr></span></em></p>' +
        '</div>' +
        '<div class="entry-content">' + post.html + '</div>' +
        '<p style="text-align: right;">----</p>'
      );
}

function wheedDisplayPosts(data, page) {
    var $result = $('#primary');
    $.each(data.posts, function (i, post) {
      $result.append(
        '<div class="entry-head">' +
        '<h3 class="entry-title"><a href="/' + post.slug + '" class="post-title">' + post.title + '</a></h3>' +
        '<p class="entry-meta"><em><span class="chronodata"><abbr class="published">Posted on ' + post.published_at + '</abbr></span></em></p>' +
        '</div>' +
        '<div class="entry-content">' + post.html + '</div>' +
        '<p style="text-align: right;">----</p>'
      );
    });
    var $pagination = $('#page-selector');
    if (page > 1 && page != 2)
      $pagination.append('<a class="prev-page" href="/page/' + (page - 1) + '" title="&larr; Previous">&larr; Previous</a> &nbsp;');
    else if (page == 2)
      $pagination.append('<a class="prev-page" href="/" title="&larr; Previous">&larr; Previous</a> &nbsp;');
    $.getJSON("//api.existid.com/posts/?author=rid&tag=personal&limit=5&page="+(page+1)+"&callback=?",
      function(data) {
        if (data.posts.length > 0)
          $pagination.append('&nbsp; <a class="next-page" href="/page/' + (page + 1) + '" title="Next &rarr;">Next &rarr;</a>');
      }
    );
  
}

jQuery(document).ready(function () {
  if (window.location.pathname == '/') {
    $.getJSON("//api.existid.com/posts/?author=rid&tag=personal&limit=5&callback=?",
      function(data) {
        wheedDisplayPosts(data, 1);
      }
    );  
  } else {
    var pathArray = window.location.pathname.split( '/' );
    if (pathArray[1] == 'page') {
      if (isNormalInteger(pathArray[2])) {
        $.getJSON("//api.existid.com/posts/?author=rid&tag=personal&limit=5&page="+parseInt(pathArray[2],10)+"&callback=?",
          function(data) {
            wheedDisplayPosts(data, parseInt(pathArray[2],10));
          }
        );
      }
    } else {
      $.getJSON("//api.existid.com/posts/slug"+window.location.pathname+"?callback=?",
        function(data) {
          wheedDisplayPost(data);
        }
      );
    }
  }
});
	</script>
<script src="/jss/background.js"></script>
<script src="/jss/jquery.cycle.min.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script type="text/javascript">
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
    var viewportmeta = document.querySelector('meta[name="viewport"]');
    if (viewportmeta) {
        viewportmeta.content = 'width=device-width, minimum-scale=1.0, initial-scale=1.0';
        document.body.addEventListener('gesturestart', function () {
            viewportmeta.content = 'width=device-width, minimum-scale=0.25';
        }, false);
    }
}
</script>
</head>
<body>
<div id="wrapper">
<div id="leftmain">
<div class="content">

<a href="/"><img id="av" src="/images/dirtyorange.png" alt="" /></a>

<h3><a href="/">Rid - Cabbit Media and Design</a></h3>
<br>

<p>No one can ever tell you your future. They can only tell you something that might have happened if they told you nothing.</p>
<br>

<div id="primary"></div>

<div id="page-selector"></div>

<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive -->
<ins class="adsbygoogle"
     style="display:block;max-width:500px;width:100%;height:auto;"
     data-ad-client="ca-pub-9722207593643821"
     data-ad-slot="9316921201"
     data-ad-format="horizontal"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<p><a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img id="cc" src="//i.creativecommons.org/l/by/4.0/88x31.png" alt="Creative Commons license" /></a>All work on this site is subject to a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons license</a> | 2016 - present | Powered by <a href="http://ghost.org/" target="_blank">Ghost</a> | <a href="http://cabbitmedia.com/">Cabbit Media and Design</a></p>

</div>
</div>

<div id="rightnav">
<div class="content">

<div class="sb-about">
<h3>About</h3>
<p>I'm not quite sure yet, just that I'm not even half of what I used to be.</p>
<p>Places you can find me online:</p>
<ul>
<!--<li><a href="https://despora.de/u/rid">despora</a></li>-->
<li><a href="https://rid.itch.io/">itch.io</a></li>
<li><a href="https://www.last.fm/user/ridsevilla">last.fm</a></li>
<li><a href="http://alpha.libre.fm/user/rid">libre.fm</a></li>
<li><a href="http://www.polanoid.net/jump/?to=people&uid=21299">polanoid</a></li>
<li><a href="https://steamcommunity.com/id/ridsevilla">steam</a></li>
<li><a href="http://ridsevilla.tumblr.com/">tumblr</a></li>
<li><a href="https://twitch.tv/ridsevilla">twitch</a></li>
<li><a href="https://twitter.com/ridsevilla">twitter</a></li>
<li><a href="http://vimeo.com/ridsevilla">vimeo</a></li>
<li><a href="https://www.youtube.com/ridsevilla">youtube</a></li>
</ul>
</div>

</div>
</div>
</div>

<div id="footer">
<div class="content">
</div>
</div>

</body>
</html>

