forked from jquery/learn.jquery.com
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stub out a basic footer that requests github user information and dis…
…plays it (only available on syntax-basics article for now)
- Loading branch information
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="clearfix"> | ||
<div class="github"> | ||
<%if @item[:github] %> | ||
<% github_user = @item[:github] || "jquery" %> | ||
<% user_request = Curl::Easy.http_get("https://api.github.com/users/"+github_user) %> | ||
<% user_request.perform %> | ||
<% user_obj = JSON.parse(user_request.body_str) %> | ||
<h3>By <%= user_obj["name"] %></h3> | ||
<img src="<%= user_obj["avatar_url"] %>" /> | ||
<% else %> | ||
<h3>By <%= @item[:attribution] %></h3> | ||
<% end %> | ||
</div> | ||
|
||
<h4>Suggestions? Problems? Feedback?</h4> | ||
You can open an issue or submit a pull request for | ||
<a target="_blank" href="https://github.com/jquery/web-learn-jquery-com/blob/master/content/<%= @item.identifier.slice(1..-2) %>.md"> | ||
this article on GitHub | ||
</a> | ||
<a href="#">(Help!)</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters