diff --git a/include/taxonomy.php b/include/taxonomy.php index 6811b58a2..dfc98f493 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -484,11 +484,14 @@ function wtagblock($uid,$count = 0,$authors = '',$owner = '', $flags = 0,$restri intval($uid) ); - $o = '
'; + $channel = App::get_channel(); + $url = z_root() . '/channel/' . $channel['channel_address'].'/?f=&tag='; + $tpl = get_markup_template('tagcloud.tpl'); + $o .= replace_macros($tpl, [ + '$title' => t('Tags'), + '$baseurl' => $url, + '$tags' => $r, + ]); } return $o; @@ -564,13 +567,14 @@ function dir_tagblock($link,$r) { $r = App::$data['directory_keywords'] ?? []; if($r) { - $o = ''; + $url = $link . '/?f=&keywords='; + $tpl = get_markup_template('dirtagcloud.tpl'); + $o .= replace_macros($tpl, [ + '$title' => t('Keywords'), + '$baseurl' => $url, + '$tags' => $r, + ]); } - return $o; } diff --git a/view/css/widgets.css b/view/css/widgets.css index f722e3f11..fe2c79766 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -14,8 +14,13 @@ .tags { word-wrap: break-word; + display: flex; + justify-content: center; } +.tag { + margin-right: 0.3rem; +} .widget-nav-pills-icons { opacity: 0; float: right; diff --git a/view/tpl/dirtagcloud.tpl b/view/tpl/dirtagcloud.tpl new file mode 100644 index 000000000..9eb69d222 --- /dev/null +++ b/view/tpl/dirtagcloud.tpl @@ -0,0 +1,10 @@ + + + diff --git a/view/tpl/tagcloud.tpl b/view/tpl/tagcloud.tpl new file mode 100644 index 000000000..b2151fa18 --- /dev/null +++ b/view/tpl/tagcloud.tpl @@ -0,0 +1,10 @@ + + +