Skip to content

Commit 3eda212

Browse files
committed
Add sandbox example
1 parent 1b77ba8 commit 3eda212

File tree

6 files changed

+88
-1
lines changed

6 files changed

+88
-1
lines changed

src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { NgModule } from '@angular/core';
44
import { AppRoutingModule } from './app-routing.module';
55

66
import { AppComponent } from './app.component';
7+
import { SandboxExampleComponent } from './sandbox-example/sandbox-example.component';
78
import { PlayingCardExampleComponent } from './playing-card-example/playing-card-example.component';
89
import { PlayingCardComponent } from './playing-card/playing-card.component';
910
import { ImageGalleryExampleComponent } from './image-gallery-example/image-gallery-example.component';
@@ -16,13 +17,14 @@ import { ChessboardExampleComponent } from './chessboard-example/chessboard-exam
1617
@NgModule({
1718
declarations: [
1819
AppComponent,
20+
SandboxExampleComponent
1921
PlayingCardExampleComponent,
2022
PlayingCardComponent,
2123
ImageGalleryExampleComponent,
2224
CaptionedImageComponent,
2325
CaptionedImageExampleComponent,
2426
ChessboardExampleComponent,
25-
WelcomeComponent
27+
WelcomeComponent,
2628
],
2729
imports: [
2830
BrowserModule,

src/app/examples.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { SandboxExampleComponent } from './sandbox-example/sandbox-example.component';
12
import { ImageGalleryExampleComponent } from './image-gallery-example/image-gallery-example.component';
23
import { CaptionedImageExampleComponent } from './captioned-image-example/captioned-image-example.component';
34
import { PlayingCardExampleComponent } from './playing-card-example/playing-card-example.component';
45
import { ChessboardExampleComponent } from './chessboard-example/chessboard-example.component';
56

67
export const examples = [
8+
{ path: 'sandbox-example', component: SandboxExampleComponent },
79
{ path: 'image-gallery-example', component: ImageGalleryExampleComponent },
810
{ path: 'captioned-image-example', component: CaptionedImageExampleComponent },
911
{ path: 'playing-card-example', component: PlayingCardExampleComponent },
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<div class="sandbox">
2+
3+
<header>
4+
<h1>Happy Little Sandbox</h1>
5+
</header>
6+
7+
<footer>
8+
<h2>We don't make mistakes, just happy little accidents.</h2>
9+
</footer>
10+
11+
<main>
12+
<p>
13+
You're meant to have fun in life. You gotta think like a tree.
14+
Automatically, all of these beautiful, beautiful things will happen. Only
15+
think about one thing at a time. As long as you believe.
16+
</p>
17+
18+
<p>
19+
You can do anything here - the only pre-requisite is that it makes you
20+
happy. The secret to doing anything is believing that you can do it.
21+
Anything that you believe you can do strong enough, you can do. Anything.
22+
Let's do that again.
23+
</p>
24+
25+
<p>
26+
It is a lot of fun. There's nothing wrong with having a tree as a friend.
27+
Maybe there's a happy little Evergreen that lives here. I can't think of
28+
anything more rewarding than being able to express yourself to others
29+
through painting. Only eight colors that you need.
30+
</p>
31+
32+
<p>
33+
We artists are a different breed of people. We're a happy bunch. Let's put
34+
some highlights on these little trees. The sun wouldn't forget them.
35+
Sometimes you learn more from your mistakes than you do from your
36+
masterpieces.
37+
</p>
38+
39+
<p>
40+
If you don't like it - change it. It's your world. A tree needs to be your
41+
friend if you're going to paint him. You can spend all day playing with
42+
mountains. Just make little strokes like that. For the lack of a better
43+
word I call them hangy downs. It's a super day, so why not make a beautiful
44+
sky?
45+
</p>
46+
</main>
47+
48+
<img src="/assets/misc/bob.jpg">
49+
50+
</div>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.sandbox {
2+
background-color: gold;
3+
padding: 20px;
4+
}
5+
6+
.sandbox > * {
7+
background-color: white;
8+
padding: 20px;
9+
}
10+
11+
img {
12+
width: 100%;
13+
}
14+
15+
header {
16+
}
17+
18+
main {
19+
}
20+
21+
footer {
22+
}
23+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'cgp-sandbox-example',
5+
templateUrl: './sandbox-example.component.html',
6+
styleUrls: ['./sandbox-example.component.scss']
7+
})
8+
export class SandboxExampleComponent implements OnInit {
9+
static label: string = 'Sandbox';
10+
}

src/assets/misc/bob.jpg

92.3 KB
Loading

0 commit comments

Comments
 (0)