Open arbolitoloco opened 5 years ago
Note: page-specific styles and JS will still be called at the page level, and will not be embedded in the style call file for obvious reasons.
Closed by 17e44a7c6e83b1c9f27eac8d1dd5495f413ae4a6.
Created headinclude.php
file with CSS calls, changing relative paths to full paths (to avoid breaking in internal pages):
<link href="/<?php echo $CLIENT_ROOT; ?>/css/base.css?ver=<?php echo $CSS_VERSION; ?>" type="text/css" rel="stylesheet" />
<link href="/<?php echo $CLIENT_ROOT; ?>/css/main.css<?php echo (isset($CSS_VERSION_LOCAL)?'?ver='.$CSS_VERSION_LOCAL:''); ?>" type="text/css" rel="stylesheet" />
Replaced these (and variations...):
<link href="../css/base.css?ver=<?php echo $CSS_VERSION; ?>" type="text/css" rel="stylesheet" />
<link href="../css/main.css<?php echo (isset($CSS_VERSION_LOCAL)?'?ver='.$CSS_VERSION_LOCAL:''); ?>" type="text/css" rel="stylesheet" />
With this:
<!-- Base -->
<!-- Main -->
And after with this:
<?php include_once($SERVER_ROOT.'/headincludes.php'); ?>
<?php include_once($SERVER_ROOT.'/headincludes.php'); ?>
Plan has changed in coordination with Ed, since Symbiota-Light
folder structure has changed a little bit.
So, now, the styles, jQuery, and meta tags are included in the /includes/head.php
, and a conditional variable for presence of jQuery is added.
Example in [this commit]: https://github.com/BioKIC/Symbiota-light/commit/71d6ae2e6dce0527c8f8b1217c8c3f02313ef79d
Templating is done manually in this framework, by including header and footer files in each content page. Content pages have their own
html
,meta
, andbody
tags. That means that a lot of the head content is repeated, and if one would like to change styles radically, it would be tedious and laborious to manually replace each single call in the over 100 pages in this codebase. Thus, each file will now include a call to a styles configuration php file, that will then include the general style calls and appropriatemeta
tags, such as the ones important for mobile responsiveness and accessibility. This is a somewhat long task.