Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c898c4d8c0 | ||
|
|
fa84f9100d | ||
|
|
9e648d59ef |
No files matched your search
@@ -112,10 +112,13 @@ class Controller
|
||||
|
||||
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
|
||||
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
|
||||
|
||||
foreach (array_keys(OS::getAll()) as $os) {
|
||||
$router->get(['/' . $os, 'get-' . $os], 'DownloadActions::executeGet');
|
||||
$router->get(['/' . $os, 'get-' . $os], 'DownloadActions::executeGet');
|
||||
}
|
||||
|
||||
$router->get('/roadmap', 'ContentActions::executeRoadmap');
|
||||
$router->get('/roadmap/{year}', 'ContentActions::executeRoadmap');
|
||||
|
||||
$router->post('/postcommit', 'OpsActions::executePostCommit');
|
||||
$router->post('/log-upload', 'OpsActions::executeLogUpload');
|
||||
|
||||
@@ -95,7 +95,7 @@ class ContentActions extends Actions
|
||||
'tutorial' => 'LBRY Tutorials',
|
||||
'publisher' => 'Publishers and Creators',
|
||||
'troubleshooting' => 'Help and Troubleshooting',
|
||||
'powerusers' => 'LBRY for Power Users',
|
||||
'powerusers' => 'LBRY for Power Users',
|
||||
'wallet' => 'Wallet and Transactions',
|
||||
'bots' => 'LBRY Bots',
|
||||
'mining' => 'Mining LBC',
|
||||
@@ -165,12 +165,20 @@ class ContentActions extends Actions
|
||||
return Controller::redirect('https://lbry.tech/contribute');
|
||||
}
|
||||
|
||||
public static function executeRoadmap()
|
||||
public static function executeRoadmap(string $year = '2020')
|
||||
{
|
||||
$cache = !Request::getParam('nocache');
|
||||
$years = range(2019, 2020);
|
||||
|
||||
$year = $year ?: $years[count($years) - 1];
|
||||
if (!in_array($year, $years)) {
|
||||
Controller::redirect('/roadmap');
|
||||
}
|
||||
|
||||
return ['content/roadmap', [
|
||||
'items' => Github::listRoadmapItems($cache)
|
||||
'year' => $year,
|
||||
'years' => $years,
|
||||
'items' => Github::listRoadmapItems($year, $cache)
|
||||
]];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+12
-11
@@ -43,14 +43,14 @@ class Github
|
||||
$bestAsset = null;
|
||||
foreach ($release['assets'] as $asset) {
|
||||
if (static::isAssetForOs($asset, $os)) {
|
||||
if (!$bestAsset) {
|
||||
$bestAsset = $asset;
|
||||
} else if ($os === Os::OS_LINUX) {
|
||||
$ext = pathinfo($asset['name'], PATHINFO_EXTENSION);
|
||||
if ($ext === $preferredExt || (!$preferredExt && $ext === 'AppImage')) {
|
||||
$bestAsset = $asset;
|
||||
if (!$bestAsset) {
|
||||
$bestAsset = $asset;
|
||||
} elseif ($os === Os::OS_LINUX) {
|
||||
$ext = pathinfo($asset['name'], PATHINFO_EXTENSION);
|
||||
if ($ext === $preferredExt || (!$preferredExt && $ext === 'AppImage')) {
|
||||
$bestAsset = $asset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,20 +105,21 @@ class Github
|
||||
);
|
||||
}
|
||||
|
||||
public static function listRoadmapItems($cache = true)
|
||||
public static function listRoadmapItems($year, $cache = true)
|
||||
{
|
||||
$year = $year ?: date('Y');
|
||||
$apiResponse = Config::get(Config::GITHUB_PERSONAL_AUTH_TOKEN) ?
|
||||
static::get('/repos/lbryio/internal-issues/issues?labels=2019&filter=all') :
|
||||
static::get('/repos/lbryio/internal-issues/issues?labels=' . $year . '&filter=all') :
|
||||
include ROOT_DIR . '/data/dummy/githubroadmap.php';
|
||||
|
||||
$issues = array_reduce($apiResponse, function ($issues, $issue) {
|
||||
$issues = array_reduce($apiResponse, function ($issues, $issue) use ($year) {
|
||||
return array_merge($issues, [[
|
||||
'name' => $issue['title'],
|
||||
'quarter_date' => array_reduce($issue['labels'], function ($carry, $label) {
|
||||
if ($carry) {
|
||||
return $carry;
|
||||
}
|
||||
return $label['name'][0] === 'Q' ? $label['name'] . ' 2019' : '';
|
||||
return $label['name'][0] === 'Q' ? ($label['name'] . ' ' . $year) : '';
|
||||
}, ''),
|
||||
'body' => $issue['body_html']
|
||||
]]);
|
||||
|
||||
@@ -10,31 +10,46 @@
|
||||
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<p>Our top priorities, definitions of success, and target completion dates for key initiatives in <?php echo date('Y') ?> are outlined below.</p>
|
||||
<p class="align-text--center">Top priorities, definitions of success, status, and target completion dates for key initiatives in
|
||||
<select id="roadmap-year-select">
|
||||
<?php foreach ($years as $aYear): ?>
|
||||
<option value="<?php echo $aYear ?>" <?php echo $aYear == $year ? 'selected="selected"' : '' ?>>
|
||||
<?php echo $aYear ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<?php js_start() ?>
|
||||
$('#roadmap-year-select').change(function() { window.location = '/roadmap/' + $(this).val(); });
|
||||
<?php js_end() ?>
|
||||
</p>
|
||||
<div class="roadmap-container" id="project-roadmap">
|
||||
<?php foreach ($items as $item): ?>
|
||||
<div class="roadmap-item">
|
||||
<h3 class="roadmap-item-title">
|
||||
<?php if (isset($item['url']) && $item['url']): ?>
|
||||
<a href="<?php echo $item['url'] ?>" class="link-primary"><?php echo $item['name'] ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $item['name'] ?>
|
||||
<?php endif ?>
|
||||
</h3>
|
||||
|
||||
<div class="roadmap-item-date">
|
||||
<?php if (isset($item['quarter_date'])): ?>
|
||||
<?php echo $item['quarter_date'] ?>
|
||||
<?php if (count($items)): ?>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<div class="roadmap-item">
|
||||
<h3 class="roadmap-item-title">
|
||||
<?php if (isset($item['url']) && $item['url']): ?>
|
||||
<a href="<?php echo $item['url'] ?>" class="link-primary"><?php echo $item['name'] ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $item['date'] ? date('m-d-Y', strtotime($item['date'])) : '' ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php echo $item['name'] ?>
|
||||
<?php endif ?>
|
||||
</h3>
|
||||
|
||||
<div class="roadmap-item-content content markdown">
|
||||
<?php echo $item['body'] ?: '<em class="no-results">No description</em>' ?>
|
||||
<div class="roadmap-item-date">
|
||||
<?php if (isset($item['quarter_date'])): ?>
|
||||
<?php echo $item['quarter_date'] ?>
|
||||
<?php else: ?>
|
||||
<?php echo $item['date'] ? date('m-d-Y', strtotime($item['date'])) : '' ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div class="roadmap-item-content content markdown">
|
||||
<?php echo $item['body'] ?: '<em class="no-results">No description</em>' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php else: ?>
|
||||
<div class="notice notice-info">No roadmap items found for this year.</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
+1
-1
Submodule web/scss/color updated: 351e2b468f...c959b39b59.
@@ -1,11 +1,11 @@
|
||||
.roadmap-container {
|
||||
margin: 1.25rem auto 0;
|
||||
max-width: 800px;
|
||||
max-width: 840px;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
width: 1px; height: 100%;
|
||||
top: 0; left: 2.5rem; // half of date width
|
||||
top: 0; left: 3rem; // half of date width
|
||||
|
||||
background-color: var(--lbry-gray-1);
|
||||
content: "";
|
||||
@@ -17,14 +17,16 @@
|
||||
.roadmap-item {
|
||||
border: 1px solid var(--lbry-gray-1);
|
||||
margin-bottom: 2rem;
|
||||
margin-left: 6rem;
|
||||
margin-left: 8rem;
|
||||
padding: 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.roadmap-item-date {
|
||||
width: 5rem; height: 5rem;
|
||||
top: -1px; left: -6rem;
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
top: -1px;
|
||||
left: -8rem;
|
||||
|
||||
background-color: var(--lbry-white);
|
||||
border-radius: 50%;
|
||||
|
||||
Reference in new issue
Block a user