Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion meta/AggregationCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@ public function render() {
protected function startScope() {
// wrapping div
if($this->mode != 'xhtml') return;
$this->renderer->doc .= "<div class=\"structcloud\">";
$params = [
'class' => 'structcloud',
];
if($this->data['displaycolumns'] > 0) {
$params['class'] .= ' columnDisplay';
$params['style'] .= 'column-count: ' . $this->data['displaycolumns'] . ';';
}
$attributes = buildAttributes($params);
$this->renderer->doc .= "<div $attributes>";
}

/**
Expand Down
4 changes: 4 additions & 0 deletions meta/ConfigParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct($lines) {
'schemas' => array(),
'sort' => array(),
'csv' => true,
'displaycolumns' => 0,
);
// parse info
foreach($lines as $line) {
Expand Down Expand Up @@ -114,6 +115,9 @@ public function __construct($lines) {
case 'page':
$this->config['target'] = cleanID($val);
break;
case 'displaycolumns':
$this->config['displaycolumns'] = abs((int) $val);
break;
default:
$data = array('config' => &$this->config, 'key' => $key, 'val' => $val);
$ev = new \Doku_Event('PLUGIN_STRUCT_CONFIGPARSER_UNKNOWNKEY', $data);
Expand Down
6 changes: 6 additions & 0 deletions style.less
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ form.struct_newschema {
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.5)
}
}

&.columnDisplay {
li {
float: none;
}
}
}

/**
Expand Down