diff --git a/flask_website/static/style.css b/flask_website/static/style.css index 855f6e50..299cde63 100644 --- a/flask_website/static/style.css +++ b/flask_website/static/style.css @@ -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 */ diff --git a/flask_website/templates/community/index.html b/flask_website/templates/community/index.html index 7442c08a..6ca9ac80 100644 --- a/flask_website/templates/community/index.html +++ b/flask_website/templates/community/index.html @@ -15,6 +15,7 @@
  • Mailinglist
  • IRC Channel
  • Flask on Twitter +
  • Powered By Flask
  • Badges
  • Logos diff --git a/flask_website/templates/community/poweredby.html b/flask_website/templates/community/poweredby.html new file mode 100644 index 00000000..bd1685b7 --- /dev/null +++ b/flask_website/templates/community/poweredby.html @@ -0,0 +1,33 @@ +{% extends "community/layout.html" %} +{% block title %}Powered By Flask{% endblock %} +{% macro render_projects(kind) %} + {% for project in projects[kind] %} +
    +

    {{ project.name }}

    +
    + {{ project.description }} +
    +
    +
    URL: +
    {{ project.host }} + {% if project.source %} +
    Sourcecode: +
    {{ project.sourcehost }} + {% endif %} +
    +
    + {% endfor %} +{% endmacro %} +{% block body %} +

    Powered By Flask

    +

    + 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, + send me a mail + with the URL, name and description of the website. +

    Websites

    + {{ render_projects('websites') }} +

    Applications

    + {{ render_projects('apps') }} +{% endblock %} diff --git a/flask_website/views/community.py b/flask_website/views/community.py index c490636d..143e6888 100644 --- a/flask_website/views/community.py +++ b/flask_website/views/community.py @@ -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/', ''' +

    + The website of the Flask microframework itself including the + mailinglist interface, snippet archive and extension registry. + '''), + Project('Brightonpy', 'http://brightonpy.org/', ''' +

    + The website of the Brighton Python User Group + ''', source='http://github.com/j4mie/brightonpy.org/'), + Project('vlasiku.lojban.org', 'http://vlasisku.lojban.org/', ''' +

    + An intelligent search engine for the Lojban dictionary. + '''), + Project(u's h o r e … software development', 'http://shore.be/', ''' +

    Corporate website of Shore Software Development. + '''), + # this one might change URL soon, check on each update + Project('rdrei.net', 'http://new.rdrei.net/', ''' +

    Personal website of Pascal Hartig. + '''), + ], + 'apps': [ + Project('960 Layout System', 'http://960ls.atomidata.com/', ''' +

    + The generator of the 960 Layout System is powered by Flask. It + generates downloadable 960 stylesheets. + '''), + Project('hg-review', 'http://review.stevelosh.com/', ''' +

    + 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/', ''' +

    + By combining your present location with the time of day, geocron + automates your life. +

    + 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/', ''' +

    An Online Logic Assistent Based on Coq. + ''', source='http://github.com/dcolish/Cockerel'), + Project('Ryshcate', 'http://ryshcate.leafstorm.us/', ''' +

    + 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')