Skip to content

Commit 6636e0a

Browse files
committed
Rename properties and make other requested changes
1 parent 2b92181 commit 6636e0a

10 files changed

Lines changed: 110 additions & 44 deletions

_includes/author-card.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
<!-- this looks weird, but it was the only way I could figure out how to test
1010
that the first character of author is "@" -->
1111
{% if at_sign.size > 0 and test_at_sign_is_first == 3 %}
12-
{% if card_style %}
13-
<iframe class="author-card" style="{{card_style}}" src="http://lab.lepture.com/github-cards/card.html?user={{ author_no_at_sign }}" frameborder="0" scrolling="0" allowtransparency></iframe>
14-
{% else %}
15-
<iframe class="author-card" src="http://lab.lepture.com/github-cards/card.html?user={{ author_no_at_sign }}" frameborder="0" scrolling="0" width="400" height="200" allowtransparency></iframe>
16-
{% endif %}
12+
<div data-card-user="{{author_no_at_sign}}"></div><br/>
1713
{% endif %}
1814
{% endfor %}

_includes/head.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
<head>
1+
<head>
22
<meta charset="utf-8">
33
<meta http-equiv="X-UA-Compatible" content="chrome=1">
44
<title>{{ page.title }}</title>
55
<link rel="stylesheet" href="{{ site.github.url }}/stylesheets/styles.css">
66
<link rel="stylesheet" href="{{ site.github.url }}/stylesheets/pygment_trac.css">
7-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
7+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
88
<script src="{{ site.github.url }}/javascripts/respond.js"></script>
9+
<script src="{{ site.github.url }}/javascripts/cards.js"></script>
910
<!--[if lt IE 9]>
1011
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
1112
<![endif]-->

_includes/youtube-embed.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{% if page.youtube_video %}
2-
{% if page.youtube_video_pre %}
3-
{{page.youtube_video_pre}}<br/>
1+
{% if page.youtube_video_id %}
2+
{% if page.youtube_video_id_pre %}
3+
{{page.youtube_video_id_pre}}<br/>
44
{% endif %}
5-
<iframe width="560" height="315" src="//www.youtube.com/embed/{{page.youtube_video}}?rel=0" frameborder="0" allowfullscreen="1"> </iframe>
5+
<iframe width="560" height="315" src="//www.youtube.com/embed/{{page.youtube_video_id}}?rel=0" frameborder="0" allowfullscreen="1"> </iframe>
66
<br /><br />
77
{% endif %}

_layouts/project.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
<h3>
1717
Project Info
1818
</h3>
19-
{% if page.github_repo %}
19+
{% if page.project_homepage_url %}
2020
<div class="button">
21-
<a href="{{ page.github_repo }}">Get the code on GitHub</a>
21+
<a href="{{ page.project_homepage_url }}">Project Homepage</a>
2222
</div><br /><br />
23-
{% elsif page.code_url %}
23+
{% endif %}
24+
{% if page.source_code_url %}
2425
<div class="button">
25-
<a href="{{ page.code_url }}">Get the code</a>
26+
<a href="{{ page.source_code_url }}">Source Code</a>
2627
</div><br /><br />
2728
{% endif %}
28-
{% if page.homepage %}
29-
Homepage: <a href="{{ page.homepage }}">{{ page.homepage }}</a> <br /><br />
29+
{% if page.programming_language %}
30+
Written In {{page.programming_language}}<br /><br />
3031
{% endif %}
3132
{% if page.author %}
32-
Author:<br/><br/>
33+
Author:<br />
3334
{% assign author_card = page.author %}
34-
{% assign card_style = "width:100%;height:200px;" %}
3535
{% include author-card.html %}
3636
{% endif %}
3737
</div>
@@ -40,8 +40,7 @@ <h3>
4040
{{ content }}
4141
<br />
4242
<div id="project-credit">
43-
{% assign author_mention = page.author %}
44-
Posted by {% include author-mention.html %} on {{ page.date | date_to_string }}
43+
Posted on {{ page.date | date_to_string }}
4544
</div>
4645
</div>
4746
</section>
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
---
22
author: "@wasabifan" #The GitHub username of the post's author or authors, separated by spaces. This is the only "required" field, but it is highly encouraged to fill out as many as you can.
3-
language: JavaScript #The programming language that the project was written with
3+
programming_language: JavaScript #The programming language that the project was written with
44

5-
youtube_video_pre: "Here's a video:" #Text to be displayed before the video; will only be included if a video is supplied
6-
youtube_video: abc123 #The video ID of the YouTube video to be displayed with this post
5+
youtube_video_id: abc123 #The video ID of the YouTube video to be displayed with this post
76

