mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-31 01:11:25 +00:00
first steps
This commit is contained in:
parent
08c67b9e92
commit
66c6c5c39c
12 changed files with 131 additions and 60 deletions
|
@ -47,6 +47,14 @@ class DeveloperActions extends Actions
|
|||
];
|
||||
}
|
||||
|
||||
|
||||
public static function prepareQuickstartInstallPartial(array $vars)
|
||||
{
|
||||
return $vars + [
|
||||
'version' => 'foo'
|
||||
];
|
||||
}
|
||||
|
||||
public static function prepareFormNewDeveloperRewardPartial(array $vars)
|
||||
{
|
||||
return $vars + [
|
||||
|
|
|
@ -8,15 +8,15 @@ class DownloadActions extends Actions
|
|||
switch ($ext)
|
||||
{
|
||||
case 'deb':
|
||||
$uri = GitHub::getDownloadUrl(OS::OS_LINUX);
|
||||
$uri = GitHub::getAppDownloadUrl(OS::OS_LINUX);
|
||||
break;
|
||||
|
||||
case 'dmg':
|
||||
$uri = GitHub::getDownloadUrl(OS::OS_OSX);
|
||||
$uri = GitHub::getAppDownloadUrl(OS::OS_OSX);
|
||||
break;
|
||||
|
||||
case 'msi':
|
||||
$uri = GitHub::getDownloadUrl(OS::OS_WINDOWS);
|
||||
$uri = GitHub::getAppDownloadUrl(OS::OS_WINDOWS);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ class DownloadActions extends Actions
|
|||
'osIcon' => $osIcon,
|
||||
'prefineryUser' => $user ?: [],
|
||||
'downloadHtml' => View::exists('download/' . $partial) ?
|
||||
View::render('download/' . $partial, ['downloadUrl' => Github::getDownloadUrl($os)]) :
|
||||
View::render('download/' . $partial, ['downloadUrl' => Github::getAppDownloadUrl($os)]) :
|
||||
false
|
||||
]];
|
||||
}
|
||||
|
|
35
lib/thirdparty/Github.class.php
vendored
35
lib/thirdparty/Github.class.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
class Github
|
||||
{
|
||||
public static function getDownloadUrl($os, $cache = true)
|
||||
public static function getAppDownloadUrl($os, $cache = true)
|
||||
{
|
||||
if (!in_array($os, array_keys(OS::getAll())))
|
||||
{
|
||||
|
@ -32,6 +32,39 @@ class Github
|
|||
return null;
|
||||
}
|
||||
|
||||
public static function getDaemonDownloadUrl($os, $cache = true)
|
||||
{
|
||||
if (!in_array($os, array_keys(OS::getAll())))
|
||||
{
|
||||
throw new DomainException('Unknown OS');
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$releaseData = static::get('/repos/lbryio/lbry/releases/latest', $cache);
|
||||
foreach ($releaseData['assets'] as $asset)
|
||||
{
|
||||
echo '<pre>';
|
||||
print_r($asset);
|
||||
echo '</pre>';
|
||||
$ext = substr($asset['name'], -4);
|
||||
if (
|
||||
($os == OS::OS_LINUX && ($ext == '.deb' || in_array($asset['content_type'], ['application/x-debian-package', 'application/x-deb']))) ||
|
||||
($os == OS::OS_OSX && ($ext == '.dmg' || in_array($asset['content_type'], ['application/x-diskcopy', 'application/x-apple-diskimage']))) ||
|
||||
($os == OS::OS_WINDOWS && $ext == '.exe')
|
||||
)
|
||||
{
|
||||
return $asset['browser_download_url'];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function get($endpoint, $cache = true)
|
||||
{
|
||||
$twoHoursInSeconds = 7200;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<h3>Download</h3>
|
||||
<pre class="code-bash">
|
||||
<?php echo Github::getDaemonDownloadUrl(OS::OS_LINUX) ?>
|
||||
<?php echo Github::getDaemonDownloadUrl(OS::OS_WINDOWS) ?>
|
||||
<?php echo Github::getDaemonDownloadUrl(OS::OS_OSX) ?>
|
||||
</pre>
|
||||
<table class="quickstart__table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -4,20 +4,18 @@
|
|||
<?php if ($showLearnFooter): ?>
|
||||
<?php echo View::render('nav/_learnFooter') ?>
|
||||
<?php endif ?>
|
||||
<div class="footer-standard">
|
||||
<div class="content">
|
||||
<nav class="control-group">
|
||||
<div class="control-item">
|
||||
<a href="/"><?php echo __('nav.home') ?></a>
|
||||
</div>
|
||||
<?php echo View::render('nav/_globalItems') ?>
|
||||
<div class="control-item">
|
||||
<a href="https://en.wikipedia.org/wiki/AACS_encryption_key_controversy" class="footer-img-link">
|
||||
<img src="/img/Free-speech-flag.svg" alt="Free Speech Flag" height="30"/>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="footer-standard <?php echo $isDark ? 'footer-standard--dark' : 'footer-standard--light' ?>">
|
||||
<nav class="control-group">
|
||||
<div class="control-item">
|
||||
<a href="/"><?php echo __('nav.home') ?></a>
|
||||
</div>
|
||||
<?php echo View::render('nav/_globalItems') ?>
|
||||
<div class="control-item">
|
||||
<a href="https://en.wikipedia.org/wiki/Free_Speech_Flag" class="footer-img-link">
|
||||
<img src="/img/Free-speech-flag.svg" alt="Free Speech Flag" height="30"/>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php foreach([
|
||||
'/get' => __('nav.get'),
|
||||
'/news' => __('nav.news'),
|
||||
'/learn' => __('nav.learn')
|
||||
'/learn' => __('nav.learn'),
|
||||
'/news' => __('nav.news')
|
||||
] as $url => $label): ?>
|
||||
<div class="control-item">
|
||||
<a href="<?php echo $url ?>" <?php echo $selectedItem === $url ? 'class="nav-active"' : ''?>><?php echo $label ?></a>
|
||||
|
|
|
@ -2,28 +2,27 @@
|
|||
<?php define('HEADER_RENDERED', 1) ?>
|
||||
<?php extract([
|
||||
'isDark' => false,
|
||||
'isAbsolute' => false
|
||||
'isAbsolute' => false,
|
||||
'isLogoOnly' => false
|
||||
], EXTR_SKIP) ?>
|
||||
<div class="header <?php echo $isAbsolute ? 'header-absolute' : '' ?> <?php echo $isDark ? 'header-dark' : 'header-light' ?>">
|
||||
<div class="header-content">
|
||||
<a href="/" class="primary-logo">
|
||||
<img src="<?php echo $isDark ? View::imagePath('header-logo-light.png') : View::imagePath('header-logo-dark2.png') ?>" alt="LBRY" />
|
||||
<?php /*
|
||||
<img src="<?php echo View::imagePath('header-logo-light.png') ?>" alt="LBRY" class="logo-light" />
|
||||
<img src="<?php echo View::imagePath('header-logo-dark.png') ?>" alt="LBRY" class="logo-dark" />
|
||||
*/ ?>
|
||||
</a>
|
||||
<div class="mobile header-navigation-mobile">
|
||||
<a href="javascript:;" data-action="toggle-class" data-for=".header" data-class="header-open">
|
||||
<span class="icon icon-bars"></span>
|
||||
<span class="icon icon-close"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="fullscreen header-navigation-fullscreen">
|
||||
<nav class="control-group">
|
||||
<?php echo View::render('nav/_globalItems') ?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php if (!$isLogoOnly): ?>
|
||||
<div class="mobile header-navigation-mobile">
|
||||
<a href="javascript:;" data-action="toggle-class" data-for=".header" data-class="header-open">
|
||||
<span class="icon icon-bars"></span>
|
||||
<span class="icon icon-close"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="fullscreen header-navigation-fullscreen">
|
||||
<nav class="control-group">
|
||||
<?php echo View::render('nav/_globalItems') ?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<div class="bg-image-full" style="background-image: url(https://s3.amazonaws.com/files.lbry.io/cover-home2.jpg)"></div>
|
||||
<div class="bg-image-full" style="background-color: white" <?php //style="background-image: url(https://s3.amazonaws.com/files.lbry.io/cover-home2.jpg)" ?>></div>
|
||||
<?php Response::setMetaTitle(__('title.home')) ?>
|
||||
<?php Response::setMetaDescription(__('description.home')) ?>
|
||||
<?php echo View::render('nav/_header', ['isDark' => true]) ?>
|
||||
<?php echo View::render('nav/_header', ['isDark' => false, 'isLogoOnly' => false]) ?>
|
||||
<main class="column-fluid">
|
||||
<div class="span12">
|
||||
<div class="cover cover-dark">
|
||||
<div class="content content-wide content-dark">
|
||||
<div class="text-center">
|
||||
<h1 class="cover-title">{{global.tagline}}</h1>
|
||||
<h2 class="cover-subtitle" style="max-width: 600px; margin-left: auto; margin-right: auto">{{global.sentence}}</h2>
|
||||
<div class="cover cover-light cover-center">
|
||||
<div class="content content-wide content-light" style="max-width: 800px">
|
||||
<div class="spacer2">
|
||||
<h1 class="cover-title cover-title-flat">Content Freedom</h1>
|
||||
<h2 class="cover-subtitle cover-title-flat">Watch, read or play what you choose. Earn 100% of the price you decide.</h2>
|
||||
<h3 class="cover-subtitle cover-title-flat">You control your data. You own the network. Indeed, <em>you</em> are the network.</h3>
|
||||
<h3 class="cover-subtitle cover-title-flat">Find Hollywood films, college lessons, amazing streamers and more on the first open, global, and distributed digital bazaar.</h3>
|
||||
</div>
|
||||
<div class="control-group spacer2 text-center">
|
||||
<div class="control-item">
|
||||
<a href="/get" class="btn-primary">{{global.get}}</a>
|
||||
<a href="/get" class="btn-primary btn-large">Join LBRY</a>
|
||||
</div>
|
||||
<div class="control-item">
|
||||
<a href="/learn" class="btn-alt">{{global.learn}}</a>
|
||||
<a href="/learn" class="btn-link btn-large">{{global.learn}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="video" style="margin-bottom: 80px">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/DjouYBEkQPY" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<?php /*
|
||||
<div class="content content-dark">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
|
@ -37,8 +37,9 @@
|
|||
<div class="span4 text-center">
|
||||
<a width="300" class="twitter-timeline" href="https://twitter.com/LBRYio" data-widget-id="671104143034073088">{{social.tweets}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div> */ ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php echo View::render('nav/_footer', ['isDark' => false]) ?>
|
||||
|
|
|
@ -114,7 +114,7 @@ a:hover img
|
|||
}
|
||||
}
|
||||
|
||||
.btn-primary, .btn-alt
|
||||
.btn-primary, .btn-alt, .btn-link
|
||||
{
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
@ -129,6 +129,17 @@ a:hover img
|
|||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.btn-link
|
||||
{
|
||||
@include anchor($color-primary);
|
||||
}
|
||||
.btn-large
|
||||
{
|
||||
height: $spacing-vertical * 2;
|
||||
line-height: $spacing-vertical * 2;
|
||||
font-size: 1.5em;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.btn-primary
|
||||
{
|
||||
color: white;
|
||||
|
|
|
@ -45,15 +45,15 @@
|
|||
|
||||
&.content-dark
|
||||
{
|
||||
color: #e8e8e8;
|
||||
color: $color-content-dark;
|
||||
h1, h2, h3, h4, h5, h6 { color: #fff; }
|
||||
.link-primary { color: $color-light-alt; }
|
||||
.meta { color: #dddddd; }
|
||||
.meta { color: $color-meta-dark; }
|
||||
}
|
||||
|
||||
&:not(.content-dark), &.content-light
|
||||
{
|
||||
color: #333;
|
||||
color: $color-content-light;
|
||||
h1, h2, h3, h4, h5, h6
|
||||
{
|
||||
color: $color-text-dark;
|
||||
|
@ -174,7 +174,6 @@
|
|||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
}
|
||||
.content-inset
|
||||
{
|
||||
|
|
|
@ -8,6 +8,9 @@ $color-text-dark: #000;
|
|||
$color-money: #216C2A;
|
||||
$color-meta-light: #505050;
|
||||
$color-meta-lighter: #999999;
|
||||
$color-meta-dark: #dddddd;
|
||||
$color-content-light: #333333;
|
||||
$color-content-dark: #e8e8e8;
|
||||
$color-info-bg: #3a779d;
|
||||
|
||||
$font-size: 16px;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
@import "global";
|
||||
|
||||
$color-nav-border: #ddd;
|
||||
$color-nav-border-light: #ddd;
|
||||
$color-nav-border-dark: #ddd;
|
||||
|
||||
.header
|
||||
{
|
||||
|
@ -41,7 +42,7 @@ $color-nav-border: #ddd;
|
|||
.header-light
|
||||
{
|
||||
color: $color-text-dark;
|
||||
border-bottom: 1px $color-nav-border solid;
|
||||
border-bottom: 1px $color-nav-border-light solid;
|
||||
background-color: white;
|
||||
.logo-light { display: none; }
|
||||
}
|
||||
|
@ -119,11 +120,24 @@ $color-nav-border: #ddd;
|
|||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
line-height: $spacing-vertical * 2;
|
||||
color: #666;
|
||||
border-top: 1px $color-nav-border solid;
|
||||
border-bottom: 1px $color-nav-border solid;
|
||||
padding: $spacing-vertical / 2 0;
|
||||
@include jumpingScrollbarFix();
|
||||
img
|
||||
{
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
.footer-standard--light
|
||||
{
|
||||
color: $color-content-light;
|
||||
border-top: 1px $color-nav-border-light solid;
|
||||
border-bottom: 1px $color-nav-border-light solid;
|
||||
}
|
||||
.footer-standard--dark
|
||||
{
|
||||
color: $color-content-dark;
|
||||
}
|
||||
.footer-img-link
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue