Code to crib for your standalone river

81 views
Skip to first unread message

Dave Winer

unread,
Sep 9, 2015, 12:00:24 PM9/9/15
to river4
I promised to do this for Anton, and of course that means sharing with the River4 list.

Here's a very simple HTML container for a river, in source.


If you copy that text into a file and open it in your browser, you will get a rendering of the new mlbriver.com.

If you have a river.js file around, just replace the URL in the httpGetRiver call to the address of your river, and it will display that flow instead.

I've tried to make it as simple as possible to put together your own wrapper for your river. Now you just have to use CSS and HTML knowledge to make this work.

Dave




Anton Zuiker

unread,
Sep 9, 2015, 8:42:52 PM9/9/15
to river4
Got out of meetings, saw your post about the mlbriver, took one look and thought, I'd love to have a river that looks like that.

Then saw this. Perfect, and simple.

Here's what I did:

1. Copied the html code from the gist

2. Pasted the html code into a new text file on my MacBook, and saved it as mlbriverTest.html

3. Use the Transmit app to upload davetest.html to my server at dukeriver.co


5. I was expecting to see exactly what is at http://mlbriver.com/ 

6. What I see, though, is the river and the player logo, but not the fonts and the bgcolor and the border. I check in Chrome and Safari, and same look (i.e. missing the fonts, background and border. Screenshots attached.

7. I also copied and pasted the code into a new index.html file, and switched out the river with one of my Duke rivers, as well as swapped in a Duke logo. Nice to see the river feeding fine, but the page similarly doesn't have the styling I was expecting. Screenshot attached.

8. I see this in the post above: "Now you just have to use CSS and HTML knowledge to make this work."

9. I wonder if I need to adjust something else in the stylesheet or Google fonts call.

Anton
mlbriver.com screenshot.png
dukeriver.co screenshot.png
mlbriverTest screenshot.png

Anton Zuiker

unread,
Sep 9, 2015, 8:44:57 PM9/9/15
to river4
Sorry, typo in #3 -- davetest.html should have been mlbriverTest.html

Dave Winer

unread,
Sep 9, 2015, 9:00:05 PM9/9/15
to riv...@googlegroups.com
i know what the problem is, you have to change the reference to styles.css to http://mlbriver.com/styles.css.

I'm out right now so I can't change the gist until later.



--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.
To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Typed on an iPad with fat fingers.

Dave Winer

unread,
Sep 9, 2015, 10:29:58 PM9/9/15
to river4, da...@smallpicture.com
I updated the file and tested it, and it works perfectly as far as I can tell


Dave


To unsubscribe from this group and stop receiving emails from it, send an email to river4+unsubscribe@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anton Zuiker

unread,
Sep 10, 2015, 8:35:01 AM9/10/15
to river4, da...@smallpicture.com
Confirmed. Styles are working.

http://dukeriver.co/ has been updated.

Dave Winer

unread,
Sep 10, 2015, 8:41:28 AM9/10/15
to Anton Zuiker, river4
Looking much better!

Now let's make it great. :-)

I did an image search for Duke, and found it has an icon that's used across many of the sites. I've edited it, to make it a good size for this design, and added a transparent background. The result is enclosed.

I'm also going to have some template updates, since I did some tweaks last night.

Dave



To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
dukeIcon.png

Anton Zuiker

unread,
Sep 10, 2015, 9:15:49 AM9/10/15
to Dave Winer, river4
You are steps ahead of me! I swapped out the icon. Looks great.

This is really simple. I can't wait to demonstrate this to my Duke communicator colleagues, and find ways to encourage others across the university to build their own rivers (lots of prior explanation and persuasion on Scripting News I know I can point to).

Two follow-up questions:

1. Can we anticipate tabs for this page, or should I consider combining my various Duke rivers into a comprehensive river?

2. I notice the ProductTitle (in my case, dukeriver.co) has an onclick behavior that should trigger an About modal, maybe. This would be great feature to be able to explain the river. Is this something I should be able to figure out, or a future modification? 


---------------------------------------------
Anton Zuiker
zui...@gmail.com
919.724.4220
---------------------------------------------

Dave Winer

unread,
Sep 10, 2015, 10:05:53 AM9/10/15
to river4, da...@smallpicture.com, zui...@gmail.com
>>1. Can we anticipate tabs for this page, or should I consider combining my various Duke rivers into a comprehensive river?

This is not going to evolve into a multi-tab thing. We already have that. This is meant as a way for you to build confidence before you try to take on a more complex project.

But -- I was going to suggest you add more feeds. A river should flow much faster than this one is flowing. Look at the content in mlbriver.com for an idea. I want to find something new there at least every day. With baseball, this time of year, I want to check in while games are being played and find out what's going on elsewhere.

BTW, I said this privately, now publicly -- please create a Facebook account. I want to introduce you to people in Chapel Hill who are influential and smart and can use what you're doing, and can help you. Not being on Facebook is like not having an email address. It limits others, not just you (which it certainly does).
To unsubscribe from this group and stop receiving emails from it, send an email to river4+unsubscribe@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frank McPherson

unread,
Sep 10, 2015, 12:06:33 PM9/10/15
to river4, da...@smallpicture.com, zui...@gmail.com
I am curious, does anyone know how to expose a [river name].js file stored in /river4data/rivers from a local file system? The docs at http://radio3.io/rivers/ are for Amazon S3. Using the domain of my River4 install, I've tried using http://mywebstream.net/rivers/All%20My%20Feeds.js but that didn't work. 

To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Typed on an iPad with fat fingers.

--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.

For more options, visit https://groups.google.com/d/optout.
--

From the tablet of Frank McPherson
frank.m...@gmail.com

Dave Winer

unread,
Sep 10, 2015, 1:23:13 PM9/10/15
to river4, da...@smallpicture.com, zui...@gmail.com
You can figure this out by reading the source code of river4.js.


Will get you the contents of the river named mlb.js.

This feature is used in the home page of your server. You could find the answer in the source code of that app too.

Hope that helps.

Dave

To unsubscribe from this group and stop receiving emails from it, send an email to river4+unsubscribe@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Typed on an iPad with fat fingers.

--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+unsubscribe@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/0bec17ef-8437-4b98-a441-74f2f1551a9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anton Zuiker

unread,
Sep 10, 2015, 1:24:57 PM9/10/15
to river4
I updated http://dukeriver.co/ to use the new code, with more feeds in the river (Fargo lists and includes are amazing), and links in the footer.

All working as expected.

Tonight I'll add an about page with background to the Duke River project, and tomorrow I hope to present this to one of the Duke leaders.

Thank you River4 community -- you've given me great examples and tools to make the Duke River a reality, something I've wanted to do for a very long time. 

Anton

Frank McPherson

unread,
Sep 10, 2015, 1:49:12 PM9/10/15
to riv...@googlegroups.com
Got it, I saw the /getonriver part in the code but couldn't figure out the rest.

To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Typed on an iPad with fat fingers.

--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/0bec17ef-8437-4b98-a441-74f2f1551a9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

From the tablet of Frank McPherson
frank.m...@gmail.com

--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.

For more options, visit https://groups.google.com/d/optout.

Andy Sylvester

unread,
Sep 10, 2015, 2:54:58 PM9/10/15
to riv...@googlegroups.com
Just put together my own example using one of my feeds - looks great! Thanks Dave for putting out this template!



To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/5f6983bc-9ab4-45af-82ee-1059d55017c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Typed on an iPad with fat fingers.

--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.

Dave Winer

unread,
Sep 10, 2015, 4:21:05 PM9/10/15
to riv...@googlegroups.com
Hah that scared me at first I thought my river had been hacked -- with ukuleles! 😎


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages