Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 82d805f

Browse files
committed
include caption on img
1 parent d5e631c commit 82d805f

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

src/components.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export namespace Components {
174174
'listenFor': string;
175175
}
176176
interface DocsZoomableImage {
177+
'caption'?: string;
177178
'close': () => Promise<void>;
178179
'href': string;
179180
'open': () => Promise<void>;
@@ -641,6 +642,7 @@ declare namespace LocalJSX {
641642
'listenFor'?: string;
642643
}
643644
interface DocsZoomableImage {
645+
'caption'?: string;
644646
'href'?: string;
645647
}
646648
interface FileTree {}

src/components/menu/templates/api.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export default () => {
88
const items = {
99
'API Hub': {
1010
'Introdução': '/docs/api/apihub',
11+
'Consumindo dados de uma Action': '/docs/api/apihub/consumindo',
12+
'Fornecendo dados para uma Action': '/docs/api/apihub/fornecendo'
1113
},
1214
...(menuData.apihub)
1315
}

src/components/zoomable-image/zoomable-image.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
transition: 0.3s;
66
}
77

8+
.notModalImgCaption {
9+
text-align: left;
10+
font-size: 0.8em;
11+
line-height: 1.7;
12+
font-style: italic;
13+
}
14+
815
.notModalImg:hover {opacity: 0.7;}
916

1017
/* The Modal (background) */

src/components/zoomable-image/zoomable-image.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Component, Element, Prop, h, State, Listen, Method } from '@stencil/cor
66
})
77
export class ZoomableImage {
88
@Prop() href: string
9+
@Prop() caption?: string
910
@State() isOpen = false
1011
@Element() element: HTMLElement;
1112
@Listen('click', { target: 'window' })
@@ -33,7 +34,10 @@ export class ZoomableImage {
3334

3435
return (
3536
<div>
36-
<img onClick={this.open.bind(this)} class="notModalImg" src={this.href} alt="Integrando sua Startup" />
37+
<figure>
38+
<img onClick={this.open.bind(this)} class="notModalImg" src={this.href} alt="Integrando sua Startup" />
39+
<figcaption class="notModalImgCaption">{this.caption}</figcaption>
40+
</figure>
3741
<div class={ this.isOpen ? "openModal" : "modal" }>
3842
<span onClick={this.close.bind(this)} class="close">&times;</span>
3943
<img class="modalImg" src={this.href} />

src/pages/api/apihub.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ O Layers API Hub é uma funcionalidade do ecossistema Layers que permite Apps co
1111
Para cada uma dessas actions, está disponível ao menos um App desenvolvido pela Layers que disponibiliza essas informações. Assim, Apps fornecedores podem se responsabilizar apenas em fornecer as informações requisitadas via actions e outros Apps consumidores se responsabilizam por expor essas informações da melhor maneira para os usuários da Layers.
1212

1313
Para exemplificar, observe:
14-
<docs-zoomable-image href="/docs/assets/images/flow-erp.png"></docs-zoomable-image>
15-
O app mais a esquerda é o “Notas Acadêmicas” e irá representar apps que necessitam de requisitar dados (App consumidor). Já o app mais a direita é o “ERP Modelo” e irá representar os apps que podem prover dados para outros apps (App fornecedor).
14+
<docs-zoomable-image href="/docs/assets/images/flow-erp.png" caption="O app mais a esquerda é o “Notas Acadêmicas” e irá representar apps que necessitam de requisitar dados (App consumidor). Já o app mais a direita é o “ERP Modelo” e irá representar os apps que podem prover dados para outros apps (App fornecedor)."></docs-zoomable-image>
1615
## Como funciona ?
1716

1817
+ <strong> 1 - App requisita informações </strong>

0 commit comments

Comments
 (0)