diff --git a/doc/usage/theming.rst b/doc/usage/theming.rst index 8bbe4b3..ab805bc 100644 --- a/doc/usage/theming.rst +++ b/doc/usage/theming.rst @@ -113,6 +113,30 @@ this needs to be included in this macro in your theme. Example: {% endmacro %} +`browseheader_message(select)` macro +###################### + +An optional Jinja macro that defines the welcome message that is shown +above the tabs on the Browse Pages (Projects, Users, and Groups). The +select parameter is a string with the name of the page being shown +Example: + +:: + + {% macro browseheader_message(select) %} + {% if select == 'projects' %} +
+
+
+

Welcome to my Pagure

+

Pagure is an Open Source software code hosting system.

+
+
+
+ {% endif %} + {% endmacro %} + + `footer()` macro ###################### diff --git a/pagure/templates/_browseheader.html b/pagure/templates/_browseheader.html index fb0ce79..a984238 100644 --- a/pagure/templates/_browseheader.html +++ b/pagure/templates/_browseheader.html @@ -1,15 +1,9 @@ +{% import "theme.html" as theme with context %} + {% macro browse_header(select) -%} -{% if select == 'projects' %} -
-
-
-

Welcome to Pagure

-

Pagure is an Open Source software code hosting system.

-
-
-
-{% endif %} +{{ theme.browseheader_message(select) if theme.browseheader_message is defined }} +