Skip to content

Commit 68362cf

Browse files
authored
Merge pull request #31 from RustPython/explainer-table
Make the explainer an HTML table
2 parents 285b56e + 6a67128 commit 68362cf

File tree

6 files changed

+120
-13
lines changed

6 files changed

+120
-13
lines changed

_layouts/home.html

+48-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
layout: default
33
---
44

5-
<!-- site title, logo and description -->
6-
<!-- to update, edit the global site config.yaml -->
75
<section>
6+
<!-- site title, logo and description -->
7+
<!-- to update, edit the global site config.yaml -->
88
<div class="w-100 m-auto mt-2">
99
<div class="d-md-flex justify-center">
1010
<div class="d-sm-none"><img class="logo" src="{{site.baseurl}}/assets/img/rust-python-logo.svg"
1111
alt="RustPython Logo">
1212
</div>
13-
<div class="w-md-25 pl-2">
13+
<div class="w-md-50 w-lg-25 pl-2">
1414
<div class="title">{{ site.title }}</div>
1515
<div class="">
1616
<p>
@@ -20,13 +20,52 @@
2020
</div>
2121
</div>
2222
</div>
23-
</section>
2423

25-
<!-- explainer image, paragraph and links to demos -->
26-
<!-- to update, edit index.markdown file in the root folder -->
27-
<section>
28-
<div class="m-auto w-md-25 mt-2">
29-
<img class="img-fluid" src="{{site.baseurl}}/assets/img/explainer.jpg" alt="RustPython Explainer">
24+
<!-- explainer table + paragraph and links to demos -->
25+
<!-- to update, edit index.markdown file in the root folder -->
26+
<div class="m-auto w-md-50 w-lg-25 mt-2">
27+
<table class="w-100">
28+
<tr>
29+
<td class="valign-center vpad-small">
30+
<img class="explainer-icon" src="{{site.baseurl}}/assets/img/python-logo.svg" alt="Python Logo">
31+
Python
32+
</td>
33+
<td></td><td></td>
34+
</tr>
35+
<tr>
36+
<td class="valign-center vpad-small">
37+
38+
</td>
39+
<td></td><td></td>
40+
</tr>
41+
<tr>
42+
<td><div class="padding-small text-center">
43+
<!-- inline css to get it to look like one word, despite the padding classes -->
44+
<span class="bg-rust rustpy-name text-white" style="padding-right: 1px;">Rust</span
45+
><span class="color-py rustpy-name" style="padding-left: 0;">Python</span>
46+
</div></td>
47+
<td class="text-center padding-small">
48+
49+
</td>
50+
<td><div class="valign-center padding-small text-center">Python embedded in Rust apps</div></td>
51+
</tr>
52+
<tr>
53+
<td class="valign-center vpad-small">
54+
55+
</td>
56+
<td></td><td></td>
57+
</tr>
58+
<tr>
59+
<td><div class="valign-center vpad-small">
60+
<img class="explainer-icon" src="{{site.baseurl}}/assets/img/wasm-logo.svg" alt="WebAssembly Logo">
61+
WebAssembly
62+
</div></td>
63+
<td class="text-center padding-small">
64+
65+
</td>
66+
<td><div class="valign-center padding-small text-center">Python on the Web</div></td>
67+
</tr>
68+
</table>
3069
</div>
3170
<div class="mt-md-4 mt-sm-2 w-md-50 m-auto">
3271
<p class="mt-md-4">

assets/img/python-logo.svg

+1
Loading

assets/img/wasm-logo.svg

+18
Loading

assets/media.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636

37-
/* desktop , tablets */
37+
/* smaller laptops, tablets */
3838
@media (min-width: 768px) {
3939
.mt-md-4 {
4040
margin-top: 4em;
@@ -85,6 +85,12 @@
8585
}
8686
}
8787

88+
@media (min-width: 1366px) {
89+
.w-lg-25 {
90+
width: 25%;
91+
}
92+
}
93+
8894
/* fixes for ipad */
8995
@media (min-width: 992px) {
9096

assets/style.css

+24
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ code.highlighter-rouge, mark.code {
112112
color: #fff;
113113
}
114114

115+
.color-py {
116+
background-color: #ffd343;
117+
color: #306998;
118+
}
119+
115120
/* alignment */
116121
.d-flex-space-between {
117122
justify-content: space-between;
@@ -129,6 +134,12 @@ code.highlighter-rouge, mark.code {
129134
text-align: center;
130135
}
131136

137+
.valign-center {
138+
display:flex;
139+
align-items: center;
140+
justify-content: center;
141+
}
142+
132143
.justify-center {
133144
justify-content: center;
134145
align-items: center;
@@ -144,6 +155,10 @@ code.highlighter-rouge, mark.code {
144155
padding: 5px;
145156
}
146157

158+
.vpad-small {
159+
padding: 5px 0;
160+
}
161+
147162
.mb-1 {
148163
margin-bottom: 1em;
149164
}
@@ -251,6 +266,15 @@ ul.list-inline {
251266
height: 80px;
252267
}
253268

269+
.explainer-icon {
270+
height: 30px;
271+
margin-right: 5px;
272+
}
273+
274+
.rustpy-name {
275+
padding: 5px 7px;
276+
}
277+
254278
.goal {
255279
line-height: 1.5em;
256280
}

index.markdown

+22-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
44

55
layout: home
6-
explainer: "CPython is the common implementation of Python. We love C, but we love Rust a little more 😉... that's why we're working on a RustPython, a Python implementation written in Rust. We are doing it for fun, to learn about writing interpreters, and to have a useful, usable and embeddable implementation of Python in Rust."
6+
explainer:
7+
RustPython is a Python interpreter written in Rust. RustPython can be
8+
embedded into Rust programs to use Python as a scripting language for your
9+
application, or it can be compiled to WebAssembly in order to run Python
10+
in the browser. RustPython is free and open-source under the MIT license.
711

812
build-from-source-link: https://github.com/RustPython/RustPython
913

@@ -19,8 +23,23 @@ installation:
1923
- command: "conda install rustpython -c conda-forge"
2024

2125
goals:
22-
- goal: "Full Python-3 environment entirely in Rust (not CPython bindings) with a clean implementation, without compatiblity hacks. "
23-
- goal: "Fast, reliable and secure implementation of Python that can be used with Rust or compiled to WebAssembly. "
26+
- goal:
27+
Full Python-3 environment entirely in Rust (not CPython bindings), with
28+
a clean implementation and no compatiblity hacks.
29+
# TODO: integrate this into the "goals" boxes
30+
progress:
31+
# TODO: actually measure how much of the test suite we run
32+
RustPython can currently run a little less than half of the CPython
33+
regression test suite, and our API is relatively unstable and
34+
doesn't require decades of backwards-compatibility.
35+
- goal:
36+
Fast, reliable and secure implementation of Python that can be used
37+
from Rust or compiled to WebAssembly.
38+
progress:
39+
RustPython currently runs about 10 times slower than CPython, but there's
40+
still lots of optimizations to be made. RustPython can be easily embedded
41+
into Rust programs simply by adding a line to Cargo.toml, and natively
42+
supports WebAssembly; see our demo above.
2443
---
2544

2645
# Why RustPython?

0 commit comments

Comments
 (0)