@@ -15726,20 +15726,20 @@ Opal.modules["components/router/app_router"] = function(Opal) {
15726
15726
return ($e = ($f = self).$Switch, $e.$$p = (TMP_3 = function(){var self = TMP_3.$$s || this;
15727
15727
15728
15728
self.$Route("/", $hash2(["exact", "mounts"], {"exact": true, "mounts": $scope.get('HomePage')}));
15729
- self.$Route("/start", $hash2(["exact", "mounts"], {"exact": true , "mounts": $scope.get('StartPage')}));
15729
+ self.$Route("/start", $hash2(["exact", "mounts"], {"exact": false , "mounts": $scope.get('StartPage')}));
15730
15730
self.$Route("/installation", $hash2(["exact", "mounts"], {"exact": true, "mounts": $scope.get('InstallationPage')}));
15731
15731
self.$Route("/tutorials", $hash2(["exact", "mounts"], {"exact": true, "mounts": $scope.get('TutorialsPage')}));
15732
15732
self.$Route("/gems", $hash2(["exact", "mounts"], {"exact": true, "mounts": $scope.get('GemsPage')}));
15733
15733
self.$Route("/tools", $hash2(["exact", "mounts"], {"exact": true, "mounts": $scope.get('ToolsPage')}));
15734
- return self.$Route("/docs", $hash2(["exact", "mounts"], {"exact": true , "mounts": $scope.get('DocsPage')}));}, TMP_3.$$s = self, TMP_3.$$arity = 0, TMP_3), $e).call($f)}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $c).call($d)}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
15734
+ return self.$Route("/docs", $hash2(["exact", "mounts"], {"exact": false , "mounts": $scope.get('DocsPage')}));}, TMP_3.$$s = self, TMP_3.$$arity = 0, TMP_3), $e).call($f)}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $c).call($d)}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
15735
15735
})($scope.base, (($scope.get('Hyperloop')).$$scope.get('Router')))
15736
15736
};
15737
15737
15738
15738
/* Generated by Opal 0.10.5 */
15739
15739
Opal.modules["components/docs/docs_sidebar"] = function(Opal) {
15740
15740
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
15741
15741
15742
- Opal.add_stubs(['$param', '$render', '$PageToc', '$section_store', '$params']);
15742
+ Opal.add_stubs(['$param', '$render', '$PageToc', '$section_store', '$params', '$history', '$section' ]);
15743
15743
return (function($base, $super) {
15744
15744
function $DocsSidebar(){};
15745
15745
var self = $DocsSidebar = $klass($base, $super, 'DocsSidebar', $DocsSidebar);
@@ -15748,9 +15748,13 @@ Opal.modules["components/docs/docs_sidebar"] = function(Opal) {
15748
15748
15749
15749
self.$param("section_store");
15750
15750
15751
+ self.$param("history");
15752
+
15753
+ self.$param("section");
15754
+
15751
15755
return ($a = ($b = self).$render, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this;
15752
15756
15753
- return self.$PageToc($hash2(["section_store"], {"section_store": self.$params().$section_store()}))}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
15757
+ return self.$PageToc($hash2(["section_store", "history", "section" ], {"section_store": self.$params().$section_store(), "history": self.$params().$history(), "section": self.$params().$section ()}))}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
15754
15758
})($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')))
15755
15759
};
15756
15760
@@ -15777,7 +15781,7 @@ Opal.modules["components/docs/docs_body"] = function(Opal) {
15777
15781
Opal.modules["components/docs/docs_page"] = function(Opal) {
15778
15782
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
15779
15783
15780
- Opal.add_stubs(['$before_mount', '$hide', '$render', '$as_node', '$DocsSidebar', '$[]', '$sections', '$DocsBody', '$PageLayout', '$loaded?']);
15784
+ Opal.add_stubs(['$before_mount', '$hide', '$render', '$puts', '$url', '$match', '$ as_node', '$DocsSidebar', '$[]', '$sections', '$history', '$ DocsBody', '$Route ', '$PageLayout', '$loaded?']);
15781
15785
return (function($base, $super) {
15782
15786
function $DocsPage(){};
15783
15787
var self = $DocsPage = $klass($base, $super, 'DocsPage', $DocsPage);
@@ -15788,12 +15792,22 @@ Opal.modules["components/docs/docs_page"] = function(Opal) {
15788
15792
15789
15793
return $scope.get('SidebarStore').$hide()}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
15790
15794
15791
- return ($a = ($c = self).$render, $a.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this, sidebar = nil, body = nil, title = nil;
15795
+ return ($a = ($c = self).$render, $a.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this, $d, $e, TMP_3, $f, TMP_4, $g, TMP_5, sidebar = nil, body = nil, title = nil;
15792
15796
15793
- sidebar = self.$DocsSidebar($hash2(["section_store"], {"section_store": $scope.get('SiteStore').$sections()['$[]']("docs")})).$as_node();
15797
+ self.$puts(self.$match().$url());
15798
+ sidebar = self.$DocsSidebar($hash2(["section_store", "history", "section"], {"section_store": $scope.get('SiteStore').$sections()['$[]']("docs"), "history": self.$history(), "section": "docs"})).$as_node();
15794
15799
body = self.$DocsBody($hash2(["section_store"], {"section_store": $scope.get('SiteStore').$sections()['$[]']("docs")})).$as_node();
15795
15800
title = "Hyperloop Documentation";
15796
- return self.$PageLayout($hash2(["sidebar_component", "body_component", "page_title", "loaded"], {"sidebar_component": sidebar, "body_component": body, "page_title": title, "loaded": $scope.get('SiteStore').$sections()['$[]']("docs")['$loaded?']()}));}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $a).call($c);
15801
+ ($d = ($e = self).$Route, $d.$$p = (TMP_3 = function(){var self = TMP_3.$$s || this;
15802
+
15803
+ return self.$puts("we have a repo")}, TMP_3.$$s = self, TMP_3.$$arity = 0, TMP_3), $d).call($e, "/docs/:repo", $hash2(["exact"], {"exact": true}));
15804
+ ($d = ($f = self).$Route, $d.$$p = (TMP_4 = function(){var self = TMP_4.$$s || this;
15805
+
15806
+ return self.$puts("we have a repo and file")}, TMP_4.$$s = self, TMP_4.$$arity = 0, TMP_4), $d).call($f, "/docs/:repo/:file", $hash2(["exact"], {"exact": true}));
15807
+ ($d = ($g = self).$Route, $d.$$p = (TMP_5 = function(){var self = TMP_5.$$s || this;
15808
+
15809
+ return self.$puts("we have a repo and file and slug")}, TMP_5.$$s = self, TMP_5.$$arity = 0, TMP_5), $d).call($g, "/docs/:repo/:file/:slug", $hash2(["exact"], {"exact": true}));
15810
+ return self.$PageLayout($hash2(["sidebar_component", "body_component", "page_title", "loaded"], {"sidebar_component": sidebar, "body_component": body, "page_title": title, "loaded": $scope.get('SiteStore').$sections()['$[]']("docs")['$loaded?']()}));}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $a).call($c, $scope.get('DIV'));
15797
15811
})($scope.base, (((($scope.get('Hyperloop')).$$scope.get('Router'))).$$scope.get('Component')))
15798
15812
};
15799
15813
@@ -16088,77 +16102,9 @@ if (e == null) e = nil;if (data == null) data = nil;
16088
16102
16089
16103
/* Generated by Opal 0.10.5 */
16090
16104
Opal.modules["components/shared/page_toc.old"] = function(Opal) {
16091
- var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
16092
-
16093
- Opal.add_stubs(['$param', '$render', '$DIV', '$Container', '$Menu', '$loaded?', '$section_store', '$params', '$accordion', '$each_with_index', '$<<', '$as_node', '$toc_heading', '$[]', '$panel', '$to_s', '$pages', '$Accordion', '$to_n', '$UL', '$each', '$toc_item', '$drop', '$on', '$set_current_page', '$force_update!', '$SPAN', '$LI', '$A']);
16094
- return (function($base, $super) {
16095
- function $PageToc(){};
16096
- var self = $PageToc = $klass($base, $super, 'PageToc', $PageToc);
16097
-
16098
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_1, TMP_7, TMP_10, TMP_13, TMP_17;
16099
-
16100
- self.$param("section_store");
16101
-
16102
- ($a = ($b = self).$render, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this, $c, $d, TMP_2;
16103
-
16104
- return ($c = ($d = self).$DIV, $c.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this, $e, $f, TMP_3;
16105
-
16106
- return ($e = ($f = $scope.get('Sem')).$Container, $e.$$p = (TMP_3 = function(){var self = TMP_3.$$s || this, $g, $h, TMP_4;
16107
-
16108
- return ($g = ($h = $scope.get('Sem')).$Menu, $g.$$p = (TMP_4 = function(){var self = TMP_4.$$s || this, $i, $j, TMP_5;
16109
-
16110
- if ((($i = self.$params().$section_store()['$loaded?']()) !== nil && $i != null && (!$i.$$is_boolean || $i == true))) {
16111
- return ($i = ($j = self).$DIV, $i.$$p = (TMP_5 = function(){var self = TMP_5.$$s || this;
16112
-
16113
- return self.$accordion()}, TMP_5.$$s = self, TMP_5.$$arity = 0, TMP_5), $i).call($j, $hash2(["class"], {"class": "accordian-div"}))
16114
- } else {
16115
- return nil
16116
- }}, TMP_4.$$s = self, TMP_4.$$arity = 0, TMP_4), $g).call($h, $hash2(["fixed", "vertical", "size", "inverted", "compact"], {"fixed": "left", "vertical": true, "size": "huge", "inverted": false, "compact": true}))}, TMP_3.$$s = self, TMP_3.$$arity = 0, TMP_3), $e).call($f)}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $c).call($d, $hash2(["class"], {"class": "tocmenu"}))}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
16117
-
16118
- Opal.defn(self, '$accordion', TMP_7 = function $$accordion() {
16119
- var $a, $b, TMP_6, self = this, panels = nil;
16120
-
16121
- panels = [];
16122
- ($a = ($b = self.$params().$section_store().$pages()).$each_with_index, $a.$$p = (TMP_6 = function(page, index){var self = TMP_6.$$s || this;
16123
- if (page == null) page = nil;if (index == null) index = nil;
16124
- return panels['$<<']($hash2(["title", "content", "key"], {"title": self.$toc_heading(page, page['$[]']("headings")['$[]'](0)).$as_node(), "content": self.$panel(page).$as_node(), "key": index.$to_s()}))}, TMP_6.$$s = self, TMP_6.$$arity = 2, TMP_6), $a).call($b);
16125
- return $scope.get('Sem').$Accordion($hash2(["panels", "styled", "fluid"], {"panels": panels.$to_n(), "styled": false, "fluid": false}));
16126
- }, TMP_7.$$arity = 0);
16127
-
16128
- Opal.defn(self, '$panel', TMP_10 = function $$panel(page) {
16129
- var $a, $b, TMP_8, self = this;
16130
-
16131
- return ($a = ($b = self).$UL, $a.$$p = (TMP_8 = function(){var self = TMP_8.$$s || this, $c, $d, TMP_9;
16132
-
16133
- return ($c = ($d = page['$[]']("headings").$drop(1)).$each, $c.$$p = (TMP_9 = function(heading){var self = TMP_9.$$s || this;
16134
- if (heading == null) heading = nil;
16135
- return self.$toc_item(page, heading)}, TMP_9.$$s = self, TMP_9.$$arity = 1, TMP_9), $c).call($d)}, TMP_8.$$s = self, TMP_8.$$arity = 0, TMP_8), $a).call($b);
16136
- }, TMP_10.$$arity = 1);
16137
-
16138
- Opal.defn(self, '$toc_heading', TMP_13 = function $$toc_heading(page, heading) {
16139
- var $a, $b, TMP_11, $c, $d, TMP_12, self = this;
16140
-
16141
- return ($a = ($b = ($c = ($d = self).$SPAN, $c.$$p = (TMP_12 = function(){var self = TMP_12.$$s || this;
16142
-
16143
- return heading['$[]']("text")}, TMP_12.$$s = self, TMP_12.$$arity = 0, TMP_12), $c).call($d, $hash2(["class"], {"class": "header"}))).$on, $a.$$p = (TMP_11 = function(){var self = TMP_11.$$s || this;
16144
-
16145
- self.$params().$section_store().$set_current_page(page);
16146
- return self['$force_update!']();}, TMP_11.$$s = self, TMP_11.$$arity = 0, TMP_11), $a).call($b, "click");
16147
- }, TMP_13.$$arity = 2);
16148
-
16149
- return (Opal.defn(self, '$toc_item', TMP_17 = function $$toc_item(page, heading) {
16150
- var $a, $b, TMP_14, self = this;
16151
-
16152
- return ($a = ($b = self).$LI, $a.$$p = (TMP_14 = function(){var self = TMP_14.$$s || this, $c, $d, TMP_15, $e, $f, TMP_16;
16153
-
16154
- return ($c = ($d = ($e = ($f = self).$A, $e.$$p = (TMP_16 = function(){var self = TMP_16.$$s || this;
16155
-
16156
- return "" + (heading['$[]']("text"))}, TMP_16.$$s = self, TMP_16.$$arity = 0, TMP_16), $e).call($f)).$on, $c.$$p = (TMP_15 = function(){var self = TMP_15.$$s || this;
16105
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice;
16157
16106
16158
- self.$params().$section_store().$set_current_page(page);
16159
- return self['$force_update!']();}, TMP_15.$$s = self, TMP_15.$$arity = 0, TMP_15), $c).call($d, "click")}, TMP_14.$$s = self, TMP_14.$$arity = 0, TMP_14), $a).call($b, $hash2(["class"], {"class": "toc_h" + (heading['$[]']("level"))}));
16160
- }, TMP_17.$$arity = 2), nil) && 'toc_item';
16161
- })($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')))
16107
+ return nil
16162
16108
};
16163
16109
16164
16110
/* Generated by Opal 0.10.5 */
@@ -16595,7 +16541,7 @@ Opal.modules["components/shared/page_toc"] = function(Opal) {
16595
16541
}
16596
16542
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
16597
16543
16598
- Opal.add_stubs(['$imports', '$param', '$render', '$Rail', '$ReactYahooSticky', '$DIV', '$loaded?', '$section_store', '$params', '$accordion', '$Accordion', '$each_with_index', '$on', '$animate', '$[]', '$set_current_page', '$force_update!', '$AccordionTitle', '$I', '$B', '$AccordionContent', '$each', '$<', '$top', '$offset', '$-', '$A', '$==', '$drop', '$pages']);
16544
+ Opal.add_stubs(['$imports', '$param', '$render', '$Rail', '$ReactYahooSticky', '$DIV', '$loaded?', '$section_store', '$params', '$accordion', '$Accordion', '$each_with_index', '$on', '$animate', '$[]', '$set_current_page', '$push', '$history', '$section', '$ force_update!', '$AccordionTitle', '$I', '$B', '$AccordionContent', '$each', '$<', '$top', '$offset', '$-', '$A', '$==', '$drop', '$pages']);
16599
16545
(function($base, $super) {
16600
16546
function $ReactYahooSticky(){};
16601
16547
var self = $ReactYahooSticky = $klass($base, $super, 'ReactYahooSticky', $ReactYahooSticky);
@@ -16612,6 +16558,10 @@ Opal.modules["components/shared/page_toc"] = function(Opal) {
16612
16558
16613
16559
self.$param("section_store");
16614
16560
16561
+ self.$param("history");
16562
+
16563
+ self.$param("section");
16564
+
16615
16565
($a = ($b = self).$render, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this, $c, $d, TMP_2;
16616
16566
16617
16567
return ($c = ($d = $scope.get('Sem')).$Rail, $c.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this, $e, $f, TMP_3;
@@ -16642,6 +16592,7 @@ if (page == null) page = nil;if (index == null) index = nil;
16642
16592
16643
16593
$scope.get('Element')['$[]']("html, body").$animate($hash2(["scrollTop"], {"scrollTop": 0}), "slow");
16644
16594
self.$params().$section_store().$set_current_page(page);
16595
+ self.$params().$history().$push("/" + (self.$params().$section()) + "/" + (page['$[]']("repo")) + "/" + (page['$[]']("file")));
16645
16596
return self['$force_update!']();}, TMP_7.$$s = self, TMP_7.$$arity = 0, TMP_7), $e).call($f, "click");
16646
16597
return ($e = ($g = $scope.get('Sem')).$AccordionContent, $e.$$p = (TMP_10 = function(){var self = TMP_10.$$s || this, $i, $j, TMP_11;
16647
16598
@@ -16659,8 +16610,8 @@ if (heading == null) heading = nil;
16659
16610
slug = "" + (heading['$[]']("slug"));
16660
16611
anchorchapter_position = $scope.get('Element')['$[]']("#" + (slug)).$offset().$top();
16661
16612
$scope.get('Element')['$[]']("html, body").$animate($hash2(["scrollTop"], {"scrollTop": $rb_minus(anchorchapter_position, 85)}), 500);
16662
- self.$params().$section_store ().$set_current_page( page);
16663
- return self['$force_update!']( );}, TMP_12.$$s = self, TMP_12.$$arity = 0, TMP_12), $k).call($l, "click")
16613
+ self.$params().$history ().$push("/" + (self.$params().$section()) + "/" + ( page['$[]']("repo")) + "/" + (page['$[]']("file")) + "/" + (slug) );
16614
+ return self.$params().$section_store().$set_current_page(page );}, TMP_12.$$s = self, TMP_12.$$arity = 0, TMP_12), $k).call($l, "click")
16664
16615
} else {
16665
16616
return nil
16666
16617
}}, TMP_11.$$s = self, TMP_11.$$arity = 1, TMP_11), $i).call($j)}, TMP_10.$$s = self, TMP_10.$$arity = 0, TMP_10), $e).call($g, $hash2(["className"], {"className": "menu"}));}, TMP_6.$$s = self, TMP_6.$$arity = 2, TMP_6), $c).call($d)}, TMP_5.$$s = self, TMP_5.$$arity = 0, TMP_5), $a).call($b, $hash2(["fluid", "className"], {"fluid": true, "className": "large pointing secondary vertical following menu"}));
@@ -16811,7 +16762,7 @@ Opal.modules["components/start/start_sidebar"] = function(Opal) {
16811
16762
Opal.modules["components/start/start_page"] = function(Opal) {
16812
16763
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
16813
16764
16814
- Opal.add_stubs(['$render', '$as_node', '$StartSidebar ', '$[]', '$sections', '$StartBody', '$PageLayout', '$loaded?']);
16765
+ Opal.add_stubs(['$render', '$as_node', '$DocsSidebar ', '$[]', '$sections', '$history ', '$StartBody', '$PageLayout', '$loaded?']);
16815
16766
return (function($base, $super) {
16816
16767
function $StartPage(){};
16817
16768
var self = $StartPage = $klass($base, $super, 'StartPage', $StartPage);
@@ -16820,7 +16771,7 @@ Opal.modules["components/start/start_page"] = function(Opal) {
16820
16771
16821
16772
return ($a = ($b = self).$render, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this, sidebar = nil, body = nil, title = nil;
16822
16773
16823
- sidebar = self.$StartSidebar ($hash2(["section_store"], {"section_store": $scope.get('SiteStore').$sections()['$[]']("start")})).$as_node();
16774
+ sidebar = self.$DocsSidebar ($hash2(["section_store", "history", "section" ], {"section_store": $scope.get('SiteStore').$sections()['$[]']("start"), "history": self.$history(), "section": "start" })).$as_node();
16824
16775
body = self.$StartBody($hash2(["section_store"], {"section_store": $scope.get('SiteStore').$sections()['$[]']("start")})).$as_node();
16825
16776
title = "Get started with Hyperloop";
16826
16777
return self.$PageLayout($hash2(["sidebar_component", "body_component", "page_title", "loaded"], {"sidebar_component": sidebar, "body_component": body, "page_title": title, "loaded": $scope.get('SiteStore').$sections()['$[]']("start")['$loaded?']()}));}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b, $scope.get('DIV'))
0 commit comments