Skip to content

Commit

Permalink
feat: add consent popup support (#55)
Browse files Browse the repository at this point in the history
* feat: add consent popup support

* update components

* fix prettier

* fix analytics show

* fix prettier
  • Loading branch information
goshander authored and Ruslan Bagautdinov committed Sep 21, 2024
1 parent e124aec commit 9dffb83
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ export type DocAnalytics = {
};
};

export type DocAnalytics = {
gtm?: {
id?: string;
mode?: 'base' | 'notification';
};
};

export interface AppProps {
lang: Lang;
langs: Lang[];
Expand Down
17 changes: 17 additions & 0 deletions src/styles/overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,25 @@
body:has(.pc-navigation) .dc-sidebar {
--dc-header-height: var(--header-height, 64px);
}
}


@media (max-width: map-get($screenBreakpoints, 'md') - 1) {
.dc-toc {
height: fit-content !important;
}

body:has(.pc-navigation) .dc-sidebar {
--dc-header-height: var(--header-height, 64px);
}

.pc-navigation-item:has(.dc-controls) {
display: none;
}
}

.gc-simple-consent.gc-analytics {
right: 0;
left: unset;
z-index: 101;
}

0 comments on commit 9dffb83

Please sign in to comment.