-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from skycoin/develop
Merge to master
- Loading branch information
Showing
31 changed files
with
445 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# STEP 1, build dist | ||
FROM node:11-alpine as node | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . ./ | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
# STEP 2, run it with nginx | ||
FROM nginx:1.15.8-alpine | ||
|
||
WORKDIR /usr/share/nginx/html | ||
|
||
COPY --from=node /usr/src/app/nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=node /usr/src/app/dist/cx-website/ ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
include /etc/nginx/mime.types; | ||
|
||
gzip on; | ||
gzip_min_length 1000; | ||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<app-header></app-header> | ||
|
||
<router-outlet></router-outlet> | ||
|
||
<app-footer></app-footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<footer> | ||
<div class="container"> | ||
<div class="links"> | ||
<a href="https://www.skycoin.net" target="_blank" rel="noreferrer nofollow"> | ||
<img src="../../assets/img/skycoin-logo.svg" alt="Skycoin" width="157"> | ||
</a> | ||
|
||
<nav> | ||
<a routerLink="/docs">Docs</a> | ||
<a routerLink="/examples">Examples</a> | ||
<a routerLink="/about">About</a> | ||
<a href="https://www.skycoin.net/blog/tags/cx/" target="_blank" rel="noreferrer nofollow">Blog</a> | ||
</nav> | ||
</div> | ||
<div class="separator"></div> | ||
<div class="social"> | ||
<span>© Skycoin.net 2019</span> | ||
<div> | ||
<a href="https://t.me/skycoin_cx" target="_blank" rel="noreferrer nofollow"> | ||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="#path0_fill" transform="translate(.04 .4)" fill="#0072FF"/><defs><path id="path0_fill" d="M6.78 14.209l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L4.74 8.86l-4.1-1.3c-.88-.25-.89-.86.2-1.3L16.81.1c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L9.6 11.86l-1.99 1.93c-.23.23-.42.42-.83.42z"/></defs></svg> | ||
</a> | ||
<a href="https://github.com/skycoin/cx" target="_blank" rel="noreferrer nofollow"> | ||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@import 'variables'; | ||
|
||
footer { | ||
background: $blue-dark; | ||
padding: 90px 0 60px; | ||
margin-top: -30px; | ||
|
||
.links, .social { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.separator { | ||
border-top: 1px solid hsla(0, 0%, 100%, .12); | ||
margin: 30px 0; | ||
} | ||
|
||
svg { | ||
margin-left: 60px; | ||
width: 20px; | ||
height: 20px; | ||
fill: $blue; | ||
} | ||
|
||
nav { | ||
a { | ||
margin-left: 30px; | ||
color: #616d7c; | ||
text-decoration: none; | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
.social span { | ||
color: #616d7c; | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
@media (max-width: map-get($bp, sm)) { | ||
footer { | ||
padding: 60px 0 30px; | ||
} | ||
|
||
.links { | ||
padding: 0 30px; | ||
flex-direction: column; | ||
align-items: flex-start !important; | ||
|
||
img { | ||
margin-bottom: 30px; | ||
} | ||
|
||
a { | ||
margin-left: 0 !important; | ||
margin-right: 30px; | ||
} | ||
} | ||
|
||
.social { | ||
padding: 0 30px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.scss'] | ||
}) | ||
export class FooterComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<div class="container"> | ||
<iframe src="../../../../assets/books/cx-programming-language.pdf" frameborder="0"></iframe> | ||
<main *ngIf="book"> | ||
<div class="heading"> | ||
<h1>{{ book.title }}</h1> | ||
<a [href]="path(book.file)" download="">Download</a> | ||
</div> | ||
<iframe [src]="path(book.file)" frameborder="0"></iframe> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
iframe { | ||
width: 100%; | ||
height: 100vh; | ||
border: none; | ||
@import 'variables'; | ||
|
||
main { | ||
padding-bottom: 0; | ||
|
||
.heading { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 30px; | ||
|
||
h1 { | ||
margin: 0; | ||
font-weight: normal; | ||
} | ||
} | ||
|
||
iframe { | ||
width: calc(100% + 60px); | ||
height: 100vh; | ||
border: none; | ||
margin: 0 -30px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,42 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
import { DomSanitizer } from '@angular/platform-browser'; | ||
|
||
@Component({ | ||
selector: 'app-book', | ||
templateUrl: './book.component.html', | ||
styleUrls: ['./book.component.scss'] | ||
}) | ||
export class BookComponent implements OnInit { | ||
book; | ||
|
||
constructor() { } | ||
readonly books = [ | ||
{ | ||
title: 'CX Programming Language', | ||
route: 'cx-programming-language', | ||
file: 'cx-programming-language.pdf' | ||
}, | ||
]; | ||
|
||
constructor( | ||
private route: ActivatedRoute, | ||
private router: Router, | ||
private sanitizer: DomSanitizer, | ||
) { } | ||
|
||
ngOnInit() { | ||
this.route.paramMap.subscribe(map => { | ||
const book = this.books.find(b => b.route === map.get('book')); | ||
|
||
if (!book) { | ||
this.router.navigate(['/']); | ||
} else { | ||
this.book = book; | ||
} | ||
}); | ||
} | ||
|
||
path(file: string) { | ||
return this.sanitizer.bypassSecurityTrustResourceUrl(`../../../../assets/books/${file}`); | ||
} | ||
} |
Oops, something went wrong.