Skip to content

Instantly share code, notes, and snippets.

@rayantony
Created September 29, 2016 07:27
Show Gist options
  • Save rayantony/39304852e41ab3604216ff6c425d1cbb to your computer and use it in GitHub Desktop.
Save rayantony/39304852e41ab3604216ff6c425d1cbb to your computer and use it in GitHub Desktop.
widget example

Widget Example Use

Example method uses wallethub widgets of on or more types

####The Widget snippet:

<a href="http://wallethub.com" data-wh-type="people" data-wh-uid="13302181">WalletHub</a>
<div id="wh-root" style="position:absolute;top:-9999px;left:-9999px;"></div>
<script type="text/javascript">/*<![CDATA[*/(function (d, id) {var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = "//efstatic.s3.amazonaws.com/wallethub/js/v1/people-love-us-widget.js";d.getElementById(id).appendChild(s);})(document, "wh-root");/*]]>*/</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=0.98" />
<meta http-equiv="cleartype" content="on">
<meta name="language" content="English, en" />
<title>Mobile News Reader Demo</title>
<meta name="description" content="Mobile News Reader Demo" />
<meta name="keywords" content="Mobile News Reader Demo" />
<meta name="author" content="ray" href="/humans.txt" />
<meta name="application-name" content="Mobile News Reader Demo">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Mobile News Reader Demo">
<meta name="mobile-web-app-capable" content="yes">
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta http-equiv="cleartype" content="on">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png">
<link rel="icon" sizes="196x196" href="/favicon-196x196.png">
<link rel="shortcut icon" href="favicon.ico" >
<link href="http://www.zazar.net/developers/jquery/zrssfeed/jquery.zrssfeed.css" rel="stylesheet" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script src="http://www.zazar.net/developers/jquery/zrssfeed/jquery.zrssfeed.min.js" type="text/javascript"></script>
<link href="//webmx.me/assets/web/news.css" rel='stylesheet' type='text/css'>
<style>
@charset "UTF-8";
/*
* Example of zRSSFeed Styling (Optional)
*
* Version: 1.2.0
* (c) Copyright 2011-2013, Zazar Ltd
*
*/
body {
font-family: 'Droid Serif', serif;
font-size: 14px;
color: #2f2f2f;
background-color: #f9f7f1;
background-color: #fff;
text-decoration: none;
text-rendering: optimizeLegibility;
/*-webkit-font-feature-settings: "liga"; Currently broken in Chrome >= v22. Falls back to text-rendering. Safari is unaffected. */
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
-o-font-feature-settings: "liga";
font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}
header {
font-family: 'Playfair Display', serif;
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.header {
font-family: 'Playfair Display', serif;
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
.header-title, .btn {
margin: 0px 10px;
text-transform: uppercase;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.head {
text-align: center;
position: relative;
}
.subhead {
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;
}
.weatherforcastbox {
position: relative;
width: 12%;
left: 10px;
border: 3px double #2f2f2f;
padding: 10px 15px 10px 15px;
line-height: 20px;
display: inline-block;
margin: 0 50px 20px -360px;
}
.content {
font-size: 0;
line-height: 0;
word-spacing: -.31em;
display: inline-block;
margin: 30px 2% 0 2%;
}
.rssFeed {
font-size: 1.3rem;
line-height: 30px;
width: 80.5%;
display: inline-block;
padding: 0 1% 0 1%;
vertical-align: top;
border-right: 1px solid #2f2f2f;
margin-bottom: 10px;
transition: all .7s;
}
.rssFeed a {
color: #333;
text-decoration: none;
}
.rssFeed a:hover {
color: #b3d4fc;
text-decoration: underline;
}
.rssHeader { font-family: 'Playfair Display', serif;
font-weight: 700;
font-size: 50px;
text-transform: uppercase;
display: inline-block;
line-height: 45px;
margin-bottom: 10px;
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;}
.rssBody { border: 1px solid #999; }
.rssBody ul { list-style: none; }
.rssBody ul, .collumn .rssRow, .rssRow h4, .rssRow p {
margin: 0;
padding: 0;
)
.bg{
width: 100%;
height: 100%;
position: absolute;
z-index: 0;
top: 0;
left: 0;
-webkit-transition: -webkit-transform 0.3s;
-moz-transition: -moz-transform 0.3s;
transition: transform 0.3s;
}
h3 {
font-weight: normal;
font-size: 20px;
}
.rssRow .post .content {
z-index: 2;
position: relative;
pointer-events: none;
}
.rssRow .collumn .headline {
text-align: center;
line-height: normal;
font-family: 'Playfair Display', serif;
display: block;
margin: 0 auto;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl1 {
font-weight: 700;
font-size: 30px;
text-transform: uppercase;
padding: 10px 0 10px 0;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl2 {
font-weight: 400;
font-style: italic;
font-size: 24px;
box-sizing: border-box;
padding: 10px 0 10px 0;
}
padding: 0.8em; }
.rssRow h4 { font-size: 1.1em; }
.rssRow div {
font-size: 90%;
color: #333;
margin: 0.2em 0 0.4em 0;
}
.odd { font-weight: 400;
font-style: italic;
font-size: 22px;
background-color:rgba(0,0,0,0.15);
background-color:#fff;
}
.even { font-weight: 400;
font-style: normal;
font-size: 26px;
background-color:rgba(128,128,128,0.15);}
.rssRow .rssMedia {
padding: 0.5em;
font-size: 1em;
}
</style>
<body>
<a href="http://wallethub.com" data-wh-type="people" data-wh-uid="13302181">WalletHub</a>
<div id="wh-root" style="position:absolute;top:-9999px;left:-9999px;"></div>
<script type="text/javascript">/*<![CDATA[*/(function (d, id) {var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = "//efstatic.s3.amazonaws.com/wallethub/js/v1/people-love-us-widget.js";d.getElementById(id).appendChild(s);})(document, "wh-root");/*]]>*/</script>
<script type="text/javascript"> $(document).ready(function() { setRSSFeed('#menu'); $('#menu').change(function() { setRSSFeed(this); });
function setRSSFeed(obj) { var feedurl = $('option:selected', obj).val(); if (feedurl) { $('#test').rssfeed(feedurl); } } });
</script>
<h4>Git Feeds</h4>
<select id="menu">
<!-- me -->
<option value="http://github.com/rayrc.atom">RAYRC GH</option>
<option value="http://github.com/rayantony.atom">RayAntony GH</option>
<option value="http://github.com/deadflowers.atom">deadflowers GH</option>
<!-- <option value="http://github.com/rayantony.atom">RayAntony GH</option> -->
<option value="http://codepen.io/rayrc/public/feed/">RAY PubPens</option>
<option value="http://rayanthonyrcc.wordpress.com/feed/">RRC News</option>
<option value="http://codepen.io/rayrc/blog/feed/">Ray Blogpen</option>
<option value="http://rayanthony.io/atom.feed">RCC WP</option>
<option value="http://rayrcc.wordpress.com/feed/">RCC WP</option>
<option value="http://rayrc.wordpress.com/feed/">RAYRC WP</option>
<!-- other news -->
<option value="http://feeds.reuters.com/reuters/oddlyEnoughNews">Reuters Oddly News</option>
<option value="http://gv.com/feed/">GV News</option>
<option value="http://feeds.bbc.co.uk/iplayer/highlights/tv/list">BBC iPlayer TV Listing</option>
<option value="http://rss.cnn.com/rss/edition.rss">CNN News</option>
<!--no working
<option value="http://rayantony.github.io/feed/">RAC GP</option>
<option value="http://github.com/rayantony/repos/">GH RayAntony</option>
<option value="http://github.com/deadflowers/activity/feed/">GH Deadflowers</option>
<option value="http://rankordie.github.io/feed/">ROD GP</option>
<option value="http://rankordie.wordpress.com/feed/">ROD WP</option>
<option value="http://dockrtc.github.io/feed/">DRTC GP</option>
<option value="http://codepen.io/rayrc/private/feed/">Pens-RAY Private</option>
<option value="http://videojs.com/blog/feed/">VJS Blog</option>
-->
</select>
<h4>Recent Activities</h4>
<div id="test"></div>
</body>
</html>
<a href="http://wallethub.com" data-wh-type="people" data-wh-uid="13302181">WalletHub</a>
<div id="wh-root" style="position:absolute;top:-9999px;left:-9999px;"></div>
<script type="text/javascript">/*<![CDATA[*/(function (d, id) {var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = "//efstatic.s3.amazonaws.com/wallethub/js/v1/people-love-us-widget.js";d.getElementById(id).appendChild(s);})(document, "wh-root");/*]]>*/</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment