I'd like to run this by as an idea.

Today, the announcement at the top of our website is controlled by this file:

https://svn.apache.org/repos/asf/incubator/ooo/ooo-site/trunk/content/brand.mdtext

The "announce" and "announceurl" values  then enter into the
templating process via:

https://svn.apache.org/repos/asf/incubator/ooo/ooo-site/trunk/templates/brand.html

Specifically:

{% block announce %}{% if headers.announce %}<div id="announce"><a
href="{{ headers.announceurl }}" title="{{ headers.announcetip }}">{{
headers.announce }}</a></div>{% endif %}{% endblock %}

So what if we want to support images there as well?

Two approaches:

1) Add additional possible value for brand.mdtext, "announceimage".
Change logic in brand.html so it follows some precedence order, say
look for announceimage first, if that exists, put an <img> there,
otherwise look for announce and display that as a <a> hyperlink.

2) Or, we could just change announce so it is the contents of a <div>.
 So brand.html is actually simplified, and brand.mdtext would contain
the actual markup.  For example, it could be: announce=<a
href="foo.html"><img src="foo.jpg" alt="foo"/></a>

#2 has the advantage of flexibility, that it allows other kinds of
markup to be inserted there, including lists, tables, etc..  Of
course, UI-wise, there is not a lot of space to play with, but it
would have that flexibility.

Any thoughts?

-Rob

Reply via email to