mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Merge pull request #119 from phil-opp/introduction
Add an introduction to the front page
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
.masthead {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.masthead-title {
|
||||
@@ -37,3 +37,7 @@
|
||||
.navigation small {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.front-page-introduction {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
19
index.html
19
index.html
@@ -2,27 +2,34 @@
|
||||
layout: default
|
||||
title: Home
|
||||
---
|
||||
<div class="newest-post">
|
||||
<emph>Latest Post</emph>: {% for post in site.posts limit:1 %}
|
||||
|
||||
<div class="front-page-introduction"><p>
|
||||
This blog series creates a small operating system in the
|
||||
<a href="https://www.rust-lang.org/">Rust programming language</a>. Each post
|
||||
is a small tutorial and includes all needed code, so you can follow along if
|
||||
you like. The source code is also available in the corresponding
|
||||
<a href="https://github.com/phil-opp/blog_os">Github repository</a>.
|
||||
</p>
|
||||
<p>Latest post: {% for post in site.posts limit:1 %}
|
||||
<strong><a href="#{{ post.id }}" onclick="
|
||||
post = document.getElementById('{{ post.id }}');
|
||||
post.className = post.className.replace(/\b updated\b/, '');
|
||||
post.offsetWidth = post.offsetWidth; // trigger reflow -> works on 2nd click, too
|
||||
post.className += ' updated';
|
||||
">{{post.title}}</a></strong>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</p></div>
|
||||
|
||||
{% assign posts = site.posts | reverse %}
|
||||
|
||||
<div class="post-category bare-bones">Bare Bones</div>
|
||||
<div id="bare-bones" class="post-category bare-bones">Bare Bones</div>
|
||||
<div class="posts bare-bones">
|
||||
{% for post in posts limit:4 %}
|
||||
{% include post_teaser.html %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="post-category memory-management">Memory Management</div>
|
||||
<div id="memory-management" class="post-category memory-management">Memory Management</div>
|
||||
<div class="posts memory-management">
|
||||
{% for post in posts offset:4 limit:3 %}
|
||||
{% include post_teaser.html %}
|
||||
|
||||
Reference in New Issue
Block a user