File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1- import { App } from 'vue'
1+ import { App , defineAsyncComponent } from 'vue'
22import { joinPath } from './utils'
33import { SiteDataRef } from './composables/siteData'
44import { PageDataRef } from './composables/pageData'
55import { Content } from './components/Content'
6- import Debug from './components/Debug.vue'
76import { ClientOnly } from './components/ClientOnly'
87
98export function mixinGlobalComputed (
@@ -70,5 +69,10 @@ export function mixinGlobalComponents(app: App) {
7069
7170 app . component ( 'Content' , Content )
7271 app . component ( 'ClientOnly' , ClientOnly )
73- app . component ( 'Debug' , isProd ? ( ) => null : Debug )
72+ app . component (
73+ 'Debug' ,
74+ isProd
75+ ? ( ) => null
76+ : defineAsyncComponent ( ( ) => import ( './components/Debug.vue' ) )
77+ )
7478}
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ import type { DefaultTheme } from './config'
7676import NavBar from ' ./components/NavBar.vue'
7777import SideBar from ' ./components/SideBar.vue'
7878import Page from ' ./components/Page.vue'
79+
7980const Home = defineAsyncComponent (() => import (' ./components/Home.vue' ))
8081
8182const NoopComponent = () => null
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ function initialize(userOptions: any) {
139139@media (min-width : 720px ) {
140140 .algolia-search-box {
141141 padding-left : 8px ;
142+ min-width : 176.3px ; /* avoid layout shift */
142143 }
143144}
144145
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ onMounted(() => {
2828 max-width : 280px ;
2929 font-size : .75rem ;
3030 background-color : rgba (255 , 255 , 255 , .8 );
31+ min-height : 105.38px ; /* avoid layout shift on mobile */
3132}
3233
3334.carbon-ads ::after {
@@ -46,6 +47,7 @@ onMounted(() => {
4647 padding : 8px ;
4748 width : 146px ;
4849 max-width : 100% ;
50+ min-height : 200px ;
4951 }
5052}
5153
@@ -60,40 +62,40 @@ onMounted(() => {
6062 }
6163}
6264
63- .carbon-ads ::v- deep(.carbon-img ) {
65+ .carbon-ads :deep(.carbon-img ) {
6466 float : left ;
6567 margin-right : .75rem ;
6668 max-width : 100px ;
6769 border : 1px solid var (--c-divider );
6870}
6971
7072@media (min-width : 420px ) {
71- .carbon-ads ::v- deep(.carbon-img ) {
73+ .carbon-ads :deep(.carbon-img ) {
7274 float : none ;
7375 display : block ;
7476 margin-right : 0 ;
7577 max-width : 130px ;
7678 }
7779}
7880
79- .carbon-ads ::v- deep(.carbon-img img ) {
81+ .carbon-ads :deep(.carbon-img img ) {
8082 display : block ;
8183 width : 100% ;
8284}
8385
8486@media (min-width : 420px ) {
85- .carbon-ads ::v- deep(.carbon-text ) {
87+ .carbon-ads :deep(.carbon-text ) {
8688 padding-top : 8px ;
8789 }
8890}
8991
90- .carbon-ads ::v- deep(.carbon-text ) {
92+ .carbon-ads :deep(.carbon-text ) {
9193 display : block ;
9294 font-weight : 400 ;
9395 color : var (--c-text-light );
9496}
9597
96- .carbon-ads ::v- deep(.carbon-poweredby ) {
98+ .carbon-ads :deep(.carbon-poweredby ) {
9799 display : block ;
98100 padding-top : 2px ;
99101 font-weight : 400 ;
You can’t perform that action at this time.
0 commit comments