Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added all Zoning district info #1180

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import LayerRecordComponent from './-base';

export default class ZoningDistrictLongDescription extends LayerRecordComponent {
@tracked primaryZoneOverride;

@service metrics;

@action
setZone(newZone) {
this.set('primaryZoneOverride', newZone);

gtag('event', 'quick_reference', {
event_category: 'Quick Reference Menu Click',
event_action: `${newZone}`,
});

this.metrics.trackEvent('MatomoTagManager', {
category: 'Quick Reference Menu Click',
action: `${newZone}`,
name: `Quick Reference Menu Click ${newZone}`,
});
}

zones = {
C: ['C1-C2', 'C3-C3A', 'C4', 'C5', 'C6', 'C7', 'C8'],
R: [
'R1',
'R2',
'R2A',
'R2X',
'R3-1',
'R3-2',
'R3A',
'R3X',
'R4',
'R4-1',
'R4A',
'R4B',
'R5',
'R5A',
'R5B',
'R5D',
'R6',
'R6A',
'R6B',
'R7',
'R7A',
'R7B',
'R7D',
'R7X',
'R8',
'R8A',
'R8B',
'R8X',
'R9',
'R9A',
'R9D',
'R9X',
'R10',
'R10A',
'R10X',
],
M: ['M1', 'M2', 'M3'],
};

get overflow() {
return this.primaryzoneCode[0] === 'R';
}

get zoneMenuItems() {
return this.zones[this.primaryzoneCode[0]];
}

get primaryzone() {
const { zonedist } = this.model;
// convert R6A to r6
const primary = zonedist.match(/\w\d*/)[0].toLowerCase();
return primary;
}

get primaryzoneCode() {
if (this.primaryZoneOverride) {
return this.primaryZoneOverride;
}

const { zonedist } = this.model;

const { primaryzone } = this;
let code = '';

if (primaryzone === 'c1' || primaryzone === 'c2') {
code = 'c1-c2';
} else if (primaryzone === 'c3') {
code = 'c3-c3a';
} else if (
[
'R2A',
'R2X',
'R3-1',
'R3-2',
'R3A',
'R3X',
'R4A',
'R4B',
'R4-1',
'R5A',
'R5B',
'R5D',
'R6A',
'R6B',
'R7A',
'R7B',
'R7D',
'R7X',
'R8A',
'R8B',
'R8X',
'R9A',
'R9D',
'R9X',
'R10A',
'R10X',
].includes(zonedist)
) {
code = zonedist;
} else if (['R7-1', 'R7-2'].includes(zonedist)) {
code = 'R7';
} else {
code = primaryzone;
}

return code.toUpperCase();
}
}
160 changes: 160 additions & 0 deletions app/styles/layouts/_l-default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,172 @@ body.index {
border: 0;
}

a.glossary, a.glossary:link, a.glossary:visited {
color: #245CB6;
font-style: italic;
}

.ceqr-access {
width: 100%;
height:48px;
border: 0;
}

.zd-nav {
display: flex;
width: 100%;
justify-content: space-evenly !important;
align-items: center;
list-style: none;
-webkit-box-pack: center;
text-wrap: nowrap;
}

.tabs {
margin: 0;
border: 1px solid #d3d5d9;
background: 0 0;
list-style-type: none;
padding-bottom: 5px;
}

.tabs::after,.tabs::before {
display: table;
content: ' ';
-webkit-flex-basis: 0;
-ms-flex-preferred-size: 0;
flex-basis: 0;
-webkit-box-ordinal-group: 2;
-webkit-order: 1;
-ms-flex-order: 1;
order: 1
}

.tabs::after {
clear: both
}

.tabs.vertical>li {
display: block;
float: none;
width: auto
}

.tabs.simple>li>a {
padding: 0
}

.tabs.simple>li>a:hover {
background: 0 0
}

.tabs.primary {
background: #ae561f
}

.tabs.primary>li>a {
color: #fefefe
}

.tabs.primary>li>a:focus,.tabs.primary>li>a:hover {
background: #a5521d
}

.tabs-title {
float: left;
flex-grow: 10;
text-align: center;
}

.tabs-title>a {
display: block;
padding: .75rem 1.25rem;
font-size: .75rem;
line-height: 1;
color: #ae561f
}

[data-whatinput=mouse] .tabs-title>a {
outline: 0
}

.tabs-title>a:hover {
background: #fefefe;
color: #964a1b
}

.tabs-title>a:focus,.tabs-title>a[aria-selected=true] {
background: 0 0;
color: #ae561f
}

.tabs-content {
border: 1px solid #d3d5d9;
border-top: 0;
background: 0 0;
color: inherit;
-webkit-transition: all .5s ease;
transition: all .5s ease
}

.tabs-content.vertical {
border: 1px solid #d3d5d9;
border-left: 0
}

.tabs-panel {
display: none;
padding: 1rem 0 0
}

.tabs-panel.is-active {
display: block
}

.tabs {
font-weight: 700;
border: 0;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex
}

.tabs::after {
content: '';
display: block;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
-webkit-box-shadow: inset 0 -1px 0 0 #d3d5d9;
box-shadow: inset 0 -1px 0 0 #d3d5d9
}

.tabs a {
border-top: 1px solid transparent
}

.tabs li {
float: none
}

.tabs li:not(.is-active) a {
-webkit-box-shadow: inset 0 -1px 0 0 #d3d5d9;
box-shadow: inset 0 -1px 0 0 #d3d5d9
}

.tabs li.is-active a {
color: #393c41;
border-top-color: #d3d5d9;
-webkit-box-shadow: inset 1px 0 0 0 #d3d5d9,inset -1px 0 0 0 #d3d5d9;
box-shadow: inset 1px 0 0 0 #d3d5d9,inset -1px 0 0 0 #d3d5d9
}

.tabs-content {
border: 0
}

#browser-unsupported {
display: none;
opacity: 0.8;
Expand Down
Loading
Loading