Skip to content

Update post links layout #64

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

Merged
merged 4 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ <h2>Posts</h2>

<ul class="post-list">
{% for post in site.categories.blog %}
<li>
<h3>
<span class="post-meta post-first-col">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"
href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
<li class="post">
<div class="post-date">{{ post.date | date: "%b %-d, %Y" }}</div>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
37 changes: 18 additions & 19 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ main {

footer {
width: 100%;
margin-top: 1rem;
margin-top: 3rem;
box-shadow: 0 0 7px rgba(0, 0, 0, 0.15);
}

Expand Down Expand Up @@ -147,38 +147,37 @@ a.source:hover {
list-style: none;
}


.post-list {
margin-left: 0;
list-style: none;
margin: 0;
padding: 0;
list-style-type: none;
}

.post-list > li {
margin-top: 2rem;
}

.post-list h2 {
margin-top: 0;
font-size: 2rem;
.post {
margin: 0 0 1.5rem 0;
}

.post-meta {
.post .post-date {
font-size: 1.25rem;
color: #666666;
font-weight: 300;
}

/* Help me! I know there should be some subgrid magic to align these spans... */
.post-first-col {
display: inline-block;
width: 16rem;
.post .post-link {
font-size: 1.7rem;
line-height: 2.4rem;
font-weight: 400;
}

.post-link {
font-weight: 400;
.all-posts-link {
font-size: 1.25rem;
}

.post .post-link, .all-posts-link {
text-decoration: none;
}

.post-link:hover {
.post .post-link:hover, .all-posts-link:hover {
text-decoration: underline;
}

Expand Down
55 changes: 25 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2>About</h2>
</p>

<p>Note that the project is in <strong>alpha</strong> status: it is already
useful in practice, but can't be considered stable.</p>
useful in practice, but can't be considered stable.</p>
</section>

<section class="paragraph lead">
Expand Down Expand Up @@ -70,45 +70,40 @@ <h2>Support</h2>

<p>
The following companies contributed significantly towards rust-analyzer development:

<div class="sponsors">
<ul>
<li><a href="https://ferrous-systems.com/">Ferrous Systems</a></li>
<li><a href="https://www.mozilla.org/">Mozilla</a></li>
</ul>
<ul>
<li><a href="https://embark-studios.com">Embark Studios</a></li>
<li><a href="https://www.freiheit.com/">freiheit.com</a></li>
</ul>
</div>
</p>
<div class="sponsors">
<ul>
<li><a href="https://ferrous-systems.com/">Ferrous Systems</a></li>
<li><a href="https://www.mozilla.org/">Mozilla</a></li>
</ul>
<ul>
<li><a href="https://embark-studios.com">Embark Studios</a></li>
<li><a href="https://www.freiheit.com/">freiheit.com</a></li>
</ul>
</div>

</section>

<section>
<h2><span class="post-first-col">Latest News</span> <a class="post-link" href="/thisweek">All</a></h2>
<h2><span class="post-first-col">Latest News</span></h2>

<ul class="post-list">
<div class="post">
{% assign post = site.categories.thisweek.first %}
<li>
<h3>
<span class="post-meta post-first-col">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
</li>
</ul>
<div class="post-date">{{ post.date | date: "%b %-d, %Y" }}</div>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</div>

<a class="all-posts-link" href="/thisweek">All news</a>
</section>

<section>
<h2><span class="post-first-col">Latest Post</span> <a class="post-link" href="/blog">All</a></h2>
<h2><span class="post-first-col">Latest Post</span></h2>

<ul class="post-list">
<div class="post">
{% assign post = site.categories.blog.first %}
<li>
<h3>
<span class="post-meta post-first-col">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
</li>
</ul>
<div class="post-date">{{ post.date | date: "%b %-d, %Y" }}</div>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</div>

<a class="all-posts-link" href="/blog">All posts</a>
</section>
8 changes: 3 additions & 5 deletions thisweek.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ <h2>This Week In rust-analyzer</h2>

<ul class="post-list">
{% for post in site.categories.thisweek %}
<li>
<h3>
<span class="post-meta post-first-col">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"
href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
<li class="post">
<div class="post-date">{{ post.date | date: "%b %-d, %Y" }}</div>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>