Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace inline calls for <meta> and styles with single php include #6

Open
arbolitoloco opened this issue Oct 1, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request redesign Front-end changes, including layouts, styles and some php

Comments

@arbolitoloco
Copy link
Owner

Templating is done manually in this framework, by including header and footer files in each content page.
Content pages have their own html, meta, and body 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 appropriate meta tags, such as the ones important for mobile responsiveness and accessibility.
This is a somewhat long task.

@arbolitoloco arbolitoloco self-assigned this Oct 1, 2019
@arbolitoloco arbolitoloco added enhancement New feature or request redesign Front-end changes, including layouts, styles and some php labels Oct 1, 2019
@arbolitoloco
Copy link
Owner Author

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.

@arbolitoloco
Copy link
Owner Author

Closed by 17e44a7.

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'); ?>

@arbolitoloco
Copy link
Owner Author

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]: BioKIC@71d6ae2

arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 6, 2020
arbolitoloco added a commit that referenced this issue Feb 7, 2020
arbolitoloco added a commit that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request redesign Front-end changes, including layouts, styles and some php
Projects
None yet
Development

No branches or pull requests

1 participant