From 298fc2ad52137d5443726970de0ee119df9ae109 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Fri, 23 Aug 2019 15:55:01 -0700 Subject: [PATCH] make results title clickable [skip ci] --- hyperglass/render/templates/results.html.j2 | 6 ++++-- hyperglass/static/hyperglass.es6 | 8 ++++++++ hyperglass/static/overrides.sass | 17 ++++++++--------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/hyperglass/render/templates/results.html.j2 b/hyperglass/render/templates/results.html.j2 index c0d26e8..3301c11 100644 --- a/hyperglass/render/templates/results.html.j2 +++ b/hyperglass/render/templates/results.html.j2 @@ -1,11 +1,13 @@
-
+
{% import "templates/title.html.j2" as title %} {{ title.title(branding, primary_asn, size_title="h1", size_subtitle="h4", direction="left") }}
-
+

diff --git a/hyperglass/static/hyperglass.es6 b/hyperglass/static/hyperglass.es6 index 2ac0a64..a84081c 100644 --- a/hyperglass/static/hyperglass.es6 +++ b/hyperglass/static/hyperglass.es6 @@ -12,6 +12,7 @@ const cfgGeneral = frontEndConfig.general; const inputMessages = frontEndConfig.messages; const pageContainer = $('#hg-page-container'); const formContainer = $('#hg-form'); +const titleColumn = $('#hg-title-col'); const queryLocation = $('#location'); const queryType = $('#query_type'); const queryTarget = $('#query_target'); @@ -40,9 +41,11 @@ const swapSpacing = (goTo) => { if (goTo === 'form') { pageContainer.removeClass('px-0 px-md-3'); resultsColumn.removeClass('px-0'); + titleColumn.removeClass('text-center'); } else if (goTo === 'results') { pageContainer.addClass('px-0 px-md-3'); resultsColumn.addClass('px-0'); + titleColumn.addClass('text-left'); } }; @@ -122,6 +125,11 @@ footerCreditBtn.popover({ $(e.currentTarget).popover('hide'); }); +titleColumn.on('click', (e) => { + window.location = $(e.currentTarget).data('href'); + return false; +}); + $(document).ready(() => { reloadPage(); resultsContainer.hide(); diff --git a/hyperglass/static/overrides.sass b/hyperglass/static/overrides.sass index 8cad12a..92ed68c 100644 --- a/hyperglass/static/overrides.sass +++ b/hyperglass/static/overrides.sass @@ -266,19 +266,14 @@ & + .nav-link margin-left: 1rem -// Fixes input group issue where button is 1px taller than the input element (default is 2px) - -#hg-submit-button - border-top-right-radius: $border-radius-lg - border-bottom-right-radius: $border-radius-lg - .input-group-lg > .form-control:not(textarea), .input-group-lg > .custom-select, -.bootstrap-select.form-control-lg .dropdown-toggle - height: calc(1.5em + 1rem + 3px) !important +bootstrap-select.form-control-lg .dropdown-toggle, .input-group-append > .btn + height: $input-height-lg !important + padding: $input-padding-y-lg $input-padding-x-lg !important .hg-back:hover - text-decoration: none + text-decoration: none border: 1px solid $hg-primary !important .hg-back:focus @@ -307,6 +302,7 @@ #hg-accordion .card-body word-wrap: normal !important + color: findTextColor($card-bg) !important .hg-menu-btn -webkit-transition: none @@ -320,6 +316,9 @@ -o-transition: all 0.5s ease transition: all 0.5s ease +#hg-title-col + cursor: pointer + .tab-content overflow: hidden