Update index.html
This commit is contained in:
parent
b3cd44759c
commit
cb0c4c0620
@ -14,6 +14,7 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
background-image: url("../img/Background.png");
|
background-image: url("../img/Background.png");
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
|
||||||
}
|
}
|
||||||
.rant-top-bar {
|
.rant-top-bar {
|
||||||
@ -30,11 +31,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
||||||
<script src="https://devrant.io/static/devrant/js/script.js?v=23"></script>
|
|
||||||
<script src="https://devrant.io/static/devrant/js/js.cookie-2.1.1.min.js"></script>
|
|
||||||
<script src="https://devrant.io/static/devrant/js/landing.js?v=5"></script>
|
|
||||||
|
|
||||||
<script src="./json.js"></script>
|
|
||||||
|
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body >
|
<body >
|
||||||
|
|
||||||
@ -50,10 +50,45 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="interior-centered">
|
<div class="interior-centered">
|
||||||
<div class="interior-content" style="min-height: 804px;">
|
<div class="interior-content" style="min-height: 804px;background-color:white;">
|
||||||
|
|
||||||
<div class="body-col1">
|
<div class="body-col1">
|
||||||
|
<div class="body-col1-content">
|
||||||
|
|
||||||
|
<div style="background-color:#243447;padding:15px;border-radius:10px;color:white;">
|
||||||
|
<img src="https://pbs.twimg.com/profile_images/884167837891342336/F8JOfFAf_400x400.jpg">
|
||||||
<h1>RetryLife</h1>
|
<h1>RetryLife</h1>
|
||||||
|
<p>Canada</p>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div style="padding:6px; background-color:#1ca2f2; border-radius:8px;">
|
||||||
|
<a href="https://twitter.com/retrylife_music" class="twitter-follow-button" data-show-count="false">Follow @retrylife_music</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="padding:6px; background-color:#1ca2f2; border-radius:8px;">
|
||||||
|
<a href="https://twitter.com/ewpratten" class="twitter-follow-button" data-show-count="false">Follow @ewpratten</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="padding:6px; background-color:#1ca2f2; border-radius:8px;">
|
||||||
|
<a href="https://twitter.com/nsdesjardins345" class="twitter-follow-button" data-show-count="false">Follow @nsdesjardins345</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="padding:6px; background-color:#ff0000; border-radius:8px;">
|
||||||
|
<a href="https://www.youtube.com/channel/UCrHT3Lt0Mg90bspbMHJfTcA?sub_confirmation=1">Subscribe to RetryLife Official</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="padding:6px; background-color:#ff0000; border-radius:8px;">
|
||||||
|
<a href="https://www.youtube.com/channel/UCxzARKt0_U0sLHbF4pDN1Pw?sub_confirmation=1">Subscribe to Nathan Desjardins</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="body-col2 page-feed">
|
<div class="body-col2 page-feed">
|
||||||
@ -61,14 +96,83 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="rantlist-bg">
|
<div class="rantlist-bg">
|
||||||
<ul class="rantlist">
|
|
||||||
|
|
||||||
|
|
||||||
<li class="rant-comment-row-widget" data-id="829770" data-type="rant">
|
<?php
|
||||||
<div class="rantlist-title-text">The Lost Warrior</div>
|
function getContent() {
|
||||||
<img src="http://art.ngfiles.com/images/477000/477954_glitchop_the-lost-warrior-2.png" width="100%" alt="Card image cap">
|
//Thanks to https://davidwalsh.name/php-cache-function for cache idea
|
||||||
</ul>
|
$file = "./feed-cache.txt";
|
||||||
</div>
|
$current_time = time();
|
||||||
|
$expire_time = 5 * 60;
|
||||||
|
$file_time = filemtime($file);
|
||||||
|
if(file_exists($file) && ($current_time - $expire_time < $file_time)) {
|
||||||
|
return file_get_contents($file);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$content = getFreshContent();
|
||||||
|
file_put_contents($file, $content);
|
||||||
|
return $content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getFreshContent() {
|
||||||
|
$html = "";
|
||||||
|
$newsSource = array(
|
||||||
|
array(
|
||||||
|
"title" => "RetryLife-all",
|
||||||
|
"url" => "http://www.rssmix.com/u/8252161/rss.xml"
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
|
function getFeed($url){
|
||||||
|
$rss = simplexml_load_file($url);
|
||||||
|
$count = 0;
|
||||||
|
$html .= '<ul class="rantlist">';
|
||||||
|
foreach($rss->channel->item as$item) {
|
||||||
|
$count++;
|
||||||
|
if($count > 1000){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$html .= '><a href="'.htmlspecialchars($item->link).'"><li class="rant-comment-row-widget" data-id="829770" data-type="rant" style="background-color:#243447;color:white;"><div class="rantlist-title-text" > '.htmlspecialchars($item->description).'</div></li>';
|
||||||
|
|
||||||
|
}
|
||||||
|
$html .= '</ul>';
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
print getContent();
|
||||||
|
echo $html;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$files = glob('content/*.{json}', GLOB_BRACE);
|
||||||
|
foreach($files as $file) {
|
||||||
|
//do your work here
|
||||||
|
|
||||||
|
|
||||||
|
$url = $file;
|
||||||
|
$content = file_get_contents($url);
|
||||||
|
$json = json_decode($content, true);
|
||||||
|
echo '<li class="rant-comment-row-widget" data-id="829770" data-type="rant" style="background-color:#243447;color:white;"><div class="rantlist-title-text" >';
|
||||||
|
echo $json{title};
|
||||||
|
echo " - ";
|
||||||
|
echo $json{author};
|
||||||
|
echo '</div> <';
|
||||||
|
echo $json{type};
|
||||||
|
echo ' src="';
|
||||||
|
echo $json{src}; echo '" href="';
|
||||||
|
echo $json{href};
|
||||||
|
echo '" width=100%>';
|
||||||
|
echo $json{body};
|
||||||
|
echo '</';
|
||||||
|
echo $json{type};
|
||||||
|
echo '>';
|
||||||
|
echo '</li>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user