make results title clickable [skip ci]

This commit is contained in:
checktheroads 2019-08-23 15:55:01 -07:00
parent a77651a2d7
commit 298fc2ad52
3 changed files with 20 additions and 11 deletions

View file

@ -1,11 +1,13 @@
<div class="container animsition" data-animsition-out-class="fade-out-left" data-animsition-in-class="fade-in-right"
id="hg-results">
<div class="row mb-md-1 mb-lg-3 mb-xl-3 px-3 px-md-1 py-3 py-md-1 mx-0 mw-100 mw-md-none">
<div class="d-flex col-12 col-lg-6 justify-content-center justify-content-lg-start align-self-end text-center text-lg-left">
<div class="d-flex col-12 col-lg-6 justify-content-center justify-content-lg-start align-self-end text-center text-lg-left"
data-href="/" id="hg-title-col">
{% import "templates/title.html.j2" as title %}
{{ title.title(branding, primary_asn, size_title="h1", size_subtitle="h4", direction="left") }}
</div>
<div class="d-flex col-12 col-lg-6 align-self-end justify-content-center justify-content-lg-end text-center text-lg-right">
<div
class="d-flex col-12 col-lg-6 align-self-end justify-content-center justify-content-lg-end text-center text-lg-right">
<h2 class="mb-0" id="hg-results-title"></h2>
</div>
</div>

View file

@ -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();

View file

@ -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