Added a list of websites to flask.pocoo.org
This commit is contained in:
parent
513a87668e
commit
ad55cb7e34
4 changed files with 135 additions and 2 deletions
|
|
@ -2,12 +2,13 @@ body { font-family: 'Georgia', serif; font-size: 17px; color: #000; }
|
|||
a { color: #004B6B; }
|
||||
a:hover { color: #6D4100; }
|
||||
.box { width: 540px; margin: 40px auto; }
|
||||
h2, h3 { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; }
|
||||
h2, h3, h4 { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; }
|
||||
h1 { margin: 0 0 30px 0; background: url(/static/flask.png) no-repeat center;
|
||||
height: 165px; }
|
||||
h1 span { display: none; }
|
||||
h2 { font-size: 30px; margin: 15px 0 5px 0; }
|
||||
h3 { font-size: 24px; margin: 15px 0 5px 0; }
|
||||
h4 { font-size: 19px; margin: 15px 0 5px 0; }
|
||||
textarea, code,
|
||||
pre { font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono',
|
||||
monospace!important; font-size: 15px; background: #eee; }
|
||||
|
|
@ -110,6 +111,19 @@ input.openid { background: url(openid.png) no-repeat 4px center;
|
|||
.extension dl dt { width: 130px; float: left; height: 22px; }
|
||||
.extension dl dd { height: 22px; }
|
||||
|
||||
/* projects */
|
||||
.project { border: 1px solid #eee; margin: 10px -10px;
|
||||
padding: 10px; }
|
||||
.project h4 { font-size: 22px; margin: -10px -10px 10px -10px;
|
||||
padding: 0; border-bottom: 1px solid #ddd; }
|
||||
.project h4 a { color: #444; text-decoration: none; display: block;
|
||||
background: #fafafa; padding: 5px 10px; }
|
||||
.project h4 a:hover { color: black; background: white; }
|
||||
.project div.description p { margin: 7px 0; font-size: 0.9em; color: #666; }
|
||||
.project dl { margin: 0; font-size: 0.9em; }
|
||||
.project dl dt { width: 110px; float: left; height: 22px; }
|
||||
.project dl dd { height: 22px; }
|
||||
|
||||
/* pygments style, same as flaskystyle */
|
||||
.hll { background-color: #ffffcc }
|
||||
.c { color: #8f5902; font-style: italic } /* Comment */
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<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.poweredby') }}">Powered By Flask</a>
|
||||
<li><a href="{{ url_for('community.badges') }}">Badges</a>
|
||||
<li><a href="{{ url_for('community.logos') }}">Logos</a>
|
||||
</ul>
|
||||
|
|
|
|||
33
flask_website/templates/community/poweredby.html
Normal file
33
flask_website/templates/community/poweredby.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "community/layout.html" %}
|
||||
{% block title %}Powered By Flask{% endblock %}
|
||||
{% macro render_projects(kind) %}
|
||||
{% for project in projects[kind] %}
|
||||
<div class=project>
|
||||
<h4><a href="{{ project.url }}">{{ project.name }}</a></h4>
|
||||
<div class=description>
|
||||
{{ project.description }}
|
||||
</div>
|
||||
<dl>
|
||||
<dt>URL:
|
||||
<dd><a href="{{ project.url }}">{{ project.host }}</a>
|
||||
{% if project.source %}
|
||||
<dt>Sourcecode:
|
||||
<dd><a href="{{ project.source }}">{{ project.sourcehost }}</a>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
{% block body %}
|
||||
<h2>Powered By Flask</h2>
|
||||
<p>
|
||||
This is a list of websites and projects that disclosed that they
|
||||
are running on Flask. If you want your own website or project
|
||||
listed here,
|
||||
<a href=mailto:armin.ronacher@active-4.com>send me a mail</a>
|
||||
with the URL, name and description of the website.
|
||||
<h3>Websites</h3>
|
||||
{{ render_projects('websites') }}
|
||||
<h3>Applications</h3>
|
||||
{{ render_projects('apps') }}
|
||||
{% endblock %}
|
||||
|
|
@ -1,8 +1,88 @@
|
|||
from flask import Module, render_template
|
||||
# -*- coding: utf-8 -*-
|
||||
from urlparse import urlparse
|
||||
from flask import Markup, Module, render_template
|
||||
from flask_website.twitter import flask_tweets
|
||||
|
||||
community = Module(__name__, url_prefix='/community')
|
||||
|
||||
|
||||
class Project(object):
|
||||
|
||||
def __init__(self, name, url, description, source=None):
|
||||
self.name = name
|
||||
self.url = url
|
||||
self.description = Markup(description)
|
||||
self.source = source
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
return urlparse(self.url)[1]
|
||||
|
||||
@property
|
||||
def sourcehost(self):
|
||||
if self.source is not None:
|
||||
return urlparse(self.source)[1]
|
||||
|
||||
projects = {
|
||||
'websites': [
|
||||
Project('Flask Website', 'http://flask.pocoo.org/', '''
|
||||
<p>
|
||||
The website of the Flask microframework itself including the
|
||||
mailinglist interface, snippet archive and extension registry.
|
||||
'''),
|
||||
Project('Brightonpy', 'http://brightonpy.org/', '''
|
||||
<p>
|
||||
The website of the Brighton Python User Group
|
||||
''', source='http://github.com/j4mie/brightonpy.org/'),
|
||||
Project('vlasiku.lojban.org', 'http://vlasisku.lojban.org/', '''
|
||||
<p>
|
||||
An intelligent search engine for the Lojban dictionary.
|
||||
'''),
|
||||
Project(u's h o r e … software development', 'http://shore.be/', '''
|
||||
<p>Corporate website of Shore Software Development.
|
||||
'''),
|
||||
# this one might change URL soon, check on each update
|
||||
Project('rdrei.net', 'http://new.rdrei.net/', '''
|
||||
<p>Personal website of Pascal Hartig.
|
||||
'''),
|
||||
],
|
||||
'apps': [
|
||||
Project('960 Layout System', 'http://960ls.atomidata.com/', '''
|
||||
<p>
|
||||
The generator of the 960 Layout System is powered by Flask. It
|
||||
generates downloadable 960 stylesheets.
|
||||
'''),
|
||||
Project('hg-review', 'http://review.stevelosh.com/', '''
|
||||
<p>
|
||||
hg-review is a code review system for Mercurial. It is available
|
||||
GPL2 license.
|
||||
''', source='http://bitbucket.org/sjl/hg-review/'),
|
||||
Project('geocron', 'http://geocron.us/', '''
|
||||
<p>
|
||||
By combining your present location with the time of day, geocron
|
||||
automates your life.
|
||||
<p>
|
||||
When you get to your Metro station during the commute home,
|
||||
geocron can send a text message reading "Pick me up dear" to your
|
||||
spouse.
|
||||
'''),
|
||||
Project('Cockerel', 'http://dcolish.github.com/Cockerel/', '''
|
||||
<p>An Online Logic Assistent Based on Coq.
|
||||
''', source='http://github.com/dcolish/Cockerel'),
|
||||
Project('Ryshcate', 'http://ryshcate.leafstorm.us/', '''
|
||||
<p>
|
||||
Ryshcate is a Flask powered pastebin with sourcecode
|
||||
available.
|
||||
''', source='http://bitbucket.org/leafstorm/ryshcate/')
|
||||
]
|
||||
}
|
||||
|
||||
# order projects by name
|
||||
for _category in projects.itervalues():
|
||||
_category.sort(key=lambda x: x.name.lower())
|
||||
del _category
|
||||
|
||||
|
||||
@community.route('/')
|
||||
def index():
|
||||
return render_template('community/index.html')
|
||||
|
|
@ -23,6 +103,11 @@ def badges():
|
|||
return render_template('community/badges.html')
|
||||
|
||||
|
||||
@community.route('/poweredby/')
|
||||
def poweredby():
|
||||
return render_template('community/poweredby.html', projects=projects)
|
||||
|
||||
|
||||
@community.route('/logos/')
|
||||
def logos():
|
||||
return render_template('community/logos.html')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue