Skip to content

Commit 6cd43b7

Browse files
authored
Merge pull request #35 from fitzgen/add-landing-page-with-call-to-action
Add call to action on blog's landing page
2 parents f00abc1 + fdf7d7c commit 6cd43b7

File tree

6 files changed

+103
-3
lines changed

6 files changed

+103
-3
lines changed

_includes/head.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55
{%- seo -%}
66
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
7+
<link rel="stylesheet" href="{{ "/assets/extra.css" | relative_url }}">
78
{%- feed_meta -%}
89
{%- if jekyll.environment == 'production' and site.google_analytics -%}
910
{%- include google-analytics.html -%}
1011
{%- endif -%}
11-
</head>
12+
</head>

_includes/header.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<div class="wrapper">
44
{%- assign default_paths = site.pages | map: "path" -%}
55
{%- assign page_paths = site.header_pages | default: default_paths -%}
6-
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
6+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">
7+
<img src="{{ "/assets/rustwasm.png" | relative_url }}" style="max-height: 2em"/>
8+
{{ site.title | escape }}
9+
</a>
710

811
{%- if page_paths -%}
912
<nav class="site-nav">
@@ -19,7 +22,7 @@
1922
</label>
2023

2124
<div class="trigger">
22-
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Book</a>
25+
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Learn</a>
2326
<a class="page-link" href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">👯 Get Involved</a>
2427
{%- for path in page_paths -%}
2528
{%- assign my_page = site.pages | where: "path", path | first -%}

_layouts/home.html

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
---
3+
4+
<!DOCTYPE html>
5+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
6+
7+
{%- include head.html -%}
8+
9+
<body>
10+
11+
{%- include header.html -%}
12+
13+
<main class="page-content" aria-label="Content">
14+
<div class="home">
15+
{%- if page.title -%}
16+
<h1 class="page-heading">{{ page.title }}</h1>
17+
{%- endif -%}
18+
19+
<section id="call-to-action">
20+
<div class="wrapper">
21+
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
22+
<h2>Learn Rust and WebAssembly</h2>
23+
<p>
24+
<a href="https://rustwasm.github.io/book/">Read the Rust and WebAssembly book</a> to
25+
learn how to design, develop, test, debug, profile, and publish Rust and
26+
WebAssembly libraries and applications.
27+
</p>
28+
<h2>Get Involved</h2>
29+
<p>
30+
<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.
31+
</p>
32+
</div>
33+
</section>
34+
35+
{{ content }}
36+
37+
<div class="wrapper">
38+
{%- if site.posts.size > 0 -%}
39+
<section>
40+
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
41+
<ul class="post-list">
42+
{%- for post in site.posts -%}
43+
<li>
44+
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
45+
<span class="post-meta">{{ post.date | date: date_format }}</span>
46+
<h3>
47+
<a class="post-link" href="{{ post.url | relative_url }}">
48+
{{ post.title | escape }}
49+
</a>
50+
</h3>
51+
{%- if site.show_excerpts -%}
52+
{{ post.excerpt }}
53+
{%- endif -%}
54+
</li>
55+
{%- endfor -%}
56+
</ul>
57+
58+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
59+
</section>
60+
{%- endif -%}
61+
</div>
62+
</div>
63+
</main>
64+
65+
{%- include footer.html -%}
66+
67+
{%- include analytics.html -%}
68+
69+
</body>
70+
71+
</html>

assets/extra.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#call-to-action {
2+
margin-top: -30px;
3+
margin-bottom: 30px;
4+
background-color: #403D58;
5+
color: #fff;
6+
padding: 30px;
7+
}
8+
9+
#call-to-action a {
10+
color: #FECD2F;
11+
}
12+
13+
#call-to-action h2 {
14+
font-weight: bold;
15+
}
16+
17+
#call-to-action img {
18+
float: right;
19+
max-width: 45%;
20+
padding-left: 5%;
21+
}
22+
23+
section {
24+
clear: both;
25+
}

assets/rustwasm.png

25.1 KB
Loading

assets/wasm-ferris.png

117 KB
Loading

0 commit comments

Comments
 (0)