defaultTemplate.opml

<!--
  5/10/12 by DW
    Upgraded to Boostrap 2.0 and jQuery 1.7.2.
    User-editable menu.
    http://worknotes.scripting.com/may2012/51012ByDw/defaultRiver2Template
  4/24/12 by DW
    Added links to OPML Server, EC2 for Poets and davewiner.com in the Cool Stuff dropdown menuy.
  4/10/12 by DW
    Let the user define the menu in River2 prefs.
    Move the description into a tooltip under the title.
    Considered moving to Bootstrap 2 but decided to stay focused on big picture stuff.
  12/24/11 by DW
    Allow the user to hide the menu
      Start with code from webapp.data.menuscripts.
      Init the menubar and icon from the onload script attached to the body of the page.
    Add some tools to the dropdown menu
      Just to put something other than picture archives there (cribbed from occupyweb.org).
    New command to set the linkblog.
      This was the reason we needed the menubar.
      We still prompt for the linkblog server on RT if it hasn't been set. But this makes it possible to change the linkblog server if it should happen to move, or you decide you want to use a different one.
  12/23/11 by DW
    Add menu to top of river page
      Here's the first benefit of having the Bootstrap Toolkit included with the river.
    Bring in Bootstrap Toolkit includes
      Expecting things to break, because they did last time I did this (in beaut.root).
      They did break, but I used the same fixes as in beaut.root, and everything looks okay now.
      Still would like to change the names of things in the river styles so there aren't any conflicts, assuming that's what the problem is.
  12/22/11 by DW
    Suck the stylesheet in
      Starting with the stylesheet here:
        http://static.newsriver.org/beautiful/default.css
    Switching over to a dynamic version
      So I don't have to rebuild every time I make a change.
        http://rivers.blorkmark.com/davesRiver
    RT has a good cursor
      The cursor when you moused over a RT was an iBeam, which means "edit this" and that was burning braincells. Turns out it was easy to get the mouse to be a pointer, as if you were hovering over an icon (but it's really text). Nice.
    Editing in OPML
      I am able to edit this JavaScript/CSS/jQuery thing in my outliner. Happy.
  -->
    <%title%>
    <link rel="alternate" type="application/rss+xml" title="OPML" href="<%opmlUrl%>" />
    <meta name="description" content="<%description%>">
      .divOpmlMenubar .topbar-wrapper {
        margin-top: 0;
        margin-bottom: 35px;
        }
        @media all {
          html,
          body,
          div {
            padding:0;
            margin:0;
            }
          body {
            font:100.01%/1 Arial, sans-serif;
            color:#333;
            background:#fff;
            }
          a:link, a:visited {
            text-decoration:none;
            color:#1E68A6;
            }
          a:hover, a:focus, a:active {
            text-decoration:underline;
            }
          h1, h2, h3 {
            line-height:1.3em;
            color:#222;
            }
          p {
            margin:0 0 1.4em;
            font-size:0.875em;
            line-height:1.4em;
            }
          header, hgroup, footer, section, aside, article {
            display:block;
            }
          #header {
            padding:10px 5px;
            margin:0 0 20px;
            background:#1E68A6;
            }
          #header hgroup {
            max-width:500px;
            overflow:hidden;
            margin:0 auto;
            }
          #header h1 {
            float:left;
            margin:0;
            font-size:1em;
            color:#fff;
            }
          #header h2 {
            float:right;
            margin:0.25em 0 0;
            font-size:0.75em;
            font-weight:normal;
            color:#eee;
            }
          #stream {
            max-width:500px;
            min-height:100px;
            padding:0 5px;
            margin:0 auto;
            }
          .notice { /* loading and errors messages */
            text-align:center;
            font-size:14px;
            }
          .loader { /* loading graphic */
            width:32px;
            height:32px;
            margin:20px auto;
            background:url(http://static.newsriver.org/beautiful/loader.gif) no-repeat 0 0;
            }
          .info {
            margin:0 0 30px;
            }
          .info:after {
            content:".";
            display:block;
            visibility:hidden;
            font-size:0;
            clear:both;
            line-height:0;
            }
          .updated {
            float:right;
            margin:0;
            font-size:12px;
            }
          #display {
            float:left;
            display:block;
            font-size:12px;
            line-height:17px;
            font-weight:bold;
            }
          #display:before {
            content:"";
            float:left;
            width:16px;
            height:16px;
            margin:0 6px 0 -22px;
            background:url(http://static.newsriver.org/beautiful/sprite.png) no-repeat -16px 0;
            }
          .compact #display:before {
            background-position:0 0;
            }
          .section {
            clear:both;
            }
          .section {
            padding:0.5em 0 0;
            border-top:1px solid #bbb;
            margin:1.5em 0 0;
            }
          .section h2, .section .header .time {
            float:left;
            padding:0 8px 0 0;
            margin:-17px 0 0 0;
            font-size:12px;
            font-weight:normal;
            line-height:1.2em;
            background:#fff;
            }
          .section .header .time {
            float:right;
            padding:0 0 0 8px;
            color:#777;
            }
          .section h2 .icon {
            position:relative;
            top:-1px;
            float:left;
            margin:0 6px 0 -22px;
            border:0;
            vertical-align:middle;
            }
          .section .header + .article {
            border-top:0;
            }
          .article {
            clear:both;
            position:relative;
            padding:10px 0;
            border-top:1px solid #eee;
            margin:0;
            }
          .article .header {
            margin:0 0 3px;
            }
          .article h3 {
            margin:0;
            font-size:1.1em;
            }
          .article h3 a:visited {
            color:#819fc7;
            }
          .article .description {
            margin:0 0 5px;
            font-size:0.925em;
            line-height:1.3em;
            color:#333;
            }
          .article .thumbnail {
            float:left;
            /*border:1px solid #999;*/
            margin:2px 8px 2px 0;
            }
          .article .footer {
            clear:both;
            margin:0 20px 0 0;
            font-size:0.6875em;
            color:#666;
            }
          .actions {
            display:inline;
            list-style:none;
            padding:0;
            margin:0;
            }
          .actions li {
            display:inline;
            margin:0 0 0 4px;
            }
          .actions li:before {
            content:"\00b7";
            font-weight:bold;
            margin:0 4px 0 -2px;
            }
          #stream.compact .description, #stream.compact .enclosure, #stream.compact .article .footer {
            display:none;
            }
          #stream.compact .article .header {
            margin:0;
            }
          #footer {
            max-width:500px;
            padding:10px 5px;
            border-top:1px solid #ccc;
            margin:3em auto 0;
            }
          #footer p {
            margin:0 0 0.5em;
            font-size:0.6875em;
            color:#666;
            }
          /* IE6 */
          * html #header {
            height:0;
            }
          * html .info {
            width:100%;
            }
          * html #header hgroup,
          * html #stream,
          * html #footer {
            width:500px;
            }
          }
        @media screen and (max-width : 340px) {
          #header h2 {
            display:none;
            }
          .info {
            margin-bottom:10px;
            }
          .updated,
          #display {
            float:none;
            margin:0 0 10px;
            }
          .section .header h2 {
            float:none;
            margin-top:0;
            }
          .section .header .time {
            float:none;
            padding:0;
            margin-top:0;
            }
          .section {
            margin-top:1em;
            }
          .article h3 {
            font-size:0.875em;
            }
          .article .description {
            font-size:0.8125em;
            }
          #footer p {
            font-size:0.6875em;
            }
          }
        function setCookie (cookieName, value, exdays) {
          var exdate = new Date ();
          exdate.setDate (exdate.getDate () + exdays);
          var cookieValue = escape (value) + ((exdays == null) ? "" : "; expires="+exdate.toUTCString());
          document.cookie = cookieName + "=" + cookieValue;
          }
        function getCookie (cookieName) {
          var i,x,y,ARRcookies=document.cookie.split(";");
          for (i=0;i<ARRcookies.length;i++) {
            x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
            y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
            x=x.replace(/^\s+|\s+$/g,"");
            if (x==cookieName) {
              return unescape(y);
              }
            }
          }
        function sendToLinkblog(description, link, title) {
          var linkBlogServer=getCookie("linkWeblogServerDomain");
          if (linkBlogServer===null || linkBlogServer=="") {
            linkBlogServer=prompt("The domain of your linkblog server:","");
            if (linkBlogServer!=null && linkBlogServer!="") {
              setCookie("linkWeblogServerDomain",linkBlogServer,365);
              }
            }
          window.location = "http://" + linkBlogServer + "/?link=" + link + "&title=" + title + "&description=" + description
          }
        function setLinkblogServer () {
          var server = getCookie ("linkWeblogServerDomain");
          if (server == "null") {
            server = ""
            }
          var linkBlogServer = prompt ("The domain of your linkblog server:", server);
          setCookie ("linkWeblogServerDomain", linkBlogServer, 365);
          }
        .spanCursorIsPointer {
          cursor: pointer;
          float: none;
          margin-left: 0;
          }
    <%userStylesheetLink%>
    <%menutext%>
      <%pleaseWaitMessage%>…
      The design and implementation of the first beautiful River2 template was a community project. Credits.
      "Day after day, alone on a hill. The man with the foolish grin is keeping perfectly still."
      var jsonFeed = '<%jsonUrl%>';
      var jsonCallback = 'onGetRiverStream';
        Switch to compact view
        Updated ${dateFormat(metadata.whenGMT, 'timeDate')}
      {{each(f,feed) updatedFeeds.updatedFeed}}
            {{if feed.websiteUrl}}{{/if}}{{if feed.websiteUrl}}{{/if}}
            {{if feed.websiteUrl}}{{/if}}${feed.feedTitle}{{if feed.websiteUrl}}{{/if}}
            (Feed)
          ${dateFormat(feed.whenLastUpdate, 'timeDate')}
        {{each(i,item) feed.item}}
            {{if item.title}}${item.title}{{else}}${item.body}{{/if}}
          {{if item.title}}
          {{if item.body}}
            {{each(t,thumbnail) item.thumbnail}}
            {{/each}}
            ${getText(item.body)}
          {{/if}}
          {{/if}}
            ${timeDifference(item.pubDate)}
              {{if item.comments}}
                Comment
                {{/if}}
              {{each(e,enclosure) item.enclosure}}
                Download enclosure (${enclosure.type}, ${getEnclosureSize(enclosure.length)})
                {{/each}}
              RT
        {{/each}}
      {{/each}}
    <%trackingCode%>