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
|
@ -139,7 +139,7 @@ class Controller
|
||||||
unset($headers[static::HEADER_STATUS]);
|
unset($headers[static::HEADER_STATUS]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($headers as $name => $value)
|
foreach($headers as $name => $value)
|
||||||
{
|
{
|
||||||
header($name . ': ' . $value);
|
header($name . ': ' . $value);
|
||||||
|
|
|
@ -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 Response::setMetaDescription('LBRY Press Kit. Information and media for those who want to report on LBRY.') ?>
|
<?php if (!isset($showHeader) || $showHeader): ?>
|
||||||
<?php NavActions::setNavUri('/learn') ?>
|
<?php Response::setMetaDescription('LBRY Press Kit. Information and media for those who want to report on LBRY.') ?>
|
||||||
<?php echo View::render('nav/header', ['isDark' => false]) ?>
|
<?php NavActions::setNavUri('/learn') ?>
|
||||||
|
<?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>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
.icon-mega
|
.icon-mega
|
||||||
{
|
{
|
||||||
font-size: 200px;
|
font-size: 200px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
||||||
|
|
Loading…
Add table
Reference in a new issue