Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relecture de views.md #12

Merged
merged 3 commits into from
Sep 18, 2017
Merged

Relecture de views.md #12

merged 3 commits into from
Sep 18, 2017

Conversation

MachinisteWeb
Copy link
Member

Un nouveau morceau ;)

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>

This layout is special since you should not include `<nuxt/>` inside its template. You must see this layout as a component displayed when an error occurs (404, 500, etc).
Cette mise en page est spéciale car vous ne devez pas inclure `<nuxt />` dans son modèle. Vous devez voir cette mise en page en tant que composant affiché lorsqu'une erreur se produit (404, 500, etc.).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"est spéciale, car"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haeresis as-tu manqué celui-ci?

Copy link
Member Author

@MachinisteWeb MachinisteWeb Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je sais pourquoi tu as ajouté une virgule :) C'est pour indiquer un rythme de lecture. C'est aussi comme ça que je le lirais !

Pour ma part, je n'aime généralement pas utilisé la ponctuation pour imposer un rythme de lecture, je préfère laisser le lecteur décider. La phrase étant courte ici, et l'original n'insistant pas sur la chose, je préfère ne pas en mettre. Et je n'ai pas dit que tu as tord ! Qu'on ne me fasse pas dire ce que j'ai pas dit :)

« Lorsque les propositions coordonnées par car sont très brèves, on peut omettre la virgule. » http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=3447

Bon pour toi @rspt ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça me convient :)


Example of a custom error page in `layouts/error.vue`:
Exemple d'une page d'erreur personalisée à l'aide de `layouts/error.vue`:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personnalisée

</div>
</template>

<script>
export default {
props: ['error'],
layout: 'blog' // you can set a custom layout for the error page
layout: 'blog' // vous pouvez définir une mise en page personalisée pour la page d'erreur
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personnalisée

}
</script>
```

### Custom Layout
### Mise en page personalisée
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personnalisée

<nuxt/>
</div>
</template>
```

And then in `pages/posts.vue`, you can tell Nuxt.js to use your custom layout:
Puis dans `pages/posts.vue`, vous pouvez spécifier à Nuxt.js d'utiliser votre mise en page personalisée :
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personnalisée


### Custom Meta Tags for a Page
### Balises meta personalisées pour une page
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personnalisées

</template>

<script>
export default {
asyncData (context) {
// called every time before loading the component
// appellé avant le chargement du composant
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appelé

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'on capitalise la phrase? Comme dans les autres commentaires?

| asyncData | L'attribut le plus important. Il peut être asynchrone et reçoit le contexte comme argument, lisez la [documentation sur `asyncData`](/guide/async-data) pour savoir comment il fonctionne. |
| fetch | Utilisé pour peupler le store avant de faire le rendu de la page, équivalent à la méthode `data` sauf qu'il ne peuple pas le composant `data`. Voir [la partie pages de l'API sur `fetch`](/api/pages-fetch). |
| head | Défini des balises meta spécifiques pour la page en cours, voir [la partie pages de l'API sur `head`](/api/pages-head). |
| layout | Défini une mise en page existantes dans le répertoire `layouts`, voir [la partie pages de l'API sur `layout`](/api/pages-layout). |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"existante"

| layout | Défini une mise en page existantes dans le répertoire `layouts`, voir [la partie pages de l'API sur `layout`](/api/pages-layout). |
| transition | Défini une transition spécifique pour une page, voir [la partie pages de l'API sur `transition`](/api/pages-transition). |
| scrollToTop | Booléen, par défaut: `false`. Indiquez si vous souhaitez que la position se déplace vers le haut avant d'afficher la page, est utilisé pour les [routes imbriquées](/guide/routing#routes-imbriqu-es). |
| validate | Fonction de validation pour les [routes dynamique](/guide/routing#routes-dynamiques). |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"[routes dynamiques]"

ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag
keyName: 'head', // le nom de l'option où vue-meta va chercher les informations.
attribute: 'data-n-head', // l'attribut que vue-meta ajoute aux balises observés
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"observées"

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb
Copy link
Member Author

Merci pour ta revue @rspt ! C'est pris en compte (je suis un peu faché avec « personnalisé » on dirait XD

@rspt
Copy link

rspt commented Sep 17, 2017

Merci pour ta revue @rspt ! C'est pris en compte (je suis un peu faché avec « personnalisé » on dirait XD

Ahahaha, au moins c'était partout la même chose!

Copy link

@atinux atinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@MachinisteWeb MachinisteWeb merged commit b3a1ff6 into working Sep 18, 2017
@MachinisteWeb MachinisteWeb deleted the views branch September 18, 2017 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants