This repository was archived by the owner on Nov 10, 2020. It is now read-only.
File tree 11 files changed +60
-49
lines changed
11 files changed +60
-49
lines changed Original file line number Diff line number Diff line change 2
2
layout : default
3
3
title : Page not found
4
4
noversions : true
5
+ isdoc : false
5
6
---
6
7
7
8
Sorry! Couldn't find what you were looking for.
8
9
9
- If you got here by switching versions, the item you were looking has probably been renamed. Try searching or returning to the home page for [ ** Swift 2.1** ] ( /v2.1/ ) or [ ** Swift 1.2** ] ( /v1.2/ ) .
10
-
10
+ If you got here by switching versions, the item you were looking has probably been renamed. Select the version you'd like from the list below:
11
11
12
+ {% for version in site.data.versions %}
13
+ - <a href =" {{ version.path }} " >{{ version.name }} ({{ version.note }}, {{version.version}})</a >
14
+ {% endfor %}
Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ body.home {
129
129
padding-top : 0 ;
130
130
padding-bottom : 0 ;
131
131
}
132
+ .dropdown-toggle ,.dropdown-menu {
133
+ width : 100% ;
134
+ }
132
135
.navbar-toggle {
133
136
border-color : @white ;
134
137
Original file line number Diff line number Diff line change @@ -129,11 +129,9 @@ $(function() {
129
129
$ ( '.dropdown-menu a' ) . each ( function ( i , item ) {
130
130
item . href = ( item . href + location . href ) . replace ( / ( v [ . a - z 0 - 9 ] + \/ ) .+ ?( \/ v [ . a - z 0 - 9 ] + \/ | $ ) / , '$1' )
131
131
} ) ;
132
- /*
133
- $('#version a').each(function(i, item) {
134
- item.href = (item.href + location.href).replace(/(v[.a-z0-9]+\/).+?(\/v[.a-z0-9]+\/|$)/, '$1');
132
+ $ ( '#header h1 a' ) . each ( function ( i , item ) {
133
+ item . href = location . href . replace ( / ( v [ . a - z 0 - 9 ] + \/ ) .+ / , '$1' )
135
134
} ) ;
136
- */
137
135
138
136
// highlight key parts of identifiers
139
137
$ ( '.toggle-link' ) . each ( function ( i , link ) {
Original file line number Diff line number Diff line change @@ -24,3 +24,16 @@ paginate_path: /news/page:num
24
24
tag_dir : /news/tags
25
25
monthly_archive :
26
26
path : /news
27
+
28
+ defaults :
29
+ -
30
+ scope :
31
+ path : " "
32
+ values :
33
+ isdoc : true
34
+ -
35
+ scope :
36
+ path : " "
37
+ type : " posts"
38
+ values :
39
+ isdoc : false
Original file line number Diff line number Diff line change 1
- path,name,note
2
- /v3.0/,Swift 3.0,swift/master
3
- /v2.2/,Swift 2.2,Xcode 7.3 beta
4
- /v2.1/,Swift 2.1,Xcode 7.2
5
- /v1.2/,Swift 1.2,Xcode 6.3+
1
+ path,name,note,version
2
+ /v3.0/,Swift 3.0-dev ,swift/master,Swift b92870f555
3
+ /v2.2/,Swift 2.2,Xcode 7.3 beta 5,swiftlang-703.0.17.4
4
+ /v2.1/,Swift 2.1,Xcode 7.2,swiftlang-700.1.101.19
5
+ /v1.2/,Swift 1.2,Xcode 6.3+,swiftlang-602.0.49.6
Original file line number Diff line number Diff line change 10
10
< a href ="/news/ "> News</ a > ⋅
11
11
< a href ="https://twitter.com/{{ site.twitter_username }} "> @{{ site.twitter_username }}</ a > ⋅
12
12
< a href ="https://github.com/{{ site.github_username }} "> github.com/{{ site.github_username }}</ a > < br />
13
- < span class ="version "> {{ site.swift_version }}</ span >
14
13
</ p >
15
14
< p > Created by parsing and analyzing the autogenerated header for the Swift standard library. Built using < a href ="https://nodejs.org/en/ "> Node.js</ a > and < a href ="http://jekyllrb.com/ "> Jekyll</ a > , hosted with < a href ="https://pages.github.com/ "> GitHub Pages</ a > .</ p >
16
15
Original file line number Diff line number Diff line change 1
1
{% capture homeUrl %}{% if page.url contains 'swift-2' %}/swift-2{% endif %}/{% endcapture %}
2
- {% assign current = 'Swift 2.2 (Xcode 7.3 beta)' %}
3
- {% for version in site.data.versions %}
4
- {% if page.url contains version.path %}
5
- {% capture current %}{{ version.name }} ({{ version.note }}){% endcapture %}
6
- {% endif %}
7
- {% endfor %}
8
-
9
2
< nav class ="navbar navbar-default " role ="navigation " id ="navbar ">
10
3
< div class ="container-fluid ">
11
4
<!-- Brand and toggle get grouped for better mobile display -->
@@ -27,6 +20,8 @@ <h1><a href="{{ homeUrl }}">SwiftDoc.org</a></h1>
27
20
< span class ="glyphicon glyphicon-search form-control-feedback "> </ span >
28
21
</ div >
29
22
23
+ {% include version.html %}
24
+
30
25
</ form >
31
26
< ul class ="nav navbar-nav navbar-right " id ="navmenu ">
32
27
< li > < a href ="/type/ "> Types</ a > </ li >
@@ -49,17 +44,7 @@ <h1><a href="{{ homeUrl }}">{{ site.title }}</a></h1>
49
44
< span class ="glyphicon glyphicon-search form-control-feedback "> </ span >
50
45
</ div >
51
46
52
- < div class ="dropdown ">
53
- < button class ="btn btn-default dropdown-toggle " type ="button " id ="versionMenu " data-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="true ">
54
- {{ current }}
55
- < span class ="caret "> </ span >
56
- </ button >
57
- < ul class ="dropdown-menu " aria-labelledby ="versionMenu ">
58
- {% for version in site.data.versions %}
59
- < li > < a href ="{{ version.path }} "> {{ version.name }} ({{ version.note }})</ a > </ li >
60
- {% endfor %}
61
- </ ul >
62
- </ div >
47
+ {% include version.html %}
63
48
64
49
{% endif %}
65
50
</ div >
Original file line number Diff line number Diff line change 1
- {% if page.isdoc %}
2
- {% assign current = 'Swift 2.2 (Xcode 7.3 beta)' %}
3
- {% for version in site.data.versions %}
4
- {% if page.url contains version.path %}
5
- {% capture current %}{{ version.name }} ({{ version.note }}){% endcapture %}
6
- {% endif %}
7
- {% endfor %}
8
1
< div id ="intranav ">
2
+ {% if page.isdoc %}
9
3
< h4 > On this page</ h4 >
10
4
< ul id ="chapters ">
11
5
< li > < a href ="#content "> Declaration</ a > </ li >
@@ -14,18 +8,8 @@ <h4>On this page</h4>
14
8
< h4 > Display</ h4 >
15
9
< ul id ="display ">
16
10
</ ul >
11
+ {% endif %}
17
12
18
13
< h4 > Swift Version</ h4 >
19
- < div class ="dropdown ">
20
- < button class ="btn btn-default dropdown-toggle " type ="button " id ="versionMenu " data-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="true ">
21
- {{ current }}
22
- < span class ="caret "> </ span >
23
- </ button >
24
- < ul class ="dropdown-menu " aria-labelledby ="versionMenu ">
25
- {% for version in site.data.versions %}
26
- < li > < a href ="{{ version.path }} "> {{ version.name }} ({{ version.note }})</ a > </ li >
27
- {% endfor %}
28
- </ ul >
29
- </ div >
14
+ {% include version.html %}
30
15
</ div >
31
- {% endif %}
Original file line number Diff line number Diff line change
1
+ {% assign current = 'Swift 2.2 (Xcode 7.3 beta)' %}
2
+ {% for version in site.data.versions %}
3
+ {% if page.url contains version.path %}
4
+ {% capture current %}{{ version.name }} ({{ version.note }}){% endcapture %}
5
+ {% endif %}
6
+ {% endfor %}
7
+ < div class ="dropdown ">
8
+ < button class ="btn btn-default dropdown-toggle " type ="button " id ="versionMenu " data-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="true ">
9
+ {{ current }}
10
+ < span class ="caret "> </ span >
11
+ </ button >
12
+ < ul class ="dropdown-menu " aria-labelledby ="versionMenu ">
13
+ {% for version in site.data.versions %}
14
+ < li > < a href ="{{ version.path }} "> {{ version.name }} ({{ version.note }})</ a > </ li >
15
+ {% endfor %}
16
+ </ ul >
17
+ </ div >
Original file line number Diff line number Diff line change
1
+ {% assign current = 'Swift 2.2 (Xcode 7.3 beta)' %}
2
+ {% for version in site.data.versions %}
3
+ {% if page.url contains version.path %}
4
+ {% capture current %}{{ version.name }} ({{ version.note }}){% endcapture %}
5
+ {% endif %}
6
+ {% endfor %}
1
7
<!DOCTYPE html>
2
8
< html >
3
9
{% include head.html %}
12
18
13
19
< div id ="fixed-sidebar " data-spy ="">
14
20
21
+ {% if page.isdoc %}
15
22
< div class ="form-group ">
16
23
< div class ="input-group has-feedback " id ="select-container ">
17
24
< input type ="hidden " class ="form-control select2 ">
18
25
< span class ="glyphicon glyphicon-search form-control-feedback "> </ span >
19
26
</ div >
20
27
</ div >
28
+ {% endif %}
21
29
22
30
{% include sidebar.html %}
23
31
Original file line number Diff line number Diff line change 2
2
layout: default
3
3
title: News
4
4
indexpage: 1
5
+ isdoc: false
5
6
---
6
7
7
8
< div class ="posts ">
You can’t perform that action at this time.
0 commit comments