Skip to content

Commit

Permalink
dynamic 'user' content in custom layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonrosage committed Jan 28, 2019
1 parent 9d3b467 commit c630308
Show file tree
Hide file tree
Showing 13 changed files with 390 additions and 320 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.1
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem "jekyll-github-metadata"
gem 'github-pages', group: :jekyll_plugins, github: "github/pages-gem", branch: "master"
gem "jekyll-github-metadata", github: "jekyll/github-metadata", branch: "master"

gem "jekyll-octicons"
132 changes: 71 additions & 61 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,55 +1,28 @@
GEM
remote: https://rubygems.org/
GIT
remote: git://github.com/github/pages-gem.git
revision: 06ff297fa077969851f9fd6f00ec5da8d1c33a60
branch: master
specs:
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.4)
dnsruby (1.61.2)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
ffi (1.10.0)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (186)
github-pages (193)
activesupport (= 4.2.10)
github-pages-health-check (= 1.8.1)
jekyll (= 3.7.3)
jekyll-avatar (= 0.5.0)
jekyll (= 3.7.4)
jekyll-avatar (= 0.6.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.5)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.3)
jekyll-feed (= 0.11.0)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.9.4)
jekyll-mentions (= 1.3.0)
jekyll-github-metadata (= 2.10.0)
jekyll-mentions (= 1.4.1)
jekyll-optional-front-matter (= 0.3.0)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.2.0)
jekyll-redirect-from (= 0.13.0)
jekyll-redirect-from (= 0.14.0)
jekyll-relative-links (= 0.5.3)
jekyll-remote-theme (= 0.3.1)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.4.0)
jekyll-seo-tag (= 2.5.0)
jekyll-sitemap (= 1.2.0)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.1.1)
Expand All @@ -66,15 +39,57 @@ GEM
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.1)
jemoji (= 0.9.0)
kramdown (= 1.16.2)
jemoji (= 0.10.1)
kramdown (= 1.17.0)
liquid (= 4.0.0)
listen (= 3.1.5)
mercenary (~> 0.3)
minima (= 2.4.1)
minima (= 2.5.0)
nokogiri (>= 1.8.2, < 2.0)
rouge (= 2.2.1)
terminal-table (~> 1.4)

GIT
remote: git://github.com/jekyll/github-metadata.git
revision: 6e08726766e3011a7c22327dfb102a7dc4c523f0
branch: master
specs:
jekyll-github-metadata (2.10.0)
jekyll (~> 3.4)
octokit (~> 4.0, != 4.4.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.4)
dnsruby (1.61.2)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
ffi (1.10.0)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages-health-check (1.8.1)
addressable (~> 2.3)
dnsruby (~> 1.60)
Expand All @@ -87,7 +102,7 @@ GEM
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.7.3)
jekyll (3.7.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -100,7 +115,7 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.5.0)
jekyll-avatar (0.6.0)
jekyll (~> 3.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
Expand All @@ -114,15 +129,11 @@ GEM
rouge (~> 2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.3)
jekyll-feed (0.11.0)
jekyll (~> 3.3)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.9.4)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.3.0)
activesupport (~> 4.0)
jekyll-mentions (1.4.1)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-octicons (8.3.0)
Expand All @@ -133,7 +144,7 @@ GEM
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.13.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-relative-links (0.5.3)
jekyll (~> 3.3)
Expand All @@ -142,7 +153,7 @@ GEM
rubyzip (>= 1.2.1, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.4.0)
jekyll-seo-tag (2.5.0)
jekyll (~> 3.3)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
Expand Down Expand Up @@ -189,28 +200,27 @@ GEM
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.1)
jekyll (~> 3.3)
jekyll-watch (2.0.0)
jekyll-watch (2.1.2)
listen (~> 3.0)
jemoji (0.9.0)
activesupport (~> 4.0, >= 4.2.9)
jemoji (0.10.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
kramdown (1.16.2)
kramdown (1.17.0)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minima (2.4.1)
minima (2.5.0)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.9.1)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
octicons (8.3.0)
nokogiri (>= 1.6.3.1)
Expand Down Expand Up @@ -249,9 +259,9 @@ PLATFORMS
ruby

DEPENDENCIES
github-pages
jekyll-github-metadata
github-pages!
jekyll-github-metadata!
jekyll-octicons

BUNDLED WITH
1.16.1
2.0.1
10 changes: 9 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
repository: primer/primer
repository: sophshep/manager-resources

sass:
sass_dir: node_modules

plugins:
- jekyll-octicons
- jekyll-github-metadata

