relative urls

This commit is contained in:
Alex Grintsvayg 2016-11-02 11:56:36 -04:00
parent d7c1a69fe0
commit 6eedbc12f4
5 changed files with 11 additions and 11 deletions

View file

@ -59,7 +59,7 @@ class Response
public static function getMetaImages()
{
return static::$metaImages ?: ['https://lbry.io/img/lbry-dark-1600x528.png'];
return static::$metaImages ?: [Request::getHostAndProto() . '/img/lbry-dark-1600x528.png'];
}
public static function setMetaTitle($title)

View file

@ -2,17 +2,17 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{rss.title}}</title>
<link>https://lbry.io<?php echo ContentActions::URL_NEWS ?></link>
<link><?php echo Request::getHostAndProto() . ContentActions::URL_NEWS ?></link>
<description>{{rss.description}}</description>
<generator>https://github.com/lbryio/lbry.io</generator>
<language>{{rss.lang}}</language>
<?php //<lastBuildDate>Sat, 07 Sep 2002 09:42:31 GMT</lastBuildDate> ?>
<atom:link href="https://lbry.io<?php echo ContentActions::URL_NEWS . '/' . ContentActions::SLUG_RSS ?>" rel="self" type="application/rss+xml" />
<atom:link href="<?php echo Request::getHostAndProto() . ContentActions::URL_NEWS . '/' . ContentActions::SLUG_RSS ?>" rel="self" type="application/rss+xml" />
<?php foreach ($posts as $post): ?>
<item>
<title><?php echo htmlspecialchars($post->getTitle()) ?></title>
<link>https://lbry.io/<?php echo $post->getRelativeUrl() ?></link>
<guid>https://lbry.io/<?php echo $post->getRelativeUrl() ?></guid>
<link><?php echo Request::getHostAndProto() . $post->getRelativeUrl() ?></link>
<guid><?php echo Request::getHostAndProto() . $post->getRelativeUrl() ?></guid>
<pubDate><?php echo $post->getDate()->format('r') ?></pubDate>
<author><?php echo htmlspecialchars($post->getAuthorEmail()) ?> (<?php echo htmlspecialchars($post->getAuthorName()) ?>)</author>
<description><?php echo htmlspecialchars($post->getContentText(50, true)) ?></description>

View file

@ -1,7 +1,7 @@
<h3>{{title.refer}}</h3>
<p>{{page.refer.earn1}} <?php echo i18n::formatCredits($prefineryUser['id'] < 75000 ? 10 : 5) ?> {{page.refer.earn2}}</p>
<p>
<input type="text" value="https://lbry.io/get?r=<?php echo $referralCode ?>" style="width: 100%; border-color: #155B4A" readonly id="referral-url-input"/>
<input type="text" value="<?php echo Request::getHostAndProto() ?>/get?r=<?php echo $referralCode ?>" style="width: 100%; border-color: #155B4A" readonly id="referral-url-input"/>
<?php js_start() ?>
$('#referral-url-input')
.focus(function() { $(this).select(); })

View file

@ -1,5 +1,5 @@
<?php NavActions::setNavUri('/learn') ?>
<?php Response::addMetaImage('https://lbry.io/img/cover-team.jpg') ?>
<?php Response::addMetaImage(Request::getHostAndProto() . '/img/cover-team.jpg') ?>
<?php Response::setMetaDescription('description.team') ?>
<?php echo View::render('nav/_header', ['isDark' => false]) ?>
<main>

View file

@ -37,7 +37,7 @@
<div class="text-center meta spacer1">
<img src="/img/lbry-ui.png"/>
<div class="content-inset">
A user searches and prepares to stream and the film <em>Its a Wonderful Life</em>, located at <a href="lbry://wonderfullife">lbry://wonderfullife</a>, via a completely decentralized network. Try it out for yourself at <a href="https://lbry.io/get">lbry.io/get</a>.
A user searches and prepares to stream and the film <em>Its a Wonderful Life</em>, located at <a href="lbry://wonderfullife">lbry://wonderfullife</a>, via a completely decentralized network. Try it out for yourself at <a href="/get">lbry.io/get</a>.
</div>
</div>
@ -115,7 +115,7 @@
<p>Other than the usage of the LBRY blockchain to store names and metadata, there are only minor differences between the blockchains of LBRY and Bitcoin, and the changes are generally consensus improvements. Weve buffed the hashing algorithm, smoothed the block reward function, increased the block size, increased the total number of credits, and prepared for offchain settlement.</p>
<p>The LBRY blockchain simply maintains LBC balances and a content namespace/catalogue. The next part, LBRYnet, specifies what to do with this data. To compare to the existing web, the blockchain is like the domain system (it maintains a listing of what is available), while the next piece makes it possible to actually fetch and pay for content.</p>
<footer> If youre a Bitcoiner wondering why we dont use the Bitcoin blockchain, you can read a detailed answer to that question <a href="https://blog.lbry.io/why-doesnt-lbry-just-use-bitcoin/">here</a>.</footer>
<footer> If youre a Bitcoiner wondering why we dont use the Bitcoin blockchain, you can read a detailed answer to that question <a href="/news/why-doesnt-lbry-just-use-bitcoin">here</a>.</footer>
<h4>Part B: The Data Network (LBRYNet)</h4>
<p>LBRYNet is the layer that makes the LBRY blockchain useful beyond a simple payment system. It says what to do with the information available in the LBRY blockchain, how to issue payments, how to look up a content identifier, and so on. </p>
@ -226,7 +226,7 @@
<p>If LBRY succeeds, we will enter a world that is even more creative, connected, and conservatory. We will waste less and we make more. We will create a world where a teenager in Kenya and a reality star in Los Angeles use the same tool to search the same network and have access to the same results -- a world where information, knowledge, and imagination know no borders. </p>
<p>Build our dream with us! Download LBRY at <a class="link-primary" href="https://lbry.io/get">lbry.io/get</a>.</p>
<p>Build our dream with us! Download LBRY at <a class="link-primary" href="/get">lbry.io/get</a>.</p>
</section>
</div>
<?php echo View::render('nav/_learnFooter') ?>
@ -264,7 +264,7 @@
<p>Other than the usage of the LBRY blockchain to store names and metadata, there are only minor differences between the blockchains of LBRY and Bitcoin, and the changes are generally consensus improvements. Weve buffed the hashing algorithm, smoothed the block reward function, increased the block size, increased the total number of credits, and prepared for offchain settlement.</p>
<p>The LBRY blockchain simply maintains LBC balances and a content namespace/catalogue. The next part, LBRYnet, specifies what to do with this data. To compare to the existing web, the blockchain is like the domain system (it maintains a listing of what is available), while the next piece makes it possible to actually fetch and pay for content.</p>
<footer> If youre a Bitcoiner wondering why we dont use the Bitcoin blockchain, you can read a detailed answer to that question <a href="https://blog.lbry.io/why-doesnt-lbry-just-use-bitcoin/">here</a>.</footer>
<footer> If youre a Bitcoiner wondering why we dont use the Bitcoin blockchain, you can read a detailed answer to that question <a href="/news/why-doesnt-lbry-just-use-bitcoin/">here</a>.</footer>
<h4>Part B: The Data Network (LBRYNet)</h4>
<p>LBRYNet is the layer that makes the LBRY blockchain useful beyond a simple payment system. It says what to do with the information available in the LBRY blockchain, how to issue payments, how to look up a content identifier, and so on. </p>