[doc] Minor fixes (styling mostly)

Don't show edit buttons for generated pages
This commit is contained in:
Andreas Dangel
2022-03-24 12:13:01 +01:00
parent c082649dda
commit af9547af7d
8 changed files with 24 additions and 36 deletions

View File

@ -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">

View File

@ -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>
&#187; {{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
>

View File

@ -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>

View File

@ -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>

View File

@ -986,10 +986,6 @@ span.soft {
color: #c0c0c0;
}
.githubEditButton {
margin-bottom: 7px;
}
.endpoint {
padding: 15px;
background-color: #f0f0f0;

View File

@ -21,6 +21,10 @@
width: 100%;
}
header {
margin-top: 40px;
}
details {
border-radius: 3px;
background: #EEE;

View File

@ -35,8 +35,8 @@ $(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');
let url = $('div.post-content').data('githubEditUrl');
if ( url !== undefined ) {
$('div.post-content')
.find(':header:not(h1)')
.append(
@ -44,6 +44,7 @@ $(document).ready(function () {
url +
' role="button">✏️️</a>'
);
}
// Check if TOC needs to be moved on page load
moveToc();

View File

@ -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`.
Theyre also in the jar file thats included with both the source and binary distributions.