Website update. There is now a community section.

This commit is contained in:
Armin Ronacher 2010-05-18 17:56:51 +02:00
parent 33bb6dec37
commit 2fb50e55d9
28 changed files with 1441 additions and 33 deletions

View file

@ -0,0 +1,12 @@
{% macro tweet_box(tweets, limit=none) %}
<div class=twitter>
<ul>
{%- for tweet in tweets.get(limit) %}
<li>
<a href="http://twitter.com/{{ tweet.user }}">{{ tweet.user }}</a>:
{{ tweet.text|urlize }}
<span class=meta>&mdash; {{ tweet.pub_date|timedeltaformat }} ago via {{ tweet.via }}</span>
{%- endfor %}
</ul>
</div>
{% endmacro %}

View file

@ -0,0 +1,32 @@
{% extends "community/layout.html" %}
{% block title %}Badges{% endblock %}
{% macro badge(filename, title) -%}
<a href="{{ url_for('general.index', _external=true) }}"><img
src="{{ url_for('.static', filename='badges/' ~ filename, _external=true) }}"
border="0"
alt="{{ title }}"
title="{{ title }}"></a>
{%- endmacro %}
{% macro show_badge(filename, title) -%}
<div class=badge>
<p>{{ badge(filename, title) }}
<pre>{{ badge(filename, title)|forceescape }}</pre>
</div>
{%- endmacro %}
{% block body %}
<h2>Badges</h2>
<p>
If you want to share the word and want to add a “powered by
Flask” badge to your website you can display one of these
nifty badges. We also have some badges if your website is not
yet powered by Flask :)
<h3>Large Badges</h3>
{{ show_badge('flask-powered.png', 'Flask powered') }}
{{ show_badge('i-wish.png', 'I wish this site were Flask powered') }}
{{ show_badge('unfortunately-not.png', 'Unfortunately not Flask powered') }}
<h3>Small Badges</h3>
{{ show_badge('flask-project-s.png', 'a Flask project') }}
{{ show_badge('made-with-flask-s.png', 'made with Flask') }}
{{ show_badge('powered-by-flask-s.png', 'powered by Flask') }}
<p><small>Idea for badges inspired by the Django Framework badges.</small></p>
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends "community/layout.html" %}
{% block body %}
<p>
Even though Flask is a rather new project, there has already a healty
community evolved around it. There is an active
<a href="{{ url_for('mailinglist.index') }}">mailinglist</a> both for
developers using Flask as well as working on the core, and an
<a href="{{ url_for('community.irc') }}">IRC</a> channel.
<p>
If you want to spread the word, there is also a selection of
<a href="{{ url_for('community.badges') }}">badges</a> and
<a href="{{ url_for('community.logos') }}">logos</a> you can use
on your own website.
<ul>
<li><a href="{{ url_for('mailinglist.index') }}">Mailinglist</a>
<li><a href="{{ url_for('community.irc') }}">IRC Channel</a>
<li><a href="{{ url_for('community.twitter') }}">Flask on Twitter</a>
<li><a href="{{ url_for('community.badges') }}">Badges</a>
<li><a href="{{ url_for('community.logos') }}">Logos</a>
</ul>
{% endblock %}

View file

@ -0,0 +1,26 @@
{% extends "community/layout.html" %}
{% block title %}IRC Channel{% endblock %}
{% block body %}
<h2>IRC Channel</h2>
<p>
The Flask IRC channel is <code>#pocoo</code> on irc.freenode.net.
Flask shares that channel with other Pocoo projects, so please
let the others know that you are talking about Flask when asking
a question.
<p>
You can use any IRC client to connect to freenode. If you don't
have one yet, pick one from the list:
<ul>
<li><a href="http://pidgin.im/">Pidgin</a>, Windows, Linux, OS X
<li><a href="http://xchat.org/">X-Chat</a>, Linux
<li><a href="http://mirc.com/">mirc</a>, Windows
<li><a href="http://colloquy.info/">colloquy</a>, OS X
</ul>
<p>
Alternatively you can also use the freenode web interface to
join the IRC channel: <a href="http://bit.ly/pocooirc">open
#pocoo in your browser</a>.
<p>
If you want to read up on older discussions you can access
the IRC logs on <a href=http://dev.pocoo.org/irclogs/>dev.pocoo.org/irclogs</a>.
{% endblock %}

