1
0
Fork 0
friendica_2020-09-1_sharedH.../view/theme/frost/default.php
Zach Prezkuta 1f09e7ad23 Modify Javascript to improve page loading times
1. Add template category 'end' that places content right before final </body> tag
	2. Move most Javascript from tpl files into one cacheable file, theme.js
	3. Load scripts at end of the HTML document instead of in the header
	4. Minify several Javascript files

Note that the second and third things were only done for Frost and Frost Mobile. Doing it for every theme means going through every .tpl for every theme and rearranging the Javascript, which is tedious.
2012-07-28 09:57:16 -06:00

44 lines
1.4 KiB
PHP

<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
<?php if( $a->module === 'home' ) { ?>
<center>
<div class="login-button">
<a href="login" class="login-button-link"><img class="login-button-image" src="/images/friendika-1600.png" title="Click to log in"></a>
</div>
</center>
<?php } elseif ( $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
?>
<div class='section-wrapper'>
<section><?php if(x($page,'content')) echo $page['content']; ?>
</section>
</div>
<?php } else {
if(x($page,'nav')) echo $page['nav']; ?>
<div class='main-container'>
<!--<div class='main-content-loading'><img src="/view/theme/frost/images/ajax-loader.gif" alt="Please wait..."></div>-->
<div class='main-content-container'>
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<div class='section-wrapper'>
<section><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
</div>
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
</div>
</div>
<?php } ?>
<?php if(x($page,'end')) echo $page['end']; ?>
</body>
</html>