diff options
-rw-r--r-- | html_template/BAKtemplate.html | 118 | ||||
-rw-r--r-- | html_template/BAKunbiased.css (renamed from html_template/testtemplate.css) | 72 | ||||
-rw-r--r-- | html_template/newtemplate.html | 52 | ||||
-rw-r--r-- | html_template/template.html | 176 | ||||
-rw-r--r-- | html_template/unbiased.css | 89 | ||||
-rw-r--r-- | main.py | 4 |
6 files changed, 338 insertions, 173 deletions
diff --git a/html_template/BAKtemplate.html b/html_template/BAKtemplate.html new file mode 100644 index 0000000..ab1dbb9 --- /dev/null +++ b/html_template/BAKtemplate.html @@ -0,0 +1,118 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <link rel="stylesheet" href="html_template/unbiased.css"> + <link rel="stylesheet" href="unbiased.css"> + <title>UnBiased</title> + </head> +<body> + +<div id="page-header"> + <span id="title-1" class="title">un</span><span id="title-2" class="title">biased</span><br /> + <span id="subtitle">a different way to read the news</span> + <p id="timestamp">Last updated: xxTimexx</p> +</div> + +<div id="page-container"> +<div id="top-stories"> + <div class="top-story"> + <a target="_blank" href="redirects/h1-1.html" id="top-story-1"> + <div class="top-stories-img"> + <img src="xxImg1-1xx" /> + </div> + <div class="top-stories-hed">xxTitle1-1xx</div> + </a> + <div class="top-stories-desc">xxDesc1-1xx</div> + </div> + + <div class="top-story"> + <a target="_blank" href="redirects/h1-2.html" id="top-story-2"> + <div class="top-stories-img"> + <img src="xxImg1-2xx" /> + </div> + <div class="top-stories-hed">xxTitle1-2xx</div> + </a> + <div class="top-stories-desc">xxDesc1-2xx</div> + </div> + + <div class="top-story"> + <a target="_blank" href="redirects/h1-3.html" id="top-story-3"> + <div class="top-stories-img"> + <img src="xxImg1-3xx" /> + </div> + <div class="top-stories-hed">xxTitle1-3xx</div> + </a> + <div class="top-stories-desc">xxDesc1-3xx</div> + </div> +</div> + +<div id="middle-stories"> + + <a target="_blank" href="redirects/h2-1.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-1xx" /> + <p class="middle-stories-hed">xxTitle2-1xx</p> + </div> + </div> + </a> + + <a target="_blank" href="redirects/h2-2.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-2xx" /> + <span class="middle-stories-hed">xxTitle2-2xx</span> + </div> + </div> + </a> + + <a target="_blank" href="redirects/h2-3.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-3xx" /> + <span class="middle-stories-hed">xxTitle2-3xx</span> + </div> + </div> + </a> + + + <a target="_blank" href="redirects/h2-4.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-4xx" /> + <span class="middle-stories-hed">xxTitle2-4xx</span> + </div> + </div> + </a> + + <a target="_blank" href="redirects/h2-5.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-5xx" /> + <span class="middle-stories-hed">xxTitle2-5xx</span> + </div> + </div> + </a> + + <a target="_blank" href="redirects/h2-6.html" > + <div class="middle-story"> + <div class="middle-stories-img"> + <img src="xxImg2-6xx" /> + <span class="middle-stories-hed">xxTitle2-6xx</span> + </div> + </div> + </a> + +</div> + +<div id="bottom-stories"> +</div> + +</div> + +<div id="sources"> + Sources: xxSourcesxx +</div> +</body> +</html> diff --git a/html_template/testtemplate.css b/html_template/BAKunbiased.css index 2cab020..49b6dce 100644 --- a/html_template/testtemplate.css +++ b/html_template/BAKunbiased.css @@ -1,17 +1,9 @@ -/*body{ - width:900px; - margin-left:auto; - margin-right:auto; -}*/ - - a:link, a:visited, a:hover, a:active { color: #00f; text-decoration:none; } #page-header{ - width:100%; text-align:center; padding:.5em 0 1em; margin-bottom:1em; @@ -41,39 +33,35 @@ a:link, a:visited, a:hover, a:active { } #page-container{ - width:900px; + width:1150px; + padding:0 1em; margin-left:auto; margin-right:auto; } #top-stories{ - width:95%; - display:block; - overflow:auto; - padding:10px; + width:1150px; margin-left:auto; margin-right:auto; font-size:1.25em; - text-align:center; } .top-story{ - display:inline-block; - text-align:left; - width:360px; - background:#fff; - margin:10px; - padding:10px; - border:2px solid #ccc; + width:350px; + float:left; + margin:0 .5em; } .top-stories-img{ width:350px; height:200px; overflow:hidden; - background-size: cover; - background-position: center center; - margin:0 auto; +} + +.top-stories-img img{ + width:100%; + display:block; + vertical-align:text-bottom; } .top-stories-desc{ @@ -83,50 +71,30 @@ a:link, a:visited, a:hover, a:active { #middle-stories{ clear:both; - width:500px; + width:1000px; margin:0 auto; - padding:0; - display:block; - overflow:auto; - float:left; } .middle-story{ - margin:5px 10px; - padding:10px; - background:#fff; - border:2px solid #ddd; - width:460px; + margin:2em 5px; + width:45%; float:left; + height:100px; } -.middle-stories-img{ - width:150px; +.middle-story img{ + vertical-align:middle; height:100px; - overflow:hidden; - background-size: cover; - background-position: center center; float:left; + margin-right:1em; } .middle-stories-hed{ font-size:1.1em; - float:left; - width:300px; } -#bottom-stories{ - margin:0 10px; - padding:10px; +.middle-story p{ display:block; - overflow:auto; - float:left; - width:350px; - border:5px solid #ddd; -} - -.bottom-story{ - padding:15px 0; } #sources{ diff --git a/html_template/newtemplate.html b/html_template/newtemplate.html index e9715fc..7170a4a 100644 --- a/html_template/newtemplate.html +++ b/html_template/newtemplate.html @@ -10,7 +10,7 @@ <div id="page-header"> <span id="title-1" class="title">un</span><span id="title-2" class="title">biased</span><br /> <span id="subtitle">a different way to read the news</span> - <p id="timestamp">Last updated: xxTimexx</p> + <p id="timestamp">Last updated: Mon, Feb 13, 7:51pm EST</p> </div> <div id="page-container"> @@ -18,38 +18,38 @@ <div class="top-story"> <a target="_blank" href="redirects/h1-1.html" id="top-story-1"> - <div class="top-stories-img" style="background-image: url('xxImg1-1xx');" /> + <div class="top-stories-img" style="background-image: url('http://www.theblaze.com/wp-content/uploads/2017/02/GettyImages-465794068-1280x720.jpg');" /> </div> - <div class="top-stories-hed">xxTitle1-1xx</div> + <div class="top-stories-hed">Rand Paul and Cory Booker push bipartisan effort to limit solitary confinement for juveniles</div> </a> - <div class="top-stories-desc">xxDesc1-1xx</div> + <div class="top-stories-desc">Sen. Rand Paul (R-Ky) and Sen …</div> </div> <div class="top-story"> <a target="_blank" href="redirects/h1-2.html" id="top-story-2"> - <div class="top-stories-img" style="background-image: url('xxImg1-2xx');" /> + <div class="top-stories-img" style="background-image: url('http://cdn.weeklystandard.biz/cache/r960-90b8d8d5cbcef212ecae2a5c455fed8f.jpg');" /> </div> - <div class="top-stories-hed">xxTitle1-2xx</div> + <div class="top-stories-hed">Bibi and Donald</div> </a> - <div class="top-stories-desc">xxDesc1-2xx</div> + <div class="top-stories-desc">This week, Israel's prime minister will visit Washington and meet with our new president. They will have a complex agenda. Benjamin ...</div> </div> <div class="top-story"> <a target="_blank" href="redirects/h1-3.html" id="top-story-3"> - <div class="top-stories-img" style="background-image: url('xxImg1-3xx');" /> + <div class="top-stories-img" style="background-image: url('https://static01.nyt.com/images/2017/02/13/multimedia/DavidOyelowo-UnitedKingdom/DavidOyelowo-UnitedKingdom-facebookJumbo.png');" /> </div> - <div class="top-stories-hed">xxTitle1-3xx</div> + <div class="top-stories-hed">David Oyelowo on How to Play a Real King</div> </a> - <div class="top-stories-desc">xxDesc1-3xx</div> + <div class="top-stories-desc">He stars in “A United Kingdom,” about the Botswana leader who married a white woman and set off an international crisis.</div> </div> <div class="top-story"> <a target="_blank" href="redirects/h1-4.html" id="top-story-4"> - <div class="top-stories-img" style="background-image: url('xxImg1-4xx');" /> + <div class="top-stories-img" style="background-image: url('http://a57.foxnews.com/images.foxnews.com/content/fox-news/us/2017/02/13/judge-orders-ohio-village-to-pay-back-3-million-to-lead-footed-drivers/_jcr_content/par/featured-media/media-0.img.jpg/0/0/1487019011476.jpg?ve=1');" /> </div> - <div class="top-stories-hed">xxTitle1-4xx</div> + <div class="top-stories-hed">Judge orders Ohio village to pay back $3 million to lead-footed drivers</div> </a> - <div class="top-stories-desc">xxDesc1-4xx</div> + <div class="top-stories-desc">Speed cameras became a cash cow for the small village of New Miami, Ohio.</div> </div> </div> @@ -58,49 +58,49 @@ <a target="_blank" href="redirects/h2-1.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-1xx');"> + <div class="middle-stories-img" style="background-image: url('http://www.theblaze.com/wp-content/uploads/2017/02/GettyImages-635148734-1280x720.jpg');"> </div> - <div class="middle-stories-hed">xxTitle2-1xx</div> + <div class="middle-stories-hed">DHS says 75 percent of those detained in ICE raids last week were ‘criminal aliens’</div> </div> </a> <a target="_blank" href="redirects/h2-2.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-2xx');"> + <div class="middle-stories-img" style="background-image: url('http://a57.foxnews.com/media2.foxnews.com/BrightCove/694940094001/2017/02/12/0/0/694940094001_5320280093001_5320267547001-vs.jpg?ve=1');"> </div> - <div class="middle-stories-hed">xxTitle2-2xx</div> + <div class="middle-stories-hed">Drama grips Trump inner circle, as president charges ahead on agenda</div> </div> </a> <a target="_blank" href="redirects/h2-3.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-3xx');"> + <div class="middle-stories-img" style="background-image: url('http://ichef.bbci.co.uk/news/1024/cpsprodpb/C9C5/production/_94635615_6c33162f-1c24-487d-8a51-bb7b13ec063f.jpg');"> </div> - <div class="middle-stories-hed">xxTitle2-3xx</div> + <div class="middle-stories-hed">Ku Klux Klan killing: Frank Ancona's wife and stepson charged - BBC News</div> </div> </a> <a target="_blank" href="redirects/h2-4.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-4xx');"> + <div class="middle-stories-img" style="background-image: url('http://media1.s-nbcnews.com/j/newscms/2017_07/1900281/13217-oroville-dam-724a-rs_4a8b5ba9690488f11410f156833e1b70.nbcnews-fp-1200-800.jpg');"> </div> - <div class="middle-stories-hed">xxTitle2-4xx</div> + <div class="middle-stories-hed">Nearly 190,000 ordered to evacuate in California dam spillway failure</div> </div> </a> <a target="_blank" href="redirects/h2-5.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-5xx');"> + <div class="middle-stories-img" style="background-image: url('http://cbsnews1.cbsistatic.com/hub/i/2017/02/13/4ad800d9-69ba-4102-a8ec-af12e8eb6adb/021317-news.jpg');"> </div> - <div class="middle-stories-hed">xxTitle2-5xx</div> + <div class="middle-stories-hed">Jerry Sandusky's son, 41, arrested on child sex charges</div> </div> </a> <a target="_blank" href="redirects/h2-6.html" > <div class="middle-story"> - <div class="middle-stories-img" style="background-image: url('xxImg2-6xx');"> + <div class="middle-stories-img" style="background-image: url('https://static01.nyt.com/images/2017/02/14/us/14townhall1/14townhall1-facebookJumbo.jpg');"> </div> - <div class="middle-stories-hed">xxTitle2-6xx</div> + <div class="middle-stories-hed">Angry Town Hall Meetings on Health Care Law, and Few Answers</div> </div> </a> @@ -144,7 +144,7 @@ </div> <div id="sources"> - Sources: xxSourcesxx + Sources: BBC US, NBC News, CBS News, The Blaze, Weekly Standard, New York Times, Fox News </div> </body> </html> diff --git a/html_template/template.html b/html_template/template.html index 94a3796..87e34e8 100644 --- a/html_template/template.html +++ b/html_template/template.html @@ -2,7 +2,6 @@ <html>
<head>
<meta charset="utf-8">
- <link rel="stylesheet" href="html_template/unbiased.css">
<link rel="stylesheet" href="unbiased.css">
<title>UnBiased</title>
</head>
@@ -15,98 +14,131 @@ </div>
<div id="page-container">
-<div id="top-stories">
- <div class="top-story">
- <a target="_blank" href="redirects/h1-1.html" id="top-story-1">
- <div class="top-stories-img">
- <img src="xxImg1-1xx" />
- </div>
- <div class="top-stories-hed">xxTitle1-1xx</div>
- </a>
- <div class="top-stories-desc">xxDesc1-1xx</div>
+ <div id="top-stories">
+
+ <div class="top-story">
+ <a target="_blank" href="redirects/h1-1.html" id="top-story-1">
+ <div class="top-stories-img" style="background-image: url('xxImg1-1xx');" />
+ </div>
+ <div class="top-stories-hed">xxTitle1-1xx</div>
+ </a>
+ <div class="top-stories-desc">xxDesc1-1xx</div>
+ </div>
+
+ <div class="top-story">
+ <a target="_blank" href="redirects/h1-2.html" id="top-story-2">
+ <div class="top-stories-img" style="background-image: url('xxImg1-2xx');" />
+ </div>
+ <div class="top-stories-hed">xxTitle1-2xx</div>
+ </a>
+ <div class="top-stories-desc">xxDesc1-2xx</div>
+ </div>
+
+ <div class="top-story">
+ <a target="_blank" href="redirects/h1-3.html" id="top-story-3">
+ <div class="top-stories-img" style="background-image: url('xxImg1-3xx');" />
+ </div>
+ <div class="top-stories-hed">xxTitle1-3xx</div>
+ </a>
+ <div class="top-stories-desc">xxDesc1-3xx</div>
+ </div>
+
+ <div class="top-story">
+ <a target="_blank" href="redirects/h1-4.html" id="top-story-4">
+ <div class="top-stories-img" style="background-image: url('xxImg1-4xx');" />
+ </div>
+ <div class="top-stories-hed">xxTitle1-4xx</div>
+ </a>
+ <div class="top-stories-desc">xxDesc1-4xx</div>
+ </div>
+
</div>
- <div class="top-story">
- <a target="_blank" href="redirects/h1-2.html" id="top-story-2">
- <div class="top-stories-img">
- <img src="xxImg1-2xx" />
+ <div id="middle-stories">
+
+ <a target="_blank" href="redirects/h2-1.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-1xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-1xx</div>
</div>
- <div class="top-stories-hed">xxTitle1-2xx</div>
</a>
- <div class="top-stories-desc">xxDesc1-2xx</div>
- </div>
-
- <div class="top-story">
- <a target="_blank" href="redirects/h1-3.html" id="top-story-3">
- <div class="top-stories-img">
- <img src="xxImg1-3xx" />
+
+ <a target="_blank" href="redirects/h2-2.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-2xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-2xx</div>
+ </div>
+ </a>
+
+ <a target="_blank" href="redirects/h2-3.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-3xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-3xx</div>
+ </div>
+ </a>
+
+ <a target="_blank" href="redirects/h2-4.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-4xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-4xx</div>
</div>
- <div class="top-stories-hed">xxTitle1-3xx</div>
</a>
- <div class="top-stories-desc">xxDesc1-3xx</div>
+
+ <a target="_blank" href="redirects/h2-5.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-5xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-5xx</div>
+ </div>
+ </a>
+
+ <a target="_blank" href="redirects/h2-6.html" >
+ <div class="middle-story">
+ <div class="middle-stories-img" style="background-image: url('xxImg2-6xx');">
+ </div>
+ <div class="middle-stories-hed">xxTitle2-6xx</div>
+ </div>
+ </a>
+
+
</div>
-</div>
-
-<div id="middle-stories">
- <a target="_blank" href="redirects/h2-1.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-1xx" />
- <p class="middle-stories-hed">xxTitle2-1xx</p>
- </div>
+ <div id="bottom-stories">
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-1.html">xxTitle3-1xx</a>
</div>
- </a>
- <a target="_blank" href="redirects/h2-2.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-2xx" />
- <span class="middle-stories-hed">xxTitle2-2xx</span>
- </div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-2.html">xxTitle3-2xx</a>
</div>
- </a>
- <a target="_blank" href="redirects/h2-3.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-3xx" />
- <span class="middle-stories-hed">xxTitle2-3xx</span>
- </div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-3.html">xxTitle3-3xx</a>
</div>
- </a>
-
- <a target="_blank" href="redirects/h2-4.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-4xx" />
- <span class="middle-stories-hed">xxTitle2-4xx</span>
- </div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-4.html">xxTitle3-4xx</a>
</div>
- </a>
- <a target="_blank" href="redirects/h2-5.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-5xx" />
- <span class="middle-stories-hed">xxTitle2-5xx</span>
- </div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-5.html">xxTitle3-5xx</a>
</div>
- </a>
- <a target="_blank" href="redirects/h2-6.html" >
- <div class="middle-story">
- <div class="middle-stories-img">
- <img src="xxImg2-6xx" />
- <span class="middle-stories-hed">xxTitle2-6xx</span>
- </div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-6.html">xxTitle3-6xx</a>
</div>
- </a>
-</div>
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-7.html">xxTitle3-7xx</a>
+ </div>
-<div id="bottom-stories">
+ <div class="bottom-story">
+ <a target="_blank" href="redirects/h3-8.html">xxTitle3-8xx</a>
+ </div>
</div>
</div>
diff --git a/html_template/unbiased.css b/html_template/unbiased.css index ade390b..b632cdd 100644 --- a/html_template/unbiased.css +++ b/html_template/unbiased.css @@ -1,13 +1,26 @@ +/*body{
+ width:900px;
+ margin-left:auto;
+ margin-right:auto;
+}*/
+
+
+body{
+ margin:0;
+}
+
a:link, a:visited, a:hover, a:active {
color: #00f;
text-decoration:none;
}
#page-header{
+ width:100%;
text-align:center;
padding:.5em 0 1em;
margin-bottom:1em;
border-bottom:1px solid #000;
+ background:#fdf;
}
.title{
@@ -33,68 +46,102 @@ a:link, a:visited, a:hover, a:active { }
#page-container{
- width:1150px;
- padding:0 1em;
+ width:900px;
margin-left:auto;
margin-right:auto;
}
#top-stories{
- width:1150px;
+ width:95%;
+ display:block;
+ overflow:auto;
+ padding:10px;
margin-left:auto;
margin-right:auto;
- font-size:1.25em;
+ text-align:center;
}
.top-story{
- width:350px;
- float:left;
- margin:0 .5em;
+ display:inline-block;
+ vertical-align:top;
+ text-align:left;
+ width:360px;
+ height:322px;
+ overflow:hidden;
+ background:#fff;
+ margin:10px;
+ padding:10px;
+ border:2px solid #ccc;
}
.top-stories-img{
width:350px;
height:200px;
overflow:hidden;
+ background-size: cover;
+ background-position: center center;
+ margin:0 auto;
}
-.top-stories-img img{
- width:100%;
- display:block;
- vertical-align:text-bottom;
+.top-stories-hed{
+ font-weight:bold;
+ font-size:1.35em;
+ margin:10px 10px 0;
}
.top-stories-desc{
- font-size:.8em;
+ font-size:1em;
padding-top:.5em;
+ margin:0 .75em;
}
#middle-stories{
clear:both;
- width:1000px;
+ width:500px;
margin:0 auto;
+ padding:0;
+ display:block;
+ overflow:auto;
+ float:left;
}
.middle-story{
- margin:2em 5px;
- width:45%;
+ margin:5px 10px;
+ padding:10px;
+ background:#fff;
+ border:2px solid #ddd;
+ width:460px;
float:left;
- height:100px;
}
-.middle-story img{
- vertical-align:middle;
+.middle-stories-img{
+ width:150px;
height:100px;
+ overflow:hidden;
+ background-size: cover;
+ background-position: center center;
float:left;
- margin-right:1em;
}
.middle-stories-hed{
- font-size:1.1em;
+ font-size:1.2em;
+ float:left;
+ width:300px;
+ margin-left:10px;
}
-.middle-story p{
+#bottom-stories{
+ margin:0 10px;
+ padding:10px;
display:block;
+ overflow:auto;
+ float:left;
+ width:350px;
+ border:5px solid #ddd;
+}
+
+.bottom-story{
+ padding:15px 0;
}
#sources{
@@ -38,10 +38,10 @@ def run(): sourceList.append(NewsSource('CBS News', 'http://cbsnews.com', - ['<a href="'], + ['<h1 class="title">', '<a href="'], ['<li data-tb-region-item>', '<a href="'], [], - 'Big News Area Side Assets', '</a>' + None, None, #'Big News Area Side Assets', '</a>' 'Big News Area Side Assets', '</ul></div>', None, None)) |