]> git.donarmstrong.com Git - lilypond.git/commitdiff
Adds Pondings corner to the upper-right of the website.
authorMike Solomon <mike@apollinemike.com>
Mon, 30 Apr 2012 04:40:44 +0000 (06:40 +0200)
committerMike Solomon <mike@apollinemike.com>
Mon, 30 Apr 2012 04:40:44 +0000 (06:40 +0200)
Moves Downloads to line up with News.

Documentation/css/lilypond-website.css
Documentation/web.texi
Documentation/web/server/tweets.xml [new file with mode: 0644]
make/website.make

index e5bf19280dd47d3533d0566051b95ebfe9b11206..2ce622912549f6c78fa1944c1798b8f01f0466b1 100644 (file)
@@ -473,7 +473,16 @@ div.news-item {
 
 div#latestVersion {
   position: absolute;
-  top: 12.4em;
+  top: 16em;
+  right: 0;
+  width: 12em;
+  text-align: center;
+  border-left: 1px solid #5b7f64;
+}
+
+div#wildCardBox {
+  position: absolute;
+  top: 0.0em;
   right: 0;
   width: 12em;
   text-align: center;
@@ -488,6 +497,14 @@ div#latestVersion {
   margin: 0;
 }
 
+#wildCardBox .subheading {
+  background: #5b7f64;
+  color: #fff;
+  text-align: center;
+  padding: 0 0.5em;
+  margin: 0;
+}
+
 /* this might not work in certain browsers */
 a[name="Stable"] + h4 {
   background: #bdee9d url(../pictures/color1-bg.png) repeat-x top left;
index b0e2b8311ad0794e729b2f3bda1a64956140364b..e6b077d328972fbea17a9ccbd033c75f5af90bdd 100644 (file)
@@ -148,6 +148,44 @@ Read more in our @ref{Introduction}!
 @ifclear web_version
   @c do nothing
 @end ifclear
+@ifset web_version
+  @c make the box:
+@divId{wildCardBox}
+@subheading Pondings
+@divId{wildCardText}
+
+@divEnd
+@divEnd
+@end ifset
+
+@html
+
+<script language="JavaScript" type="text/javascript">
+  function loadXMLDoc(dname)
+    {
+      if (window.XMLHttpRequest)
+        {
+          xhttp=new XMLHttpRequest();
+        }
+      else
+        {
+          xhttp=new ActiveXObject("Microsoft.XMLHTTP");
+        }
+      xhttp.open("GET",dname,false);
+      xhttp.send();
+      return xhttp.responseXML;
+    }
+
+  var xmlDoc = loadXMLDoc("tweets.xml");
+  var tweets = xmlDoc.getElementsByTagName("tweet");
+  var index = Math.floor(Math.random() * tweets.length);
+  var tweet = tweets[index];
+  var text = tweet.childNodes[0];
+  document.getElementById("wildCardText").innerHTML = text.nodeValue;
+</script>
+
+@end html
+
 @ifset web_version
   @c make the box:
 @divId{latestVersion}
diff --git a/Documentation/web/server/tweets.xml b/Documentation/web/server/tweets.xml
new file mode 100644 (file)
index 0000000..c333ec2
--- /dev/null
@@ -0,0 +1,8 @@
+<tweets>
+<tweet>
+The Ensemble 101 is going on a European tour where they'll sing music
+typeset using LilyPond.  Click &lt;a target="_blank"
+href="http://www.kickstarter.com/projects/751757415/ensemble-101"
+&gt;here&lt;/a&gt; to learn more!
+</tweet>
+</tweets>
\ No newline at end of file
index ce7627b720700937010bcf8b06ea76877b8785f7..1177e34d3c9a249cd93c782ef1cdb77812edda8f 100644 (file)
@@ -155,6 +155,7 @@ post-files = $(OUT)/website/index.html
 root-files = $(OUT)/.htaccess \
              $(OUT)/website/.htaccess \
              $(OUT)/website/favicon.ico \
+             $(OUT)/website/tweets.xml \
              $(OUT)/website/robots.txt
 
 texinfo-files = $(OUT)/index.html $(WEB_LANGS:%=$(OUT)/%/index.html)
@@ -289,6 +290,9 @@ $(OUT)/website/favicon.ico: $(SERVER_FILES)/favicon.ico
 $(OUT)/website/robots.txt: $(SERVER_FILES)/robots.txt
        cp $< $@
 
+$(OUT)/website/tweets.xml: $(SERVER_FILES)/tweets.xml
+       cp $< $@
+
 $(OUT)/.htaccess: $(top-htaccess)
        cp $< $@