]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #848 from annando/master
authortobiasd <tobias.diekershoff@gmx.net>
Fri, 6 Dec 2013 11:31:19 +0000 (03:31 -0800)
committertobiasd <tobias.diekershoff@gmx.net>
Fri, 6 Dec 2013 11:31:19 +0000 (03:31 -0800)
New "minimal" mode for displaying the network content. Preparation for e.g. a multicolumn layout.

index.php
view/minimal.php
view/theme/vier/style.css

index 87795ade700acd49faa38bfdadfcfc7609abb408..98c7bce1113fa295fddad63bb6e96810ff4ffc45 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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");
 
@@ -457,7 +460,8 @@ if ($_GET["mode"] == "raw") {
        session_write_close();
        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"]))
                $pageno = $_GET["page"];
        else
@@ -515,13 +519,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;
index a8c693985116355d75033ddda4b4b3dc14acbb0e..a131e3ec5e12a99ab8f44868257a13dab7fc4e03 100644 (file)
@@ -6,7 +6,7 @@
   <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>\r
 </head>\r
 <body>\r
-       <section style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>\r
+       <section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>\r
                <div id="page-footer"></div>\r
        </section>\r
 </body>\r
index f3379fe61865d0ed1fc29bcbbc5cca80e38afc24..d340f12d60f4ab6908cc40dae05e9af0a46388ef 100644 (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; */