Author: marcus
Date: Fri Jun 27 20:50:43 2014
New Revision: 1606222

URL: http://svn.apache.org/r1606222
Log:
Added function to show an alert box with text and link, updated download box

Modified:
    openoffice/ooo-site/trunk/content/xx/index.html

Modified: openoffice/ooo-site/trunk/content/xx/index.html
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/xx/index.html?rev=1606222&r1=1606221&r2=1606222&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/xx/index.html (original)
+++ openoffice/ooo-site/trunk/content/xx/index.html Fri Jun 27 20:50:43 2014
@@ -19,18 +19,61 @@
     </style>
 
     <script>
-      function follow(platform) {
-        _gaq.push(['_trackEvent','social', 'followUs', platform]); 
-          if (platform == 'Facebook') {
-            window.open("https://www.facebook.com/ApacheOO","_blank";);
-          } else if (platform == 'Twitter') {
-            window.open("https://twitter.com/ApacheOO","_blank";);
-          } else if (platform == 'GooglePlus') {
-            window.open("https://plus.google.com/+openoffice","_blank";);
-          }  else if (platform == 'ApacheBlog') {
-            window.open("https://blogs.apache.org/OOo/","_blank";);
-          }
+      function follow( platform ) {
+        _gaq.push( ['_trackEvent','social', 'followUs', platform] ); 
+
+        if ( platform == 'ApacheBlog' )
+          window.open( "https://blogs.apache.org/OOo/";, "_blank" );
+        else if ( platform == 'Facebook' )
+          window.open( "https://www.facebook.com/ApacheOO";, "_blank" );
+        else if ( platform == 'Twitter' )
+          window.open( "https://twitter.com/ApacheOO";, "_blank" );
+        else if ( platform == 'GooglePlus' )
+          window.open( "https://plus.google.com/+openoffice";, "_blank" );
+      }
+
+      function showAlertbox( show ) {
+       // More see "http://html-color-codes.info/";
+        var l10n_alert_box_background_color = "#F5A9A9";
+       // Maximum 86 characters.
+        var l10n_alert_box_headline_text    = "Important message";
+       // Maximum 517 characters.
+        var l10n_alert_box_text1_text      = "This alert box is now within the 
layout of the list items below."
+                                             + "<br /><br />"
+                                             + "The following link can be 
added to point the user to more information or "
+                                             + "to a solution. But the link 
can also be left out. Then the link will not "
+                                             + "be shown."
+       // Maximum 517 characters.
+        var l10n_alert_box_text2_text      = "Dummy link";
+        var l10n_alert_box_text2_href      = "download/index.html";
+
+        // Show alert box or not?
+        if( show ) {
+          // If no color value was set then use the default value.
+          if( ! l10n_alert_box_background_color )
+            var l10n_alert_box_background_color = "#FFD9A7";
+
+          // Show alert box with defined background color.
+          document.write( "<div id='alert_box' style='background: " + 
l10n_alert_box_background_color + "'>" );
+            // Show headline.
+            document.write( "<h2>" + l10n_alert_box_headline_text + "</h2>" );
+
+            // If text without link is available then show it.
+            if( l10n_alert_box_text1_text )
+              document.write( "<p>" + l10n_alert_box_text1_text + "</p>" );
+
+            // If text with link is available then show it.
+            if( l10n_alert_box_text2_text ) {
+              document.write( "<p>"
+                + "<a href='" + l10n_alert_box_text2_href + "' 
target='_blank'>"
+                  + l10n_alert_box_text2_text
+                + "</a>"
+              + "</p>" );
+            }
+          document.write( "</div>" ); // Alert box
+        }
       }
+
     </script>
 </head>
 
@@ -42,6 +85,15 @@ screen reader.
 <h1 style="display: none;">Apache OpenOffice</h1>
 
 <div id="actionstatements">
+
+  <script type="text/javascript">
+  <!--
+  // Show alert box.
+  // Change to 'true' if you want to show the text that is defined in the 
variables above.
+  showAlertbox( false );
+  //-->
+  </script>
+
   <ul>
     <li>
       <hr />
@@ -58,20 +110,42 @@ screen reader.
       <hr />
     </li>
 
-    <!-- Show the currently available version, loaded via JavaScript -->
+    <!-- Show the download link with currently available version number, 
loaded via JavaScript -->
     <script type="text/javascript">
     <!--
     document.write( "<li>"
       + "<div class='action-download'>"
         + "<div class='action-text action-link'>"
-          + "<a href='download/index.html'><h2>I want to download Apache 
OpenOffice " + VERSION + "</h2>"
-          + "<p>Download Apache OpenOffice for free, or find out about other 
ways of getting it.</p></a>"
+          + "<a href='download/index.html'>"
+            + "<h2>I want to download Apache OpenOffice</h2>"
+            + "<p style='font-size: 1.0em; font-weight: bold;'>(Most recent 
release: " + VERSION + ")</p>"
+            + "<p>Download Apache OpenOffice for free <b>(really!)</b> | "
+              + "<a 
href='https://blogs.apache.org/OOo/entry/with_apache_openoffice_you_get'"
+                + "title='Blog post: With Apache OpenOffice you get what you 
do not pay for' target='_blank'>"
+                + "Click here to get more information"
+              + "</a>."
+            + "</p>"
+          + "</a>"
         + "</div>"
       + "</div>"
     + "</li>" );
     //-->
     </script>
 
+    <!-- Show the download link, without version number -->
+    <noscript>
+      <li>
+        <div class="action-download">
+          <div class="action-text action-link">
+            <a href="download/index.html">
+              <h2>I want to download Apache OpenOffice</h2>
+              <p>Download Apache OpenOffice for free, or find out about other 
ways of getting it.</p>
+            </a>
+          </div>
+        </div>
+      </li>
+    </noscript>
+
     <li>
       <hr />
     </li>
@@ -116,16 +190,16 @@ screen reader.
           <p>Follow the progress of OpenOffice via our announcement list, 
social media areas and blog.</p></a>
             <div class="action-social-extra">
               <p>
-                <span style="padding:0 5px;cursor: pointer; cursor: hand;" 
onclick="javascript:follow('ApacheBlog');"
+                <span style="padding:0 5px;cursor: pointer;" 
onclick="javascript:follow('ApacheBlog');"
                 title="Blog of OpenOffice."><img 
src="../images/logo-rss-16.png" alt="Blog of OpenOffice" />
                 <a>Official Blog</a></span>
-                <span style="padding:0 5px;cursor: pointer; cursor: hand;" 
onclick="javascript:follow('Facebook');"
+                <span style="padding:0 5px;cursor: pointer;" 
onclick="javascript:follow('Facebook');"
                 title="Follow us on Facebook."><img 
src="../images/logo-facebook-16.png" alt="Follow us on Facebook." />
                 <a>Facebook</a></span>
-                <span style="padding:0 5px;cursor: pointer; cursor: hand;" 
onclick="javascript:follow('Twitter');"
+                <span style="padding:0 5px;cursor: pointer;" 
onclick="javascript:follow('Twitter');"
                 title="Follow us on Twitter."><img 
src="../images/logo-twitter-16.png" alt="Follow us on Twitter." />
                 <a>Twitter</a></span>
-                <span style="padding:0 5px;cursor: pointer; cursor: hand;" 
onclick="javascript:follow('GooglePlus');"
+                <span style="padding:0 5px;cursor: pointer;" 
onclick="javascript:follow('GooglePlus');"
                 title="Follow us on Google+."><img 
src="../images/logo-googleplus-16.png" alt="Follow us on Google+." />
                 <a>Google+</a></span>
               </p>


Reply via email to