mirror of
https://github.com/friendica/friendica
synced 2024-11-10 08:22:57 +00:00
Merge pull request #848 from annando/master
New "minimal" mode for displaying the network content. Preparation for e.g. a multicolumn layout.
This commit is contained in:
commit
aa7b05e8dc
3 changed files with 27 additions and 9 deletions
28
index.php
28
index.php
|
@ -428,7 +428,7 @@ else
|
||||||
$a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']);
|
$a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']);
|
||||||
//$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet));
|
//$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();
|
$doc = new DOMDocument();
|
||||||
|
|
||||||
$target = new DOMDocument();
|
$target = new DOMDocument();
|
||||||
|
@ -449,6 +449,9 @@ if ($_GET["mode"] == "raw") {
|
||||||
// And then append it to the target
|
// And then append it to the target
|
||||||
$target->documentElement->appendChild($item);
|
$target->documentElement->appendChild($item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET["mode"] == "raw") {
|
||||||
|
|
||||||
header("Content-type: text/html; charset=utf-8");
|
header("Content-type: text/html; charset=utf-8");
|
||||||
|
|
||||||
|
@ -457,7 +460,8 @@ if ($_GET["mode"] == "raw") {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
} elseif (get_pconfig(local_user(),'system','infinite_scroll') AND ($_GET["q"] == "network")) {
|
} elseif (get_pconfig(local_user(),'system','infinite_scroll')
|
||||||
|
AND ($_GET["q"] == "network") AND ($_GET["mode"] != "minimal")) {
|
||||||
if (is_string($_GET["page"]))
|
if (is_string($_GET["page"]))
|
||||||
$pageno = $_GET["page"];
|
$pageno = $_GET["page"];
|
||||||
else
|
else
|
||||||
|
@ -515,13 +519,21 @@ $profile = $a->profile;
|
||||||
|
|
||||||
header("Content-type: text/html; charset=utf-8");
|
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))
|
if ($_GET["mode"] == "minimal") {
|
||||||
require_once($template);
|
//$page['content'] = substr($target->saveHTML(), 6, -8)."\n\n".
|
||||||
else
|
// '<div id="conversation-end"></div>'."\n\n";
|
||||||
require_once(str_replace('theme/' . current_theme() . '/', '', $template));
|
|
||||||
|
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();
|
session_write_close();
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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>
|
<div id="page-footer"></div>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1088,6 +1088,12 @@ section {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 215px;
|
left: 215px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
section.minimal {
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
/* wall item */
|
/* wall item */
|
||||||
.tread-wrapper {
|
.tread-wrapper {
|
||||||
/* border-bottom: 1px solid #BDCDD4; */
|
/* border-bottom: 1px solid #BDCDD4; */
|
||||||
|
|
Loading…
Reference in a new issue