[doc] Minor fixes (styling mostly)
Don't show edit buttons for generated pages
This commit is contained in:
@ -1,19 +1,18 @@
|
||||
<footer>
|
||||
{% if site.github_editme_path and page.editmepath != false %}
|
||||
<hr />
|
||||
<div>
|
||||
{% if site.github_editme_path %} This documentation is written in
|
||||
markdown. <br />
|
||||
This documentation is written in markdown. <br />
|
||||
If there is something missing or can be improved, edit this page on
|
||||
github and create a PR: {% unless page.editmepath == false %}
|
||||
github and create a PR:
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://github.com/{{site.github_editme_path}}{{editmepath}}"
|
||||
class="githubEditButton"
|
||||
role="button"
|
||||
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
|
||||
>
|
||||
{% endunless %} {% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-lg-12 footer">
|
||||
|
@ -1,17 +1,17 @@
|
||||
<header>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<a href="./" class="githubEditButton" role="button"
|
||||
<a href="./" role="button"
|
||||
><i class="fa fa-home fa-lg"></i
|
||||
></a>
|
||||
» {{page.title}} {% if site.github_editme_path %} {% assign
|
||||
» {{page.title}} {% if site.github_editme_path %} {% assign
|
||||
editmepath = page.path %} {% if page.editmepath %} {% assign
|
||||
editmepath = page.editmepath %} {% endif %}{% unless page.editmepath
|
||||
== false %}
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://github.com/{{site.github_editme_path}}{{editmepath}}"
|
||||
class="pull-right githubEditButton"
|
||||
class="pull-right"
|
||||
role="button"
|
||||
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
|
||||
>
|
||||
|
@ -1,12 +0,0 @@
|
||||
|
||||
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
// Handler for .ready() called.
|
||||
|
||||
$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="toc"></div>
|
@ -30,7 +30,7 @@ layout: default
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="post-content" data-github-edit-url="https://github.com/{{site.github_editme_path}}{{editmepath}}">
|
||||
<div class="post-content" {% if site.github_editme_path and page.editmepath != false %}data-github-edit-url="https://github.com/{{site.github_editme_path}}{{editmepath}}"{% endif %}>
|
||||
|
||||
{% if page.summary %}
|
||||
<div class="summary">{{page.summary}}</div>
|
||||
|
@ -986,10 +986,6 @@ span.soft {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.githubEditButton {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.endpoint {
|
||||
padding: 15px;
|
||||
background-color: #f0f0f0;
|
||||
|
@ -21,6 +21,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
details {
|
||||
border-radius: 3px;
|
||||
background: #EEE;
|
||||
|
@ -35,15 +35,16 @@ $(document).ready(function () {
|
||||
anchors.add('h2,h3,h4,h5');
|
||||
|
||||
// Add an "Edit on GitHub" button to each header (except h1)
|
||||
let url = $('div.post-content').attr('data-github-edit-url');
|
||||
|
||||
$('div.post-content')
|
||||
.find(':header:not(h1)')
|
||||
.append(
|
||||
' <a class="edit-header" target="_blank" href=' +
|
||||
url +
|
||||
' role="button">✏️️</a>'
|
||||
);
|
||||
let url = $('div.post-content').data('githubEditUrl');
|
||||
if ( url !== undefined ) {
|
||||
$('div.post-content')
|
||||
.find(':header:not(h1)')
|
||||
.append(
|
||||
' <a class="edit-header" target="_blank" href=' +
|
||||
url +
|
||||
' role="button">✏️️</a>'
|
||||
);
|
||||
}
|
||||
|
||||
// Check if TOC needs to be moved on page load
|
||||
moveToc();
|
||||
|
@ -84,6 +84,6 @@ Now the source and binary distribution zip files can be found in the folder `pmd
|
||||
|
||||
**Notes:**
|
||||
|
||||
- The rules that have already been written are specified in the `src/main/resources/rulesets/` directories of
|
||||
the specific languages, e.g. `pmd-java/src/main/resources/rulesets`.
|
||||
- The rules that have already been written are specified in the `src/main/resources/category/` directories of
|
||||
the specific languages, e.g. `pmd-java/src/main/resources/category`.
|
||||
They’re also in the jar file that’s included with both the source and binary distributions.
|
||||
|
Reference in New Issue
Block a user