social-mediagoblin
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Social-mediagoblin] long live 0.0.1! what's next for 0.0.2?


From: Christopher Allan Webber
Subject: Re: [Social-mediagoblin] long live 0.0.1! what's next for 0.0.2?
Date: Tue, 03 May 2011 10:00:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Deborah Nicholson <address@hidden> writes:

> Hi,
> If there is python programming that could be done by very
> new-to-python programmers, we are rapidly building up a store of such
> folks in Boston. I would be happy to help organize and host a hackfest
> aimed at very new folks IF someone could help me with the exactly what
> people should do at such an event and get people unstuck when they get
> stuck. Maybe just 6 folks and one mentor to start?

Hm!  We could set up a list of tasks on the bugtracker that are aimed at
people new to the codebase.

> Tell me more about how the templates will work. Is that a python task
> or a Django thing or something else?

So the templates are django-like but actually aren't django (it's jinja2
http://jinja.pocoo.org/docs/ ), and they make some python calls, but
they're mostly just html with some logic embedded in them.  Here's a
simple sample:

https://gitorious.org/mediagoblin/mediagoblin/blobs/master/mediagoblin/templates/mediagoblin/auth/register.html

  {% extends "mediagoblin/base.html" %}
  
  {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
  
  {% block mediagoblin_content %}
    <h2>Login:</h2>
  
    <form action="{{ request.urlgen('mediagoblin.auth.login') }}"
          method="POST" enctype="multipart/form-data">
  
      {% if login_failed %}
        <p><i>Login failed!</i></p>
      {% endif %}
  
      <table>
        {{ wtforms_util.render_table(login_form) }}
        <tr>
          <td></td>
          <td><input type="submit" value="submit" /></td>
        </tr>
      </table>
  
      {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
      {% endif %}
    </form>
  {% endblock %}

So you can see it's kind of a mix of HTML, some markup inside of
{{ foo }} and sometimes {% foo %} type tags, etc.

So here's how I imagine templates are going to work out.

Python programmers will create the views and some "skeleton" templates
like above, that have all the python calls and basic logic in them
already.  Designers who mostly aren't python programmers can then
improve / style these.  Add CSS classes, move things around, etc.  When
I worked on Miro Community this is basically what I'd do, I'd write out
the basic django templates and the graphic designer would log in and
actually mess with things until they looked pretty to him.

So there's template inheritence... you can see this extends from
"base.html".  That's this thing:

https://gitorious.org/mediagoblin/mediagoblin/blobs/master/mediagoblin/templates/mediagoblin/base.html

Here's something we could use help with frontend / ui / graphic designer
people who don't necessarily know python immediately.  If you make
changes to:

  mediagoblin/templates/base.html
  mediagoblin/static/css/base.css

then start up the server and visit http://127.0.0.1:6543/ and you should
see your changes take effect.

if you want to mess around with the template that's used on that page
you can fiddle with

mediagoblin/templates/root.html

I guess we should start talking about what the basic design of
mediagoblin will look like.  I made some ascii art mockups in:

http://docs.mediagoblin.org/vision.html#look-and-feel

and also referenced Mairin Duffy's mockup in there:
http://mairin.wordpress.com/2010/03/09/another-design-hub-mockup/

but beyond that I don't know.  I'd love to see very tango-ish colors and
use tango icons also, if possible, in the base template. :) 

Anyone interested in doing work on defining mockups, or making our basic
theme start to look nice?

-- 
http://dustycloud.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]