View file

@ -0,0 +1,10 @@
{% extends "layout.html" %}
{% block head %}
{{ super() }}
<style type=text/css>
h1 { background-image: url({{ url_for('.static', filename='community.png') }}); }
</style>
{% endblock %}
{% block body_title %}
<h1><span>Flask Community</span></h1>
{% endblock %}

View file

@ -0,0 +1,27 @@
{% extends "community/layout.html" %}
{% block title %}Logos{% endblock %}
{% macro logo(format) -%}
<a href="{{ url_for('.static', filename='logo/flask.' ~ format)
}}">{{ format|upper }} format</a>
{%- endmacro %}
{% block body %}
<h2>Logos</h2>
<p>
The Flask logo is available for download and use in the formats
below. You can use the logo to promote Flask like you want.
The image is licensed under the Creative Commons
“Attribution-No Derivative Works 3.0 Austria” license.
<a href="http://creativecommons.org/licenses/by-nd/3.0/at/deed.en"
>Read license text</a>.
<ul>
<li>{{ logo('png') }}: for online and screen usage
<li>{{ logo('svg') }}: for online and screen usage
<li>{{ logo('eps') }}: for print use
<li>{{ logo('pdf') }}: for print use
</ul>
<p>
The font used in the logo is “Hightower Text roman” from the
Font Bureau foundry. The font can be purchased from
<a href="http://www.ascenderfonts.com/font/hightower-text-roman.aspx"
>Ascender Fonts</a>.
{% endblock %}

View file

@ -0,0 +1,23 @@
{% extends "community/layout.html" %}
{% from "_twitter.html" import tweet_box %}
{% block head %}
{{ super() }}
{% endblock %}
{% block body %}
<h2>Twitter</h2>
<p>
Currently there is no dedicated Twitter account for updates
regarding Flask, but here are some accounts that you might
want to follow:
<ul>
<li><a href="http://twitter.com/mitsuhiko">@mitsuhiko</a> &mdash;
development lead
<li><a href="http://twitter.com/PocooProject">@PocooProject</a> &mdash;
official Pocoo Project account
</ul>
<h3>Recent Tweets</h3>
<p>
Here some aggregated tweets from various people all over the planet
mentioning Flask:
{{ tweet_box(tweets, 15) }}
{% endblock %}

View file

