Last active
July 30, 2018 22:11
-
-
Save darkylmnx/6754e54db6eb43bf4acccf116745735e to your computer and use it in GitHub Desktop.
Revisions
-
darkylmnx revised this gist
Jul 30, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <template> <div> <the-header /> <h1> i'm layout C </h1> <!-- let's use the sub layout --> <a-sub-layout> -
darkylmnx revised this gist
Jul 30, 2018 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ new VueRouter({ { name: 'some-random-page', path: '/bla1', meta: {layout: 'LayoutC' }, component: () => import('@/pages/Random1.vue') }, { -
darkylmnx revised this gist
Jul 30, 2018 . 4 changed files with 30 additions and 4 deletions.There are no files selected for viewing
File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ <h1> i'm layout A </h1> <!-- let's use the sub layout --> <a-sub-layout> <slot /> <!-- here we are doing slot transfer, the main component will appear within the sub layout --> </a-sub-layout> <!-- here we have a footer --> <the-footer /> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ <h1> i'm layout A1 </h1> <!-- let's use the sub layout --> <a-sub-layout> <slot /> <!-- here we are doing slot transfer, the main component will appear within the sub layout --> </a-sub-layout> <!-- no footer here --> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ // as you will notice // we never use a sub layout directly // sub layouts are only used to contain common markup for main layouts new VueRouter({ routes: [ { name: 'home', path: '/', meta: {layout: 'LayoutA' }, component: require('@/pages/Home.vue').default // load sync mode }, { name: 'some-random-page', path: '/bla1', meta: {layout: 'LayoutA1' }, component: () => import('@/pages/Random1.vue') }, { name: 'some-random-page-2', path: '/bla2', meta: {layout: 'LayoutB' }, component: () => import('@/pages/Random2.vue') } ] }) -
darkylmnx created this gist
Jul 30, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ <template> <div> <the-header /> <h1> i'm layout A </h1> <!-- let's use the sub layout --> <sub-layout-a> <slot /> <!-- here we are doing slot transfer, the main component will appear within the sub layout --> </sub-layout-a> <!-- here we have a footer --> <the-footer /> </div> <template> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <template> <div> <the-header /> <h1> i'm layout A1 </h1> <!-- let's use the sub layout --> <sub-layout-a> <slot /> <!-- here we are doing slot transfer, the main component will appear within the sub layout --> </sub-layout-a> <!-- no footer here --> </div> <template> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <template> <div> <the-header /> <h1> i'm layout B</h1> <aside> i'm a side bar</aside> <slot /> <!-- no sub layout --> <!-- the main compoent will apppear hear as a slot --> </the-footer /> </div> </template> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <template> <!-- this layout will not have any header or general things to all layouts --> <div> <h2> i'm a sub layout </h2> <slot /> </div> </template> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <template> <footer> hey i'm the footer </footer> </template> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <template> <header> hey i'm the header </header> </template>