Permalink
Browse files

templates for landing pages #77

  • Loading branch information...
1 parent 76072c3 commit b9d1daa26df121103572dfe43afcac9ab0ce088b @cboettig committed Mar 29, 2013
View
10 R.xml
@@ -6,10 +6,10 @@ title : Atom Feed
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }} - R</title>
- <link href="{{ site.production_url }}/R.xml" rel="self"/>
- <link href="{{ site.production_url }}"/>
+ <link href="/R.xml" rel="self"/>
+ <link href="/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
- <id>{{ site.production_url }}</id>
+ <id>{{ site.url }}</id>
<author>
<name>{{ site.author.name }}</name>
<email>{{ site.author.email }}</email>
@@ -18,9 +18,9 @@ title : Atom Feed
{% for post in site.tags.R %}
<entry>
<title>{{ post.title }}</title>
- <link href="{{ site.production_url }}{{ post.url }}"/>
+ <link href="{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
- <id>h{{ site.production_url }}{{ post.id }}</id>
+ <id>{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
View
@@ -1,16 +1,12 @@
---
-layout: html5
+layout: page
---
-{% include header.html %}
<div class="row">
<div class="span8 offset1">
<article>
{{ content }}
</article>
</div>
</div>
-{% include footer.html %}
-{% include javascript.html %}
-{% include analytics.html %}
-
+
@@ -1,9 +1,21 @@
-require 'octokit'
-require 'time'
+# Author: Carl Boettiger
+# License: MIT
+# Description: Jekyll plugins for interacting with the Github API using the
+# 'octokit' gem. Currently provides a way to embed commits and isues
+# from a given repository. Be sure to set the user below.
+
+# Examples:
+# {% octokit_issues nonparametric-bayes%}
+# {% octokit_commits nonparametric-bayes%}
-# should this cache?
# TODO: show only top 3 issues? sort by date? Show closed issues?
+
+
+require 'octokit'
+require 'time'
+require 'chronic'
+
module Jekyll
class OctokitIssues < Liquid::Tag
def initialize(tag_name, text, tokens)
@@ -16,7 +28,7 @@ def render(context) # learn how to write this to take an argument!
# repo = Octokit.issues(@address, :status => "closed") # (Gets closed issues??)
# Generate a list of all open issues, linking to github issue page.
out = "<ul>"
- for i in 0 ... [repo.size, 3].min ## displays up to 3. sorted by date?
+ for i in 0 ... [repo.size, 5].min ## displays up to 5. sorted by date?
lab = ""
if repo[i].labels[0].class == Hashie::Mash # Get labels for issues, with color, where applicable
lab = " (<font color=\"#" + repo[i].labels[0].color +
@@ -40,6 +52,9 @@ def render(context) # learn how to write this to take an argument!
+
+## Commit gets issues on the day given.
+
module Jekyll
class OctokitCommits < Liquid::Tag
def initialize(tag_name, text, tokens)
@@ -48,12 +63,13 @@ def initialize(tag_name, text, tokens)
@address = "cboettig/"+"#{@text}"
end
def render(context)
- day = context.environments.first["page"]["date"]
- @until = (day + 60*60*24).iso8601
- @since = day.iso8601
- repo = Octokit.commits(@address, "master", {:since => @since, :until => @until})
+ # day = Time.now # context.environments.first["page"]["date"]
+ # @until = Chronic.parse("Now") #(day + 60*60*24).iso8601
+ # @since = Chronic.parse("One day ago") #day.iso8601
+ # repo = Octokit.commits(@address, "master", {:since => @since, :until => @until})
+ repo = Octokit.commits(@address, "master")
out = "<ul>"
- for i in 0 ... repo.size
+ for i in 0 ... [repo.size, 5].min
out = out + "<li>" +
repo[i].commit.message + " " +
"<a href=\"" +
View
@@ -9,7 +9,7 @@ <h4>({{ site.posts | size }} entries) <a href="{{ site.url }}/atom.xml"><img src
<div class="postpreview">
{% for post in site.posts %}
<div class="span6">
- <p> <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>
+ <p> <a href="{{ post.url }}">{{ post.title }}</a>
<span style="text-align:right; font-style:italic"> {{ post.date | date_to_string }}</span></p>
</div>
{% endfor %}
View
@@ -2,79 +2,75 @@
title: Lab Notebook
subtitle: (<a href="http://www.carlboettiger.info/2012/09/28/Welcome-to-my-lab-notebook.html">Introduction</a>)
redirects: [/research/lab-notebook, /wordpress/research/lab-notebook]
-layout: html5
+layout: page
---
-{% include header.html %}
+<div class="row feed">
+ <div class="span3 offset1">
+ <h4> <a property="account" href="https://github.com/{{site.author.github}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;"><i class="icon-github" alt="github"></i> Coding </a></h4>
+ <div class="excerpt">
+ {% github_feed cboettig, 5 %}
+ </div>
+ </div>
+ <div class="span3">
+ <h4> <a property="account" href="https://twitter.com/{{site.author.twitter}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Twitter'); return false;"><i class="icon-twitter"></i> Discussing </a></h4>
+ <div class="excerpt">
+ {% twitter_feed cboettig, 5 %}
+ </div>
+ </div>
+ <div class="span3">
+ <h4> <a href="http://www.mendeley.com/groups/634301/theoretical-ecology/papers/" onClick="recordOutboundLink(this, 'Outbound Links', 'Mendeley'); return false;"><i class="icon-book"></i> Reading </a></h4>
+ <div class="excerpt">
+ {% mendeley_feed 634301/theoretical-ecology, 4 %}
+ </div>
+ </div>
+</div>
- <div class="row feed">
- <div class="span3 offset1">
- <h4> <a property="account" href="https://github.com/{{site.author.github}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;"><i class="icon-github" alt="github"></i> Coding </a></h4>
- <div class="excerpt">
- {% github_feed cboettig, 5 %}
- </div>
- </div>
- <div class="span3">
- <h4> <a property="account" href="https://twitter.com/{{site.author.twitter}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Twitter'); return false;"><i class="icon-twitter"></i> Discussing </a></h4>
- <div class="excerpt">
- {% twitter_feed cboettig, 5 %}
- </div>
- </div>
- <div class="span3">
- <h4> <a href="http://www.mendeley.com/groups/634301/theoretical-ecology/papers/" onClick="recordOutboundLink(this, 'Outbound Links', 'Mendeley'); return false;"><i class="icon-book"></i> Reading </a></h4>
- <div class="excerpt">
- {% mendeley_feed 634301/theoretical-ecology, 4 %}
+<hr>
+<div class="row postpreview">
+ <div class="span11 offset1">
+ <div class="row">
+ <h4> <a href="{{ site.url }}/atom.xml"
+ onClick="recordOutboundLink(this,
+ 'Outbound Links', 'RSS'); return false;"
+ style="color: inherit;"
+ ><i class="icon-rss" ></i> Entries</a></h4>
+ {% for post in site.posts limit:3 %}
+ <div class="span3">
+ {% include postexcerpt.html %}
</div>
- </div>
+ {% endfor %}
</div>
- <hr>
- <div class="row postpreview">
- <div class="span11 offset1">
- <div class="row">
- <h4> <a href="{{ site.url }}/atom.xml"
- onClick="recordOutboundLink(this,
- 'Outbound Links', 'RSS'); return false;"
- style="color: inherit;"
- ><i class="icon-rss" ></i> Entries</a></h4>
- {% for post in site.posts limit:3 %}
- <div class="span3">
- {% include postexcerpt.html %}
- </div>
- {% endfor %}
+ <div class="row">
+ {% for post in site.posts limit:3 offset:3 %}
+ <div class="span3">
+ {% include postexcerpt.html %}
</div>
+ {% endfor %}
+ </div>
- <div class="row">
- {% for post in site.posts limit:3 offset:3 %}
- <div class="span3">
- {% include postexcerpt.html %}
- </div>
- {% endfor %}
+ <div class="row">
+ {% for post in site.posts limit:3 offset:6 %}
+ <div class="span3">
+ {% include postexcerpt.html %}
</div>
+ {% endfor %}
+ </div>
- <div class="row">
- {% for post in site.posts limit:3 offset:6 %}
- <div class="span3">
- {% include postexcerpt.html %}
- </div>
- {% endfor %}
- </div>
+ </div>
+</div> <!--end row -->
- </div>
- </div> <!--end row -->
+<div class="row">
+ <div class="span11 offset1">
+ <div class="socialicons">
+ <p> <a href="/archive.html"><i class="icon-calendar"></i> All entries by date</a></p>
+ <p> <a href="/categories.html"><i class="icon-list"></i> All entries by category</a> </p>
+ <p> <a href="/tags.html"><i class="icon-tags"></i> All entries by tag</a> </p>
+ </div>
+ </div> <!--end span9 -->
+</div> <!--end row -->
- <div class="row">
- <div class="span11 offset1">
- <div class="socialicons">
- <p> <a href="/archive.html"><i class="icon-calendar"></i> All entries by date</a></p>
- <p> <a href="/categories.html"><i class="icon-list"></i> All entries by category</a> </p>
- <p> <a href="/tags.html"><i class="icon-tags"></i> All entries by tag</a> </p>
- </div>
- </div> <!--end span9 -->
- </div> <!--end row -->
-{% include footer.html %}
-{% include javascript.html %}
-{% include analytics.html %}
@@ -0,0 +1,73 @@
+---
+title: adaptive-dynamics
+layout: page
+published: false
+---
+
+{% capture project %}adaptive-dynamics{% endcapture %}
+
+<div class="row">
+ <div class="span7">
+ <h2> Abstract </h2>
+ This project is not currently active. I still stay loosely abrest of this literature, so the reading list is somewhat more recent.
+ </div>
+
+ <div class="span4 sidebar">
+ <h3> Collaborators </h3>
+ <ul>
+ <li> Joshua Weitz </li>
+ <li> Jonathan Dushoff </li>
+ <li> Ulf Dieckmann </li>
+ <li> Rupert </li>
+ </ul>
+
+ <h3> Funding and Support/Affiliation </h3>
+ <ul>
+ <li> </li>
+ </ul>
+ </div>
+</div>
+
+<!-- add icons to title text -->
+
+<hr>
+
+<div class="row">
+ <div calss="span12">
+ <div class="span4">
+ <h4><a href="https://github.com/cboettig/AdaptiveDynamics" style="color:#6c71c4;"><i class="icon-github"></i> Recent Commits</a> </h4>
+ {% octokit_commits AdaptiveDynamics%}
+ </div>
+ <div class="span4">
+ <h4><a href="https://github.com/cboettig/AdaptiveDynamics/issues" style="color:#d33682;"> <i class="icon-list"></i> Active Issues / Next Steps</a> </h4>
+ {% octokit_issues AdaptiveDynamics%}
+ </div>
+ <div class="span4">
+ <h4><a href="" style="color:#dc322f;"> <i class="icon-bookmark" ></i> Reading</a> </h4>
+ {% mendeley_feed 529981/adaptive-dynamics, 4 %}
+ </div>
+ </div>
+</div>
+
+<hr>
+
+<div class="row">
+ <div calss="span12">
+ <div class="span4">
+ <h4> <a href="/vita.html" style="color:#2aa198;"><i class="icon-book"></i> Publications</a> </h4>
+ </div>
+ <div class="span4">
+ <h4> <a href="/tags.html#{{ project }}" style="color:#b58900;"><i class="icon-tags" ></i>Tagged notebook entries</a> </h4>
+ {% for post in site.tags.adaptive-dynamics limit:8 %}
+ <p> <a href="{{ post.url }}">{{ post.title }}</a>
+ <span style="font-style:italic"> {{ post.date | date_to_string }}</span></p>
+ {% endfor %}
+ </div>
+ <div class="span4">
+ <h4> Data sets </h4>
+ </div>
+ </div>
+</div>
+
+
+
Oops, something went wrong.

0 comments on commit b9d1daa

Please sign in to comment.