Skip to content
Open
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
4 changes: 3 additions & 1 deletion .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.styl"
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/font-awesome/css/font-awesome.min.css",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is fine to use Font Awesome, but the use of Bootstrap should be reviewed. Perhaps it would be better and cleaner not to use a CSS framework.

"styles.styl"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
Expand Down
1,726 changes: 1,218 additions & 508 deletions package-lock.json

Large diffs are not rendered by default.

35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,33 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^4.4.3",
"@angular/common": "^4.4.3",
"@angular/compiler": "^4.4.3",
"@angular/core": "^4.4.3",
"@angular/forms": "^4.4.3",
"@angular/http": "^4.4.3",
"@angular/platform-browser": "^4.4.3",
"@angular/platform-browser-dynamic": "^4.4.3",
"@angular/router": "^4.4.3",
"@angular/animations": "^5.0.3",
"@angular/common": "^5.0.3",
"@angular/compiler": "^5.0.3",
"@angular/core": "^5.0.3",
"@angular/forms": "^5.0.3",
"@angular/http": "^5.0.3",
"@angular/platform-browser": "^5.0.3",
"@angular/platform-browser-dynamic": "^5.0.3",
"@angular/platform-server": "^5.0.3",
"@angular/router": "^5.0.3",
"angularfire2": "^5.0.0-rc.3",
"angulartics2": "^4.0.1",
"bootstrap": "^4.0.0-beta.2",
"core-js": "^2.4.1",
"firebase": "^4.6.0",
"rxjs": "^5.4.2",
"font-awesome": "^4.7.0",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.4.2",
"@angular/compiler-cli": "^4.4.3",
"@angular/language-service": "^4.4.3",
"@angular/cli": "1.5.2",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.1.1",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
Expand All @@ -48,7 +51,7 @@
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
3 changes: 2 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<app-login></app-login>
<router-outlet></router-outlet>
<router-outlet></router-outlet>
<app-footer></app-footer>
56 changes: 38 additions & 18 deletions src/app/shared/components/event/event.component.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
<div class="card event-container">
<div class="event-description">
<h2>{{eventData?.name}}</h2>
<div>{{eventData?.time | date}}</div>
<div [innerHtml]="eventData?.description"></div>

<div>
<a [href]="eventData?.link">{{eventData?.link}}</a>
<header class="masthead">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="site-heading">
<h1>Evento</h1>
<span class="subheading">Unete a nuestra comunidad</span>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="event-description">
<h2 class="display-4">{{eventData?.name}}</h2>
<p class="text-date"><i class="fa fa-calendar" aria-hidden="true"></i> {{eventData?.time | date}}</p>
<hr>
<div [innerHtml]="eventData?.description"></div>

<div class="event-location-attendees">
<app-rsvp [eventId]="eventData?.id"></app-rsvp>
<h3>Lugar</h3>
<div>{{eventData?.venue.name}}</div>
<img src="{{eventData?.mapPic}}" alt="Mapa para llegar a {{eventData?.venue.name}}">

<div>
{{eventData?.venue.address_1}}, {{eventData?.venue.city}}, {{eventData?.venue.localized_country_name}}
<div>
<a [href]="eventData?.link">{{eventData?.link}}</a>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="event-location-attendees">
<app-rsvp [eventId]="eventData?.id"></app-rsvp>
<h3 class="display-4">Lugar</h3>
<div><i class="fa fa-map-marker" aria-hidden="true"></i> {{eventData?.venue.name}}</div>
<div class="row">
<img src="{{eventData?.mapPic}}" alt="Mapa para llegar a {{eventData?.venue.name}}">
</div>

<div>
<app-attendees-list [eventId]="eventData?.id"></app-attendees-list>
<div class="row">
<p>{{eventData?.venue.address_1}}, {{eventData?.venue.city}}</p>
<p>{{eventData?.venue.localized_country_name}}</p>
</div>
</div>
<hr>
<app-attendees-list [eventId]="eventData?.id"></app-attendees-list>
</div>
</div>
</div>
61 changes: 45 additions & 16 deletions src/app/shared/components/event/event.component.styl
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
.event-container
display flex
padding 0.5em
height 67vh
overflow-y auto

.event-description
width 70%
$fonts-text = 'Open Sans', 'Helvetica Neue', Arial, sans-serif
$color-background = #868e96
$color-background-o = #212529

h2
margin-top 0
margin-bottom 0
header
&.masthead
margin-bottom 50px
background no-repeat center center
background-color $color-background
background-attachment scroll
position relative
-webkit-background-size cover
-moz-background-size cover
-o-background-size cover
background-size cover
background-image: url("../../../../assets/backgrounds/event-image.png");

