-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
Abstract header #74
Comments
|
I agree on 1. & 2., but not for 3. (or I misuderstood it) let's imagine something like: Pages Parts In Pages we would have all the content + specific meta of the page (title and description) + 1 include at the top (header) and 1 include at the bottom (footer) In Parts we would have ... parts ! So: <!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="elementary LLC">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" media="all" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300">
<link rel="stylesheet" type="text/css" media="all" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<meta name="description" content="elementary OS, a fast and open replacement for Windows and OS X">
<title>elementary OS</title>
</head>
<body>
<div id="content-container">
blablabla...
</div>
<footer>
Copyright © 2015 elementary LLC.
<ul>
<li><a href="http://blog.elementaryos.org" target="_blank" title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
<li><a href="https://twitter.com/elementary" target="_blank" title="Twitter"><i class="fa fa-twitter"></i></a></li>
<li><a href="http://reddit.com/r/elementaryos" target="_blank" title="Reddit"><i class="fa fa-reddit"></i></a></li>
<li><a href="https://plus.google.com/114635553671833442612" target="_blank" title="Google+"><i class="fa fa-google-plus"></i></a></li>
<li><a href="https://github.com/elementary/mvp" target="_blank" title="Github"><i class="fa fa-github"></i></a></li>
<li><a href="https://www.facebook.com/elementaryos" target="_blank" title="Facebook"><i class="fa fa-facebook"></i></a></li>
</ul>
</footer>
</body>
</html> |
Yeah, I don't think there's any harm in @KeitIG, I think I prefer keeping the page's HTML to just within the |
@lewisgoddard you're right about 1 and 2. Thanks for the heads up (I wrote that code without reference on my break). |
I don't see how you guys disagree with 3. I would use |
@lewisgoddard that's fair. If there's a performance benefit for using |
There is a minor memory reduction, gut multiplied across thousands of release-day requests, it stacks up. A good general rule of thumb is to use it to stop functions and classes being re-declared (which is a fatal error), rather than template control. |
@KeitIG I'm not sure if you've started work on this or not, but for a directory structure, I think this is pretty sensible:
Feel free to correct me if I'm wrong. :) |
We should probably pull the header out into its own file, much like the footer in #65.
A simple way to do this while still being able to set page-specific titles/descriptions is to set have some variables in the header, then set them in the pages before including the header. Something like:
Then in the header you can do this:
...etc.
The text was updated successfully, but these errors were encountered: