Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #432 from GSA/help-wanted3
Browse files Browse the repository at this point in the history
Help Wanted (no public link)
  • Loading branch information
DanielJDufour authored Feb 12, 2018
2 parents 4952ae4 + 4b92760 commit 7ac0c4a
Show file tree
Hide file tree
Showing 38 changed files with 1,264 additions and 93 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ End-to-end tests need to be written in a file with an `.e2e.ts` extension.
This app uses the `github-deploy` package for handling deployment. To configure
deployment, customize the `config/github-deploy` and `webpack.github-deploy`
files to match your settings. When ready to deploy, run
`npm run github-deploy:dev` or `npm run github-deploy:prod`, depending on your
intended destination.
`npm run federalist-deploy:dev` or `npm run federalist-deploy:prod`, depending on your
intended destination. If you are deploying from a fork, you will have to set
the `GIT_REMOTE_NAME` environmental variable,
like `GIT_REMOTE_NAME="upstream" npm run federalist-deploy`.

## Deployment Problems
When pushing to staging or dev branches, you might run into an occasional error warning that the branch you're pushing to already exists. If you see this, you need to clear the cache in the gh-pages module using this command: `rm -rf node_modules/gh-pages/.cache`
Expand Down
2 changes: 1 addition & 1 deletion config/github-deploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const execSync = require('child_process').execSync;
const helpers = require('../helpers');

const HTTPS_REPO_NAME_RE = /Push URL: https:\/\/github\.com\/.*\/(.*)/;
const SSH_REPO_NAME_RE = /Push\s*URL:\s*git@github\.com:.*\/(.*)\.git/;
const SSH_REPO_NAME_RE = /Push\s*URL:\s*git@github\.com:.*\/(.*)(\.git)?/;

function getWebpackConfigModule() {
if (helpers.hasProcessFlag('github-dev')) {
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function (options) {
gtmAuth: isProd ? 'GTM-M9L9Q5' : 'GTM-MSJCVS',
HMR: isProd ? false : helpers.hasProcessFlag('hot'),
ENV: options.env,
port: process.env.PORT || isProd ? 8080 : 2700,
port: process.env.PORT || (isProd ? 8080 : 2700),
host: process.env.HOST || 'localhost'
};

Expand Down
2 changes: 1 addition & 1 deletion config/webpack.federalist-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const postcssImport = require('postcss-import');
/**
* Webpack Constants
*/
const GIT_REMOTE_NAME = 'origin';
const GIT_REMOTE_NAME = process.env.GIT_REMOTE_NAME || 'origin';
const COMMIT_MESSAGE = 'Updates';
const GH_REPO_NAME = ghDeploy.getRepoName(GIT_REMOTE_NAME);
const ENV = 'production';
Expand Down
108 changes: 105 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
"version": "npm run build",
"postversion": "git push && git push --tags",
"postinstall": "typings install",
"licenses": "license-checker --json --relativeLicensePath --out dependency_licenses.json"
"licenses": "license-checker --json --relativeLicensePath --out dependency_licenses.json",
"list-git-conflicts": "git diff --name-only --diff-filter=U"
},
"dependencies": {
"@angular/animations": "^4.4.4",
Expand Down Expand Up @@ -133,6 +134,7 @@
"sass-loader": "^6.0.6",
"typed.js": "^1.1.1",
"typings": "^2.1.1",
"url-parse": "^1.2.0",
"uswds": "^1.4.4",
"webpack-create-file-plugin": "^0.1.0",
"zone.js": "^0.8.19"
Expand Down
4 changes: 4 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ROUTES } from './app.routes';
import { APP_RESOLVER_PROVIDERS } from './app.resolver';
import { ExternalLinkDirective } from './directives/external-link';
import { ToggleMenuDirective } from './directives/toggle-menu';
import { CapitalizePipe } from './pipes/capitalize';
import { LanguageIconPipe } from './pipes/language-icon';
import { PluralizePipe } from './pipes/pluralize';
import { TruncatePipe } from './pipes/truncate';
Expand All @@ -32,6 +33,7 @@ import { IsDefinedPipe } from './pipes/is-defined';
import { APP_COMPONENTS } from './utils/app-components';
import { AgencyService, AGENCIES } from './services/agency';
import { AgencyApiService } from './services/agency-api';
import { HelpWantedService } from './services/help-wanted';
import { AgenciesIndexService, ReleasesIndexService } from './services/indexes';
import { MobileService } from './services/mobile';
import { ModalService } from './services/modal';
Expand All @@ -52,6 +54,7 @@ const APP_PROVIDERS = [
AgenciesIndexService,
AgencyService,
AgencyApiService,
HelpWantedService,
MobileService,
ModalService,
MonacoEditorService,
Expand Down Expand Up @@ -85,6 +88,7 @@ const APP_PROVIDERS = [
declarations: [
APP_COMPONENTS,
ExternalLinkDirective,
CapitalizePipe,
LanguageIconPipe,
PluralizePipe,
IsDefinedPipe,
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Routes, RouterModule } from '@angular/router';
import {
FourOhFourComponent,
HelpWantedComponent,
HomeComponent,
HomeLayoutComponent,
PrivacyPolicyComponent,
Expand All @@ -24,6 +25,7 @@ export const ROUTES: Routes = [
{ path: 'search', component: SearchResultsComponent },
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
{ path: 'roadmap', component: RoadmapComponent },
{ path: 'help-wanted', component: HelpWantedComponent },
{ path: '**', component: FourOhFourComponent },
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class AgencySidebarComponent {
}

getIcon(agency) {
return `assets/img/logos/agencies/${agency.id}-50x50.png`;
return this.agencyService.getIcon(agency);
}

}
14 changes: 14 additions & 0 deletions src/app/components/help-wanted/card/help-wanted-card.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, Input } from '@angular/core';
import { ExternalLinkDirective } from '../../directives/external-link.directive';
import { HelpWantedItem } from '../help-wanted-item.model';

@Component({
selector: 'help-wanted-card',
styles: [require('./help-wanted-card.styles.scss')],
template: require('./help-wanted-card.template.html')
})

export class HelpWantedCardComponent {
@Input() private item: HelpWantedItem;
@Input() private mobile: string;
}
90 changes: 90 additions & 0 deletions src/app/components/help-wanted/card/help-wanted-card.styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@import '../../../../styles/base/variables';

.help-wanted-card {
height: 100%;

h3,
p {
margin: 0;
}

h3 {
line-height: 1;

a {
color: $brand-teal-medium;
font-weight: bold;
}
}

p {
color: $color-black;
line-height: 1.1;
}

small {
color: $color-gray-light;
font-size: 1em;
}

dl {
background-color: $color-cool-blue-lightest;
margin-bottom: 0.25rem;
padding: 0.75rem 0.75rem;

> div {
display: inline-block;
line-height: 1.1;
margin-left: 1rem;
text-indent: -1rem;

&:not(:last-of-type) {
margin-right: 2rem;
}
}
}

dd,
dt {
display: inline;
margin: 0;
}

dd {
font-weight: bold;
}

dt {
color: $color-gray;
}

.agency-details {
padding: 10px 0px 0px 0px;
img {
height: 25px;
vertical-align: bottom;
max-width: 100px;
}
.help-wanted-agency-name {
color: $color-gray-light;
}
}

.help-wanted-card-description {
word-wrap: break-word;
}

.help-wanted-card-actions {
a {
button {
margin-bottom: 0;
width: fit-content;

&:last-of-type {
margin-right: 0
}
}
}
}

}
Loading

0 comments on commit 7ac0c4a

Please sign in to comment.