mirror of
https://github.com/rclone/rclone
synced 2024-12-20 10:25:56 +01:00
docs: Add hover over links on headings
This commit is contained in:
parent
1e7dc06ab8
commit
8a771450d2
@ -9,6 +9,7 @@
|
||||
"description": "rclone - rsync for cloud storage: google drive, s3, swift, cloudfiles, dropbox, memstore...",
|
||||
"canonifyurls": true,
|
||||
"blackfriday": {
|
||||
"smartDashes": false
|
||||
"smartDashes": false,
|
||||
"plainIDAnchors": true
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
<script src="/js/jquery.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
15
docs/static/css/custom.css
vendored
15
docs/static/css/custom.css
vendored
@ -24,3 +24,18 @@ thead td, th {
|
||||
tbody tr:nth-child(odd) {
|
||||
background-color:#d0d0ff
|
||||
}
|
||||
|
||||
/* Hover over links on headers */
|
||||
.header-link {
|
||||
position: absolute;
|
||||
left: -0.5em;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out 0.1s;
|
||||
}
|
||||
h2:hover .header-link,
|
||||
h3:hover .header-link,
|
||||
h4:hover .header-link,
|
||||
h5:hover .header-link,
|
||||
h6:hover .header-link {
|
||||
opacity: 1;
|
||||
}
|
||||
|
14
docs/static/js/custom.js
vendored
Normal file
14
docs/static/js/custom.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Site JS
|
||||
|
||||
// Add hover links on headings
|
||||
$(function() {
|
||||
return $("h2, h3, h4, h5, h6").each(function(i, el) {
|
||||
var $el, icon, id;
|
||||
$el = $(el);
|
||||
id = $el.attr('id');
|
||||
icon = '<i class="fa fa-link"></i>';
|
||||
if (id) {
|
||||
return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user