mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
downloading webpages is hard
This commit is contained in:
parent
1a66549f26
commit
02c16c46e2
4 changed files with 21 additions and 8 deletions
|
@ -75,9 +75,20 @@ class ContentActions extends Actions
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
$zip->open($zipPath, ZipArchive::OVERWRITE);
|
$zip->open($zipPath, ZipArchive::OVERWRITE);
|
||||||
|
|
||||||
//file_get_contents fails on servers without proper SSL, so use live site always for now
|
$pageHtml = View::render('page/press-kit', ['showHeader' => false]);
|
||||||
$html = file_get_contents('https://lbry.io/press-kit');
|
$html = <<<EOD
|
||||||
// $html = file_get_contents('https://' . $_SERVER['HTTP_HOST'] . '/press-kit'));
|
<!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;
|
||||||
|
|
||||||
$zip->addFromString('press.html', $html);
|
$zip->addFromString('press.html', $html);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
<?php if (!isset($showHeader) || $showHeader): ?>
|
||||||
<?php Response::setMetaDescription('LBRY Press Kit. Information and media for those who want to report on LBRY.') ?>
|
<?php Response::setMetaDescription('LBRY Press Kit. Information and media for those who want to report on LBRY.') ?>
|
||||||
<?php NavActions::setNavUri('/learn') ?>
|
<?php NavActions::setNavUri('/learn') ?>
|
||||||
<?php echo View::render('nav/header', ['isDark' => false]) ?>
|
<?php echo View::render('nav/header', ['isDark' => false]) ?>
|
||||||
|
<?php endif ?>
|
||||||
<main>
|
<main>
|
||||||
<div class="content content-light markdown">
|
<div class="content content-light markdown">
|
||||||
<h1>LBRY Press Kit</h1>
|
<h1>LBRY Press Kit</h1>
|
||||||
|
|
Loading…
Add table
Reference in a new issue