From dfd489480e3e9d987f9881066ed45f00dd56cb63 Mon Sep 17 00:00:00 2001 From: dtomlinson Date: Wed, 25 Mar 2020 22:41:37 +0000 Subject: [PATCH] adding latest --- firebase.md | 212 ++++++++++++++++++++++++++-------- src/App.vue | 14 +-- src/components/Appbar.vue | 35 ++++-- src/components/HelloWorld.vue | 151 ------------------------ src/plugins/vuetify.js | 6 +- src/router/index.js | 6 + src/views/Home.vue | 18 +-- src/views/forms/LoginForm.vue | 68 ++++++++--- 8 files changed, 267 insertions(+), 243 deletions(-) diff --git a/firebase.md b/firebase.md index 8618c31..f6aae58 100644 --- a/firebase.md +++ b/firebase.md @@ -10,18 +10,20 @@ List of errors: ` you can have many ``. You can have as many of these and us ```html - + Savvy Firebase tutorial - + ``` @@ -137,7 +138,6 @@ For example, to break on the medium viewport and have the second layout apply to Here the second layout does not include the medium layout, hence the medium layout will apply to it. - ## App bar ### Gradient as a background colour @@ -148,17 +148,17 @@ If you want to apply a fade gradient colour on top of the image, you should use ```html - ``` If you want to just use a gradient (no img), then apply a solid colour image and then use a scoped slot with the gradient you want. @@ -169,7 +169,7 @@ When linking to routes, you should use ``: ```html - Sign In + Sign In ``` @@ -177,7 +177,7 @@ You can apply transitions on a route change: ```html - + ``` @@ -201,8 +201,8 @@ export default { data() { return { video: require("../assets/videos/optical.mp4") - } - }, + }; + } }; ``` @@ -220,8 +220,8 @@ You can find full props to customise the video: You can set a gradient to the image to improve visibility: ```javascript - style=" height: 100vh;" - overlay="linear-gradient(45deg,#2a4ae430,#fb949e6b)" +style = " height: 100vh;"; +overlay = "linear-gradient(45deg,#2a4ae430,#fb949e6b)"; ``` ## Dynamically hide app bar @@ -242,7 +242,7 @@ Use the Vuex store to determine when you want to hide the app bar: state.fullScreen = fullScreen; } }, - ``` +``` and create the lifecycle actions in the component that houses the appbar: @@ -258,13 +258,13 @@ and create the lifecycle actions in the component that houses the appbar: Then you can wrap the appbar in a `v-if`: ```html - + ``` ## Change default font colour @@ -289,10 +289,10 @@ Then create a new class `fontColor` to apply to the router, and edit the default Then in `App.vue` apply the `fontColor` class to the ``: ```html - + ``` ## Grids @@ -312,7 +312,7 @@ The grid system applies to `` and you can use the following props: For `` only `align-self` is available. To align content on a column, or any other element like a card, you should use the same classes as in the flex system. For example: ```html - + ``` ## Container filling whole page @@ -322,6 +322,49 @@ A container should be used whenever you want to use `` and ``. To - `fill-height` - `fluid`. +## Multi column layouts + +An example can be found here: + + +You can make use of the above to create dynamic layouts. + +One idea (for a login page) might be to use the following nested layout: + +### Container + +A `` with `fill-height` and `fluid` props. + +### Row + +A `` + +### Columns + +A `` with `align-self="stretch"` and `class="d-flex flex-column justify-space-between"`. + +`align-self=stretch` allows each child of the column to _stretch_ (. + +`class="d-flex flex-column justify-space-between"` allows each child of the column to flex - with justify-space-between putting them equally apart top to bottom. It's used to equally space out the _rows_ inside this column. Even though we are not using ``. + +### Cards + +A `` with `class="d-flex align-end flex-column"`. + +`class="d-flex align-end flex-column"` allows content inside the card to flex. The `align-end` means they will be on the right hand side and flex-column means they are flexing across columns. + +To make text align right, you should use the `text-right` class: + +`

` + +This is because although the `

` element will align to the right becasue of the class from the ``, the text inside will align to the left. + +We can add `color="rgb(0, 0, 0, 0)"` and `flat` props to the card - allowing it to seamlessly blend in with the background. + +We can add mulitple cards to this layout in this column - and control how they are spaced with the props on the column. + +We can add `` and then add additional colums with the same props to add content in a column like manner. + ## Helper classes ### Spacing @@ -344,7 +387,7 @@ There are two types of styles: Typography Display Classes and Style and Weight C Examples include `.display-2` and `.font-weight-black`. -### Replace Vuetify default font with own +### Replace Vuetify default font with custom Fonts needed to replace the Roboto default: @@ -362,3 +405,82 @@ Fonts needed to replace the Roboto default: If font styles dont exist then substitute them with the closest type. +An example of a stylesheet replacing all of these with the Gilroy font is here: + + +## Custom colour theme + +Creating a custom colour theme for Vuetify is straightforward. + + is a good resource to generate palettes from a colour. + +See for details on customising a theme. + +### Editable colours + +You change the `Vuetify` object in `vuetify.js`: + +```javascript +export default new Vuetify({ + icons: { + iconfont: "mdi" + }, + theme: { + themes: { + light: { + primary: "#051937", + secondary: "#374366", + accent: "#d4a418", + background: "#e8e8e8" + } + } + } +}); +``` + +These are the editable colours you can choose for Vuetify + +```json +{ + "primary": "#1976D2", + "secondary": "#424242", + "accent": "#82B1FF", + "error": "#FF5252", + "info": "#2196F3", + "success": "#4CAF50", + "warning": "#FFC107" +} +``` + +These follow the Material style of colours: + + +The accent colour in Vuetify isn't really specified in the Material colour design - typically the secondary colour would be used as an accent colour - with shades of the primary used throughout the UI. However in some themes you may wish to use primary and secondary together, and have a seperate accent colour. + + + +### Colour variants + +Vuetify will automatically generate darken and lighten colour variants of the primary and secondary colours in the theme. If you want to control these manually you can do so following the instructions: + + +The variants you can use are: + +```json +{ + "base": "string", + "lighten5": "string", + "lighten4": "string", + "lighten3": "string", + "lighten2": "string", + "lighten1": "string", + "darken1": "string", + "darken2": "string", + "darken3": "string", + "darken4": "string" +} +``` + +You can apply these as a class to the object you want to darken/lighten. +For example: +`Hello` diff --git a/src/App.vue b/src/App.vue index f37d35e..608953d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,6 @@