Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Sep 7, 2016
0 parents commit 3eedc1d
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# My BioCaddie

Put your data here

Site adapted from:

Adapted from: https://github.com/Gaohaoyang/gaohaoyang.github.io/*

55 changes: 55 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
title: MyBioCaddie
brief-intro: My Data
baseurl: "/mybiocaddie" # the subpath of your site, e.g. /blog
url: "http://cmungall.github.io/mybiocaddie" # the base hostname & protocol for your site

permalink: /:year/:month/:day/:title/

# other links
twitter_username: chrismungall
github_username: cmungall
email: [email protected]

collections:
metadata:
output: true
ctest:
output: true

description_footer: My BioCaddie!

# comments
# two ways to comment, only choose one, and use your own short name
disqus_shortname: cmungall

##google_analytics_id: UA-72449510-4 # google 分析追踪id

# Build settings
markdown: kramdown

kramdown:
input: GFM
syntax_highlighter: rouge

# port
# port: 1234

# url
category_dir: category/
tag_dir: tag/

# excerpt
excerpt_separator: "\n\n\n\n"

# paginate
# note: no longer required?
#gems: [jekyll-paginate]
#paginate: 6
30 changes: 30 additions & 0 deletions feed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
159 changes: 159 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
layout: default
---

<div class="page clearfix" index>
<div class="left">
<h1>My Datasets</h1>
<hr>
<ul>
{% for post in site.metadata %}
<li>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<div class="label">
<div class="label-card">
<i class="fa fa-calendar"></i>{{ post.date | date: "%F" }}
</div>
<div class="label-card">
{% if post.author %}<i class="fa fa-user"></i>{{ post.author }}
{% endif %}
</div>
<div class="label-card">
{% if page.meta %}<i class="fa fa-key"></i>{{ page.meta }} {% endif %}
</div>

<div class="label-card">
{% include category.html %}
</div>

<div class="label-card">
{% include tag.html %}
</div>
</div>
<div class="excerpt">
{{post.excerpt}}
</div>
<div class="read-all">
<a href="{{ post.url | prepend: site.baseurl }}"><i class="fa fa-newspaper-o"></i>Read All</a>
</div>
<hr>
</li>
{% endfor %}
</ul>



<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="/index.html" class="previous"><i class="fa fa-angle-double-left"></i></a>
<a href="{{ paginator.previous_page_path }}" class="previous"><i class="fa fa-angle-left"></i></a>
{% else %}
<span class="previous disable"><i class="fa fa-angle-double-left"></i></span>
<span class="previous disable"><i class="fa fa-angle-left"></i></span>
{% endif %}
<span class="page_number ">{{ paginator.page }}/{{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next"><i class="fa fa-angle-right"></i></a>
<a href="/page{{ paginator.total_pages }}" class="next"><i class="fa fa-angle-double-right"></i></a>
{% else %}
<span class="next disable"><i class="fa fa-angle-right"></i></span>
<span class="next disable"><i class="fa fa-angle-double-right"></i></span>
{% endif %}
</div>
</div>
<!-- <button class="anchor"><i class="fa fa-anchor"></i></button> -->
<div class="right">
<div class="wrap">
<div class="side">
<div>
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
Recent Posts
</div>
<ul class="content-ul" recent>
{% for post in site.posts offset: 0 limit: 10 %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>

<!-- Content -->
<div class="side ">
<div>
<i class="fa fa-th-list"></i>
Categories
</div>
<ul class="content-ul" cate>
{% for category in site.categories order:ascending %}
<li>
<a href="{{ root_url }}/{{ site.category_dir }}#{{ category | first }}" class="categories-list-item" cate="{{ category | first }}">
<span class="name">
{{ category | first }}
</span>
<span class="badge">{{ category | last | size }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
<!-- 其他div框放到这里 -->
<div class="side">
<div>
<i class="fa fa-tags"></i>
Tags
</div>
<div class="tags-cloud">
{% assign first = site.tags.first %}
{% assign max = first[1].size %}
{% assign min = max %}
{% for tag in site.tags offset:1 %}
{% if tag[1].size > max %}
{% assign max = tag[1].size %}
{% elsif tag[1].size < min %}
{% assign min = tag[1].size %}
{% endif %}
{% endfor %}

{% if max == min %}
{% assign diff = 1 %}
{% else %}
{% assign diff = max | minus: min %}
{% endif %}

{% for tag in site.tags %}
{% assign temp = tag[1].size | minus: min | times: 36 | divided_by: diff %}
{% assign base = temp | divided_by: 4 %}
{% assign remain = temp | modulo: 4 %}
{% if remain == 0 %}
{% assign size = base | plus: 9 %}
{% elsif remain == 1 or remain == 2 %}
{% assign size = base | plus: 9 | append: '.5' %}
{% else %}
{% assign size = base | plus: 10 %}
{% endif %}
{% if remain == 0 or remain == 1 %}
{% assign color = 9 | minus: base %}
{% else %}
{% assign color = 8 | minus: base %}
{% endif %}
<a href="{{ root_url }}/{{ site.tag_dir }}#{{ tag[0] }}" style="font-size: {{ size }}pt; color: #{{ color }}{{ color }}{{ color }};">{{ tag[0] }}</a>
{% endfor %}
</div>
</div>

<!-- <div class="side">
<div>
<i class="fa fa-external-link"></i>
Links
</div>
<ul class="content-ul">
</ul>
</div> -->
</div>
</div>
</div>
<!-- <script src="{{ "/js/scroll.min.js " | prepend: site.baseurl }}" charset="utf-8"></script> -->
<!-- <script src="{{ "/js/pageContent.js " | prepend: site.baseurl }}" charset="utf-8"></script> -->

0 comments on commit 3eedc1d

Please sign in to comment.