Skip to content

Commit

Permalink
Some little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jan 1, 2020
1 parent ad370d5 commit d51d39b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions Template.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -342,9 +342,6 @@ public function metaheadersHandler(\Doku_Event $event)


} }


# Material Design Icons
#$stylesheets[] = $tpl_basedir . 'assets/mdi/css/materialdesignicons.min.css';

# Bootstrap JavaScript # Bootstrap JavaScript
$scripts[] = $tpl_basedir . 'assets/bootstrap/js/bootstrap.min.js'; $scripts[] = $tpl_basedir . 'assets/bootstrap/js/bootstrap.min.js';


Expand All @@ -354,6 +351,7 @@ public function metaheadersHandler(\Doku_Event $event)
# Typeahead (Bootstrap3) # Typeahead (Bootstrap3)
$scripts[] = $tpl_basedir . 'assets/typeahead/bootstrap3-typeahead.min.js'; $scripts[] = $tpl_basedir . 'assets/typeahead/bootstrap3-typeahead.min.js';


# Iconify
$scripts[] = $tpl_basedir . 'assets/iconify/iconify.min.js'; $scripts[] = $tpl_basedir . 'assets/iconify/iconify.min.js';


foreach ($stylesheets as $style) { foreach ($stylesheets as $style) {
Expand All @@ -363,18 +361,19 @@ public function metaheadersHandler(\Doku_Event $event)
'href' => $style)); 'href' => $style));
} }


# Set Iconify default API URL
$event->data['script'][] = array(
'type' => 'text/javascript',
'_data' => "if (typeof IconifyConfig == 'undefined') { var IconifyConfig = { 'defaultAPI' : '{$tpl_basedir}iconify.php?prefix={prefix}&icons={icons}' } }"
);

foreach ($scripts as $script) { foreach ($scripts as $script) {
$event->data['script'][] = array( $event->data['script'][] = array(
'type' => 'text/javascript', 'type' => 'text/javascript',
'_data' => '', '_data' => '',
'src' => $script); 'src' => $script);
} }


$event->data['script'][] = array(
'type' => 'text/javascript',
'_data' => "Iconify.setConfig('defaultAPI', '$tpl_basedir/iconify.php?prefix={prefix}&icons={icons}');"
);

if ($google_analitycs = $this->getGoogleAnalitycs()) { if ($google_analitycs = $this->getGoogleAnalitycs()) {
$event->data['script'][] = array( $event->data['script'][] = array(
'type' => 'text/javascript', 'type' => 'text/javascript',
Expand Down Expand Up @@ -1990,7 +1989,7 @@ public function normalizeContent($content)
} }


foreach ($html->find('div.table') as $elm) { foreach ($html->find('div.table') as $elm) {
$elm->class = trim(str_replace('table', '', $eml->class)); $elm->class = trim(str_replace('table', '', $elm->class));
} }


# Tag and Pagelist (table) # Tag and Pagelist (table)
Expand Down Expand Up @@ -2171,7 +2170,7 @@ public function normalizeContent($content)
if ($INPUT->str('page') == 'usermanager') { if ($INPUT->str('page') == 'usermanager') {


foreach ($html->find('.notes') as $elm) { foreach ($html->find('.notes') as $elm) {
$elm->class = str_replace('notes', '', $eml->class); $elm->class = str_replace('notes', '', $elm->class);
} }


foreach ($html->find('h2') as $idx => $elm) { foreach ($html->find('h2') as $idx => $elm) {
Expand All @@ -2183,6 +2182,9 @@ public function normalizeContent($content)
case 1: case 1:
$elm->innertext = iconify('mdi:account-plus') . ' ' . $elm->innertext; $elm->innertext = iconify('mdi:account-plus') . ' ' . $elm->innertext;
break; break;
case 2:
$elm->innertext = iconify('mdi:account-edit') . ' ' . $elm->innertext;
break;
} }


} }
Expand Down
2 changes: 1 addition & 1 deletion js/template.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jQuery(document).on('bootstrap3:nav', function(event) {
.contents().unwrap(); .contents().unwrap();


// Move the font-icons inside a link // Move the font-icons inside a link
var $links = jQuery('.nav li i + a'); var $links = jQuery('.nav li .dw-icons + a');
if ($links.length) { if ($links.length) {
jQuery.each($links, function() { jQuery.each($links, function() {
var $link = jQuery(this), var $link = jQuery(this),
Expand Down
2 changes: 1 addition & 1 deletion template.info.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ date 2019-05-22
name Bootstrap3 Template name Bootstrap3 Template
desc Bootstrap-based template for Dokuwiki desc Bootstrap-based template for Dokuwiki
url https://www.dokuwiki.org/template:bootstrap3 url https://www.dokuwiki.org/template:bootstrap3
build develop/20191229 build develop/20200101

0 comments on commit d51d39b

Please sign in to comment.