From f6df801b384118b946bb3b7b3248832ec70cfd0a Mon Sep 17 00:00:00 2001 From: Derick Montague Date: Wed, 9 Dec 2020 18:37:11 -0600 Subject: Update component documentation The component structure was not consistent. We determined how we wanted to save image examples within the component directory, but not all of the components were updated. The result was that some images were not displaying on the component pages. This patchset resolves that issue, along with removing the page component since it is not an actual component within the application. - Add directory for each component, move example images to the directory, and update the image path - Create a page-title and page-section directory and index.md for each - Move content for page-title and page-section from the page.md file into the index.md within the respective component directory - Delete the page.md from the component directory as it is not a component - Update links to page.md in the page-anatomy.md file. Signed-off-by: Derick Montague Change-Id: I1e554adf71abb4c84f423a30d3c3b598f678ade0 --- docs/guide/components/page-title/index.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/guide/components/page-title/index.md (limited to 'docs/guide/components/page-title/index.md') diff --git a/docs/guide/components/page-title/index.md b/docs/guide/components/page-title/index.md new file mode 100644 index 00000000..b51ab640 --- /dev/null +++ b/docs/guide/components/page-title/index.md @@ -0,0 +1,23 @@ +# Page title +The `` component will automatically render the page title that corresponds with the title property set in the route record's meta field in `src/router/routes.js`. + +```js +// src/router/routes.js + { + path: '', + name: 'login', + component: Login, + meta: { + title: i18n.t('appPageTitle.login'), + }, + }, +``` + +Optional page descriptions can be included by using the description prop `:description` prop and passing in the i18n localized text string. Translations are found in the `src/locales` folder. + +``` vue +// Example: `src/views/AccessControl/Ldap/Ldap.vue` + +``` + +[View the page title component source code](https://github.com/openbmc/webui-vue/blob/master/src/components/Global/PageTitle.vue). -- cgit v1.2.3