@ -1,11 +1,14 @@
{% extends "layout.html" %}
{% from "_twitter.html" import tweet_box %}
{% set latest_version = '0.2' %}
{% set download_url = 'http://pypi.python.org/packages/source/' ~
'F/Flask/Flask-' ~ latest_version ~ '.tar.gz' %}
{% block head %}
{{ super() }}
<style type=text/css>
h1 { margin: 0 0 30px 0; background: url({{ url_for('.static', filename='logo.png') }}) no-repeat center; height: 165px; }
h1 span, p.tagline { display: none; }
</style>
<link href="{{ tweets.feed_url }}" rel="alternate" title="Flask on Twitter" type="application/atom+xml">
{% endblock %}
{% block body_title %}
{{ super() }}
@ -17,6 +20,9 @@
And before you ask: It's <a href="{{ url_for('docs.show', page='license')
}}">BSD licensed</a>!
</blockquote>
<p class=latestver>
<strong>Latest Version:</strong>
<a href="{{ download_url }}" title="Download tarball">{{ latest_version }}</a>
<h2>Flask is Fun</h2>
<pre><span class=ig>from flask import Flask
app = Flask(__name__)</span>
@ -33,13 +39,13 @@ def hello():
<span class=ig> * Running on http://localhost:5000/</span></pre>
<h2>Interested?</h2>
<ul>
<li><a href="{{ download_url }}">Download latest release</a> ({{ latest_version }})
<li>
<a href="{{ url_for('docs.index') }}">Read the documentation</a> or download as
<a href="{{ url_for('docs.pdf') }}">PDF</a> and
<a href="{{ url_for('docs.zip') }}">zipped HTML</a>
<li><a href="{{ url_for('mailinglist.index') }}">Join the mailinglist</a>
<li><a href=http://github.com/mitsuhiko/flask>Fork it on github</a>
<li><a href=http://pypi.python.org/pypi/Flask>Download it from PyPI</a>
</ul>
<h2>Whats in the Box?</h2>
<ul>
@ -54,6 +60,7 @@ def hello():
}}#sessions">secure cookies</a> (client side sessions)
<li>100% <a href=http://www.python.org/dev/peps/pep-0333/>WSGI 1.0</a> compliant
<li>Unicode based
<li>extensively <a href="{{ url_for('docs.index') }}">documented</a>
</ul>
<h2>What do Flask Apps look like?</h2>
<p>
@ -71,22 +78,15 @@ def hello():
<p>Found a bug? Have a good idea for improving Flask? Head over to
<a href=http://github.com/mitsuhiko/flask>Flask's github</a> page and
create a new ticket or fork. If you just want to chat with fellow
developers, go to <code>#pocoo</code> on irc.freenode.net.
developers, visit <a href="{{ url_for('community.irc') }}">the IRC
channel</a> or join <a href="{{ url_for('mailinglist.index') }}"
>the mailinglist</a>.
{% if tweets %}
<h2>Recent Tweets</h2>
<div class=twitter>
<p>
What people say about Flask on <a href=http://twitter.com/>Twitter</a>:
<ul>
{%- for tweet in tweets %}
<li>
<a href="http://twitter.com/{{ tweet.user }}">{{ tweet.user }}</a>:
{{ tweet.text|urlize }}
<span class=meta>&mdash; {{ tweet.pub_date|timedeltaformat }} ago via {{ tweet.via }}</span>
{%- endfor %}
</ul>
</div>
<p>
What people say about Flask on <a href=http://twitter.com/>Twitter</a>:
{{ tweet_box(tweets, 3) }}
<p class=more><a href="{{ url_for('community.twitter') }}">more &raquo;<a>
{% endif %}
<a href="http://github.com/mitsuhiko/flask"><img style="position: fixed; top: 0; right: 0; border: 0;"

View file

@ -13,7 +13,7 @@
<p class=nav>
<a href="{{ url_for('general.index') }}">overview</a> //
<a href="{{ url_for('docs.index') }}">documentation</a> //
<a href="{{ url_for('mailinglist.index') }}">mailinglist</a> //
<a href="{{ url_for('community.index') }}">community</a> //
<a href="{{ url_for('snippets.index') }}">snippets</a> //
<a href="{{ url_for('extensions.index') }}">extensions</a>
{% for message in get_flashed_messages() %}

View file

@ -1,6 +1,8 @@
{% extends "mailinglist/layout.html" %}
{% block title %}Mailinglist Archive{% endblock %}
{% block body %}
<p class=backnav>
<a href="{{ url_for('index') }}">&laquo; list information</a>
<h2>Mailinglist Archive</h2>
<ul class=archive>
{% for thread in threads %}

View file

@ -1,6 +1,7 @@
{% extends "mailinglist/layout.html" %}
{% block title %}Mailinglist{% endblock %}
{% block body %}
<h2>Mailinglist Information</h2>
<p>
There is a mailinglist for Flask hosted on <a
href=http://librelist.com/>librelist</a> you can use for both user requests

View file

@ -2,11 +2,12 @@
{% block title %}{{ thread.title }}{% endblock %}
{% block head %}
{{ super() }}
<script type=text/javascript src=/static/mailinglist.js></script>
<script type=text/javascript src="{{ url_for('.static',
filename='mailinglist.js') }}"></script>
{% endblock %}
{% block body %}
<p class=backnav>
<a href=/mailinglist/archive/>&laquo; back to archive</a>
<a href="{{ url_for('archive') }}">&laquo; back to archive</a>
<h2>{{ thread.title }}</h2>
<ul class=mailtree>