From a4a50d9c9c69a4c1fb39b86f61cece4e02566213 Mon Sep 17 00:00:00 2001 From: Mauricio Mercado Date: Tue, 16 Jul 2019 13:27:01 -0700 Subject: [PATCH] fix(repository.pug): environments are optional (#7) --- views/repository/repository.pug | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/views/repository/repository.pug b/views/repository/repository.pug index 8008bb4..30c5feb 100644 --- a/views/repository/repository.pug +++ b/views/repository/repository.pug @@ -78,21 +78,22 @@ block content div= day(schedule).fromNow() div.small.text-muted= key - div.col-sm-6.col-lg-4 - div.card - div.card-header - h3.card-title Environments + if repository.colophon.environments + div.col-sm-6.col-lg-4 + div.card + div.card-header + h3.card-title Environments - div.table-responsive(style='max-height: 15rem') - table.table.card-table.table-striped.table-vcenter - tbody - each env in repository.colophon.environments - tr - td.w-1 - span.avatar.avatar-sm(class=`avatar-${random()}` style=`background-image: url(//logo.clearbit.com/${domain(env.uri)}`) - td - div= env.title - div.small.text-muted: a(href= env.uri target='_blank')= env.uri + div.table-responsive(style='max-height: 15rem') + table.table.card-table.table-striped.table-vcenter + tbody + each env in repository.colophon.environments + tr + td.w-1 + span.avatar.avatar-sm(class=`avatar-${random()}` style=`background-image: url(//logo.clearbit.com/${domain(env.uri)}`) + td + div= env.title + div.small.text-muted: a(href= env.uri target='_blank')= env.uri if repository.colophon.references div.col-sm-6.col-lg-4