Permalink
Browse files

Import theme resources from yous/yous.github.io

  • Loading branch information...
yous committed Jan 5, 2017
1 parent fe6af65 commit 7401c379f223c1d6f80c197f263c8ef9b0a805d0
@@ -1,48 +1,56 @@
# whiteglass
Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes` and your sass in `_sass`. To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
TODO: Delete this and the text above, and describe your gem
Minimal, responsible Jekyll theme for hackers.
## Installation
Add this line to your Jekyll site's Gemfile:
```ruby
``` ruby
gem "jekyll-whiteglass"
```
And add this line to your Jekyll site's `_config.yml`:
```yaml
``` yaml
theme: jekyll-whiteglass
```
And then execute:
$ bundle
``` sh
bundle
```
Or install it yourself as:
$ gem install jekyll-whiteglass
``` sh
gem install jekyll-whiteglass
```
## Usage
TODO: Write usage instructions here. Describe your available layouts, includes, and/or sass.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at
<https://github.com/yous/whiteglass>. This project is intended to be a safe,
welcoming space for collaboration, and contributors are expected to adhere to
the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## Development
To set up your environment to develop this theme, run `bundle install`.
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
Your theme is setup just like a normal Jekyll site! To test your theme, run
`bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
This starts a Jekyll server using your theme. Add pages, documents, data, etc.
like normal to test your theme's contents. As you make modifications to your
theme and to your content, your site will regenerate and you should see the
changes in the browser after a refresh, just like normal.
## License
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
The theme is available as open source under the terms of the
[MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,9 @@
# If you want to link only specific pages in your header, uncomment this and add
# the path to the pages in order as they should show up.
main:
- title: "About"
url: /about/
- title: "Archives"
url: /archives/
- title: "GitHub"
url: https://github.com/yous/whiteglass
@@ -0,0 +1,8 @@
{% for category in include.categories %}
{% assign no_comma = forloop.last %}
{% for archive in site.archives %}
{% if archive.type == "category" and archive.title == category %}
<a href="{{ archive.url | relative_url }}">{{ archive.title | escape }}</a>{% unless no_comma %},{% endunless %}
{% endif %}
{% endfor %}
{% endfor %}
@@ -0,0 +1,14 @@
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Bitter:400,700,400italic:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
@@ -0,0 +1,11 @@
<footer class="site-footer">
<div class="wrapper">
<p>
{% include footer_content.html %}
</p>
</div>
</footer>
@@ -0,0 +1 @@
&copy; {{ site.author }} - Subscribe via <a href="{{ "/atom.xml" | relative_url }}">RSS</a>
@@ -0,0 +1,13 @@
{% if site.google_analytics %}
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
@@ -0,0 +1,60 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% assign title = page.title | default: site.title | escape %}
{% assign canonical = page.url | replace:'index.html','' | absolute_url %}
{% assign description = page.description | default: site.description | normalize_whitespace | escape %}
<title>{{ title }}</title>
<meta name="description" content="{{ description }}">
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="canonical" href="{{ canonical }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/atom.xml" | relative_url }}">
{% include head_custom.html %}
{% if site.facebook_app_id %}
<meta property="fb:admins" content="{{ site.facebook_app_id }}">
<meta property="og:title" content="{{ title }}">
<meta property="og:site_name" content="{{ site.title | escape }}">
<meta property="og:url" content="{{ canonical }}">
<meta property="og:description" content="{{ description }}">
{% if site.facebook_page %}<meta property="article:author" content="{{ site.facebook_page }}">{% endif %}
{% if page.facebook.image %}
<meta property="og:image" content="{{ page.facebook.image }}">
{% elsif site.facebook_image %}
<meta property="og:image" content="{{ site.facebook_image }}">
{% endif %}
{% endif %}
<meta name="twitter:card" content="{{ page.twitter_card.type | default: "summary" }}">
{% if site.twitter_username %}<meta name="twitter:site" content="{{ site.twitter_username }}">{% endif %}
<meta name="twitter:title" content="{{ title | truncate: 70 }}">
<meta name="twitter:description" content="{{ description | truncate: 200 }}">
{% if page.twitter_card.creator %}
<meta name="twitter:creator" content="{{ page.twitter_card.creator }}">
{% elsif site.twitter_username %}
<meta name="twitter:creator" content="{{ site.twitter_username }}">
{% endif %}
{% if page.twitter_card.image %}
{% if page.twitter_card.type == 'gallery' %}
<meta name="twitter:image0" content="{{ page.twitter_card.image }}">
<meta name="twitter:image1" content="{{ page.twitter_card.image1 }}">
<meta name="twitter:image2" content="{{ page.twitter_card.image2 }}">
<meta name="twitter:image3" content="{{ page.twitter_card.image3 }}">
{% else %}
<meta name="twitter:image:src" content="{{ page.twitter_card.image }}">
{% if page.twitter_card.type == 'photo' %}
{% if page.twitter_card.width %}<meta name="twitter:image:width" content="{{ page.twitter_card.width }}">{% endif %}
{% if page.twitter_card.height %}<meta name="twitter:image:height" content="{{ page.twitter_card.height }}">{% endif %}
{% endif %}
{% endif %}
{% elsif site.twitter_image %}
<meta name="twitter:image:src" content="{{ site.twitter_image }}">
{% endif %}
{% include fonts.html %}
{% include google_analytics.html %}
</head>
@@ -0,0 +1,10 @@
<!--
You can specify additional content for head here. Here are some examples.
<link href="{{ "/favicon.png" | relative_url }}" rel="icon">
<link href="{{ "/apple-touch-icon.png" | relative_url }}" rel="apple-touch-icon">
<link href="{{ "/apple-touch-icon-76x76.png" | relative_url }}" rel="apple-touch-icon" sizes="76x76">
<link href="{{ "/apple-touch-icon-120x120.png" | relative_url }}" rel="apple-touch-icon" sizes="120x120">
<link href="{{ "/apple-touch-icon-152x152.png" | relative_url }}" rel="apple-touch-icon" sizes="152x152">
<link href="{{ "/apple-touch-icon-180x180.png" | relative_url }}" rel="apple-touch-icon" sizes="180x180">
-->
@@ -0,0 +1,20 @@
<header class="site-header">
<div class="wrapper">
<a class="site-title" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
<nav class="site-nav">
{% for link in site.data.navigation.main %}
{% if link.url contains "http" %}
{% assign url = link.url %}
{% else %}
{% assign url = link.url | relative_url %}
{% endif %}
<a class="page-link" href="{{ url }}">{{ link.title }}</a>
{% endfor %}
</nav>
</div>
</header>
@@ -0,0 +1,11 @@
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.next_page %}
<a class="previous" href="{{ paginator.next_page_path | relative_url }}">&laquo; Older</a>
{% endif %}
{% if paginator.previous_page %}
<a class="next" href="{{ paginator.previous_page_path | relative_url }}">Newer &raquo;</a>
{% endif %}
</div>
{% endif %}
@@ -0,0 +1,28 @@
---
layout: default
---
<div class="home">
<h1 class="page-heading">Blog Archive</h1>
{{ content }}
{% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %}
<ul class="post-archives">
{% for post in site.posts %}
{% capture post_lang %}{{ post.lang | default: site_lang }}{% endcapture %}
{% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories != empty %} • {% include category_links.html categories=post.categories %}{% endif %}</span>
<h2>
<a class="post-link" href="{{ post.url | relative_url }}"{% if lang != empty %} lang="{{ lang }}"{% endif %}>{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
</h2>
</li>
{% endfor %}
</ul>
</div>
@@ -0,0 +1,25 @@
---
layout: default
---
<div class="home">
<h1 class="page-heading">Archive of {{ page.type }} '{{ page.title | escape }}'</h1>
{% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %}
<ul class="post-archives">
{% for post in page.posts %}
{% capture post_lang %}{{ post.lang | default: site_lang }}{% endcapture %}
{% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories %} • {% include category_links.html categories=post.categories %}{% endif %}</span>
<h2>
<a class="post-link" href="{{ post.url | relative_url }}"{% if lang != empty %} lang="{{ lang }}"{% endif %}>{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
</h2>
</li>
{% endfor %}
</ul>
</div>
@@ -1 +1,20 @@
{{ content }}
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{% include head.html %}
<body>
{% include header.html %}
<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>
{% include footer.html %}
</body>
</html>
@@ -0,0 +1,39 @@
---
layout: default
---
<div class="home">
{{ content }}
{% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %}
<ul class="post-list">
{% for post in paginator.posts %}
{% capture post_lang %}{{ post.lang | default: site_lang }}{% endcapture %}
{% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
<li{% if lang != empty %} lang="{{ lang }}"{% endif %}>
<header class="post-header">
<h1 class="post-title">
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
</h1>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories != empty %} • {% include category_links.html categories=post.categories %}{% endif %}</p>
</header>
<div class="post-content">
{{ post.excerpt }}
</div>
{% if post.content contains site.excerpt_separator %}
<p class="post-continue">
<a href="{{ post.url | relative_url }}">Read on &rarr;</a>
</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% include pagination.html %}
</div>
@@ -1,5 +1,14 @@
---
layout: default
---
<article class="post">
{{ content }}
<header class="post-header">
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>
<div class="post-content">
{{ content }}
</div>
</article>
@@ -1,5 +1,19 @@
---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
{{ content }}
<header class="post-header">
{% if page.external-url %}
<h1 class="post-title" itemprop="name headline"><a href="{{ page.external-url }}">{{ page.title | escape }} &rarr;</a></h1>
{% else %}
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
{% endif %}
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.categories != empty %} • {% include category_links.html categories=page.categories %}{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</article>
Oops, something went wrong.

0 comments on commit 7401c37

Please sign in to comment.