topics:
- name: Web design
github_name: web-design
- name: CSS
github_name: css
- name: Sass
github_name: sass
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>{{ site.github.project_title }}</title>
<title>{{ site.github.owner.name }}</title>
<link href="/assets/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
9 changes: 9 additions & 0 deletions _includes/projects.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h2>My Projects</h2>
<p class="f4 mb-4 text-gray">GitHub repositories that I've contributed to</p>
<div class="d-flex flex-wrap gutter-condensed mb-4">
{% for repository in site.github.public_repositories limit: 4 %}
<div class="col-sm-6 col-md-12 col-lg-6 col-xl-4 mb-3">
{% include repo-card.html %}
</div>
{% endfor %}
</div>
40 changes: 18 additions & 22 deletions _includes/repo-card.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
<div class="github-component">
<div class="height-full border border-gray-light bg-white rounded-1 p-3">
<div class="d-flex flex-justify-between flex-items-start mb-1">
<h1 class="f4 lh-condensed mb-1">
<a href="/twbs" class="d-inline-block v-align-top mr-1" data-ga-click="Repository, go to repository owner, location:topic row">
<img src="https://avatars2.githubusercontent.com/u/2918581?s=96&amp;v=4" class="avatar rounded-1" width="20" height="20" alt="@twbs">
</a>
<a href="/twbs/bootstrap" data-ga-click="Repository, go to repository, location:topic row">
<span class="text-normal">twbs /</span>
bootstrap
</a>
</h1>
</div>
<div class="text-gray mb-2 ws-normal">The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.</div>
<div class="d-flex f6">
<a href="/twbs/bootstrap/stargazers" class="d-inline-block link-gray mr-4" data-ga-click="Repository, go to repository stargazers, location:topic row">
<svg class="octicon octicon-star mr-1" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path></svg>130253
</a>
<a href="/twbs/bootstrap/network" class="d-inline-block link-gray mr-4" data-ga-click="Repository, go to repository forks, location:topic row">
<svg class="octicon octicon-git-branch mr-1" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 5c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v.3c-.02.52-.23.98-.63 1.38-.4.4-.86.61-1.38.63-.83.02-1.48.16-2 .45V4.72a1.993 1.993 0 0 0-1-3.72C.88 1 0 1.89 0 3a2 2 0 0 0 1 1.72v6.56c-.59.35-1 .99-1 1.72 0 1.11.89 2 2 2 1.11 0 2-.89 2-2 0-.53-.2-1-.53-1.36.09-.06.48-.41.59-.47.25-.11.56-.17.94-.17 1.05-.05 1.95-.45 2.75-1.25S8.95 7.77 9 6.73h-.02C9.59 6.37 10 5.73 10 5zM2 1.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2C1.35 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2zm0 12.41c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm6-8c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>63919
</a>
</div>
<div class="github-component height-full text-left border border-gray-light bg-white rounded-1 p-3">
<div class="d-flex flex-justify-between flex-items-start mb-1">
<h1 class="f4 lh-condensed mb-1">
<a href="{{ repository.html_url }}">
{% octicon repo height:20 class:"mr-1 v-align-middle" fill:"#586069" aria-label:repo %}
<span class="text-normal">{{ repository.owner.login }} /</span>
{{ repository.name }}
</a>
</h1>
</div>
<div class="text-gray mb-2 ws-normal">{{ repository.description }}</div>
<div class="d-flex f6">
<a href="" class="d-inline-block link-gray mr-4">
<svg class="octicon octicon-star mr-1" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path></svg>130253
</a>
<a href="" class="d-inline-block link-gray mr-4">
<svg class="octicon octicon-git-branch mr-1" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 5c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v.3c-.02.52-.23.98-.63 1.38-.4.4-.86.61-1.38.63-.83.02-1.48.16-2 .45V4.72a1.993 1.993 0 0 0-1-3.72C.88 1 0 1.89 0 3a2 2 0 0 0 1 1.72v6.56c-.59.35-1 .99-1 1.72 0 1.11.89 2 2 2 1.11 0 2-.89 2-2 0-.53-.2-1-.53-1.36.09-.06.48-.41.59-.47.25-.11.56-.17.94-.17 1.05-.05 1.95-.45 2.75-1.25S8.95 7.77 9 6.73h-.02C9.59 6.37 10 5.73 10 5zM2 1.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2C1.35 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2zm0 12.41c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm6-8c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>63919
</a>
</div>
</div>
19 changes: 14 additions & 5 deletions _includes/topic-card.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<div class="github-component">
<div class="position-relative hover-grow height-full text-center border border-gray-light rounded-1 bg-white p-5">
<a href="/topics/sql" class="no-underline d-flex flex-column flex-justify-center" data-ga-click="Topics, go to sql, location:boxes">
<img src="https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/react/react.png" width="64" height="64" class="mx-auto rounded-1 mb-3" alt="react logo">
<p class="f3 lh-condensed text-center link-gray-dark mb-0 mt-1">React</p>
<p class="f5 text-gray text-center mb-0 mt-1">React (also known as React.js or ReactJS) is a JavaScript library that makes developing interactive user interfaces simple.</p>
</a>
{% if topic.github_name %}
<a href="https://github.com/topics/{{ topic.github_name }}" class="no-underline d-flex flex-column flex-justify-center" data-ga-click="Topics, go to sql, location:boxes">
<img src="https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/{{ topic.github_name }}/{{ topic.github_name }}.png" width="64" height="64" class="mx-auto rounded-1 mb-3" alt="{{ topic.name }}">
<p class="f3 lh-condensed text-center link-gray-dark mb-0 mt-1">{{ topic.name }}</p>
{% if topic.description %}
<p class="f5 text-gray text-center mb-0 mt-1">{{ topic.description }}</p>
{% endif %}
</a>
{% else %}
<p class="f3 lh-condensed text-center link-gray-dark mb-0 mt-1">{{ topic.name }}</p>
{% if topic.description %}
<p class="f5 text-gray text-center mb-0 mt-1">{{ topic.description }}</p>
{% endif %}
{% endif %}
</div>
</div>
Loading

0 comments on commit c630308

Please sign in to comment.