Improve theming flexibility
This commit is contained in:
parent
e33478527e
commit
8cb27fc1a1
@ -140,7 +140,9 @@ switch ($VARS['action']) {
|
||||
die(json_encode(["status" => "ERROR", "msg" => lang("invalid tileid", false)]));
|
||||
}
|
||||
|
||||
if ($database->get("publications", 'uid', ['pubid' => $VARS['pubid']]) != $_SESSION['uid']) {
|
||||
$pubid = $database->get("tiles", "pubid", ['tileid' => $VARS['tileid']]);
|
||||
|
||||
if ($database->get("publications", 'uid', ['pubid' => $pubid]) != $_SESSION['uid']) {
|
||||
die(json_encode(["status" => "ERROR", "msg" => lang("no permission", false)]));
|
||||
}
|
||||
|
||||
|
BIN
database.mwb
BIN
database.mwb
Binary file not shown.
@ -34,9 +34,24 @@ if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
||||
}
|
||||
?>
|
||||
<style nonce="<?php echo $SECURE_NONCE; ?>">
|
||||
<?php $pubcss = $database->get("pub_styles", "css", ["styleid" => $pubdata["styleid"]]); ?>
|
||||
<?php $pubcss = $database->get("pub_styles", ["css", "cssvars", "cssextra", "background"], ["styleid" => $pubdata["styleid"]]); ?>
|
||||
.pub-content {
|
||||
<?php echo $pubcss; ?>
|
||||
<?php
|
||||
$pubvars = json_decode($pubcss["cssvars"], TRUE);
|
||||
foreach ($pubvars as $name => $val) {
|
||||
echo "--$name: $val;\n";
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
.pub-content {
|
||||
<?php echo $pubcss["css"]; ?>
|
||||
}
|
||||
|
||||
<?php echo $pubcss["cssextra"]; ?>
|
||||
|
||||
.pub-content {
|
||||
background-image: url('data:image/png;base64,<?php echo $pubcss["background"]; ?>');
|
||||
}
|
||||
|
||||
<?php $pagesize = $database->get("page_sizes", ["sizewidth (width)", "sizeheight (height)"], ["sizeid" => $pubdata["page_size"]]); ?>
|
||||
@ -45,6 +60,13 @@ if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
||||
height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.pub-content {
|
||||
height: auto;
|
||||
min-height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
|
||||
}
|
||||
}
|
||||
|
||||
.page-safe-line .bottom {
|
||||
top: calc(<?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?> - 5mm);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user