Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68362cf

Browse files
authored
Merge pull requestRustPython#31 from RustPython/explainer-table
Make the explainer an HTML table
2 parents285b56e +6a67128 commit68362cf

File tree

6 files changed

+120
-13
lines changed

6 files changed

+120
-13
lines changed

‎_layouts/home.html‎

Lines changed: 48 additions & 9 deletions
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
<divclass="w-100 m-auto mt-2">
99
<divclass="d-md-flex justify-center">
1010
<divclass="d-sm-none"><imgclass="logo"src="{{site.baseurl}}/assets/img/rust-python-logo.svg"
1111
alt="RustPython Logo">
1212
</div>
13-
<divclass="w-md-25 pl-2">
13+
<divclass="w-md-50 w-lg-25 pl-2">
1414
<divclass="title">{{ site.title }}</div>
1515
<divclass="">
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-
<divclass="m-auto w-md-25 mt-2">
29-
<imgclass="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+
<divclass="m-auto w-md-50 w-lg-25 mt-2">
27+
<tableclass="w-100">
28+
<tr>
29+
<tdclass="valign-center vpad-small">
30+
<imgclass="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+
<tdclass="valign-center vpad-small">
37+
38+
</td>
39+
<td></td><td></td>
40+
</tr>
41+
<tr>
42+
<td><divclass="padding-small text-center">
43+
<!-- inline css to get it to look like one word, despite the padding classes -->
44+
<spanclass="bg-rust rustpy-name text-white"style="padding-right: 1px;">Rust</span
45+
><spanclass="color-py rustpy-name"style="padding-left: 0;">Python</span>
46+
</div></td>
47+
<tdclass="text-center padding-small">
48+
49+
</td>
50+
<td><divclass="valign-center padding-small text-center">Python embedded in Rust apps</div></td>
51+
</tr>
52+
<tr>
53+
<tdclass="valign-center vpad-small">
54+
55+
</td>
56+
<td></td><td></td>
57+
</tr>
58+
<tr>
59+
<td><divclass="valign-center vpad-small">
60+
<imgclass="explainer-icon"src="{{site.baseurl}}/assets/img/wasm-logo.svg"alt="WebAssembly Logo">
61+
WebAssembly
62+
</div></td>
63+
<tdclass="text-center padding-small">
64+
65+
</td>
66+
<td><divclass="valign-center padding-small text-center">Python on the Web</div></td>
67+
</tr>
68+
</table>
3069
</div>
3170
<divclass="mt-md-4 mt-sm-2 w-md-50 m-auto">
3271
<pclass="mt-md-4">

‎assets/img/python-logo.svg‎

Lines changed: 1 addition & 0 deletions
Loading

‎assets/img/wasm-logo.svg‎

Lines changed: 18 additions & 0 deletions
Loading

‎assets/media.css‎

Lines changed: 7 additions & 1 deletion
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‎

Lines changed: 24 additions & 0 deletions
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:5px0;
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:5px7px;
276+
}
277+
254278
.goal {
255279
line-height:1.5em;
256280
}

‎index.markdown‎

Lines changed: 22 additions & 3 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp