mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
kit try 2
This commit is contained in:
parent
17a8428325
commit
1a66549f26
6 changed files with 131 additions and 36 deletions
|
@ -75,7 +75,11 @@ class ContentActions extends Actions
|
|||
$zip = new ZipArchive();
|
||||
$zip->open($zipPath, ZipArchive::OVERWRITE);
|
||||
|
||||
$zip->addFile(ROOT_DIR . '/posts/press.md', 'intro.txt');
|
||||
//file_get_contents fails on servers without proper SSL, so use live site always for now
|
||||
$html = file_get_contents('https://lbry.io/press-kit');
|
||||
// $html = file_get_contents('https://' . $_SERVER['HTTP_HOST'] . '/press-kit'));
|
||||
|
||||
$zip->addFromString('press.html', $html);
|
||||
|
||||
foreach(glob(ROOT_DIR . '/web/img/press/*') as $productImgPath)
|
||||
{
|
||||
|
@ -86,7 +90,7 @@ class ContentActions extends Actions
|
|||
|
||||
foreach(glob(ROOT_DIR . '/posts/bio/*.md') as $bioPath)
|
||||
{
|
||||
list($metadata, $bioHtml) = static::parseMarkdown($bioPath);
|
||||
list($metadata, $bioHtml) = View::parseMarkdown($bioPath);
|
||||
$zip->addFile($bioPath, '/team_bios/' . $metadata['name'] . ' - ' . $metadata['role'] . '.txt');
|
||||
}
|
||||
|
||||
|
@ -113,19 +117,11 @@ class ContentActions extends Actions
|
|||
]];
|
||||
}
|
||||
|
||||
protected static function parseMarkdown($path)
|
||||
{
|
||||
list($ignored, $frontMatter, $markdown) = explode('---', file_get_contents($path), 3);
|
||||
$metadata = Spyc::YAMLLoadString(trim($frontMatter));
|
||||
$html = ParsedownExtra::instance()->text(trim($markdown));
|
||||
return [$metadata, $html];
|
||||
}
|
||||
|
||||
public static function prepareBioPartial(array $vars)
|
||||
{
|
||||
$person = $vars['person'];
|
||||
$path = ROOT_DIR . '/posts/bio/' . $person . '.md';
|
||||
list($metadata, $bioHtml) = static::parseMarkdown($path);
|
||||
$path = 'bio/' . $person . '.md';
|
||||
list($metadata, $bioHtml) = View::parseMarkdown($path);
|
||||
return $metadata + [
|
||||
'imgSrc' => '/img/team/' . $person . '-644x450.jpg',
|
||||
'bioHtml' => $bioHtml,
|
||||
|
|
32
posts/press-kit.md
Normal file
32
posts/press-kit.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
###Press & Media Inquiries
|
||||
|
||||
Mike Vine, LBRY Evangelist<br/>
|
||||
[mike@lbry.io](mailto:mike@lbry.io) • [917-719-6333](tel:9177196333)
|
||||
|
||||
###Company Profile
|
||||
|
||||
LBRY’s goal: Every film, song, book & game ever made – accessible anywhere.
|
||||
|
||||
LBRY uses blockchain technology to provide a new way for people to publish and share content with each other – with no corporate middleman. It is a decentralized, censorship-resistant, open-source, peer-to-peer information marketplace and discovery protocol. LBRY was incorporated in 2015 by Jeremy Kauffman, and the team has expanded steadily since then. An alpha client was released in late October 2015, and an invite-only beta client will be released imminently. LBRY is powered by its own cryptocoin, LBRY Credits (similar to Bitcoin), which began being mined on June 27th, 2016.
|
||||
|
||||
###FAQ
|
||||
|
||||
- [LBRY in 100 Seconds (Video)](https://www.youtube.com/watch?v=qkUA0vTWM7g)
|
||||
- [How Does LBRY Work, Exactly?](https://lbry.io/news/introducing-lbry-the-bitcoin-of-content)
|
||||
- [Why Doesn't LBRY Just Use Bitcoin?](https://lbry.io/news/why-doesnt-lbry-just-use-bitcoin)
|
||||
|
||||
### Media Mentions
|
||||
|
||||
- [LBRY and decentralised apps - an interview with Jeremy Kauffman](http://goodtechnologyproject.org/blog/2016/02/07/lbry-and-decentralised-apps-an-interview-with-jeremy-kauffman/), **Good Technology Project, February 2016]**
|
||||
- [The Appcoin Revolution: Interview with Mike Vine of LBRY](http://cointelegraph.com/news/the-appcoin-revolution-interview-with-mike-vine-of-lbry), **CoinTelegraph, February 2016**
|
||||
- [Alexandria vs LBRY - Which will be the file sharing application of the next generation?](http://bravenewcoin.com/news/alexandria-vs-lbry-which-will-be-the-file-sharing-application-of-the-next-generation/), **BraveNewCoin, December 2015**
|
||||
- [LBRY: The Lovechild of Bitcoin, BitTorrent & Storj](http://cointelegraph.com/news/lbry-the-lovechild-of-bitcoin-bittorrent-storj), **CoinTelegraph, October 2015**
|
||||
- [This New Hampshire Startup's Plan to Fight Netflix is Equal Parts BitTorrent and Bitcoin](http://bostinno.streetwise.co/2015/09/18/bitcoin-startups-lbry-combines-bittorrent-and-bitcoin-to-fight-netflix/), **Bostinno, September 2015**
|
||||
|
||||
### Contact & Social Media
|
||||
|
||||
- Web: [https://lbry.io/](https://lbry.io/)
|
||||
- Facebook: [https://www.facebook.com/lbryio](https://www.facebook.com/lbryio)
|
||||
- Twitter: [https://twitter.com/lbryio](https://twitter.com/lbryio)
|
||||
- Reddit: [https://www.reddit.com/r/lbry](https://www.reddit.com/r/lbry)
|
||||
- Mailing List: [https://lbry.io/join-list](https://lbry.io/join-list) - **Sign up to follow along as we build LBRY**
|
|
@ -1 +0,0 @@
|
|||
LBRY is a new method for people to publish, share and purchase content with one another online.
|
|
@ -19,6 +19,11 @@ class View
|
|||
|
||||
public static function render($template, array $vars = [])
|
||||
{
|
||||
if (static::isMarkdown($template))
|
||||
{
|
||||
return static::markdownToHtml(static::getFullPath($template));
|
||||
}
|
||||
|
||||
if (!static::exists($template) || substr_count($template, '/') !== 1)
|
||||
{
|
||||
throw new InvalidArgumentException(sprintf('The template "%s" does not exist or is unreadable.', $template));
|
||||
|
@ -53,13 +58,32 @@ class View
|
|||
return ob_get_clean();
|
||||
}
|
||||
|
||||
public static function markdownToHtml($path)
|
||||
{
|
||||
return ParsedownExtra::instance()->text(trim(file_get_contents($path)));
|
||||
}
|
||||
|
||||
public static function exists($template)
|
||||
{
|
||||
return is_readable(static::getFullPath($template));
|
||||
}
|
||||
|
||||
protected static function isMarkdown($nameOrPath)
|
||||
{
|
||||
return strlen($nameOrPath) > 3 && substr($nameOrPath, -3) == '.md';
|
||||
}
|
||||
|
||||
protected static function getFullPath($template)
|
||||
{
|
||||
if ($template && $template[0] == '/')
|
||||
{
|
||||
return $template;
|
||||
}
|
||||
if (static::isMarkdown($template))
|
||||
{
|
||||
return ROOT_DIR . '/posts/' . $template;
|
||||
}
|
||||
|
||||
return ROOT_DIR . '/view/template/' . $template . '.php';
|
||||
}
|
||||
|
||||
|
@ -88,6 +112,15 @@ class View
|
|||
return static::$metaImg ?: '//lbry.io/img/lbry-dark-1600x528.png';
|
||||
}
|
||||
|
||||
public static function parseMarkdown($template)
|
||||
{
|
||||
$path = static::getFullPath($template);
|
||||
list($ignored, $frontMatter, $markdown) = explode('---', file_get_contents($path), 3);
|
||||
$metadata = Spyc::YAMLLoadString(trim($frontMatter));
|
||||
$html = ParsedownExtra::instance()->text(trim($markdown));
|
||||
return [$metadata, $html];
|
||||
}
|
||||
|
||||
public static function compileCss()
|
||||
{
|
||||
$scssCompiler = new \Leafo\ScssPhp\Compiler();
|
||||
|
|
|
@ -2,33 +2,68 @@
|
|||
<?php NavActions::setNavUri('/learn') ?>
|
||||
<?php echo View::render('nav/header', ['isDark' => false]) ?>
|
||||
<main>
|
||||
<div class="content content-light">
|
||||
<div class="content content-light markdown">
|
||||
<h1>LBRY Press Kit</h1>
|
||||
<p>
|
||||
Information and media for those who want to write or report on LBRY.
|
||||
Any information or media on this page or in our kit can be re-used or otherwise published without attribution.
|
||||
</p>
|
||||
<section>
|
||||
<h3>Download Kit</h3>
|
||||
<a href="/press-kit.zip" class="btn-primary"><span class="icon icon-download"></span><span class="btn-label">Download ZIP</span></a>
|
||||
</section>
|
||||
<section>
|
||||
<h3>What is LBRY?</h3>
|
||||
<?php echo ParsedownExtra::instance()->text(trim(file_get_contents(ROOT_DIR . '/posts/press.md'))) ?>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Logos and Product Images</h3>
|
||||
<div class="column-fluid">
|
||||
<?php foreach(glob(ROOT_DIR . '/web/img/press/*') as $imgPath): ?>
|
||||
<div class="span6">
|
||||
<div style="margin: 10px">
|
||||
<?php $imgUrl = str_replace(ROOT_DIR . '/web', '', $imgPath) ?>
|
||||
<h4><?php echo str_replace('/img/press/', '', $imgUrl) ?></h4>
|
||||
<a href="<?php echo $imgUrl ?>"><img src="<?php echo $imgUrl ?>"/></a>
|
||||
</div>
|
||||
<h3>Download Kit</h3>
|
||||
<a href="/press-kit.zip" class="btn-primary"><span class="icon icon-download"></span><span class="btn-label">Download ZIP</span></a>
|
||||
|
||||
<?php echo View::render('press-kit.md') ?>
|
||||
|
||||
<h3 id="images">Logos and Product Images</h3>
|
||||
<div class="column-fluid">
|
||||
<?php foreach(glob(ROOT_DIR . '/web/img/press/*') as $imgPath): ?>
|
||||
<div class="span6">
|
||||
<div style="margin: 10px">
|
||||
<?php $imgUrl = str_replace(ROOT_DIR . '/web', '', $imgPath) ?>
|
||||
<h4><?php echo str_replace('/img/press/', '', $imgUrl) ?></h4>
|
||||
<a href="<?php echo $imgUrl ?>"><img src="<?php echo $imgUrl ?>"/></a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<h3>Founding Team</h3>
|
||||
<?php foreach(['jeremy-kauffman', 'michael-zargham', 'josh-finer', 'alex-grintsvayg', 'mike-vine', 'jimmy-kiselak', 'jack-robison'] as $person): ?>
|
||||
<?php list($metadata, $bioHtml) = View::parseMarkdown('bio/' . $person . '.md') ?>
|
||||
<section class="row-fluid">
|
||||
<div class="span3">
|
||||
<img src="/img/team/<?php echo $person ?>-644x450.jpg" alt="<?php echo $metadata['name'] ?>"/>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<h4>
|
||||
<?php echo $metadata['name'] ?>
|
||||
<?php if (isset($metadata['email'])): ?>
|
||||
<a href="mailto:<?php echo $metadata['email'] ?>" class="link-primary"><?php echo $metadata['email'] ?></a>
|
||||
<?php endif ?>
|
||||
</h4>
|
||||
<div class="meta spacer1"><?php echo $metadata['role'] ?></div>
|
||||
<div class="markdown">
|
||||
<?php echo $bioHtml ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
<h3>Advisory Team</h3>
|
||||
<?php foreach(['alex-tabarrok', 'stephan-kinsella', 'michael-huemer'] as $person): ?>
|
||||
<?php list($metadata, $bioHtml) = View::parseMarkdown('bio/' . $person . '.md') ?>
|
||||
<section class="row-fluid">
|
||||
<div class="span3">
|
||||
<img src="/img/team/<?php echo $person ?>-644x450.jpg" alt="<?php echo $metadata['name'] ?>"/>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<h4>
|
||||
<?php echo $metadata['name'] ?>
|
||||
</h4>
|
||||
<div class="meta spacer1"><?php echo $metadata['role'] ?></div>
|
||||
<div class="markdown">
|
||||
<?php echo $bioHtml ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</main>
|
|
@ -78,7 +78,7 @@ section
|
|||
.align-left { float: left; }
|
||||
.align-right { float: right; }
|
||||
|
||||
.link-primary, .markdown a[href]
|
||||
.link-primary, .markdown a[href]:not([class])
|
||||
{
|
||||
@include anchor($color-primary);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue