Skip to content

Add call to action on blog's landing page #35

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
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
3 changes: 2 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/extra.css" | relative_url }}">
{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
</head>
</head>
7 changes: 5 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">
<img src="{{ "/assets/rustwasm.png" | relative_url }}" style="max-height: 2em"/>
{{ site.title | escape }}
</a>

{%- if page_paths -%}
<nav class="site-nav">
Expand All @@ -19,7 +22,7 @@
</label>

<div class="trigger">
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Book</a>
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Learn</a>
<a class="page-link" href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">👯 Get Involved</a>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
Expand Down
71 changes: 71 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
---

<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{%- include head.html -%}

<body>

{%- include header.html -%}

<main class="page-content" aria-label="Content">
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}

<section id="call-to-action">
<div class="wrapper">
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
<h2>Learn Rust and WebAssembly</h2>
<p>
<a href="https://rustwasm.github.io/book/">Read the Rust and WebAssembly book</a> to
learn how to design, develop, test, debug, profile, and publish Rust and
WebAssembly libraries and applications.
</p>
<h2>Get Involved</h2>
<p>
<a href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">Join the Rust and WebAssembly domain working group!</a> Help us craft the future of Rust and WebAssembly.
</p>
</div>
</section>

{{ content }}

<div class="wrapper">
{%- if site.posts.size > 0 -%}
<section>
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
<ul class="post-list">
{%- for post in site.posts -%}
<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
</section>
{%- endif -%}
</div>
</div>
</main>

{%- include footer.html -%}

{%- include analytics.html -%}

</body>

</html>
25 changes: 25 additions & 0 deletions assets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#call-to-action {
margin-top: -30px;
margin-bottom: 30px;
background-color: #403D58;
color: #fff;
padding: 30px;
}

#call-to-action a {
color: #FECD2F;
}

#call-to-action h2 {
font-weight: bold;
}

#call-to-action img {
float: right;
max-width: 45%;
padding-left: 5%;
}

section {
clear: both;
}
Binary file added assets/rustwasm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wasm-ferris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.