diff --git a/src/_sass/railsdoc.scss b/src/_sass/railsdoc.scss index 9b57f9f6db..aa72eb9c5c 100644 --- a/src/_sass/railsdoc.scss +++ b/src/_sass/railsdoc.scss @@ -170,12 +170,21 @@ code { } } -// FIXME: Wrap method with `code` tag in sdoc .method { - h3 { - font-family: monospace; - font-size: 1.3rem; - } + h3 { + font-family: monospace; + font-size: 1.3rem; + } + + .description, + .method__aka, + .method__source { + margin-left: 1em; + + @media (min-width: 768px) { + margin-left: 2em; + } + } } #content { @@ -243,10 +252,10 @@ code { } .anchorjs-link { - color: #AAAAAA; + color: $red; &:hover { - color: $red; + color: #ee0000; text-decoration: none; } } diff --git a/src/assets/js/app.js b/src/assets/js/app.js index ed2e7fe81b..4ce25e622a 100644 --- a/src/assets/js/app.js +++ b/src/assets/js/app.js @@ -1,16 +1,16 @@ -document.addEventListener('DOMContentLoaded', () => { - anchors.options.visible = 'always'; +document.addEventListener("DOMContentLoaded", () => { + anchors.options = { visible: "always" }; anchors.add(); }); $(() => { // highlight.js hljs.configure({ - languages: ['ruby', 'html', 'bash', 'sql'] + languages: ["ruby", "html", "bash", "sql"], }); hljs.highlightAll(); - $("#navigation").load(`${config.rootPath}navigation.html`, function() { + $("#navigation").load(`${config.rootPath}navigation.html`, () => { $(".sidebar-sticky .icon").on("click", function (e) { e.preventDefault(); $(this).siblings("ul").toggle(); @@ -18,7 +18,7 @@ $(() => { }); $(`.sidebar-content a[href='${window.location.pathname}']`) .attr("class", "active-link") - .parents('ul') + .parents("ul") .show(); - }) + }); });