Merge pull request #160 from goanpeca/enh/add-home-flowblocks

PR: Update content on home page, move hardcoded text to page content wit flowblocks
This commit is contained in:
Russell Keith-Magee 2017-07-25 12:45:10 +08:00 committed by GitHub
commit 4a4acb5805
15 changed files with 280 additions and 50 deletions

BIN
content/brutus-97.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -1,5 +1,157 @@
title: The IDEs of Python
_model: home
---
_template: home.html
---
title: The IDEs of Python
---
summary:
---
description: BeeWare is a collection of projects that can be used to help develop, debug and launch Python software. Each tool follows the Unix philosophy of doing one thing well. Each tool can be used in isolation, or they can be chained together to provide a rich set of programming tools.
---
header:
#### button-block ####
label: Tell me more
----
link: /project/overview/
----
icon:
----
type: primary
----
size: lg
----
is_block: no
#### button-block ####
label: I want to contribute
----
link: /contributing/
----
icon:
----
type: primary
----
size: lg
----
is_block:
#### button-block ####
label: I want to donate
----
link: /contributing/membership/
----
icon:
----
type: primary
----
size: lg
----
is_block:
---
body:
#### text-block ####
title: ### Python native tools...
----
text: Python has proven itself as a highly capable language - approachable for newcomers, but powerful in the hands of experts. Why shouldn't you be able to **use Python everywhere** that you need to tell a computer to do something? And shouldn't your tools **exploit all the capabilities of Python** as a language, not just the bits that map nicely to a C binding?
----
image: python.png
----
image_alignment: right
#### text-block ####
title: ### ...on mobile & desktop...
----
text: Modern computing doesn't happen in an 80x25 console window. It happens on **phones, tablets, and desktop machines** with rich user interfaces. Shouldn't you be able to use Python in all those locations, and **exploit the unique capabilities of those platforms**?
----
image: cross-platform.png
----
image_alignment: left
#### text-block ####
title: ### ...behaving natively.
----
text: End users shouldn't have to care what language their tools are written in. And that starts with looking and behaving **like completely native tools**. Native appearance, native behavior, delivered in the way a native app is delivered. Why shouldn't your Python tools fit in just as well as a native tool?
----
image: native.png
----
image_alignment: right
#### text-block ####
title: ## This is BeeWare.
----
text: This is what BeeWare provides. Tools to help you write Python code with a rich, **native user interface**; and the libraries and support code necessary to get that code running on **iOS, Android, macOS, Linux, Windows, tvOS, and more**.
----
image: brutus-97.png
----
image_alignment: left
#### text-block ####
title: ### Open source
----
text: The Open Source development process has proven itself to be the most reliable way to develop robust and reliable software. That's why the entire BeeWare suite of tools are BSD licensed, and **available for all to use and modify**.
----
image: opensource.png
----
image_alignment: right
#### text-block ####
title: ### All contributions welcome
----
text: But it's not just about code. A successful software project requires documentation, design skills, feedback and bug reports. The BeeWare community acknowledges that **all contributions are important** — not just the ones that come as a pull request on GitHub.
----
image: labhr.png
----
image_alignment: left
#### text-block ####
title: ### From diversity comes strength
----
text: A diverse community is a strong community. This means accepting people of all levels of experience, from all backgrounds, of all races, creeds, orientations and expressions. The BeeWare project is committed to **developing and maintaining a diverse, welcoming community**. We have an **open offer to mentor anyone** who wants to get involved as a contributor, backed up by a `Code of Conduct <community/behavior/code-of-conduct/>`__ that is rigorously enforced.
----
image: diversity.png
----
image_alignment: right
#### text-block ####
title: Contribute!
----
text: If all this sounds interesting, why not take a look at the `BeeWare projects </project/projects>`__ and see how you can use them when developing Python applications? Or, if you'd like to contribute, and you've never contributed to open source before, start with our `guide for first time contributors </contributing/first-time/>`__. If you feel ready to dive straight in, check out the `project pages </project/projects/>`__ or our guide on `what you can do to help </contributing/how/>`__.
----
image:
----
image_alignment:
#### button-block ####
label:
Contribute to BeeWare
----
link: /contributing/
----
icon: code-fork
----
type: primary
----
size: lg
----
is_block: yes
#### text-block ####
title: ### Stay in touch!
----
text: Follow `@PyBeeWare <https://twitter.com/PyBeeWare/>`__ on Twitter, or `join the BeeWare enthusiasts mailing list </community/keep-informed/>`__ for updates, hints, tips, and announcements related to the project.
----
image:
----
image_alignment:
#### button-block ####
label: Keep in touch!
----
link: /community/keep-informed/
----
icon: envelope
----
type: success
----
size: lg
----
is_block: yes
#### text-block ####
title: ### Members
----
text: BeeWare is supported by users like you! Every little bit helps: `click here to contribute </contributing/membership/>`__.
----
image:
----
image_alignment:

