Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This theme has a several improvements to help chalice users: * Add a landing page that makes it clear what chalice does. * Add a navbar to make it easy for customers to go to exactly where they want. * Allow for additional resources to be added that aren't documentation, link to workshops, videos, additional content that's useful to chalice users. This theme is a modified version of the smithy theme.
- Loading branch information
Showing
21 changed files
with
1,779 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{# | ||
basic/globaltoc.html | ||
~~~~~~~~~~~~~~~~~~~~ | ||
#} | ||
<div id="sidebar-navigation" class="hidden-xs"> | ||
{{ toctree(maxdepth=3, titles_only=True) }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<section id="landing-container"> | ||
|
||
<div id="splash"> | ||
<div class="width-wrapper"> | ||
<div class="splash-row"> | ||
<div class="splash-column"> | ||
<img id="splash-logo" src="{{ pathto('_static/img/chalice-logo-whitespace.png', 1) }}" alt="AWS Chalice" /> | ||
<div class="headline"> | ||
A Python framework for serverless applications | ||
</div> | ||
<a class="splash-link" href="quickstart.html">Get started</a> | ||
</div> | ||
|
||
<div class="splash-column"> | ||
<div class="highlight-chalice notranslate"> | ||
<div class="highlight"> | ||
<pre><a class="see-full-example" href="{{ pathto('quickstart') }}#complete-example">[full example]</a> | ||
<span style="color: #f92672">from</span> <span style="color: #f8f8f2">chalice</span> <span style="color: #66d9ef">import</span> <span style="color: #f8f8f2">Chalice</span> | ||
|
||
<span style="color: #f8f8f2">app</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">Chalice(app_name</span><span style="color: #f92672">=</span><span style="color: #e6db74">"helloworld"</span><span style="color: #f8f8f2">)</span> | ||
|
||
<span style="color: #a6e22e">@app</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">route(</span><span style="color: #e6db74">"/"</span><span style="color: #f8f8f2">)</span> | ||
<span style="color: #66d9ef">def</span> <span style="color: #a6e22e">index</span><span style="color: #f8f8f2">():</span> | ||
<span style="color: #66d9ef">return</span> <span style="color: #f8f8f2">{</span><span style="color: #e6db74">"hello"</span><span style="color: #f8f8f2">:</span> <span style="color: #e6db74">"world"</span><span style="color: #f8f8f2">}</span> | ||
|
||
<span style="color: #a6e22e">@app</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">schedule(Rate(</span><span style="color: #ae81ff">5</span><span style="color: #f8f8f2">,</span> <span style="color: #f8f8f2">unit</span><span style="color: #f92672">=</span><span style="color: #f8f8f2">Rate</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">MINUTES))</span> | ||
<span style="color: #66d9ef">def</span> <span style="color: #a6e22e">periodic_task</span><span style="color: #f8f8f2">(event):</span> | ||
<span style="color: #66d9ef">return</span> <span style="color: #f8f8f2">{</span><span style="color: #e6db74">"hello"</span><span style="color: #f8f8f2">:</span> <span style="color: #e6db74">"world"</span><span style="color: #f8f8f2">}</span> | ||
|
||
<span style="color: #a6e22e">@app</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">on_s3_event(bucket</span><span style="color: #f92672">=</span><span style="color: #e6db74">'mybucket'</span><span style="color: #f8f8f2">)</span> | ||
<span style="color: #66d9ef">def</span> <span style="color: #a6e22e">s3_handler</span><span style="color: #f8f8f2">(event):</span> | ||
<span style="color: #f8f8f2">print(event</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">bucket,</span> <span style="color: #f8f8f2">event</span><span style="color: #f92672">.</span><span style="color: #f8f8f2">key)</span> | ||
|
||
</pre> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="width-wrapper"> | ||
<div class="splash-row"> | ||
<img class="lp-image" src="{{ pathto('_static/img/coding.png', 1) }}" alt="Coding" /> | ||
<div class="splash-column"> | ||
<h2>Focus on writing your application code</h2> | ||
<p>Focus on writing your application code | ||
instead of the resources or services needed to deploy | ||
your application. Chalice automatically determines how to | ||
provision the necessary resources for your application.</p> | ||
</div> | ||
<img class="lp-image" src="{{ pathto('_static/img/programming.png', 1) }}" alt="Coding" /> | ||
<div class="splash-column"> | ||
<h2>A familiar decorator based API</h2> | ||
<p>Chalice's API for writing serverless application uses a familiar | ||
decorator-based syntax used in frameworks such as Flask, | ||
bottle, and FastAPI. Skip the learning curve and get up and | ||
running quickly. | ||
</p> | ||
</div> | ||
<img class="lp-image" src="{{ pathto('_static/img/maintenance.png', 1) }}" alt="Coding" /> | ||
<div class="splash-column"> | ||
<h2>Supports multiple deployment systems</h2> | ||
<p>Chalice supports multiple tools to deploy your application | ||
including AWS CloudFormation, Terraform, and its own built-in | ||
deployer based on the AWS SDK for Python. Use the deployment | ||
tools and services you're already familiar with.</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Decide if we want the FAQ on the landing page or a separate page. | ||
<div class="faq"> | ||
<div class="width-wrapper"> | ||
<h2 class="faq-heading">FAQs</h2> | ||
<h2>Why should I use Chalice?</h2> | ||
<p></p> | ||
<h2>How does Chalice compare to SAM?</h2> | ||
<p></p> | ||
</div> | ||
</div> | ||
--> | ||
<div class="width-wrapper"> | ||
<section class="relations"> | ||
<a class="next-page clearfix" href="{{ pathto('quickstart')}}">Quick start -></a> | ||
</section> | ||
<p></p> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{%- extends "basic/layout.html" %} | ||
|
||
{%- block extrahead %} | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
{% endblock %} | ||
|
||
{%- block scripts %} | ||
{{ super() }} | ||
<script type="text/javascript"> | ||
function _scroll(subjectId) { | ||
var subjectElement = $(subjectId); | ||
var actualSubjectHeight = subjectElement.height(); | ||
var startingPosition = subjectElement[0].getBoundingClientRect().top; | ||
return function() { | ||
var availableHeight = $(window).height() - startingPosition; | ||
// Subtract the scroll position to account for sticky movement. | ||
availableHeight += Math.min($(window).scrollTop(), 40); | ||
var cappedHeight = Math.min(actualSubjectHeight, availableHeight); | ||
if (subjectElement.css("height") !== cappedHeight) { | ||
subjectElement.css("height", cappedHeight); | ||
} | ||
}; | ||
} | ||
|
||
// Scroll and resize the the columns when scrolled. | ||
$(function() { | ||
var rightScroll = _scroll("#right-column > .column-body"); | ||
var scrollFn = function() { | ||
rightScroll.call(this, arguments); | ||
}; | ||
scrollFn(); | ||
$(window).scroll(scrollFn); | ||
$(window).resize(scrollFn); | ||
}); | ||
|
||
// Scroll spy to change highlighted navigation element. | ||
$(function() { | ||
var section = document.querySelectorAll(".section"); | ||
var sections = {}; | ||
var i = 0; | ||
Array.prototype.forEach.call(section, function(e) { | ||
sections[e.id] = e.offsetTop; | ||
}); | ||
var scrollSpy = function() { | ||
var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop; | ||
for (i in sections) { | ||
if (sections[i] <= scrollPosition) { | ||
$('#right-column .current').removeClass('current'); | ||
$("#right-column a[href='#" + i + "']").addClass('current'); | ||
} | ||
} | ||
}; | ||
$(window).scroll(scrollSpy); | ||
scrollSpy(); | ||
}); | ||
</script> | ||
{% if theme_ga_id %} | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ theme_ga_id }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ theme_ga_id }}'); | ||
</script> | ||
{% endif %} | ||
{%- endblock %} | ||
|
||
{%- block css -%} | ||
<link rel="stylesheet" href="{{ pathto('_static/bootstrap-reboot.css', 1) }}" type="text/css" /> | ||
{{ super() }} | ||
<link rel="stylesheet" href="{{ pathto('_static/custom-tabs.css', 1) }}" type="text/css" /> | ||
{% endblock -%} | ||
|
||
<div id="site-container"> | ||
|
||
{%- block header %} | ||
<header> | ||
<div class="header-flex width-wrapper"> | ||
<div class="site-logo"> | ||
<a href="{{ pathto(master_doc) }}"> | ||
<span class="logo-icon"><img src="{{ pathto('_static/img/chalice-logo-icon-small.png', 1) }}" /></span> | ||
</a> | ||
</div> | ||
|
||
<ul id="page-navigation"> | ||
<li class="site-page first"><a href="{{ pathto('quickstart') }}">Quick Start</a></li> | ||
<li class="site-page"><a href="{{ pathto('/tutorials/index') }}">Tutorials</a></li> | ||
<li class="site-page"><a href="{{ pathto('/topics/index') }}">Topics</a></li> | ||
<li class="site-page"><a href="{{ pathto('api') }}">API Reference</a></li> | ||
<li class="site-page"><a href="https://github.com/aws/chalice">Code</a></li> | ||
<li class="site-search hidden-sm"> | ||
<form action="{{ pathto('search') }}" method="get"> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
<input class="search-input" autocomplete="off" type="search" name="q" placeholder="Search" /> | ||
</form> | ||
</li> | ||
</ul> | ||
</div> | ||
</header> | ||
{% endblock -%} | ||
|
||
{%- block relbar1 %}{% endblock %} | ||
|
||
{% block content %} | ||
{% if pagename == "index" %} | ||
{%- include 'landing.html' with context %} | ||
{% endif %} | ||
{% if pagename != "index" or builder == "singlehtml" %} | ||
<section id="page-container"> | ||
<div class="width-wrapper flex"> | ||
<article id="document-body"> | ||
{% if parents %} | ||
<ul class="rel-parents"> | ||
{%- for parent in parents %} | ||
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a></li> | ||
{%- endfor %} | ||
</ul> | ||
{% endif %} | ||
{% block body %} {% endblock %} | ||
{% if prev or next %} | ||
<section class="relations"> | ||
{% if prev %} | ||
<a href="{{ prev.link|e }}" title="{{ _('previous chapter')}}" class="previous-page clearfix hidden-xs">← {{ prev.title }}</a> | ||
{% endif %} | ||
{%- if next and next.title != '<no title>' %} | ||
<a href="{{ next.link|e }}" title="{{ _('next chapter')}}" class="next-page clearfix">{{ next.title }} →</a> | ||
{%- endif %} | ||
</section> | ||
{% endif %} | ||
{%- block content_footer %}{%- endblock %} | ||
</article> | ||
|
||
{%- if pagename not in ('search', 'contents', 'index', '404') -%} | ||
<aside id="right-column" class="side-column hidden-sm"> | ||
<div class="column-body"> | ||
<section class="sidebar"> | ||
{% if prev or next %} | ||
<section class="next-previous"> | ||
{% if prev %} | ||
<a href="{{ prev.link|e }}" title="{{ _('previous chapter')}}" class="previous-page clearfix hidden-xs">← Prev</a> | ||
{% endif %} | ||
{%- if next and next.title != '<no title>' %} | ||
<a href="{{ next.link|e }}" title="{{ _('next chapter')}}" class="next-page clearfix">Next →</a> | ||
{%- endif %} | ||
</section> | ||
{% endif %} | ||
{{ toc }} | ||
</section> | ||
</div> | ||
</aside> | ||
{%- endif -%} | ||
</div> | ||
</section> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
</div><!-- site-container --> | ||
|
||
{%- block relbar2 %}{% endblock %} | ||
{%- block footer %} | ||
<footer id="footer"> | ||
<div class="width-wrapper"> | ||
<div class="copyright"> | ||
<p>©2020, Amazon Web Services, Inc or its affiliates. All rights reserved.</p> | ||
</div> | ||
</div> | ||
</footer> | ||
{%- endblock -%} |
Binary file not shown.
Oops, something went wrong.