mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-30 17:01:25 +00:00
replace press-kit with prompt to contact brinck
This commit is contained in:
parent
594ffa4eba
commit
eddc203ff2
4 changed files with 29 additions and 67 deletions
|
@ -139,8 +139,6 @@ class Controller
|
|||
$router->get([ContentActions::URL_NEWS . '/{slug:c}?', 'news'], 'ContentActions::executeNews');
|
||||
$router->get([ContentActions::URL_FAQ . '/{slug:c}?', 'faq'], 'ContentActions::executeFaq');
|
||||
$router->get([ContentActions::URL_BOUNTY . '/{slug:c}?', 'bounty'], 'ContentActions::executeBounty');
|
||||
$router->get([ContentActions::URL_PRESS . '/{slug:c}', 'press'], 'ContentActions::executePress');
|
||||
// $router->get([ContentActions::URL_CREDIT_REPORTS . '/{slug:c}?', 'faq'], 'ContentActions::executeFaq');
|
||||
$router->get(ContentActions::URL_CREDIT_REPORTS, 'ContentActions::executeCreditReports');
|
||||
$router->get([ContentActions::URL_CREDIT_REPORTS . '/{year:c}-q{quarter:c}', ContentActions::URL_CREDIT_REPORTS . '/{year:c}-Q{quarter:c}'], 'ContentActions::executeCreditReport');
|
||||
|
||||
|
|
|
@ -151,16 +151,6 @@ class ContentActions extends Actions
|
|||
]];
|
||||
}
|
||||
|
||||
public static function executePress(string $slug = null): array
|
||||
{
|
||||
Response::enableHttpCache();
|
||||
try {
|
||||
$post = Post::load(static::SLUG_PRESS . '/' . ltrim($slug, '/'));
|
||||
} catch (PostNotFoundException $e) {
|
||||
return NavActions::execute404();
|
||||
}
|
||||
return ['content/press-post', ['post' => $post]];
|
||||
}
|
||||
|
||||
protected static function convertBountyAmount($amount)
|
||||
{
|
||||
|
@ -252,39 +242,22 @@ class ContentActions extends Actions
|
|||
|
||||
public static function executePressKit(): array
|
||||
{
|
||||
$zipFileName = 'lbry-press-kit-' . date('Y-m-d') . '.zip';
|
||||
$zipPath = tempnam('/tmp', $zipFileName);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$zip->open($zipPath, ZipArchive::OVERWRITE);
|
||||
|
||||
// $pageHtml = View::render('page/press-kit', ['showHeader' => false]);
|
||||
// $html = <<<EOD
|
||||
//<!DOCTYPE html>
|
||||
//<html>
|
||||
// <head prefix="og: http://ogp.me/ns#">
|
||||
// <title>LBRY Press Kit</title>
|
||||
// <link href='https://fonts.googleapis.com/css?family=Raleway:300,300italic,400,400italic,700' rel='stylesheet' type='text/css'>
|
||||
// <link href="https://lbry.io/css/all.css" rel="stylesheet" type="text/css" media="screen,print" />
|
||||
// </head>
|
||||
// <body>
|
||||
// $pageHtml
|
||||
// </body>
|
||||
//</html>
|
||||
//EOD;
|
||||
// $zipFileName = 'lbry-press-kit-' . date('Y-m-d') . '.zip';
|
||||
// $zipPath = tempnam('/tmp', $zipFileName);
|
||||
//
|
||||
// $zip->addFromString('press.html', $html);
|
||||
|
||||
foreach (glob(ROOT_DIR . '/web/img/press/*') as $productImgPath) {
|
||||
$imgPathTokens = explode('/', $productImgPath);
|
||||
$imgName = $imgPathTokens[count($imgPathTokens) - 1];
|
||||
$zip->addFile($productImgPath, 'logo_and_product/' . $imgName);
|
||||
}
|
||||
|
||||
foreach (glob(ContentActions::CONTENT_DIR . '/bio/*.md') as $bioPath) {
|
||||
list($metadata, $bioHtml) = View::parseMarkdown($bioPath);
|
||||
$zip->addFile($bioPath, 'team_bios/' . $metadata['name'] . ' - ' . $metadata['role'] . '.txt');
|
||||
}
|
||||
// $zip = new ZipArchive();
|
||||
// $zip->open($zipPath, ZipArchive::OVERWRITE);
|
||||
//
|
||||
// foreach (glob(ROOT_DIR . '/web/img/press/*') as $productImgPath) {
|
||||
// $imgPathTokens = explode('/', $productImgPath);
|
||||
// $imgName = $imgPathTokens[count($imgPathTokens) - 1];
|
||||
// $zip->addFile($productImgPath, 'logo_and_product/' . $imgName);
|
||||
// }
|
||||
//
|
||||
// foreach (glob(ContentActions::CONTENT_DIR . '/bio/*.md') as $bioPath) {
|
||||
// list($metadata, $bioHtml) = View::parseMarkdown($bioPath);
|
||||
// $zip->addFile($bioPath, 'team_bios/' . $metadata['name'] . ' - ' . $metadata['role'] . '.txt');
|
||||
// }
|
||||
|
||||
/*
|
||||
* team bio images are no longer included in press kit now that they've moved to spee.ch
|
||||
|
@ -300,16 +273,16 @@ class ContentActions extends Actions
|
|||
// $zip->addFile($bioImgPath, '/team_photos/' . $imgName);
|
||||
// }
|
||||
|
||||
|
||||
$zip->close();
|
||||
|
||||
Response::enableHttpCache();
|
||||
Response::setDownloadHttpHeaders($zipFileName, 'application/zip', filesize($zipPath));
|
||||
|
||||
return ['internal/zip', [
|
||||
'_no_layout' => true,
|
||||
'zipPath' => $zipPath
|
||||
]];
|
||||
//
|
||||
// $zip->close();
|
||||
//
|
||||
// Response::enableHttpCache();
|
||||
// Response::setDownloadHttpHeaders($zipFileName, 'application/zip', filesize($zipPath));
|
||||
//
|
||||
// return ['internal/zip', [
|
||||
// '_no_layout' => true,
|
||||
// 'zipPath' => $zipPath
|
||||
// ]];
|
||||
}
|
||||
|
||||
public static function prepareBioPartial(array $vars): array
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?php Response::setMetaDescription($post->getTitle()) ?>
|
||||
<?php Response::addMetaImages($post->getImageUrls()) ?>
|
||||
<?php echo View::render('nav/_header') ?>
|
||||
<main>
|
||||
<section class="post-content">
|
||||
<div class="content">
|
||||
<h1><?php echo htmlentities($post->getTitle()) ?></h1>
|
||||
<?php echo $post->getContentHtml() ?>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<?php echo View::render('nav/_footer', ['showLearnFooter' => true]) ?>
|
|
@ -6,6 +6,9 @@
|
|||
<main>
|
||||
<div class="content content-light markdown">
|
||||
<h1>{{press.title}}</h1>
|
||||
<p>For a current press-kit, please contact:</p>
|
||||
<?php echo View::render('content/_bio', ['person' => 'brinck-slattery']) ?>
|
||||
<?php /*
|
||||
<p>
|
||||
{{press.info}}
|
||||
{{press.used}}
|
||||
|
@ -76,7 +79,7 @@
|
|||
</div>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div> */ ?>
|
||||
</main>
|
||||
|
||||
<?php echo View::render('nav/_footer') ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue