]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/default.php
[frio] Add a <section> tag to the home page default template
[friendica.git] / view / theme / frio / php / default.php
index ce9b36765c5aafa6c03859441240bc936cdc9c2b..74c30f6f7b4eee0a62a4b5746284be346a059e88 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -35,7 +35,7 @@ if (!isset($minimal)) {
        $minimal = false;
 }
 
-$basepath = DI::baseUrl()->getUrlPath() ? "/" . DI::baseUrl()->getUrlPath() . "/" : "/";
+$basepath = DI::baseUrl()->getPath() ? "/" . DI::baseUrl()->getPath() . "/" : "/";
 $frio = "view/theme/frio";
 $view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
 $is_singleuser = DI::config()->get('system', 'singleuser');
@@ -45,7 +45,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
        <head>
                <title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
                <meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
-               <script  type="text/javascript">var baseurl = "<?php echo DI::baseUrl(); ?>";</script>
+               <script  type="text/javascript">var baseurl = "<?php echo (string)DI::baseUrl(); ?>";</script>
                <script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
 <?php
                // Because we use minimal for modals the header and the included js stuff should be only loaded
@@ -77,7 +77,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
 ?>
        </head>
 
-       <body id="top" class="mod-<?php echo DI::module()->getName() . " " . $is_singleuser_class . " " . $view_mode_class;?>">
+       <body id="top" class="mod-<?php echo $page['module'] . " " . $is_singleuser_class . " " . $view_mode_class;?>">
                <a href="#content" class="sr-only sr-only-focusable"><?php echo DI::l10n()->t('Skip to main content'); ?></a>
 <?php
        if (!empty($page['nav']) && !$minimal) {
@@ -125,7 +125,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
 
                                        <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
                                                <section class="sectiontop ';
-                                                       echo $a->argv[0] ?? '';
+                                                       echo $page['section'] ?? '';
                                                        echo '-content-wrapper">';
                                                        if (!empty($page['content'])) {
                                                                echo $page['content'];
@@ -137,19 +137,19 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
                                                ';
                                } else {
                                        echo '
-                                       <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
+                                       <section class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
                                                if (!empty($page['content'])) {
                                                        echo $page['content'];
                                                }
                                                echo '
-                                       </div>
+                                       </section>
                                        ';
                                }
 ?>
                                </div><!--row-->
                        </div><!-- container -->
 
-                       <div id="back-to-top" title="back to top">⇧</div>
+                       <div id="back-to-top" title="<?php echo DI::l10n()->t('Back to top')?>">⇧</div>
                </main>
 
                <footer>