added parsedown extension for header ids (#388) (#399)

This commit is contained in:
Lukas
2018-11-18 20:31:37 +01:00
committed by Kevin Papst
parent b1c06eed7b
commit 321ac74b6a
13 changed files with 119 additions and 17 deletions

View File

@@ -106,6 +106,16 @@ $(function() {
});
});
$('.markdown-body :header').prepend(function() {
$(this).prepend('<a class="anchor" href="#'+$(this).attr('id')+'"><i class="fas fa-link"></i>');
});
$('.markdown-body :header').hover(function(){
$(this).find('a.anchor').show();
}, function(){
$(this).find('a.anchor').hide();
});
/*
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',

View File

@@ -37,3 +37,4 @@ footer.main-footer {
@import 'calendar';
@import 'dashboard';
@import 'navbar';
@import 'documentation';

View File

@@ -0,0 +1,25 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
.markdown-body {
h1, h2, h3, h4, h5, h6 {
a.anchor {
float: left;
font-size: 0.5em;
margin-left: -1em;
padding-top: 0.5em;
color: $text-color;
display: none;
}
}
}
@media (min-width: $screen-sm-min) {
.markdown-body {
padding-left: 25px;
}
}

View File

@@ -26,7 +26,7 @@
}
/* The filter form is available on most pages above the datatable */
@media (min-width: 768px) {
@media (min-width: $screen-sm-min) {
.toolbar {
form.navbar-form {
font-size: $font-size-base;