File tree Expand file tree Collapse file tree 9 files changed +77
-3
lines changed Expand file tree Collapse file tree 9 files changed +77
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ author :
15151616 github : Starstructor
1717
18+ gallery :
19+ - http://i.imgur.com/1Eu7C4k.png
20+ - http://i.imgur.com/TwLGnmF.png
21+ - http://i.imgur.com/xzM69M2.png
22+
1823# The production_url is only used when full-domain names are needed
1924# such as sitemap.txt
2025# Most places will/should use BASE_PATH to make the urls
Original file line number Diff line number Diff line change 1+ {% assign gallery = site.gallery %}
2+
3+ <div id="screenshots" class="container">
4+ {% for picture in gallery %}
5+ <a href="{{ picture }}"><img class="screenshot" src="{{ picture }}" alt="Screenshot" style="width: 30%;height: 5%" /></a>
6+ {% endfor %}
7+ </div>
Original file line number Diff line number Diff line change 1+ {% get_tags %}
Original file line number Diff line number Diff line change 3434 </ head >
3535
3636 < body >
37- < header class ="navbar navbar-inverse ">
37+ < header id =" header " class ="navbar navbar-inverse ">
3838 < div class ="navbar-inner ">
3939 < div class ="container-narrow ">
4040 < a class ="brand " href ="{{ HOME_PATH }} "> {{ site.title }}</ a >
Original file line number Diff line number Diff line change 1+ require 'net/http'
2+ require 'openssl'
3+ require 'json'
4+
5+ module Jekyll
6+ class GetTags < Liquid ::Tag
7+ def initialize ( tag_name , text , tokens )
8+ super
9+
10+ uri = URI ( 'https://api.github.com/repos/Starstructor/starstructor/tags' )
11+
12+ Net ::HTTP . start ( uri . host , uri . port , use_ssl : true ) do |http |
13+ request = Net ::HTTP ::Get . new uri
14+ response = http . request request
15+ @json_obj = JSON . parse response . body
16+ end
17+ end
18+
19+ def render ( context )
20+ @json_obj . each do |tag |
21+ %|<li>Download #{ tag [ 'name' ] } (<a href='#{ tag [ 'zipball_url' ] } '>ZIP</a> \| <a href='#{ tag [ 'tarball_url' ] } '>TAR</a>)</li>|
22+ end
23+ end
24+ end
25+ end
26+
27+ Liquid ::Template . register_tag ( 'get_tags' , Jekyll ::GetTags )
Original file line number Diff line number Diff line change 1+ require 'uri'
2+ require 'cgi'
3+
4+ module Jekyll
5+ class YouTubeTag < Liquid ::Tag
6+ def initialize ( tag_name , video_url , tokens )
7+ super
8+ query = URI ::parse ( video_url ) . query
9+ params = CGI ::parse ( query )
10+ @vid = params [ "v" ] [ 0 ]
11+ end
12+
13+ def render ( context )
14+ %|<iframe width="560" height="315" src="http://www.youtube.com/embed/#{ @vid } " frameborder="0" allowfullscreen></iframe>|
15+ end
16+ end
17+ end
18+
19+ Liquid ::Template . register_tag ( 'youtube' , Jekyll ::YouTubeTag )
Original file line number Diff line number Diff line change 44 color : # EEE ;
55}
66
7+ header # header {
8+ width : 100% ;
9+ }
10+
711section # mainContainer {
812 border-radius : 5px ;
913 background-color : # 000 ;
@@ -12,6 +16,14 @@ section#mainContainer {
1216 padding : 5px ;
1317}
1418
19+ div # screenshots {
20+
21+ }
22+
23+ img .screenshot {
24+ margin : 5px ;
25+ }
26+
1527/* Custom container */
1628.container-narrow {
1729 margin : 0 auto;
Original file line number Diff line number Diff line change 77< div id ="downloads ">
88 < h5 > Releases (stable)</ h5 >
99 < ul id ="stable ">
10- < li > At some point, I will try to utilize the github api to fetch all tags.</ li >
10+ <!--{% get_tags %} this does not work on github pages due to jekyll's --safe option.-->
11+ < li > Download 0.7.5145.12730 (< a href ='https://api.github.com/repos/Starstructor/starstructor/zipball/0.7.5145.12730 '> ZIP</ a > | < a href ='https://api.github.com/repos/Starstructor/starstructor/tarball/0.7.5145.12730 '> TAR</ a > )</ li >
12+ < li > Download 0.7.5145.7246 (< a href ='https://api.github.com/repos/Starstructor/starstructor/zipball/0.7.5145.7246 '> ZIP</ a > | < a href ='https://api.github.com/repos/Starstructor/starstructor/tarball/0.7.5145.7246 '> TAR</ a > )</ li >
13+ < li > Download v0.7.5143.8266 (< a href ='https://api.github.com/repos/Starstructor/starstructor/zipball/v0.7.5143.8266 '> ZIP</ a > | < a href ='https://api.github.com/repos/Starstructor/starstructor/tarball/v0.7.5143.8266 '> TAR</ a > )</ li >
1114 </ ul >
1215
1316 < h5 > Unstable</ h5 >
Original file line number Diff line number Diff line change 44title: Gallery
55group: navigation
66---
7- The Gallery
7+ {% include gallery %}
You can’t perform that action at this time.
0 commit comments