File tree 9 files changed +77
-3
lines changed 9 files changed +77
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ author :
15
15
email : starstructor@gmail.com
16
16
github : Starstructor
17
17
18
+ gallery :
19
+ - http://i.imgur.com/1Eu7C4k.png
20
+ - http://i.imgur.com/TwLGnmF.png
21
+ - http://i.imgur.com/xzM69M2.png
22
+
18
23
# The production_url is only used when full-domain names are needed
19
24
# such as sitemap.txt
20
25
# 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 34
34
</ head >
35
35
36
36
< body >
37
- < header class ="navbar navbar-inverse ">
37
+ < header id =" header " class ="navbar navbar-inverse ">
38
38
< div class ="navbar-inner ">
39
39
< div class ="container-narrow ">
40
40
< 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 4
4
color : # EEE ;
5
5
}
6
6
7
+ header # header {
8
+ width : 100% ;
9
+ }
10
+
7
11
section # mainContainer {
8
12
border-radius : 5px ;
9
13
background-color : # 000 ;
@@ -12,6 +16,14 @@ section#mainContainer {
12
16
padding : 5px ;
13
17
}
14
18
19
+ div # screenshots {
20
+
21
+ }
22
+
23
+ img .screenshot {
24
+ margin : 5px ;
25
+ }
26
+
15
27
/* Custom container */
16
28
.container-narrow {
17
29
margin : 0 auto;
Original file line number Diff line number Diff line change 7
7
< div id ="downloads ">
8
8
< h5 > Releases (stable)</ h5 >
9
9
< 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 >
11
14
</ ul >
12
15
13
16
< h5 > Unstable</ h5 >
Original file line number Diff line number Diff line change 4
4
title: Gallery
5
5
group: navigation
6
6
---
7
- The Gallery
7
+ {% include gallery %}
You can’t perform that action at this time.
0 commit comments