-
-
Notifications
You must be signed in to change notification settings - Fork 325
/
Copy pathhome.html
135 lines (124 loc) · 4.81 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!-- TODO: Use markdown code blocks whenever mkdocs starts supported markdown embeds -->
{% extends "main.html" %}
<!-- Set the content block to empty -->
{% block content %}{% endblock %}
<!-- Override the tabs block to create the homepage -->
{% block tabs %}
<style>
/* Variables */
[data-md-color-scheme="slate"] {
--row-stripe-bg-color: conic-gradient(from 90deg at -10% 100%,
#2b303b 0deg,
#2b303b 90deg,
#16181d 1turn);
--row-bg-color: conic-gradient(from -90deg at 110% 100%, #2b303b 0deg, #16181d 90deg, #16181d 1turn);
--stripe-border-color: rgba(246, 247, 249, 0.1);
--code-block-filter: none;
--home-tabbed-set-bg-color: #1f1f1f;
}
[data-md-color-scheme="default"] {
--row-stripe-bg-color: conic-gradient(from 90deg at -10% 100%,
#bcc1cd 0deg,
#bcc1cd 90deg,
#fff 1turn);
--row-bg-color: var(--row-stripe-bg-color);
--stripe-border-color: rgba(35, 39, 47, 0.1);
--code-block-filter: invert(1) contrast(1.3) hue-rotate(180deg) saturate(2);
--code-tab-color: rgb(246 247 249);
--home-tabbed-set-bg-color: #fff;
}
/* Application header should be static for the landing page */
.md-header {
position: initial;
}
/* Hide markdown area */
.md-main__inner {
margin: 0;
}
.md-content {
display: none;
}
</style>
<section class="home md-typeset">
<div class="row first">
<img src="https://raw.githubusercontent.com/reactive-python/reactpy/main/branding/svg/reactpy-logo-square.svg"
alt="ReactPy Logo" class="home-logo">
<h1>{{ config.site_name }}</h1>
<p>{{ config.site_description }}</p>
<div class="home-btns">
<a href="{{ page.next_page.url | url }}" class="md-button md-button--primary">
Get Started
</a>
<a href="{{ 'reference/components/' | url }}" class="md-button">
API Reference
</a>
<a href="{{ 'about/changelog/' | url }}" class="md-button">
Changelog
</a>
</div>
</div>
<div class="row stripe">
<h1>Create user interfaces from components</h1>
<p class="md-grid">
ReactPy lets you build user interfaces out of individual pieces called components. Create your own ReactPy
components like <code>thumbnail</code>, <code>like_button</code>, and <code>video</code>. Then combine
them into entire screens, pages, and apps.
</p>
<div class="example-container">
{% with image="create-user-interfaces.png", class="pop-left" %}
{% include "homepage_examples/code_block.html" %}
{% endwith %}
{% include "homepage_examples/create_user_interfaces_demo.html" %}
</div>
<p>
Whether you work on your own or with thousands of other developers, using React feels the same. It is
designed to let you seamlessly combine components written by independent people, teams, and
organizations.
</p>
</div>
<div class="row">
<h1>Write components with pure Python code</h1>
<p>
ReactPy components are Python functions. Want to show some content conditionally? Use an
<code>if</code> statement. Displaying a list? Try using
<a href="https://www.w3schools.com/python/python_lists_comprehension.asp">list comprehension</a>.
Learning ReactPy is learning programming.
</p>
<div class="example-container">
{% with image="write-components-with-python.png", class="pop-left" %}
{% include "homepage_examples/code_block.html" %}
{% endwith %}
{% include "homepage_examples/write_components_with_python_demo.html" %}
</div>
</div>
<div class="row stripe">
<h1>Add interactivity wherever you need it</h1>
<p>
ReactPy components receive data and return what should appear on the screen. You can pass them new data in
response to an interaction, like when the user types into an input. ReactPy will then update the screen to
match the new data.
</p>
<div class="example-container">
{% with image="add-interactivity.png" %}
{% include "homepage_examples/code_block.html" %}
{% endwith %}
{% include "homepage_examples/add_interactivity_demo.html" %}
</div>
<p>
You don't have to build your whole page in ReactPy. Add React to your existing HTML page, and render
interactive ReactPy components anywhere on it.
</p>
</div>
<div class="row">
<h1>Go full-stack with a framework</h1>
<p>
ReactPy is a library. It lets you put components together, but it doesn't prescribe how to do routing and
data fetching. To build an entire app with ReactPy, you can leverage a backend framework like
<a href="https://www.djangoproject.com/">Django</a> or <a href="https://www.starlette.io/">Starlette</a>.
</p>
<a href="{{ page.next_page.url | url }}" class="md-button md-button--primary">
Get Started
</a>
</div>
</section>
{% endblock %}