Add template from Irene's refactoring
commit
a36ffd3314
@ -0,0 +1,2 @@
|
||||
_site
|
||||
_includes/pubs.html
|
@ -0,0 +1,3 @@
|
||||
[submodule "bibble"]
|
||||
path = bibble
|
||||
url = git://github.com/sampsyo/bibble.git
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
layout: default
|
||||
title: 404 Not Found
|
||||
---
|
||||
Sorry! The server can't find that page.
|
||||
|
||||
Please consider trying to find what you need from [the home page][home].
|
||||
|
||||
If you think something might be broken, please send an email to [Adrian][].
|
||||
|
||||
[home]: {{ site.base }}/
|
||||
[adrian]: https://homes.cs.washington.edu/~asampson/
|
@ -0,0 +1,24 @@
|
||||
PYTHON=python2.7
|
||||
|
||||
# targets that aren't filenames
|
||||
.PHONY: all clean deploy
|
||||
|
||||
all: _includes/pubs.html _site/index.html
|
||||
|
||||
BUILDARGS :=
|
||||
_site/index.html _site/wacas14/index.html:
|
||||
jekyll build $(BUILDARGS)
|
||||
|
||||
_includes/pubs.html: bib/pubs.bib bib/publications.tmpl
|
||||
mkdir -p _includes
|
||||
$(PYTHON) bibble/bibble.py $+ > $@
|
||||
|
||||
_site/index.html: $(wildcard *.html) _includes/pubs.html _config.yml \
|
||||
_layouts/default.html
|
||||
|
||||
clean:
|
||||
$(RM) -r _site _includes/pubs.html
|
||||
|
||||
HOST := yourwebpage.com
|
||||
deploy: clean all
|
||||
rsync --compress --recursive --checksum --itemize-changes --delete -e ssh _site/ $(HOST):www/
|
@ -0,0 +1,65 @@
|
||||
Sampa group website
|
||||
===================
|
||||
|
||||
This site uses [Jekyll][] and [bibble][] to generate a static Sampa website
|
||||
complete with publications, personnel, and news.
|
||||
|
||||
|
||||
Editing
|
||||
-------
|
||||
|
||||
Most pages are just Markdown files that you can edit directly. People are
|
||||
listed in `_data/people.yml` and the news is generated from `_data/news.yml`.
|
||||
|
||||
Try editing directly in GitHub! It's like magic.
|
||||
|
||||
|
||||
News Items and Blog Posts
|
||||
-------------------------
|
||||
|
||||
For both long-form blog posts and short news updates, we use Jekyll's blogging system. To post a new item of either type, you create a file in the [_posts directory][postsdir] using the naming convention `YYYY-MM-DD-title-for-url.md`. The date part of the filename always matters; the title part is currently only used for full blog posts (but is still required for news updates).
|
||||
|
||||
The file must begin with [YAML front matter][yfm]. For news updates, use this:
|
||||
|
||||
---
|
||||
layout: post
|
||||
shortnews: true
|
||||
---
|
||||
|
||||
For full blog posts, use this format:
|
||||
|
||||
---
|
||||
layout: post
|
||||
title: "Some Great Title Here"
|
||||
---
|
||||
|
||||
And concoct a page title for your post. The body of the post goes after the `---` in either case.
|
||||
|
||||
[yfm]: http://jekyllrb.com/docs/frontmatter/
|
||||
[postsdir]: https://github.com/uwsampa/sampa-www/tree/master/_posts
|
||||
|
||||
|
||||
Building and Deploying
|
||||
----------------------
|
||||
|
||||
The requirements for building the site are:
|
||||
|
||||
* [Jekyll][]: run `gem install jekyll`
|
||||
* [Pybtex][]: run `pip install pybtex`
|
||||
* [bibble][]: included as a submodule. Because git is cruel, you need to use
|
||||
`git clone --recursive URL` or issue the commands `git submodule init ; git
|
||||
submodule update` to check out the dependency.
|
||||
* ssh and rsync, only if you want to deploy directly.
|
||||
|
||||
`make` compiles the bibliography and the website content to the `_site`
|
||||
directory. To preview the site, run `jekyll serve`` and head to
|
||||
http://0.0.0.0:4000.
|
||||
|
||||
To upload a new version of the site via rsync over ssh, type `make deploy`. A web hook does this automatically when you push to GitHub.
|
||||
|
||||
If you use an alternative Python when building the bibliography, use `make
|
||||
PYTHON=/path/to/python`.
|
||||
|
||||
[Jekyll]: http://jekyllrb.com/
|
||||
[bibble]: https://github.com/sampsyo/bibble/
|
||||
[pybtex]: http://pybtex.sourceforge.net
|
@ -0,0 +1,51 @@
|
||||
name: Template webpage
|
||||
url: hhttps://github.com/iyzhang/template-www
|
||||
|
||||
exclude: [bibble, README.md, Makefile]
|
||||
|
||||
# use this library to parse Markdown
|
||||
markdown: redcarpet
|
||||
redcarpet:
|
||||
extensions: [smart, tables]
|
||||
|
||||
# colorize code snippets with the pygment module
|
||||
pygments: true
|
||||
|
||||
# The path structure for blog posts.
|
||||
permalink: /blog/:year/:month/:day/:title.html
|
||||
|
||||
# Sections on the "people" page.
|
||||
roles:
|
||||
- {key: faculty, name: Faculty}
|
||||
- {key: staff, name: Staff}
|
||||
- {key: postdoc, name: Researchers}
|
||||
- {key: grad, name: Graduate Students}
|
||||
- {key: collab, name: Collaborators}
|
||||
- {key: alum, name: Alumni}
|
||||
|
||||
# Number of news stories on the front page.
|
||||
front_page_news: 8
|
||||
|
||||
# Base pathname for links.
|
||||
base: ''
|
||||
|
||||
# Navigation bar links.
|
||||
navigation:
|
||||
- title: Home
|
||||
link: /
|
||||
- title: People
|
||||
link: /people.html
|
||||
- title: Research
|
||||
link: /research/
|
||||
- title: Publications
|
||||
link: /publications.html
|
||||
- title: Code
|
||||
link: /code.html
|
||||
|
||||
# Rewriting of old path names.
|
||||
redirects:
|
||||
People: people.html
|
||||
Projects: research/
|
||||
Publications: publications.html
|
||||
Funding: ''
|
||||
Main_Page: ''
|
@ -0,0 +1 @@
|
||||
- Some very old news!
|
@ -0,0 +1,30 @@
|
||||
profx:
|
||||
display_name: "Professor X"
|
||||
webpage: "http://en.wikipedia.org/wiki/Professor_X"
|
||||
github: profx
|
||||
role: faculty
|
||||
bio: |
|
||||
Professor X is the leader and founder of X-Men.
|
||||
melody:
|
||||
display_name: "Melody Kadenko"
|
||||
webpage: "http://www.cs.washington.edu/homes/melody/"
|
||||
role: staff
|
||||
bio: |
|
||||
Melody is our Program Director. She actually makes magic stuff happen.
|
||||
And beware of the Spoon of Death.
|
||||
|
||||
wolverine:
|
||||
display_name: "Wolverine"
|
||||
webpage: "http://en.wikipedia.org/wiki/Wolverine_%28comics%29"
|
||||
github: wolverine
|
||||
role: postdoc
|
||||
|
||||
storm:
|
||||
display_name: "Storm"
|
||||
webpage: "http://en.wikipedia.org/wiki/Storm_%28Marvel_Comics%29"
|
||||
role: grad
|
||||
|
||||
jean:
|
||||
display_name: "Jean Grey"
|
||||
role: alum
|
||||
bio: "Ph.D., 2013. Now at Microsoft Research."
|
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ site.name }}: {{ page.title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{ site.base }}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{ site.base }}/css/group.css" rel="stylesheet">
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom"
|
||||
href="{{ site.base }}/blog/blog.xml">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<ul class="nav nav-pills">
|
||||
{% assign shorturl = page.url | replace:'index.html','' %}
|
||||
{% for item in site.navigation %}
|
||||
<li {% if item.link == shorturl %}class="active"{% endif %}>
|
||||
<a href="{{ site.base }}{{ item.link }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% comment %}Liquid is sort of terrible! I think "!= true" is the
|
||||
only way to do negation?{% endcomment %}
|
||||
{% if page.notitle != true %}
|
||||
<h2>{{ page.title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
<div class="footer">
|
||||
<p>
|
||||
<a href="http://www.cs.washington.edu/">Computer Science &
|
||||
Engineering</a>
|
||||
at the
|
||||
<a href="http://www.washington.edu/">University of
|
||||
Washington</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
<!-- Support retina images. -->
|
||||
<script type="text/javascript"
|
||||
src="{{ site.base }}/js/srcset-polyfill.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<h2>{{ page.title }}</h2>
|
||||
<p class="meta">{{ page.date | date_to_string }}</p>
|
||||
|
||||
<div class="post">
|
||||
{{ content }}
|
||||
</div>
|
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WACAS: {{ page.title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{ site.base }}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{ site.base }}/css/sampa.css" rel="stylesheet">
|
||||
<link href="{{ site.base }}/css/print.css" rel="stylesheet"
|
||||
media="print">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<ul class="nav nav-pills pull-right">
|
||||
{% assign shorturl = page.url | replace:'index.html','' %}
|
||||
{% for item in site.nav_wacas %}
|
||||
<li {% if item.link == shorturl %}class="active"{% endif %}>
|
||||
<a href="{{ site.base }}{{ item.link }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="./"><img style="float: left; margin-right: 1em"
|
||||
src="{{ site.base }}/img/wacas-small.jpg"
|
||||
width="56" height="56" alt="logo" /></a>
|
||||
<a href="./"><h1>WACAS 2014</h1></a>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% comment %}Liquid is sort of terrible! I think "!= true" is the
|
||||
only way to do negation?{% endcomment %}
|
||||
{% if page.notitle != true %}
|
||||
<h2>{{ page.title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
<!-- Support retina images. -->
|
||||
<script type="text/javascript"
|
||||
src="{{ site.base }}/js/srcset-polyfill.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: post
|
||||
shortnews: true
|
||||
---
|
||||
Testing .. Testing ...
|
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Check a .bib file for unretrievable URLs.
|
||||
#
|
||||
# Usage:
|
||||
# bib-url-check.pl sampa-pubs.bib
|
||||
# -or-
|
||||
# < sampa-pubs.bib bib-url-check.pl > urlreport.txt
|
||||
#
|
||||
|
||||
|
||||
use strict;
|
||||
use LWP::UserAgent;
|
||||
|
||||
# http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||
my $urlrx = qr{(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))}o;
|
||||
|
||||
my $ua = LWP::UserAgent->new(
|
||||
ssl_opts => { verify_hostname => 0 },
|
||||
);
|
||||
$ua->timeout(10);
|
||||
$ua->env_proxy;
|
||||
my $response;
|
||||
|
||||
my %done = {};
|
||||
|
||||
while (<>) {
|
||||
if (m/$urlrx/g) {
|
||||
next if $done{$1};
|
||||
|
||||
$response = $ua->get($1);
|
||||
if ($response->is_success) {
|
||||
print "OK (", $response->code, "): line $.: $1\n";
|
||||
} else {
|
||||
print "FAIL (", $response->code, "): line $.: $1\n";
|
||||
}
|
||||
$done{$1} = 1;
|
||||
sleep 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
{%- set prev_year = 1900 %}
|
||||
{%- for entry in entries %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="date">
|
||||
{% if entry.fields['year'] != prev_year %}
|
||||
<big><strong>{{ entry.fields['year'] }}</strong></big><br />
|
||||
{% endif %}
|
||||
{%- set prev_year = entry.fields['year'] %}
|
||||
{{ entry.fields['month']|monthname }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="publication">
|
||||
<span class="pubtitle">
|
||||
{%- set url = entry|main_url %}
|
||||
{%- if url %}
|
||||
<img src="img/pdficon_small.png" width="16"
|
||||
height="16" alt="PDF" />
|
||||
<a href="{{ url|escape }}">{{ entry|title }}</a>.
|
||||
{%- else %}
|
||||
{{ entry|title }}.
|
||||
{%- endif %}
|
||||
</span><br />
|
||||
<span class="authors">
|
||||
{{ entry.persons['author']|author_list }}.
|
||||
</span><br />
|
||||
<span class="venuetype">{{ entry|venue_type -}}</span><span class="venue">{{ entry|venue -}}</span>.
|
||||
{%- if entry.fields['note'] %}
|
||||
<span class="note">
|
||||
{{ entry.fields['note']|escape }}.
|
||||
</span>
|
||||
{%- endif %}
|
||||
<br />
|
||||
<span class="links">
|
||||
{%- for type, url in (entry|extra_urls).iteritems() %}
|
||||
[<a href="{{ url|escape }}">{{ type|escape }}</a>]
|
||||
{%- endfor %}
|
||||
{%- if entry.fields['abstract'] %}
|
||||
[<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);" onclick="$('#abstract_{{entry.fields['key']}}').slideToggle('fast');return false;">abstract</a>]
|
||||
{%- endif %}
|
||||
</span>
|
||||
{%- if entry.fields['abstract'] %}
|
||||
<div id="abstract_{{entry.fields['key']}}" class="abstract">
|
||||
{{ entry.fields['abstract'] |escape }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endfor %}
|
||||
</tbody>
|
||||
</table>
|
@ -0,0 +1,8 @@
|
||||
@InProceedings{XXX,
|
||||
author = {Author 1 and Author 2},
|
||||
title = {Awesome Publication},
|
||||
booktitle = {International Conference on Awesome Research},
|
||||
year = 2014,
|
||||
month = 5
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: nil
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title type="text" xml:lang="en">{{ site.name }}</title>
|
||||
<link type="application/atom+xml" href="{{ site.url }}{{ site.base }}/blog/blog.xml" rel="self"/>
|
||||
<link href="{{ site.url }}{{ site.base }}/"/>
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}{{ site.base }}/</id>
|
||||
<author>
|
||||
<name>the Sampa group</name>
|
||||
</author>
|
||||
|
||||
{% for post in site.posts limit:20 %}
|
||||
<entry>
|
||||
{% if post.shortnews %}
|
||||
<title>{{ post.date | date_to_long_string }}</title>
|
||||
<link href="{{ site.url }}{{ site.base }}/blog/"/>
|
||||
{% else %}
|
||||
<title>{{ post.title }}</title>
|
||||
<link href="{{ site.url }}{{ site.base }}{{ post.url }}"/>
|
||||
{% endif %}
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}{{ site.base }}{{ post.url }}</id>
|
||||
<content type="html">{{ post.content | xml_escape }}</content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
layout: default
|
||||
title: News and Blog
|
||||
---
|
||||
<ul class="news list-unstyled">
|
||||
{% for post in site.posts %}
|
||||
{% if post.shortnews %}
|
||||
<li class="shortnews">
|
||||
<span class="date">{{ post.date | date_to_long_string }}</span>
|
||||
{{ post.content }}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="bloglink">
|
||||
<span class="date">{{ post.date | date_to_long_string }}</span>
|
||||
<a href="{{ post.url }}">» {{ post.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p><a href="{{ site.base }}/oldnews.html">See archived news posts.</a></p>
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
layout: default
|
||||
title: Code
|
||||
---
|
||||
If you like this template, find our other code here:
|
||||
|
||||
* [uwsampa on GitHub](https://github.com/uwsampa/)
|
||||
|
||||
See the licensing terms within each project's codebase for the requisite legal
|
||||
details.
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,126 @@
|
||||
/* Space out content a bit */
|
||||
body {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Everything but the jumbotron gets side spacing for mobile first views */
|
||||
.header,
|
||||
.footer {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* Custom page header */
|
||||
.header {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
/* Custom page footer */
|
||||
.footer {
|
||||
padding-top: 19px;
|
||||
color: #777;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.footer p {
|
||||
margin: 0.1em 0;
|
||||
}
|
||||
.footer a:link, .footer a:visited {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
/* Customize container */
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 730px;
|
||||
}
|
||||
}
|
||||
.container-narrow > hr {
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
/* Jumbotron */
|
||||
.jumbotron {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.jumbotron p {
|
||||
font-size: 15px;
|
||||
}
|
||||
.jumbotron {
|
||||
padding-top: 18px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Group logo */
|
||||
#logo {
|
||||
width: 154px;
|
||||
height: 35px;
|
||||
margin: 2px 0 8px 0;
|
||||
}
|
||||
|
||||
/* Responsive: Portrait tablets and up */
|
||||
@media screen and (min-width: 768px) {
|
||||
/* Remove the padding we set earlier */
|
||||
.header,
|
||||
.footer {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
/* Space out the masthead */
|
||||
.header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
/* Remove the bottom border on the jumbotron for visual effect */
|
||||
.jumbotron {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Slightly better-looking header on mobile. */
|
||||
@media screen and (max-width: 767px) {
|
||||
.nav-pills {
|
||||
display: block;
|
||||
margin: 0 auto 1em;
|
||||
}
|
||||
#logo {
|
||||
display: block;
|
||||
clear: both;
|
||||
margin: 1em auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Photo */
|
||||
.inset-image {
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* People list */
|
||||
dl.people dd {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/* Front page news. */
|
||||
ul.news .date {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
}
|
||||
ul.news > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
ul.news .shortnews .date {
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
ul.news .bloglink a {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.illustration {
|
||||
float: right;
|
||||
margin: 0 0 1em 1em;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
.container {
|
||||
-moz-column-count: 2;
|
||||
-webkit-column-count: 2;
|
||||
column-count: 2;
|
||||
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.3em;
|
||||
margin: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.2em;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.noprint {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: -2em 0 0 0;
|
||||
}
|
||||
|
||||
/* Disable Bootstrap's link display. */
|
||||
@media print {
|
||||
a:link:after,
|
||||
a:visited:after {
|
||||
content: "" !important;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
layout: none
|
||||
permalink: .htaccess
|
||||
---
|
||||
ErrorDocument 404 /404.html
|
||||
RewriteEngine on
|
||||
RewriteBase {{ site.base }}/
|
||||
{% for item in site.redirects %}
|
||||
{% assign oldname=item[0] %}
|
||||
{% assign path=item[1] %}
|
||||
RewriteRule ^sampa/{{ oldname | replace: '(', '\(' | replace: ')', '\)' }} /{{ path }} [L,R=301]
|
||||
{% endfor %}
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
layout: default
|
||||
title: Home
|
||||
notitle: true
|
||||
---
|
||||
|
||||
<h2>News</h2>
|
||||
<ul class="news list-unstyled">
|
||||
{% for post in site.posts limit: site.front_page_news %}
|
||||
{% if post.shortnews %}
|
||||
<li class="shortnews">
|
||||
<span class="date">{{ post.date | date_to_long_string }}</span>
|
||||
{{ post.content }}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="bloglink">
|
||||
<span class="date">{{ post.date | date_to_long_string }}</span>
|
||||
<a href="{{ post.url }}">» {{ post.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% assign numposts = site.posts | size %}
|
||||
{% if numposts >= site.front_page_news %}
|
||||
<p><a href="{{ site.base }}/blog/">Older posts…</a></p>
|
||||
{% else %}
|
||||
<p><a href="{{ site.base }}/oldnews.html">Older news posts…</a></p>
|
||||
{% endif %}
|
@ -0,0 +1,52 @@
|
||||
(function(window, document) {
|
||||
// Test if it already supports srcset
|
||||
if ('srcset' in document.createElement('img'))
|
||||
return true;
|
||||
|
||||
// We want to get the device pixel ratio
|
||||
var maxWidth = (window.innerWidth > 0) ? window.innerWidth : screen.width,
|
||||
maxHeight = (window.innerHeight > 0) ? window.innerHeight : screen.height,
|
||||
maxDensity = window.devicePixelRatio || 1;
|
||||
|
||||
// Implement srcset
|
||||
function srcset(image) {
|
||||
if (!image.attributes['srcset']) return false;
|
||||
|
||||
var candidates = image.attributes['srcset'].nodeValue.split(',');
|
||||
|
||||
for (var i = 0; i < candidates.length; i++) {
|
||||
// The following regular expression was created based on the rules
|
||||
// in the srcset W3C specification available at:
|
||||
// http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/
|
||||
|
||||
var descriptors = candidates[i].match(
|
||||
/^\s*([^\s]+)\s*(\s(\d+)w)?\s*(\s(\d+)h)?\s*(\s(\d+)x)?\s*$/
|
||||
),
|
||||
filename = descriptors[1],
|
||||
width = descriptors[3] || false,
|
||||
height = descriptors[5] || false,
|
||||
density = descriptors[7] || 1;
|
||||
|
||||
if (width && width > maxWidth) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (height && height > maxHeight) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (density && density > maxDensity) {
|
||||
continue;
|
||||
}
|
||||
|
||||
image.src = filename;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var images = document.getElementsByTagName('img');
|
||||
|
||||
for (var i=0; i < images.length; i++) {
|
||||
srcset(images[i]);
|
||||
}
|
||||
})(window, document);
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
title: Older News
|
||||
---
|
||||
{% for item in site.data.news %}
|
||||
<p>{{ item | markdownify }}</p>
|
||||
{% endfor %}
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
layout: default
|
||||
title: People
|
||||
---
|
||||
|
||||
{% for role in site.roles %}
|
||||
<h3>{{ role.name }}</h3>
|
||||
<dl class="people">
|
||||
{% for item in site.data.people %}
|
||||
{% assign person = item[1] %}
|
||||
{% if person.role == role.key %}
|
||||
<dt class="person">
|
||||
{% if person.webpage %}
|
||||
<a href="{{ person.webpage |escape }}">
|
||||
{% endif %}
|
||||
{{ person.display_name }}
|
||||
{% if person.webpage %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dt>
|
||||
<dd>
|
||||
{% if person.bio %}
|
||||
{{ person.bio | markdownify }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endfor %}
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
title: Publications
|
||||
---
|
||||
<p>
|
||||
<a href="{{ site.base }}/bib/sampa-pubs.bib">Download BibTeX.</a>
|
||||
</p>
|
||||
|
||||
{% include pubs.html %}
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
layout: default
|
||||
title: Research Projects
|
||||
projects:
|
||||
- link: project/
|
||||
name: An Exciting project
|
||||
summary: This will never work.
|
||||
---
|
||||
|
||||
Our research is awesome.
|
||||
|
||||
### An Exciting project
|
||||
Read about it [here][project].
|
||||
|
||||
[project]: project/index.html
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
title: An Exciting Project
|
||||
---
|
||||
We've done some great work on this project!
|
Loading…
Reference in New Issue