diff --git a/firebase.md b/firebase.md index fc64a56..b297403 100644 --- a/firebase.md +++ b/firebase.md @@ -898,6 +898,8 @@ document setting a default cols (check this with triangle) + + You can control how items are rendered based on the viewport width. For example, you can have a page appear across 2 columns on desktop, but display a single column on mobile : One way is to use the the viewport cols props for ``: @@ -917,10 +919,25 @@ You can find all props for the dynamic cols in - +Using the cards to create dynamic rows filling the space in each column, you can go even further and control how this should render on different viewports. + +For example, if we wanted to center content on a mobile, but have it align to the right on larger screens we can do the following: + +```html +
+``` + +Here we are using `align-center`. This will set the content to center itself by default. We can then use `align-sm-end` to align the content to the right on anything sm and above. Combinations of these can be used to create dynamic and fluid layouts for all devices. + +You can also use dynamically created classes to apply css to the content depending on the viewport. + + + ## CSS Spacing @@ -1021,3 +1038,137 @@ The x and y set the coordinate system to use for the top left corner of the view Take for example `viewBox="-50 -50 100 100"` - this means the top left corner has coordinates -50,-50, so the bottom right corner has coordinates 50,50. Drawing a circle centered around 0,0 with radius 50 it will fill the screen. Setting a viewbox allows you to set the box that the svg element should draw in. This will allow you to then control the width and height to scale the element properly. + +## Triangle banners + +### Method 1 - position: absolute + +See for an example. + +You should create a triangle banner css class: + +```scss +.newtriangle { + width: 105vw; + height: 50vh; + background-image: radial-gradient( + circle farthest-corner at 7.5% 54.1%, + rgba(0, 0, 0, 1) 0%, + rgba(39, 0, 89, 1) 74.9% + ); + -webkit-clip-path: polygon(0 0, 100% 35%, 100% 65%, 0% 100%); + clip-path: polygon(0 0, 100% 35%, 100% 65%, 0% 100%); +} +``` + +Then you should create a `` with this class. This row should also set `position: absolute; z-index: 1;` in the style (or add this to the triangle class). + +```html + + + +

+ Welcome to Savvy Firebox Tutorial +

+ Click Here +
+
+
+``` + +Because the element has been set to position absolute, any content after this without absolute positioning will be on top of this element. You should create a blank row with `position: relative;` with a height matching the triangle banner above it. This will create blank space on top of the banner. + +```html + +``` + +Any other content then be placed after this like normal. + +### Method 2 - Without position: absolute + +See for an example. + +Add the css class for the banner: + +```css +.newtriangle { + width: 105vw; + height: 50vh; + background-image: radial-gradient( + circle farthest-corner at 7.5% 54.1%, + rgba(0, 0, 0, 1) 0%, + rgba(39, 0, 89, 1) 74.9% + ); + -webkit-clip-path: polygon(0 0, 100% 35%, 100% 65%, 0% 100%); + clip-path: polygon(0 0, 100% 35%, 100% 65%, 0% 100%); +} +``` + +Apply this class to a `` and add any content to go inside it: + +```html + + + +

+ CSS polygon background with clip-path. +

+
+
+
+``` + +## Fullscreen backgrounds + +You can use svg images as a fullsize background. These images can be obtained from envano web templates - use Pixelmator Pro and its extraction tools to extract the svg elements, upscale and export for web. + +Create a `` with the src as the svg image. + +```html + +``` + +Any content to go in the page should go inside the `` tags. + +The width should be auto - it will be set by the height. + +The prop `contain` should be used to ensure the image fits the full height properly and isn't cropped. + +To align the image in the bottom right, set the position prop: + +```html +position="bottom 0px right 0px" +``` + +If you are using a appbar, you should dynamically get the viewport height, and substract the height of the appbar. The default height is `64px` - use the documentation to find the heights if using dense or extended props. + +You should add a computed property that returns the current viewport height: + +```javascript +computed: { + currentHeight() { + return window.innerHeight + } +} +``` + +Then, in the height of the `` you should set a dynamic prop that sets the height of the image to this computed property minus the height of the appbar. + +```html +:height="this.currentHeight - 64" +``` diff --git a/src/assets/images/newbackground.png b/src/assets/images/newbackground.png new file mode 100644 index 0000000..9a337e0 Binary files /dev/null and b/src/assets/images/newbackground.png differ diff --git a/src/components/LoginFull.vue b/src/components/LoginFull.vue index 1defc6c..112e1e4 100644 --- a/src/components/LoginFull.vue +++ b/src/components/LoginFull.vue @@ -1,7 +1,7 @@