mirror of https://github.com/rails/rails
Merge pull request #45932 from marcoroth/migrate-guides-to-turbo
Migrate Rails Guides from `Turbolinks` to `Turbo`
This commit is contained in:
commit
b85296efe6
|
@ -21,6 +21,7 @@ nd
|
|||
ned
|
||||
noone
|
||||
objekt
|
||||
optin
|
||||
ot
|
||||
overthere
|
||||
reenable
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
clipboard.js linguist-vendored
|
||||
turbolinks.js linguist-vendored
|
||||
turbo.js linguist-vendored
|
||||
|
|
|
@ -23,10 +23,7 @@
|
|||
for(var i = 0; i < array.length; i++) callback(array[i]);
|
||||
}
|
||||
|
||||
// Viewable on local
|
||||
if (window.location.protocol === "file:") Turbolinks.supported = false;
|
||||
|
||||
document.addEventListener("turbolinks:load", function() {
|
||||
document.addEventListener("turbo:load", function() {
|
||||
var guidesMenu = document.getElementById("guidesMenu");
|
||||
var guides = document.getElementById("guides");
|
||||
|
||||
|
@ -52,11 +49,7 @@
|
|||
guidesIndexItem.value = currentGuidePath.substring(currentGuidePath.lastIndexOf("/") + 1) || 'index.html';
|
||||
|
||||
guidesIndexItem.addEventListener("change", function(e) {
|
||||
if (Turbolinks.supported) {
|
||||
Turbolinks.visit(e.target.value);
|
||||
} else {
|
||||
window.location = e.target.value;
|
||||
}
|
||||
Turbo.visit(e.target.value);
|
||||
});
|
||||
|
||||
var moreInfoButton = document.querySelector(".more-info-button");
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -12,4 +12,4 @@ Import advanced style sheet
|
|||
@import url("reset.css");
|
||||
@import url("main.css");
|
||||
@import url("dark.css");
|
||||
@import url("turbolinks.css");
|
||||
@import url("turbo.css");
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.turbolinks-progress-bar {
|
||||
.turbo-progress-bar {
|
||||
background-color: #c52f24;
|
||||
}
|
|
@ -16,17 +16,17 @@
|
|||
<% end %>
|
||||
<p>
|
||||
The guides for earlier releases:
|
||||
<a href="https://guides.rubyonrails.org/v7.0/" data-turbolinks="false">Rails 7.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v6.1/" data-turbolinks="false">Rails 6.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v6.0/" data-turbolinks="false">Rails 6.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.2/" data-turbolinks="false">Rails 5.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.1/" data-turbolinks="false">Rails 5.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.0/" data-turbolinks="false">Rails 5.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.2/" data-turbolinks="false">Rails 4.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.1/" data-turbolinks="false">Rails 4.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.0/" data-turbolinks="false">Rails 4.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.2/" data-turbolinks="false">Rails 3.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.1/" data-turbolinks="false">Rails 3.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.0/" data-turbolinks="false">Rails 3.0</a>, and
|
||||
<a href="https://guides.rubyonrails.org/v2.3/" data-turbolinks="false">Rails 2.3</a>.
|
||||
<a href="https://guides.rubyonrails.org/v7.0/" data-turbo="false">Rails 7.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v6.1/" data-turbo="false">Rails 6.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v6.0/" data-turbo="false">Rails 6.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.2/" data-turbo="false">Rails 5.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.1/" data-turbo="false">Rails 5.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v5.0/" data-turbo="false">Rails 5.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.2/" data-turbo="false">Rails 4.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.1/" data-turbo="false">Rails 4.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v4.0/" data-turbo="false">Rails 4.0</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.2/" data-turbo="false">Rails 3.2</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.1/" data-turbo="false">Rails 3.1</a>,
|
||||
<a href="https://guides.rubyonrails.org/v3.0/" data-turbo="false">Rails 3.0</a>, and
|
||||
<a href="https://guides.rubyonrails.org/v2.3/" data-turbo="false">Rails 2.3</a>.
|
||||
</p>
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><%= yield(:page_title) %></title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/style.css" data-turbolinks-track="reload">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/style.css" data-turbo-track="reload">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/highlight.css" data-turbolinks-track="reload">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/highlight.css" data-turbo-track="reload">
|
||||
<link href="images/favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<script src="javascripts/turbolinks.js" data-turbolinks-track="reload"></script>
|
||||
<script src="javascripts/clipboard.js" data-turbolinks-track="reload"></script>
|
||||
<script src="javascripts/guides.js" data-turbolinks-track="reload"></script>
|
||||
<script src="javascripts/turbo.js" data-turbo-track="reload"></script>
|
||||
<script src="javascripts/clipboard.js" data-turbo-track="reload"></script>
|
||||
<script src="javascripts/guides.js" data-turbo-track="reload"></script>
|
||||
<meta property="og:title" content="<%= yield(:page_title) %>" />
|
||||
<meta name="description" content="<%= yield(:description) %>" />
|
||||
<meta property="og:description" content="<%= yield(:description) %>" />
|
||||
|
|
Loading…
Reference in New Issue