You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by wa...@apache.org on 2020/10/23 21:30:12 UTC

[openoffice-org] branch main updated: Brand template

This is an automated email from the ASF dual-hosted git repository.

wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git


The following commit(s) were added to refs/heads/main by this push:
     new b535700  Brand template
b535700 is described below

commit b5357006e549b2b42048149671f27eb3d84effb8
Author: Dave Fisher <da...@davefisher.tech>
AuthorDate: Fri Oct 23 14:29:14 2020 -0700

    Brand template
---
 content/brand.md                    | 26 ++++++++++++++------------
 templates/{brand.html => brand.gsp} | 20 ++++++++++----------
 2 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/content/brand.md b/content/brand.md
index ce9c72b..459c568 100644
--- a/content/brand.md
+++ b/content/brand.md
@@ -1,12 +1,14 @@
-home:		home
-search:		search
-selectedlang:	en
-language:	Language
-name:		Apache OpenOffice
-tagline:	The Free and Open Productivity Suite
-logo:		AOO_logos/AOO4_website_logo.png
-domain:		https://www.openoffice.org
-divid:		bannera
-announce:	Apache OpenOffice 4.1.7 released
-announceurl:	https://blogs.apache.org/OOo/entry/announcing-apache-openoffice-4-13
-announcetip:	Apache OpenOffice 4.1.7 released
+type=brand
+status=published
+search=search
+selectedlang=en
+language=Language
+name=Apache OpenOffice
+tagline=The Free and Open Productivity Suite
+logo=AOO_logos/AOO4_website_logo.png
+domain=https://www.openoffice.org
+divid=bannera
+announce=Apache OpenOffice 4.1.7 released
+announceurl=https://blogs.apache.org/OOo/entry/announcing-apache-openoffice-4-13
+announcetip=Apache OpenOffice 4.1.7 released
+~~~~~~
diff --git a/templates/brand.html b/templates/brand.gsp
similarity index 78%
rename from templates/brand.html
rename to templates/brand.gsp
index 5607b29..a3e5e57 100644
--- a/templates/brand.html
+++ b/templates/brand.gsp
@@ -1,7 +1,7 @@
-  <div id="{{ headers.divid }}">
+  <div id="${content.divid}">
   <div id="languagesdiv">
-  	{% block language %}{% if headers.language %}{{ headers.language }}{% else %}Language{% endif %}:{% endblock %}
-  	<select id="selectlanguage" onchange="javascript:location.href=location.protocol+'//'+location.host+'/'+this.value;">
+  	${content.language}
+ 	<select id="selectlanguage" onchange="javascript:location.href=location.protocol+'//'+location.host+'/'+this.value;">
   	<!-- Asturian --><option value="ast">Asturianu (ast)</option>
 	<!-- Catalan --><option value="ca">Català (ca)</option>
   	<!-- Czech --><option value="cs">Čeština (cs)</option>
@@ -44,7 +44,7 @@
   	<!-- Korean --><option value="ko">한국어 (ko)</option>
 	</select>
 	<script>
-	  var lang = "{{headers.selectedlang}}";
+	  var lang = "${content.selectedlang}";
 	  var dropdown = document.getElementById('selectlanguage');
 	  var options = dropdown.options;
 	  for( var i = 0; i < dropdown.options.length; i++ ) {
@@ -55,22 +55,22 @@
 	  }
 	</script>
   </div>
-  <div id="bannerleft"><a title="Apache OpenOffice" href="/"><img id="ooo-logo" alt="{{ headers.name }}" src="/images/{{ headers.logo }}"/></a></div>
+  <div id="bannerleft"><a title="Apache OpenOffice" href="/"><img id="ooo-logo" alt="${content.name}" src="/images/${content.logo}"/></a></div>
     <div id="bannerright">        
       <div id="searchdiv">
 	<form id="cse-search-box-header" action="https://www.google.com/search" method="get">
 	  <div>
-	    <input type="hidden" name="domains" value="{{ headers.domain }}"/>
-	    <input type="hidden" name="sitesearch" value="{{ headers.domain }}"/>
+	    <input type="hidden" name="domains" value="${content.domain}"/>
+	    <input type="hidden" name="sitesearch" value="${content.domain}"/>
 	  </div>
 	  <div class="topsrchbox">
 	    <input name="resultsPerPage" value="40" type="hidden"/> 
 	    <input name="q" id="query" type="text" title="search query"/>
-	    <input name="Button" value="{{ headers.search }}" type="submit" class="topsrchbutton"/>
+	    <input name="Button" value="${content.search}" type="submit" class="topsrchbutton"/>
 	  </div>
 	</form>
       </div>
     </div>
-    {% block tagline %}{% if headers.tagline %}<div id="bannercenter"><br/>{{ headers.tagline }}</div>{% endif %}{% endblock %}
+    <div id="bannercenter"><br/>${content.tagline}</div>
   </div>
-  {% block announce %}{% if headers.announce %}<div id="announce"><a href="{{ headers.announceurl }}" title="{{ headers.announcetip }}">{{ headers.announce }}</a></div>{% endif %}{% endblock %}
+  <div id="announce"><a href="${content.announceurl}" title="${content.announcetip}">${content.announce}</a></div>


Re: [openoffice-org] branch main updated: Brand template

Posted by Dave Fisher <wa...@apache.org>.
Status.

Assets go to assets directory.
Pages go to content directory. I can make it the pages directory if people prefer.
Footer and doctype are now assets
Fragment templates for navigators and brand are in place.

My next steps are:

Page Templates - it’s getting to be time to get groovy.
- breadcrumb calculation
- ssi selection from a json file (may switch to yaml)
- markdown pages
- html content parsing
- html pages

