Browse Source

New "minimal" mode for displaying the network content. Preparation for e.g. a multicolumn layout.

pull/848/head
Michael Vogel 7 years ago
parent
commit
3e5b9e97e7
3 changed files with 25 additions and 8 deletions
  1. +18
    -7
      index.php
  2. +1
    -1
      view/minimal.php
  3. +6
    -0
      view/theme/vier/style.css

+ 18
- 7
index.php View File

@ -428,7 +428,7 @@ else
$a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']);
//$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet));
if ($_GET["mode"] == "raw") {
if (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal")) {
$doc = new DOMDocument();
$target = new DOMDocument();
@ -449,6 +449,9 @@ if ($_GET["mode"] == "raw") {
// And then append it to the target
$target->documentElement->appendChild($item);
}
}
if ($_GET["mode"] == "raw") {
header("Content-type: text/html; charset=utf-8");
@ -515,13 +518,21 @@ $profile = $a->profile;
header("Content-type: text/html; charset=utf-8");
$template = 'view/theme/' . current_theme() . '/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
if(file_exists($template))
require_once($template);
else
require_once(str_replace('theme/' . current_theme() . '/', '', $template));
if ($_GET["mode"] == "minimal") {
//$page['content'] = substr($target->saveHTML(), 6, -8)."\n\n".
// '<div id="conversation-end"></div>'."\n\n";
require "view/minimal.php";
} else {
$template = 'view/theme/' . current_theme() . '/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
if(file_exists($template))
require_once($template);
else
require_once(str_replace('theme/' . current_theme() . '/', '', $template));
}
session_write_close();
exit;

+ 1
- 1
view/minimal.php View File

@ -6,7 +6,7 @@
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
<section style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>
<section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
</body>


+ 6
- 0
view/theme/vier/style.css View File

@ -1088,6 +1088,12 @@ section {
position: absolute;
left: 215px;
}
section.minimal {
top: 0px;
left: 0px;
}
/* wall item */
.tread-wrapper {
/* border-bottom: 1px solid #BDCDD4; */


Loading…
Cancel
Save