PythonJamaica / pythonjam.site

The PythonJamaica website
http://pythonjam.org.jm
0 stars 0 forks source link

Design the badges #10

Open pigeonflight opened 8 years ago

pigeonflight commented 8 years ago

the badges need to be designed, firstly a standard template and then perhaps 2 or 3examples, you may want to coordinate this with the badge related UX task.

There's a lot that can happen here, I'd focus on two independent projects: PROJECT 1 - design a bunch of badges

PROJECT 2 - get the system working

pigeonflight commented 8 years ago

@lesmumba looking out for the first version of the code that returns json.

To retrieve an image on a field named "image"

<img tal:attributes="src string: ${context/absolute_url}/@@images/image/preview" />

Scale: "preview" is one of the built in scales for plone. It could be replaced with "thumb", "tile", "mini" or "large".

In the context of a browser view it might look like this:

url = self.context.image.absolute_url()
image_url = "%s/@@images/image/thumb" % url

If the field is called "myimage" then it would be more like this::

url = self.context.my_image.absolute_url()
image_url = "%s/@@images/my_image/thumb" % url