To use css you just define styles normally in the css files you include in your view (probably layout or other parent view) or even, if you prefer, in a style tag, they may need to override the default ones and for this you have to consider the css precedence rules but a good rule of thumb is that the more specific you are with your css selectors the more it's likely that you'll get what you want. To be able to use the function I provided just put it somewhere in the model and you'll be able to call it from anywhere, although the css approach is certainly something you could/should try depending on what you want.
Quinta-feira, 20 de Setembro de 2012 19:26:10 UTC+1, mweissen escreveu: > > > *Massimo*: > auth.wiki is great! I have copied http://vimeo.com/8952354 to a page. > Ok, it works fine, but the picture is bigger than the page and I have to > scroll. Therefore I want to adjust the width. > > Using CSS: sorry, I did not understand how to use CSS together with a wiki > page. Are there special classes? > > > *Leonel*: > Thank you this idea. But how can I call a function from a wiki page? > > 2012/9/20 Massimo Di Pierro <massimo....@gmail.com <javascript:>> > >> You can still define your own extension but the the suggested behavior is >> designed to be more intuitive and leave the width and height size to the >> CSS. >> >> >> On Thursday, 20 September 2012 09:35:06 UTC-5, Leonel Câmara wrote: >>> >>> Well but it should be possible. Here's how it could be done >>> >>> def vimeo(code, width=400, height=250): >>> """ >>> ## Embeds a vimeo video (by code) >>> - ``code`` is the code of the video >>> - ``width`` is the width you want the video to have >>> - ``height`` is the height you want the video to have >>> """ >>> return XML("""<iframe src="http://player.vimeo.com/**video/%(code)s" >>> width="%(width)s" height="%(height)s" frameborder="0" webkitAllowFullScreen >>> mozallowfullscreen allowFullScreen></iframe>""" % dict(code=code, >>> width=width, height=height)) >>> >>> Quinta-feira, 20 de Setembro de 2012 14:31:31 UTC+1, Massimo Di Pierro >>> escreveu: >>>> >>>> You simply cut and paste a link to the video in the text as below: >>>> >>>> http://vimeo.com/8952354 >>>> >>>> You cannot choose width and height. Vimeo choses that for you. >>>> >>>> On Thursday, 20 September 2012 07:46:43 UTC-5, mweissen wrote: >>>>> >>>>> I want to embedd a vimeo video in a auth.wiki page. >>>>> >>>>> In the plugin_wiki I had to write for example >>>>> >>>>> *``* >>>>> *name: vimeo* >>>>> *code: 8952354 * >>>>> *width: 533* >>>>> *height: 400* >>>>> *``:widget* >>>>> >>>>> How can I do the same in auth.wiki? >>>>> >>>>> Regards, Martin >>>>> >>>>> >> --