Skip to content

Commit

Permalink
fix(docs): book component (scullyio#715)
Browse files Browse the repository at this point in the history
* fix(docs): book component

Fix test snapshots

* WIP:

* change the href to routerLink

Co-authored-by: jorgeucano <[email protected]>
  • Loading branch information
GuzmanPI and jorgeucano authored Jul 14, 2020
1 parent 86899e7 commit 3e68794
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 38 deletions.
4 changes: 2 additions & 2 deletions apps/scully-docs/src/app/components/book/book.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div>
<a [routerLink]="href">
<img src="assets/book.png" alt="Book icon" />

<div class="card-content">
<h3>{{ header }}</h3>
<p>{{ text }}</p>
</div>
</div>
</a>
1 change: 1 addition & 0 deletions apps/scully-docs/src/app/components/book/book.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Component, Input, OnInit } from '@angular/core';
export class BookComponent implements OnInit {
@Input() header: string;
@Input() text: string;
@Input() href: string;

constructor() {}

Expand Down
1 change: 1 addition & 0 deletions apps/scully-docs/src/app/landing/landing.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ main {
.guide-2 {
grid-column-start: inherit;
grid-column-end: inherit;
cursor: pointer;
}
}

Expand Down
8 changes: 5 additions & 3 deletions apps/scully-docs/src/app/landing/landing.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h3>FEATURES</h3>
[header]="'Runtime Tooling'"
text="
Scully gives developers the necessary tools
to Jamstackify any Angular project,
to Jamstackify any Angular project,
including fine-grained control where needed.
"
[iconUrl]="'assets/machine-learning.png'"
Expand Down Expand Up @@ -109,15 +109,17 @@ <h3>TOOLS & RESOURCES</h3>
</div>

<div class="container-tools">
<div class="guide-1" [routerLink]="'/docs/getting-started'">
<div class="guide-1">
<app-book
[href]="'docs/getting-started/'"
[header]="'Guides'"
[text]="'Easy step by step guides to help get you started.'"
>
</app-book>
</div>
<div class="guide-2" [routerLink]="'/docs/blog'">
<div class="guide-2">
<app-book
[href]="'docs/blog/'"
[header]="'Create a Blog'"
[text]="
'Easy step by step to create your own blog in less than 5 minutes.'
Expand Down
9 changes: 5 additions & 4 deletions apps/scully-docs/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ nav > app-button > a.router-link-active:active {
}

/* BOOKS */
app-book > div {
app-book > a {
width: 90%;
margin: auto;
min-height: 160px;
Expand All @@ -218,21 +218,22 @@ app-book > div {
display: flex;
justify-content: flex-start;
align-items: center;
text-decoration: none;
}

app-book > div > img {
app-book > a > img {
height: 80px;
margin: 40px;
}

app-book > div > .card-content > h3 {
app-book > a > .card-content > h3 {
color: var(--scully-green);
margin-bottom: 0;
margin-top: 5px;
text-align: left;
}

app-book > div > .card-content > p {
app-book > a > .card-content > p {
text-align: left;
line-height: 2;
margin-bottom: 0;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"changelog": "npx conventional-changelog -p scully -i ./CHANGELOG.md -s && git add ./CHANGELOG.md",
"commit": "git add . && npx git-cz",
"commit:select": "npx git-cz",
"fullPublish": "nx workspace-schematic publish"
"fullPublish": "nx workspace-schematic publish",
"full-build": "npm i && npm run symlinks && npm run build:code && npm run build:sample && npm run build:docs && npm run jest:test && npm run cypress:e2e:server"
},
"private": true,
"dependencies": {
Expand Down
56 changes: 28 additions & 28 deletions tests/jest/src/__tests__/__snapshots__/docsThere.spec.ts.snap

Large diffs are not rendered by default.

0 comments on commit 3e68794

Please sign in to comment.