h3
margin-top 0.2em
margin-bottom 0.1em
header
&.masthead
.overlay
position absolute
top 0
left 0
height 100%
width 100%
background-color $color-background-o
opacity .5

img
width 300px
header
&.masthead
.site-heading
h1
font-size 80px
color #fff

header.masthead .page-heading, header.masthead .site-heading
text-align center
padding 100px 0;

header.masthead .page-heading .subheading, header.masthead .site-heading .subheading

font-size 24px
font-weight 300
line-height 1.1
display block
margin 10px 0 0
font-family $fonts-text
color #fff
29 changes: 27 additions & 2 deletions src/app/shared/components/event/event.component.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
import { Component, OnInit, Input } from '@angular/core';
import { environment } from './../../../../environments/environment';
import { MeetupService } from './../../../core/services/meetup.service';

@Component({
selector: 'app-event',
templateUrl: './event.component.html',
styleUrls: ['./event.component.styl']
})
export class EventComponent implements OnInit {
@Input() public eventData;

eventData;

constructor() { }
/**
* @param meetupService {MeetupService} Injection of MeetupService
*/

constructor(private meetupService: MeetupService) { }

ngOnInit() {
this.meetupService.getNextEvents().subscribe((eventResponse) => {
const event = eventResponse[0];
if(event.venue) {
const staticMapsUrl = `https://maps.googleapis.com/maps/api/staticmap`;
const staticMapsUrlProps = [
['center', `${event.venue.lat},${event.venue.lon}`],
['zoom', '17'],
['markers', `color:red|${event.venue.lat},${event.venue.lon}`],
['size', '300x300'],
['key', environment.staticMapsKey],
].reduce((acc, elem) => acc += encodeURI(`${elem[0]}=${elem[1]}&`), '?');

event.mapPic = staticMapsUrl + staticMapsUrlProps;
}

this.eventData = event;
console.log(this.eventData);
});
}

}
25 changes: 25 additions & 0 deletions src/app/shared/components/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto text-center">
<h2 class="section-heading">Sigamos en contacto!</h2>
<hr class="my-4">
<p class="mb-5"></p>
</div>
</div>
<div class="row">
<div class="col-lg-4 ml-auto text-center">
<i class="fa fa-meetup fa-3x mb-3 sr-contact"></i>
<p>
<a href="https://www.meetup.com/es-ES/Angular-Colombia/" target="_blank">Angular Colombia</a>
</p>
</div>
<div class="col-lg-4 mr-auto text-center">
<i class="fa fa-twitter fa-3x mb-3 sr-contact"></i>
<p>
<a href="https://twitter.com/AngularCO" target="_blank">@AngularCO</a>
</p>
</div>
</div>
</div>
</section>
25 changes: 25 additions & 0 deletions src/app/shared/components/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { FooterComponent } from './footer.component';

describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Empty file.
15 changes: 15 additions & 0 deletions src/app/shared/components/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.styl']
})
export class FooterComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
32 changes: 24 additions & 8 deletions src/app/shared/components/header/header.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
<header>
<div class="app-header">
<h1>Angular Colombia</h1>
<header class="masthead text-center text-white d-flex">
<div class="overlay"></div>
<div class="container my-auto">
<div class="row">
<div class="col-lg-10 mx-auto">
<h1 class="text-uppercase">
<strong>Angular Colombia</strong>
</h1>
<hr>
</div>
<div class="col-lg-8 mx-auto">
<div *ngIf="nextEvent" class="next-event-header">
<h3 class="text-faded"><a [routerLink]="['/event', nextEvent.id]">{{nextEvent?.name}}</a></h3>
<p class="text-faded"><i class="fa fa-calendar" aria-hidden="true"></i> {{nextEvent?.time | date}}, {{nextEvent?.time | date: 'shortTime'}}</p>
<p class="text-faded"><i class="fa fa-map-marker" aria-hidden="true"></i> {{nextEvent?.venue.address_1}}, {{nextEvent?.venue.city}}</p>
<a class="btn btn-primary btn-xl js-scroll-trigger" [href]="nextEvent?.link" target="_blank">Unirse</a>
</div>
<div *ngIf="!nextEvent">
<p class="text-faded mb-5">Únete a nuestra comunidad.</p>
<a class="btn btn-primary btn-xl js-scroll-trigger" href="#about">Meetup</a>
</div>
</div>
</div>
</div>

<div class="next-event-widget-container">
<app-event [eventData]="nextEvent"></app-event>
</div>
</header>
</header>
Loading