mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
2020 roadmap support
This commit is contained in:
parent
d80664e0f9
commit
9e648d59ef
6 changed files with 60 additions and 32 deletions
|
@ -112,10 +112,13 @@ class Controller
|
||||||
|
|
||||||
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
|
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
|
||||||
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
|
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
|
||||||
|
|
||||||
foreach (array_keys(OS::getAll()) as $os) {
|
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', 'ContentActions::executeRoadmap');
|
||||||
|
$router->get('/roadmap/{year}', 'ContentActions::executeRoadmap');
|
||||||
|
|
||||||
$router->post('/postcommit', 'OpsActions::executePostCommit');
|
$router->post('/postcommit', 'OpsActions::executePostCommit');
|
||||||
$router->post('/log-upload', 'OpsActions::executeLogUpload');
|
$router->post('/log-upload', 'OpsActions::executeLogUpload');
|
||||||
|
|
|
@ -165,12 +165,19 @@ class ContentActions extends Actions
|
||||||
return Controller::redirect('https://lbry.tech/contribute');
|
return Controller::redirect('https://lbry.tech/contribute');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function executeRoadmap()
|
public static function executeRoadmap(string $year = '2000')
|
||||||
{
|
{
|
||||||
$cache = !Request::getParam('nocache');
|
$cache = !Request::getParam('nocache');
|
||||||
|
$years = range(2019, 2020);
|
||||||
|
|
||||||
|
if (!in_array($year, $years)) {
|
||||||
|
Controller::redirect('/roadmap');
|
||||||
|
}
|
||||||
|
|
||||||
return ['content/roadmap', [
|
return ['content/roadmap', [
|
||||||
'items' => Github::listRoadmapItems($cache)
|
'year' => $year,
|
||||||
|
'years' => $years,
|
||||||
|
'items' => Github::listRoadmapItems($year, $cache)
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
lib/thirdparty/Github.class.php
vendored
5
lib/thirdparty/Github.class.php
vendored
|
@ -105,10 +105,11 @@ 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) ?
|
$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';
|
include ROOT_DIR . '/data/dummy/githubroadmap.php';
|
||||||
|
|
||||||
$issues = array_reduce($apiResponse, function ($issues, $issue) {
|
$issues = array_reduce($apiResponse, function ($issues, $issue) {
|
||||||
|
|
|
@ -10,31 +10,46 @@
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="inner-wrap">
|
<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">
|
<div class="roadmap-container" id="project-roadmap">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php if (count($items)): ?>
|
||||||
<div class="roadmap-item">
|
<?php foreach ($items as $item): ?>
|
||||||
<h3 class="roadmap-item-title">
|
<div class="roadmap-item">
|
||||||
<?php if (isset($item['url']) && $item['url']): ?>
|
<h3 class="roadmap-item-title">
|
||||||
<a href="<?php echo $item['url'] ?>" class="link-primary"><?php echo $item['name'] ?></a>
|
<?php if (isset($item['url']) && $item['url']): ?>
|
||||||
<?php else: ?>
|
<a href="<?php echo $item['url'] ?>" class="link-primary"><?php echo $item['name'] ?></a>
|
||||||
<?php echo $item['name'] ?>
|
|
||||||
<?php endif ?>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="roadmap-item-date">
|
|
||||||
<?php if (isset($item['quarter_date'])): ?>
|
|
||||||
<?php echo $item['quarter_date'] ?>
|
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo $item['date'] ? date('m-d-Y', strtotime($item['date'])) : '' ?>
|
<?php echo $item['name'] ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</h3>
|
||||||
|
|
||||||
<div class="roadmap-item-content content markdown">
|
<div class="roadmap-item-date">
|
||||||
<?php echo $item['body'] ?: '<em class="no-results">No description</em>' ?>
|
<?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>
|
||||||
</div>
|
<?php endforeach ?>
|
||||||
<?php endforeach ?>
|
<?php else: ?>
|
||||||
|
<div class="notice notice-info">No roadmap items found for this year.</div>
|
||||||
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 351e2b468fbecfb3e81e6c6fc8ce6c8d25d30772
|
Subproject commit c959b39b594c410829eb897af97cd6dea9b52d9c
|
|
@ -1,11 +1,11 @@
|
||||||
.roadmap-container {
|
.roadmap-container {
|
||||||
margin: 1.25rem auto 0;
|
margin: 1.25rem auto 0;
|
||||||
max-width: 800px;
|
max-width: 840px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
width: 1px; height: 100%;
|
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);
|
background-color: var(--lbry-gray-1);
|
||||||
content: "";
|
content: "";
|
||||||
|
@ -17,14 +17,16 @@
|
||||||
.roadmap-item {
|
.roadmap-item {
|
||||||
border: 1px solid var(--lbry-gray-1);
|
border: 1px solid var(--lbry-gray-1);
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
margin-left: 6rem;
|
margin-left: 8rem;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.roadmap-item-date {
|
.roadmap-item-date {
|
||||||
width: 5rem; height: 5rem;
|
width: 6rem;
|
||||||
top: -1px; left: -6rem;
|
height: 6rem;
|
||||||
|
top: -1px;
|
||||||
|
left: -8rem;
|
||||||
|
|
||||||
background-color: var(--lbry-white);
|
background-color: var(--lbry-white);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
Loading…
Add table
Reference in a new issue