File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import { defineDocSearchConfig } from '@vuepress/plugin-docsearch/client' ;
2020import { computed } from 'vue' ;
21+ import { useRouter , withBase } from 'vuepress/client' ;
2122import { defineClientConfig , usePageData } from 'vuepress/client' ;
2223import DocSearch from './components/DocSearch.vue' ;
2324import { getDocVersion } from './utils/index.js' ;
@@ -28,6 +29,19 @@ export default defineClientConfig({
2829 } ,
2930 setup ( ) {
3031 const pageData = usePageData ( ) ;
32+ const router = useRouter ( ) ;
33+
34+ let lastTo = '' ;
35+
36+ router . onError ( ( error ) => {
37+ console . warn ( error ) ;
38+ if ( ! lastTo ) return ;
39+ window . location . href = withBase ( lastTo ) ;
40+ lastTo = '' ;
41+ } ) ;
42+ router . beforeEach ( ( to ) => {
43+ lastTo = to . fullPath ;
44+ } ) ;
3145
3246 const docSearchConfig = computed ( ( ) => ( {
3347 appId : 'JLT9R2YGAE' ,
Original file line number Diff line number Diff line change 1616 * limitations under the License.
1717 */
1818
19+ // #main-description {
20+ // max-width: 55rem;
21+ // }
22+ .vp-skip-link {
23+ z-index : 1 ;
24+ }
1925.vp-hero-image {
2026 max-width : 420px ;
2127}
@@ -82,3 +88,17 @@ footer {
8288div [class *= ' language-' ] pre code {
8389 color : var (--code-c-text );
8490}
91+
92+ .home {
93+ .theme-hope-content {
94+ inset : 0 ;
95+ z-index : 0 ;
96+ position : relative ;
97+ background-attachment : fixed ;
98+ background-position : 50% ;
99+ background-size : cover ;
100+ max-width : 100% ;
101+ padding : 0 ;
102+ display : inline ;
103+ }
104+ }
You can’t perform that action at this time.
0 commit comments