|
| 1 | +--- |
| 2 | +description: Diretrizes para criação de conteúdo para o Vue.js A11y (posts, receitas e dicas). |
| 3 | +--- |
| 4 | + |
| 5 | +# Guia de postagens |
| 6 | + |
| 7 | +## Como iniciar |
| 8 | + |
| 9 | +Em primeiro lugar, faça uma breve pesquisa para ver se a sua ideia de postagem ainda não existe no site. |
| 10 | + |
| 11 | +Se você está procurando por ideias, temos uma [issue](https://github.com/vue-a11y/vue-a11y.com/issues/14) com várias ideias de postagem, fique à vontade para reservar um assunto. |
| 12 | + |
| 13 | +Depois de verificar, reserve sua postagem abrindo uma issue usando alguns de nossos modelos: |
| 14 | + |
| 15 | +- [New Post/Article](https://github.com/vue-a11y/vue-a11y.com/issues/new?labels=Post&template=new-post.md&title=Post%2FArticle%3A+%5BYour+title%5D) |
| 16 | +- [New Widget (Recipe)](https://github.com/vue-a11y/vue-a11y.com/issues/new?labels=Recipe,Widget&template=new-widget.md&title=Recipe%28widget%29%3A+%5BYour+title%5D) |
| 17 | +- [New Tip (Recipe)](https://github.com/vue-a11y/vue-a11y.com/issues/new?labels=Recipe,Tip&template=new-tip.md&title=Recipe%28Tip%29%3A+%5BYour+title%5D) |
| 18 | + |
| 19 | +Após reservar um assunto, fork o repositório, siga as etapas em nosso [README](https://github.com/vue-a11y/vue-a11y.com/blob/master/README.md) para instalação. |
| 20 | + |
| 21 | +Crie um arquivo markdown no diretório de tipo de postagem específico e no idioma em que a postagem será escrita. |
| 22 | + |
| 23 | +Por exemplo, conteúdo em português: |
| 24 | + |
| 25 | +- `src/pt/posts`: Para postagens do blog; |
| 26 | +- `src/pt/recipes/widgets`: Para postar widgets; |
| 27 | +- `src/pt/recipes/tips`: Para postar dicas rápidas; |
| 28 | + |
| 29 | +::: alert warning |
| 30 | +Siga a estrutura `2020-05-12-meu-post.md` |
| 31 | +::: |
| 32 | + |
| 33 | +Depois de concluir, crie um PR e solicite a revisão dos membros para os ajustes mais recentes e mescle sua postagem. |
| 34 | + |
| 35 | +## Frontmatter |
| 36 | + |
| 37 | +### Blog posts |
| 38 | + |
| 39 | +::: headerCode |
| 40 | +2020-05-12-my-post.md |
| 41 | +::: |
| 42 | +```yaml |
| 43 | +--- |
| 44 | +title: Título do post # (Obrigatório) - entre 50-65 caracteres |
| 45 | +description: Descrição do post # (Obrigatório) - no máximo até 155 caracteres |
| 46 | +summary: Resumo do post ou tl;dr # (Opcional) |
| 47 | +categories: Array de categorias que combinam com a postagem # (Obrigatório) |
| 48 | +tag: Array de tags que correspondem à postagem # (Opcional) |
| 49 | +author: Nickname do autor # (Opcional) |
| 50 | +date: YYYY/MM/DD HH:ii:ss # (Obrigatório) |
| 51 | +--- |
| 52 | +``` |
| 53 | + |
| 54 | +::: alert warning |
| 55 | +Categorias disponíveis: `[news, aria, wcag, tools, packages, spa, html]`. |
| 56 | +::: |
| 57 | + |
| 58 | +::: alert warning |
| 59 | +As tags não têm limitações, você pode criar quantas tags quiser `[screen-reader, form, ...]`. |
| 60 | +::: |
| 61 | + |
| 62 | +::: alert tip |
| 63 | +Adicione suas informações de autor `src/config/authors.json`, em breve teremos uma página dedicada aos autores do site. |
| 64 | +::: |
| 65 | + |
| 66 | +## Boas práticas |
| 67 | + |
| 68 | +- Use uma hierarquia correta de títulos; |
| 69 | +- Adicione a linguagem aos blocos de código (highlight code); |
| 70 | +- Texto alternativo em imagens; |
| 71 | +- Escreva de forma simples e compreensível; |
| 72 | +- [Evite parede de texto](https://axesslab.com/accessibility-according-to-pwd/#wall-of-text); |
| 73 | +- Use lazy-load para iframes (Componente IntersectObserver) |
| 74 | + |
| 75 | +## Usando custom-blocks |
| 76 | + |
| 77 | +### Figure + Blockquote + Figcaption |
| 78 | + |
| 79 | +::: headerCode |
| 80 | +::: |
| 81 | +``` |
| 82 | +:::: fig bq |
| 83 | +::: bq |
| 84 | +VuePress is composed of two parts: a minimalistic static site generator with a Vue-powered theming system and Plugin API, and a default theme optimized for writing technical documentation. |
| 85 | +::: |
| 86 | +::: figcap |
| 87 | +[Vuepress documentation](https://vuepress.vuejs.org/) |
| 88 | +::: |
| 89 | +:::: |
| 90 | +``` |
| 91 | + |
| 92 | +:::: fig bq |
| 93 | +::: bq |
| 94 | +VuePress is composed of two parts: a minimalistic static site generator with a Vue-powered theming system and Plugin API, and a default theme optimized for writing technical documentation. |
| 95 | +::: |
| 96 | +::: figcap |
| 97 | +[Vuepress documentation](https://vuepress.vuejs.org/) |
| 98 | +::: |
| 99 | +:::: |
| 100 | + |
| 101 | +### Tip, Note, Warning, Danger |
| 102 | + |
| 103 | +::: headerCode |
| 104 | +::: |
| 105 | +``` |
| 106 | +::: alert tip |
| 107 | +This is a tip |
| 108 | +::: |
| 109 | +
|
| 110 | +::: alert note |
| 111 | +This is a note |
| 112 | +::: |
| 113 | +
|
| 114 | +::: alert warning |
| 115 | +This is a warning |
| 116 | +::: |
| 117 | +
|
| 118 | +::: alert danger |
| 119 | +This is a danger |
| 120 | +::: |
| 121 | +``` |
| 122 | + |
| 123 | +::: alert tip |
| 124 | +This is a tip |
| 125 | +::: |
| 126 | + |
| 127 | +::: alert note |
| 128 | +This is a note |
| 129 | +::: |
| 130 | + |
| 131 | +::: alert warning |
| 132 | +This is a warning |
| 133 | +::: |
| 134 | + |
| 135 | +::: alert danger |
| 136 | +This is a danger |
| 137 | +::: |
| 138 | + |
| 139 | +### Figure + HeaderCode + Code block + Figcaption |
| 140 | + |
| 141 | +``` |
| 142 | +:::: fig code |
| 143 | +::: headerCode |
| 144 | +main.js |
| 145 | +::: |
| 146 | +``js |
| 147 | +import Vue from 'vue' |
| 148 | +import VueAnnouncer from '@vue-a11y/announcer' |
| 149 | + |
| 150 | +Vue.use(VueAnnouncer) |
| 151 | +`` |
| 152 | +::: figcap |
| 153 | +Basic usage of Vue announcer |
| 154 | +::: |
| 155 | +:::: |
| 156 | +``` |
| 157 | + |
| 158 | +:::: fig code |
| 159 | +::: headerCode |
| 160 | +main.js |
| 161 | +::: |
| 162 | +```js |
| 163 | +import Vue from 'vue' |
| 164 | +import VueAnnouncer from '@vue-a11y/announcer' |
| 165 | + |
| 166 | +Vue.use(VueAnnouncer) |
| 167 | +``` |
| 168 | +::: figcap |
| 169 | +Basic usage of Vue announcer |
| 170 | +::: |
| 171 | +:::: |
| 172 | + |
| 173 | +### headerCode + Code block |
| 174 | + |
| 175 | +``` |
| 176 | +::: headerCode |
| 177 | +main.js |
| 178 | +::: |
| 179 | +``js |
| 180 | +import Vue from 'vue' |
| 181 | +import VueAnnouncer from '@vue-a11y/announcer' |
| 182 | + |
| 183 | +Vue.use(VueAnnouncer) |
| 184 | +`` |
| 185 | +``` |
| 186 | + |
| 187 | +::: headerCode |
| 188 | +main.js |
| 189 | +::: |
| 190 | +```js |
| 191 | +import Vue from 'vue' |
| 192 | +import VueAnnouncer from '@vue-a11y/announcer' |
| 193 | + |
| 194 | +Vue.use(VueAnnouncer) |
| 195 | +``` |
| 196 | + |
| 197 | +## Vue in markdown |
| 198 | + |
| 199 | +### Componente IntersectionObserver |
| 200 | + |
| 201 | +Use este component para lazy load de iframes, images, dentre outras medias. |
| 202 | + |
| 203 | +```vue |
| 204 | +<intersection-observer> |
| 205 | + <template v-slot="data"> |
| 206 | + <iframe |
| 207 | + v-if="data.show" |
| 208 | + src="https://caniuse.bitsofco.de/embed/index.html?feat=hidden&periods=future_1,current,past_1,past_2" |
| 209 | + height="420" |
| 210 | + allowfullscreen="true" |
| 211 | + style="width: 100%"> |
| 212 | + </iframe> |
| 213 | + </template> |
| 214 | +</intersection-observer> |
| 215 | +``` |
0 commit comments