diff --git a/public_html/assets/css/nf-core.css b/public_html/assets/css/nf-core.css index 1d53b69fbc..5643369030 100644 --- a/public_html/assets/css/nf-core.css +++ b/public_html/assets/css/nf-core.css @@ -42,6 +42,12 @@ blockquote a { min-width: 100%; } } +/* Don't stretch the final card across the full row if an odd number */ +@media only screen and (min-width: 1000px) { + .card_deck_card.card { + max-width: calc(50% - 30px); + } +} .site-nav { padding: .2rem 1rem; @@ -350,7 +356,7 @@ Based on https://codepen.io/wintr/pen/beBJBb */ */ .pipelines-toolbar .pipeline-filters input { - max-width: 6rem; + max-width: 10rem; } .pipelines-toolbar .btn.active { opacity: 0.8; @@ -374,6 +380,9 @@ Based on https://codepen.io/wintr/pen/beBJBb */ font-size: 0.8rem; color: #999; } +.pipeline .stargazers .far { + color: #DAA520; +} .pipeline .stargazers:hover { color: #DAA520; text-decoration: none; diff --git a/public_html/pipelines.php b/public_html/pipelines.php index 5923605432..1ce1713dc1 100644 --- a/public_html/pipelines.php +++ b/public_html/pipelines.php @@ -3,8 +3,20 @@ ini_set('display_startup_errors', 1); error_reporting(E_ALL); +function rsort_releases($a, $b){ + $t1 = strtotime($a->published_at); + $t2 = strtotime($b->published_at); + return $t2 - $t1; +} +function rsort_pipelines($a, $b){ + $t1 = strtotime($a->last_release); + $t2 = strtotime($b->last_release); + return $t2 - $t1; +} + $pipelines_json = json_decode(file_get_contents('pipelines.json')); $pipelines = $pipelines_json->remote_workflows; +usort($pipelines, 'rsort_pipelines'); // From https://stackoverflow.com/a/18891474/713980 function time_ago($date) { @@ -34,14 +46,9 @@ function time_ago($date) { } return "$difference $periods[$j] {$tense}"; } -function rsort_releases($a, $b){ - $t1 = strtotime($a->published_at); - $t2 = strtotime($b->published_at); - return $t2 - $t1; -} $title = 'Pipelines'; -$subtitle = 'Browse the '.$pipelines_json->pipeline_count.' pipelines that are currently available as part of nf-core.'; +$subtitle = 'Browse the '.$pipelines_json->pipeline_count.' pipelines that are currently available as part of nf-core.'; include('../includes/header.php'); ?> @@ -50,31 +57,31 @@ function rsort_releases($a, $b){ Let us know!