Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
126 lines (101 loc) · 5.28 KB
/
Copy pathindex.html
File metadata and controls
126 lines (101 loc) · 5.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- metadata you need to fill in -->
<title>GovTrack Insider</title>
<meta property="og:title" content="GovTrack Insider" />
<meta name="description" content="GovTrack Insider covers the daily activities of the United States Congress. A project of GovTrack.us.">
<meta property="og:description" content="GovTrack Insider covers the daily activities of the United States Congress. A project of GovTrack.us.">
<link rel="icon" type="image/png" href="favicon.ico"> <!-- replace with HTML generated by http://realfavicongenerator.net/ -->
<meta name="twitter:creator" content="@GovTrack" />
<meta name="twitter:site" content="@GovTrack" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/css/main.css">
<!--[if lt IE 9]>
<script src="static/js/html5-3.6-respond-1.1.0.min.js"></script>
<![endif]-->
</head>
<body>
<!--[if lt IE 8]><p>Internet Explorer version 8 or any modern web browser is required to use this website, sorry.<![endif]-->
<!--[if gt IE 7]><!-->
<div class="container">
<header>
<img src="static/image/title.png" alt="GovTrack Insider" class="img-responsive"/>
<div class="deck">Tracking the United States Congress. A project of <a href="https://www.govtrack.us">GovTrack.us</a>.</div>
</header>
<div class="row">
<div class="col-md-5 col-md-push-7">
<h2>Subscribe by email</h2>
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="//civicimpulse.us5.list-manage.com/subscribe/post?u=ed85ab30f6b221222ace0c2c2&id=5b3c455d72" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="form-group mc-field-group">
<label for="mce-EMAIL">Enter your email address:</label>
<input type="email" value="" name="EMAIL" class="required email form-control" id="mce-EMAIL">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_ed85ab30f6b221222ace0c2c2_5b3c455d72" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-primary"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
<hr>
<h2>Support our work</h2>
<p>GovTrack Insider is a pay-what-you-can service. Please consider supporting our work through a <a href="https://www.govtrack.us/accounts/membership">GovTrack Membership Subscription</a>!</p>
<hr>
</div>
<div class="col-md-7 col-md-pull-5">
<h2 style="margin: 1.5em 0; text-align: center"><a href="https://medium.com/govtrack-insider">Read these posts on Medium »</a></h2>
<div id="medium-posts">
</div>
</div>
</div> <!-- /row -->
<hr>
<footer>
<p>© <a href="http://www.civicimpulse.com">Civic Impulse LLC</a> 2015. See <a href="https://www.govtrack.us">GovTrack.us</a> for more about this site.</p>
</footer>
</div> <!-- /container -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script>
$(function() {
$.ajax({
//url: "https://medium.com/govtrack-insider?format=json",
url: "https://www.govtrack.us/medium-posts", // proxies ^
dataType: "text",
success: function(obj) {
// there's some crap before the JSON object starts
var i = obj.indexOf("{");
obj = obj.substring(i);
obj = JSON.parse(obj);
var posts = obj.payload.value.sections[1].postListMetadata.postIds;
for (var i = 0; i < posts.length; i++) {
var post = obj.payload.references.Post[posts[i]];
var collection = obj.payload.references.Collection[post.homeCollectionId];
console.log(post)
var n = $("<div class='medium-post'><h3><a/></h3><div class='preview'/><a class='more'>Continue reading »</a></div>")
n.find('h3 a').text(post.title);
n.find('a').attr('href', "https://medium.com/" + collection.slug + "/" + post.uniqueSlug);
var content = post.previewContent.bodyModel.paragraphs;
for (var j = 0; j < content.length; j++) {
if (content[j].type == 1) { // paragraph?
n.find('div.preview').append($('<p/>').text(content[j].text))
}
}
$('#medium-posts').append(n);
}
}
})
})
</script>
</body>
</html>