BIN
content/cross-platform.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
content/diversity.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
content/labhr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
content/native.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
content/opensource.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
content/python.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,39 @@
[block]
name = Button Block
button_label = Button Block
[fields.label]
label = Button Label
type = string
[fields.link]
label = Button link
type = string
[fields.icon]
label = Button icon
type = select
choices = code-fork, envelope
choice_labels = Code fork, Envelope
width = 1/4
[fields.type]
label = Button type
type = select
choices = default, primary, success, info, warning, danger, link
choice_labels = Default, Primary, Success, Info, Warning, Danger, Link
default = Default
width = 1/4
[fields.size]
label = Button size
type = select
choices = lg, md, sm, xs
choice_labels = Large, Medium, Small, Extra small
default = Large
width = 1/4
[fields.is_block]
label = Is a block button?
type = boolean
width = 1/4

26
flowblocks/text-block.ini Normal file
View file

@ -0,0 +1,26 @@
[block]
name = Text Block
button_label = Rich Text
[fields.title]
label = Title
description = Markdown
type = markdown
[fields.text]
label = Text
description = reStructuredText
type = rst
[fields.image]
label = Image
type = select
source = record.attachments.images
width = 1/4
[fields.image_alignment]
label = Image Alignment
type = select
choices = left, right
choice_labels = Left, Right
width = 1/4

41
models/home.ini Normal file
View file

@ -0,0 +1,41 @@
[model]
name = Home
label = {{ this.title }}
[children]
order_by = sort_key
[fields.title]
label = Title
type = string
[fields.summary]
label = Summary
type = string
[fields.description]
label = Description
type = rst
[fields.header]
label = Header blocks
type = flow
[fields.body]
label = Body blocks
type = flow
[fields.incomplete]
label = Is this page incomplete?
width = 1/4
type = boolean
[fields.sort_key]
label = Sort order
type = sort_key
width = 1/4
[fields.hide_from_index]
label = Hide from index?
type = boolean
width = 1/4

View file

@ -21,7 +21,6 @@ type = rst
label = Gutter
type = rst
[fields.incomplete]
label = Is this page incomplete?
width = 1/4

View file

@ -0,0 +1,3 @@
<a class="btn btn-{{ this.type }} btn-{{ this.size }} {% if this.is_block %}btn-block{% endif %}" href="{{ this.link }}" role="button">
<i class="fa fa-{{ this.icon }}" aria-hidden="true"></i> {{ this.label }}
</a>

View file

@ -0,0 +1,2 @@
{% if this.title %}<h3>{{ this.title }}</h3>{% endif %}
<p>{% if this.image %}<p><img src="{{ this.image }}" class="hidden-sm-down pull-sm-{{ this.image_alignment }}"></p>{% endif %} {{ this.text }}</p>

View file