8-
github_repo: "github.com/myuser/myrepo" #Provide a link to a dedicated GitHub repo
9-
code_url: "example.com/myproject" #Fallback if no GitHub repo is provided;
10-
homepage: "example.com" #A pretty home page for the project
7+
source_code_url: "https://github.com/myuser/myrepo" #Provide a link to your code
8+
project_homepage_url: "http://example.com" #A pretty home page for the project
119

12-
published: false #Hides the project from the published site (set this to true to publish it)
13-
14-
layout: project
15-
category: projects
10+
layout: "project"
11+
category: "projects"
1612
---
1713

1814
Put your content here. It can be any Markdown, HTML, plain text, or a combination of the three.

_posts/2014-05-09-Python-Rubiks-Cube-Solver.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
author: "@cavenel"
3-
language: Python
4-
github_repo: "https://github.com/cavenel/ev3dev_examples"
5-
youtube_video_pre: "You can find a demo of the robot using the rubiks cube example here:"
6-
youtube_video: HuKsfp19yF0
3+
programming_language: Python
4+
source_code_url: "https://github.com/cavenel/ev3dev_examples"
5+
youtube_video_id: HuKsfp19yF0
76

8-
layout: project
9-
category: projects
7+
layout: "project"
8+
category: "projects"
109
---
1110

1211
The model is based on [mindcub3r](http://www.mindcuber.com/mindcub3r/mindcub3r.html), from David Gilday.

_posts/2014-05-16-Balancing-Robot.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
author: "@G33kDude and @dlech"
3-
code_url: "https://gist.github.com/dlech/11098915"
4-
layout: project
5-
category: projects
3+
source_code_url: "https://gist.github.com/dlech/11098915"
4+
5+
layout: "project"
6+
category: "projects"
67
---
78

89
This is still a work in progress. It is a Segway-style balancing robot based on

_posts/2014-07-16-Drawing-Robot.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
author: "@cavenel"
3-
language: Python
4-
youtube_video: 9pjpQoZoW6E
5-
layout: project
6-
category: projects
3+
programming_language: Python
4+
youtube_video_id: 9pjpQoZoW6E
5+
6+
layout: "project"
7+
category: "projects"
78
---

javascripts/cards.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$(document).ready(function () {
2+
$('div[data-card-user]').each(function (i, element) {
3+
var $cardDiv = $(element);
4+
$.ajax('https://api.github.com/users/' + $cardDiv.data('card-user')).done(function (userData) {
5+
$cardDiv.addClass('user-card');
6+
$cardDiv.append('<div class="user-card-avatar"><img src="' + userData.avatar_url + '"/></div>');
7+
$cardDiv.append('<div class="user-card-text"></div>');
8+
var $textDiv = $cardDiv.children(':last-child');
9+
$textDiv.append('<div class="user-card-name">' + (userData.name || userData.login) + '</div>');
10+
$textDiv.append('<div class="user-card-login">@' + userData.login + '</div>');
11+
});
12+
});
13+
});

stylesheets/styles.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ strong {
616616
}
617617

618618
.project-content-wrapper {
619+
width: 650px;
619620
width: calc(100% - 250px);
620621
}
621622

@@ -969,3 +970,62 @@ section #title p {
969970
70% { color: rgb(255, 204, 0); }
970971
100% { color: #e8e8e8 }
971972
}
973+
974+
.user-card {
975+
position: relative;
976+
min-height: 40px;
977+
background-color: #fff;
978+
font-family: "Helvetica", Arial, sans-serif;
979+
color: #111111;
980+
border-radius: 2px;
981+
text-align: center;
982+
font-weight: 100;
983+
padding: 5px;
984+
985+
-moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
986+
-webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
987+
-o-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
988+
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
989+
}
990+
991+
.user-card .user-card-avatar {
992+
position: absolute;
993+
float: left;
994+
max-height: 100%;
995+
width: auto;
996+
max-width: 20%;
997+
top: 50%;
998+
999+
-webkit-transform: translateY(-50%);
1000+
-ms-transform: translateY(-50%);
1001+
-o-transform: translateY(-50%);
1002+
-moz-transform: translateY(-50%);
1003+
transform: translateY(-50%);
1004+
}
1005+
1006+
.user-card .user-card-avatar img {
1007+
vertical-align: middle;
1008+
border: 1px solid #aaa;
1009+
border-radius: 2px;
1010+
}
1011+
1012+
.user-card .user-card-text {
1013+
clear: both;
1014+
margin-left: auto;
1015+
margin-right: 0;
1016+
width: 75%;
1017+
height: 100%;
1018+
vertical-align: middle;
1019+
}
1020+
1021+
.user-card .user-card-name {
1022+
font-size: 1.5em;
1023+
font-weight: normal;
1024+
vertical-align: middle;
1025+
}
1026+
1027+
.user-card .user-card-login {
1028+
font-size: 1em;
1029+
font-weight: 100;
1030+
vertical-align: middle;
1031+
}

0 commit comments

Comments
 (0)