User Tools

Site Tools


jekyll_website_overhaul

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
jekyll_website_overhaul [2019/09/12 00:16] telljekyll_website_overhaul [2019/09/12 00:40] (current) – [The Home Page is Special] tell
Line 71: Line 71:
 Page layouts are done with templates in the ''_layouts'' directory.  Mostly they're very short, and contain a little bit of HTML and some jekyll-syntax include statements. Page layouts are done with templates in the ''_layouts'' directory.  Mostly they're very short, and contain a little bit of HTML and some jekyll-syntax include statements.
  
-Here's '_layouts/standard.html'' in its entirety:+Here'''_layouts/standard.html'' in its entirety:
  
 <code html> <code html>
Line 96: Line 96:
 </code> </code>
  
-The best thing about these layout templates is that they're short, and serve as an outline of the whole page.  With the reusable pieces broken out into files, '_layouts/standard.html'' reads just like the bulleted list of pieces that we started with above.+The best thing about these layout templates is that they're short, and serve as an outline of the whole page.  With the reusable pieces broken out into files, ''_layouts/standard.html'' reads just like the bulleted list of pieces that we started with above.
  
 Some of the things we see in there are the include statements for head, nav, and end; they look like Some of the things we see in there are the include statements for head, nav, and end; they look like
 ''{% include nav.html %}'' ''{% include nav.html %}''
  
-There's also ''{{page.title}}'' again, and  ''{{ content }}'', which gets replaced with the markdown+There's also ''%%{{page.title}}%%'' again, and  ''%%{{content}}%%'', which gets replaced with the markdown
 content for the page. content for the page.
  
Line 131: Line 131:
  
  
 +====== The Home Page is Special ======
  
 +The main home landing page is special: it doesn't use the "standard" layout.  It has its own layout,
 +''_layouts/home.html'', which includes some additional css to set up the transparent "card" overlayed on top of a big background image.
  
 +The text in the card comes from the to level ''index.md'' file.
  
 +We actually could just put the whole thing into a single html file in the github repo, but breaking it up this way is useful for several reasons:
 +  * we can reuse this layout if we want.  
 +  * the text can still be edited in its own markdown file, even by someone who doesn't understand html or the rest of the site
 +  * an opportunity to learn more jekyll
  
 +''_layouts/home.html'' is still a concise outline of what goes into the page:
  
 +<code html>
 +<!DOCTYPE html>
 +<html lang="en">
 +<head>
 +{% include head.html %}
 +<style>
 +{% include css/home.css %}
 +</style>
 +</head>
 +<body>
 +  <div id="page-wrapper" class="container-fluid p-0">
 +    {% include nav.html %}
 +    <div id="info-card" class="card shadow-sm">
 +      <div class="card-body">
 + <div class="card-text">
 +   {{ content }}
 + </div>
 +      </div>
 +    <hr>
 +    {% include footer.html %}
 +  </div> <!-- /container -->
 +  {% include end.html %}
 +</body>
 +</html>
  
 +</code>
  
  
- +TODO get this page up too.
  
jekyll_website_overhaul.1568261808.txt.gz · Last modified: 2019/09/12 00:16 by tell