Jenkins Job
Staging Test for base page and .asf.yaml understanding.

Fork A:
- Automation of conversion of all the sub project sites.
- Acceptance tests
- Production!

Fork B:
- openoffice.apache.org <http://openoffice.apache.org/> website conversion

Regards,
Dave

> On Oct 23, 2020, at 2:30 PM, wave@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> wave pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/openoffice-org.git
> 
> 
> The following commit(s) were added to refs/heads/main by this push:
>     new b535700  Brand template
> b535700 is described below
> 
> commit b5357006e549b2b42048149671f27eb3d84effb8
> Author: Dave Fisher <da...@davefisher.tech>
> AuthorDate: Fri Oct 23 14:29:14 2020 -0700
> 
>    Brand template
> ---
> content/brand.md                    | 26 ++++++++++++++------------
> templates/{brand.html => brand.gsp} | 20 ++++++++++----------
> 2 files changed, 24 insertions(+), 22 deletions(-)
> 
> diff --git a/content/brand.md b/content/brand.md
> index ce9c72b..459c568 100644
> --- a/content/brand.md
> +++ b/content/brand.md
> @@ -1,12 +1,14 @@
> -home:		home
> -search:		search
> -selectedlang:	en
> -language:	Language
> -name:		Apache OpenOffice
> -tagline:	The Free and Open Productivity Suite
> -logo:		AOO_logos/AOO4_website_logo.png
> -domain:		https://www.openoffice.org
> -divid:		bannera
> -announce:	Apache OpenOffice 4.1.7 released
> -announceurl:	https://blogs.apache.org/OOo/entry/announcing-apache-openoffice-4-13
> -announcetip:	Apache OpenOffice 4.1.7 released
> +type=brand
> +status=published
> +search=search
> +selectedlang=en
> +language=Language
> +name=Apache OpenOffice
> +tagline=The Free and Open Productivity Suite
> +logo=AOO_logos/AOO4_website_logo.png
> +domain=https://www.openoffice.org
> +divid=bannera
> +announce=Apache OpenOffice 4.1.7 released
> +announceurl=https://blogs.apache.org/OOo/entry/announcing-apache-openoffice-4-13
> +announcetip=Apache OpenOffice 4.1.7 released
> +~~~~~~
> diff --git a/templates/brand.html b/templates/brand.gsp
> similarity index 78%
> rename from templates/brand.html
> rename to templates/brand.gsp
> index 5607b29..a3e5e57 100644
> --- a/templates/brand.html
> +++ b/templates/brand.gsp
> @@ -1,7 +1,7 @@
> -  <div id="{{ headers.divid }}">
> +  <div id="${content.divid}">
>   <div id="languagesdiv">
> -  	{% block language %}{% if headers.language %}{{ headers.language }}{% else %}Language{% endif %}:{% endblock %}
> -  	<select id="selectlanguage" onchange="javascript:location.href=location.protocol+'//'+location.host+'/'+this.value;">
> +  	${content.language}
> + 	<select id="selectlanguage" onchange="javascript:location.href=location.protocol+'//'+location.host+'/'+this.value;">
>   	<!-- Asturian --><option value="ast">Asturianu (ast)</option>
> 	<!-- Catalan --><option value="ca">Català (ca)</option>
>   	<!-- Czech --><option value="cs">Čeština (cs)</option>
> @@ -44,7 +44,7 @@
>   	<!-- Korean --><option value="ko">한국어 (ko)</option>
> 	</select>
> 	<script>
> -	  var lang = "{{headers.selectedlang}}";
> +	  var lang = "${content.selectedlang}";
> 	  var dropdown = document.getElementById('selectlanguage');
> 	  var options = dropdown.options;
> 	  for( var i = 0; i < dropdown.options.length; i++ ) {
> @@ -55,22 +55,22 @@
> 	  }
> 	</script>
>   </div>
> -  <div id="bannerleft"><a title="Apache OpenOffice" href="/"><img id="ooo-logo" alt="{{ headers.name }}" src="/images/{{ headers.logo }}"/></a></div>
> +  <div id="bannerleft"><a title="Apache OpenOffice" href="/"><img id="ooo-logo" alt="${content.name}" src="/images/${content.logo}"/></a></div>
>     <div id="bannerright">        
>       <div id="searchdiv">
> 	<form id="cse-search-box-header" action="https://www.google.com/search" method="get">
> 	  <div>
> -	    <input type="hidden" name="domains" value="{{ headers.domain }}"/>
> -	    <input type="hidden" name="sitesearch" value="{{ headers.domain }}"/>
> +	    <input type="hidden" name="domains" value="${content.domain}"/>
> +	    <input type="hidden" name="sitesearch" value="${content.domain}"/>
> 	  </div>
> 	  <div class="topsrchbox">
> 	    <input name="resultsPerPage" value="40" type="hidden"/> 
> 	    <input name="q" id="query" type="text" title="search query"/>
> -	    <input name="Button" value="{{ headers.search }}" type="submit" class="topsrchbutton"/>
> +	    <input name="Button" value="${content.search}" type="submit" class="topsrchbutton"/>
> 	  </div>
> 	</form>
>       </div>
>     </div>
> -    {% block tagline %}{% if headers.tagline %}<div id="bannercenter"><br/>{{ headers.tagline }}</div>{% endif %}{% endblock %}
> +    <div id="bannercenter"><br/>${content.tagline}</div>
>   </div>
> -  {% block announce %}{% if headers.announce %}<div id="announce"><a href="{{ headers.announceurl }}" title="{{ headers.announcetip }}">{{ headers.announce }}</a></div>{% endif %}{% endblock %}
> +  <div id="announce"><a href="${content.announceurl}" title="${content.announcetip}">${content.announce}</a></div>
>