Skip to content

Commit

Permalink
Add Examples to nav and add "intro" text (#392)
Browse files Browse the repository at this point in the history
I think we've ironed out enough of the kinks to justify making the examples page more prominent. We've been sitting on a lot of value here for awhile 😄 

For posterity: big thanks to @mockersf for putting together this feature in #225 and @doup for adding loading feedback in #355 and a bunch of other visual improvements.
  • Loading branch information
cart committed Jul 8, 2022
1 parent c6e0524 commit e571eba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sass/pages/_assets.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.assets {
.assets-intro {
font-size: 1.2rem;
margin-bottom: 20px;
}

.asset-section {
font-size: 2.4rem;
margin: 0 0 20px;
Expand Down Expand Up @@ -36,5 +41,6 @@

a {
text-decoration: none;
color: $link-color;
}
}
5 changes: 5 additions & 0 deletions templates/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

{% block page_content %}
<div class="assets">
<div class="assets-intro">
These examples demonstrate how to use Bevy's features in a minimal, easy to understand way. Click an example below to run it in
your browser (using WASM + WebGL) and view the source code. You can also view these examples (and others) in the
<a href="https://github.com/bevyengine/bevy/tree/latest/examples#examples">Bevy repo</a>.
</div>
{% for subsection in section.subsections %}
{% set section = get_section(path=subsection) %}

Expand Down
1 change: 1 addition & 0 deletions templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
{{header_macros::header_item(name="News", current_path=current_path)}}
{{header_macros::header_item(name="Community", current_path=current_path)}}
{{header_macros::header_item(name="Assets", current_path=current_path)}}
{{header_macros::header_item(name="Examples", current_path=current_path)}}
{# <li class="main-menu__entry">
<a class="main-menu__link" href="https://merch.bevyengine.org">Merch</a>
</li> #}
Expand Down

0 comments on commit e571eba

Please sign in to comment.