Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Commit

Permalink
Make initial view updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalcic committed Oct 14, 2018
1 parent 55812b7 commit d5243b3
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 149 deletions.
2 changes: 2 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"styles": [
"src/styles/all-stylesheets.css",
"src/styles/angular.css"
],
"scripts": []
},
Expand Down Expand Up @@ -71,6 +72,7 @@
"scripts": [],
"styles": [
"src/styles/all-stylesheets.css",
"src/styles/angular.css"
],
"assets": [
"src/assets"
Expand Down
22 changes: 7 additions & 15 deletions src/app/404/not-found.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<section>
<div class="container a4">
<div class="three unit row">
<div class="unit column grows">
<h1><span class="pixel">Error 404</span> Not Found</h1>
</div>
</div>
<div class="two half unit row">
<div class="unit column grows">
<p>Sorry, there doesn't appear to be a page at this location.<br>Think this is wrong? <a href="mailto:[email protected]?subject=Missing page">Let us know</a></p>
<p>If you’re a sponsor, are you using your magic link? You’ll need it to access the site.</p>
</div>
</div>
</div>
</section>
<h1 rows="1.0"><span class="pixel">Error 404</span> Not Found</h1>
<div rows="2.5">
<p>
Sorry, there doesn't appear to be a page at this location.<br>Think this is wrong? <a href="mailto:[email protected]?subject=Missing page">Let us know</a>
</p>
<p>If you’re a sponsor, are you using your magic link? You’ll need it to access the site.</p>
</div>
34 changes: 6 additions & 28 deletions src/app/admin/admin.component.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
<section>
<div class="container a4">
<div class="three unit row">
<div class="unit column grows">
<h1>Account Admin</h1>
</div>
</div>
<div class="two unit row">
<div class="unit column grows">
<h3>Registered sponsors</h3>
</div>
</div>
<div *ngFor="let sponsor of sponsors" class="one half unit row">
<div class="unit column grows">
<p>
<a rel="next" [routerLink]="[ '/', sponsor.id ]">{{ sponsor.name }}</a>
</p>
</div>
</div>
<div class="one half unit row">
<div class="unit column grows">
<div>
<button [routerLink]="[ '/admin/new' ]">Add Sponsor &rarr;</button>
</div>
</div>
</div>
</div>
</section>
<h1 rows="3">Account Admin</h1>
<h3 rows="2">Registered sponsors</h3>
<a rel="next" rows="1.5" *ngFor="let sponsor of sponsors" [routerLink]="[ '/', sponsor.id ]">{{ sponsor.name }}</a>
<div rows="1.5">
<button [routerLink]="[ '/admin/new' ]">Add Sponsor &rarr;</button>
</div>
62 changes: 28 additions & 34 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
<header class="black">
<div class="container width">
<div class="three unit row">
<div class="two half unit column">
<img id="hack-cambridge-logo-object" draggable="false" src="/assets/images/logo.svg" alt="Hack Cambridge Logo">
</div>
<div class="nine unit column">
<h2>Hack Cambridge<br><span class="pixel">Ternary</span></h2>
</div>
</div>
<div class="one half unit row">
<div class="two half unit column"></div>
<div class="six unit column">
<h3>{{ companyName ? "Hi " + companyName + "!" : 'Sponsorship Portal' }}</h3>
</div>
</div>
</div>
<header color="black" layout="width" grid="grid" rows="2.5">
<img columns="2.5" draggable="false" src="/assets/images/logo.svg" alt="Hack Cambridge Logo"/>
<div columns="5.5">
<h1 id="wordmark">Hack Cambridge<br><span class="pixel">Sponsors' Portal</span></h1>
</div>
</header>
<main>

<router-outlet></router-outlet>
<main layout="width">
<section *ngIf="companyName" color="red" grid="grid" rows="0.5">
<h3 columns="8.0">Hi {{companyName}}!</h3>
</section>
<router-outlet></router-outlet>
</main>
<footer class="black">
<div class="container width">
<div class="three unit row">
<div class="unit column grows">
<p>
Copyright © Hack Cambridge {{ year }}. All rights reserved.
</p>
<a rel="next" href="/terms-and-conditions">Terms and Conditions</a>
<a rel="next" href="/privacy-policy">Privacy Policy</a>
<a rel="next" href="/faqs">FAQs</a>
<a rel="next" href="https://static.mlh.io/docs/mlh-code-of-conduct.pdf">MLH Code of Conduct</a>
</div>
</div>
</div>
<footer grid="rows" layout="width" rows="2.0">
<div>
<ul>
<li>
<a rel="next" href="/terms-and-conditions">Terms and Conditions</a>
</li>
<li>
<a rel="next" href="/privacy-policy">Privacy Policy</a>
</li>
<li>
<a rel="next" href="/faqs">FAQs</a>
</li>
<li>
<a rel="next" href="https://static.mlh.io/docs/mlh-code-of-conduct.pdf">MLH Code of Conduct</a>
</li>
</ul>
<small>&copy; Hack Cambridge {{ year }}. All rights reserved.</small>
</div>
</footer>
26 changes: 6 additions & 20 deletions src/app/login/login.component.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<section>
<div class="container a4">
<div class="three unit row">
<div class="unit column grows">
<h1>Log in</h1>
</div>
</div>
<div class="one half unit persistent row content">
<div class="three unit column">
<input type="text" placeholder="Email" [(ngModel)]="email">
</div>
<div class="three unit column">
<input type="password" placeholder="Password" [(ngModel)]="password">
</div>
<div class="one unit column">
<button type="button" (click)="login()">Log in</button>
</div>
</div>
</div>
</section>
<h1 rows="3.0">Log in</h1>
<div grid="columns" rows="0.5" columns="1.0" align-last="right">
<input type="text" placeholder="Email" [(ngModel)]="email">
<input type="password" placeholder="Password" [(ngModel)]="password">
<button type="button" (click)="login()">Log in</button>
</div>
69 changes: 17 additions & 52 deletions src/app/newSponsor/new-sponsor.component.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,17 @@
<section>
<div class="container a4">
<div class="three unit row">
<div class="unit column grows">
<h1>New Sponsor</h1>
</div>
</div>
<div class="two half unit row">
<div class="unit column grows">
<div class="unit persistent content row">
<div class="five unit column grows">
<div><input type="text" placeholder="Company name" [(ngModel)]="sponsorName"></div>
</div>
<div class="two unit column grows">
<input type="text" placeholder="Tier name" [(ngModel)]="tier">
</div>
<div class="three unit column grows">
<input type="number" placeholder="Maximum number of recruiters" [(ngModel)]="maxRecruiters">
</div>
</div>
</div>
</div>
<div class="two unit row">
<div class="unit column grows">
<h3>Benefits</h3>
</div>
</div>
<div class="five unit row">
<div class="four half unit columns balance">
<label *ngFor="let benefit of benefits; let i = index">
<input type="checkbox" value="Company Name" [(ngModel)]="selectedBenefits[i]">
{{ benefit.name }}<br>
</label>
</div>
</div>
<div class="two unit row">
<div class="unit column grows">
<div>
<button (click)="addBenefit()">Add new benefit &rarr;</button>
</div>
</div>
</div>
<div class="one half unit row">
<div class="one unit column grows">
<div>
<button type="submit" (click)="saveSponsor()">Save.</button>
</div>
</div>
</div>
</div>
</section>

<h1 rows="3.0">New Sponsor</h1>
<div rows="4.0">
<input type="text" placeholder="Company name" [(ngModel)]="sponsorName">
<input type="text" placeholder="Tier name" [(ngModel)]="tier">
<input type="number" placeholder="Maximum number of recruiters" [(ngModel)]="maxRecruiters">
</div>
<h3 rows="3.0">Benefits</h3>
<label rows="0.5" *ngFor="let benefit of benefits; let i = index">
<input type="checkbox" value="Company Name" [(ngModel)]="selectedBenefits[i]">
{{ benefit.name }}<br>
</label>
<div rows="2.0">
<button (click)="addBenefit()">Add new benefit &rarr;</button>
</div>
<div rows="1.5">
<button type="submit" (click)="saveSponsor()">Save.</button>
</div>
22 changes: 22 additions & 0 deletions src/styles/angular.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
router-outlet {
display: none;
}

@media (max-width: calc(482pt + (57pt * 2) - 1pt)) {

/* Margins between top-level elements */

app-not-found > *:not(:first-child) {
margin-top: calc(var(--unit) / 2);
}
}

@media (min-width: calc(482pt + (57pt * 2))) {

app-not-found {
grid-auto-rows: calc(var(--unit) / 2);
}
app-not-found > * {
grid-row: span calc(var(--rows) * 2 + var(--half-row));
}
}

0 comments on commit d5243b3

Please sign in to comment.