@ -10,12 +10,12 @@
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-md-9 col-lg-8 col-xl-8">
<h1 class="display-1">BeeWare</h1>
<h2 class="display-2">The IDEs of Python</h2>
<p>BeeWare is a collection of projects that can be used to help develop, debug and launch Python software. Each tool follows the Unix philosophy of doing one thing well. Each tool can be used in isolation, or they can be chained together to provide a rich set of programming tools.</p>
<h2 class="display-2">{{ this.title }}</h2>
<p>{{ this.description }}</p>
<p>
<a class="btn btn-primary btn-lg" href="/project/overview/" role="button">Tell me more</a>
<a class="btn btn-primary btn-lg" href="/contributing/" role="button">I want to contribute</a>
<a class="btn btn-primary btn-lg" href="/contributing/membership/" role="button">I want to donate</a>
{% for blk in this.header.blocks %}
{{ blk }}
{% endfor %}
</p>
</div>
</div>
@ -25,49 +25,17 @@
{% block body %}
<div class="row-fluid">
<div class="col-sm-12 col-md-8 project-description">
<h3>Python native tools...</h3>
<p><img src="/static/images/python.png" class="hidden-sm-down pull-sm-right"> Python has proven itself as a highly capable language - approachable for newcomers, but powerful in the hands of experts. Why shouldn't you be able to <strong>use Python everywhere</strong> that you need to tell a computer to do something? And shouldn't your tools <strong>exploit all the capabilities of Python</strong> as a language, not just the bits that map nicely to a C binding?</p>
<h3>...on mobile &amp; desktop...</h3>
<p><img src="/static/images/cross-platform.png" class="hidden-sm-down pull-sm-left"> Modern computing doesn't happen in an 80x25 console window. It happens on <strong>phones, tablets, and desktop machines</strong> with rich user interfaces. Shouldn't you be able to use Python in all those locations, and <strong>exploit the unique capabilities of those platforms</strong>?</p>
<h3>...behaving natively.</h3>
<p><img src="/static/images/native.png" class="hidden-sm-down pull-sm-right"> End users shouldn't have to care what language their tools are written in. And that starts with looking and behaving <strong>like completely native tools</strong>. Native appearance, native behavior, delivered in the way a native app is delivered. Why shouldn't your Python tools fit in just as well as a native tool?</p>
<h2>This is BeeWare.</h2>
<p><img src="/static/images/brutus-97.png" class="hidden-sm-down pull-sm-left"> This is what BeeWare provides. Tools to help you write <strong>Python code</strong> with a <strong>rich, native user interface</strong>; and the libraries and support code necessary to get that code running on <strong>iOS, Android, macOS, Linux, Windows, tvOS, and more</strong>.</p>
<h3>Open source</h3>
<p><img src="/static/images/opensource.png" class="hidden-sm-down pull-sm-right"> The Open Source development process has proven itself to be the most reliable way to develop robust and reliable software. That's why the entire BeeWare suite of tools are BSD licensed, and <strong>available for all to use and modify</strong>.</p>
<h3>All contributions welcome</h3>
<p><img src="/static/images/labhr.png" class="hidden-sm-down pull-sm-left"> But it's not just about code. A successful software project requires documentation, design skills, feedback and bug reports. The BeeWare community acknowledges that <strong>all contributions are important</strong> &mdash; not just the ones that come as a pull request on GitHub.</p>
<h3>From diversity comes strength</h3>
<p><img src="/static/images/diversity.png" class="hidden-sm-down pull-sm-right"> A diverse community is a strong community. This means accepting people of all levels of experience, from all backgrounds, of all races, creeds, orientations and expressions. The BeeWare project is committed to <strong>developing and maintaining a diverse, welcoming community</strong>. We have an <strong>open offer to mentor anyone</strong> who wants to get involved as a contributor, backed up by a <strong><a href="community/behavior/code-of-conduct/">Code of Conduct</a></strong> that is rigorously enforced. </p>
<h3>Contribute!</h3>
<p>If all this sounds interesting, why not take a look at the <strong><a href="/project/projects">BeeWare projects</a></strong> and see how you can use them when developing Python applications? Or, if you'd like to contribute, and you've never contributed to open source before, start with our <strong><a href="/contributing/first-time/">guide for first time contributors</a></strong>. If you feel ready to dive straight in, check out the <a href="/project/projects/">project pages</a> or our guide on <a href="/contributing/how/">what you can do to help</a>.</p>
{% for blk in this.body.blocks %}
{% if blk._flowblock == 'button-block' %}
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a class="btn btn-primary btn-lg btn-block" href="/contributing/" role="button"><i class="fa fa-code-fork" aria-hidden="true"></i> Contribute to BeeWare</a>
{{ blk }}
</div>
</div>
<h3>Stay in touch!</h3>
<p>Follow <a href="https://twitter.com/PyBeeWare/">@PyBeeWare</a> on Twitter, or <a href="/community/keep-informed/">join the BeeWare enthusiasts mailing list</a> for updates, hints, tips, and announcements related to the project.</p>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a class="btn btn-success btn-lg btn-block" href="/community/keep-informed/" role="button"> <i class="fa fa-envelope" aria-hidden="true"></i> Keep in touch!
</a>
</div>
</div>
<h3>Members</h3>
<p>BeeWare is supported by users like you! Every little bit helps: <a href="/contributing/membership/">click here to contribute.</a></p>
{% else %}
{{ blk }}
{% endif %}
{% endfor %}
</div>
<div class="col-sm-12 col-md-4 gutter home-gutter">