Skip to content

Commit 66249bf

Browse files
authored
Merge pull request #3908 from Blargian/add_event_to_ad_close
Add a Galaxy event for the closing of the sidebar advert
2 parents c37ec9e + 0a7abe2 commit 66249bf

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

docs/getting-started/install/install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {galaxyOnClick} from '@site/src/lib/galaxy/galaxy'
2525
, security, reliability and upgrades."
2626
icon="cloud"
2727
infoText="Get started free"
28-
infoUrl="https://auth.clickhouse.cloud/"
28+
infoUrl="https://console.clickhouse.cloud/signUp?loc=docs-install-page-banner"
2929
isSelected
3030
onButtonClick={galaxyOnClick('docs.installCloudCallout.buttonClicked')}
3131
size="md"

src/theme/DocItem/TOC/Desktop/index.js

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,29 @@ export default function DocItemTOCDesktop() {
9090

9191
{
9292
!isClosed && title && description && href && label && (
93-
<div className={styles.docCloudCardAd}>
94-
<div className={styles.docCloudCardHeader}>
95-
<h6>{title}</h6>
96-
<button
97-
className={styles.docCloudClose}
98-
onClick={() => {
99-
setClosed(true)
100-
galaxyOnClick('docs.sidebarCloudAdvert.buttonClick')
101-
window.sessionStorage.setItem('doc-cloud-card-banner', 'closed');
102-
}}>
103-
<IconClose color="var(--ifm-color-emphasis-600)" width={10} height={10}/>
104-
</button>
105-
</div>
106-
<p className={styles.docCloudCardContent}>{description}</p>
107-
<a href={href} className={clsx(styles.docCloudCardLink, 'click-button primary-btn')}>{label}</a>
108-
</div>
109-
)
93+
<div className={styles.docCloudCardAd}>
94+
<div className={styles.docCloudCardHeader}>
95+
<h6>{title}</h6>
96+
<button
97+
className={styles.docCloudClose}
98+
onClick={() => {
99+
setClosed(true);
100+
galaxyOnClick('docs.sidebarCloudAdvert.advertDismissed');
101+
window.sessionStorage.setItem('doc-cloud-card-banner', 'closed');
102+
}}>
103+
<IconClose color="var(--ifm-color-emphasis-600)" width={10} height={10}/>
104+
</button>
105+
</div>
106+
<p className={styles.docCloudCardContent}>{description}</p>
107+
<a
108+
href={href}
109+
className={clsx(styles.docCloudCardLink, 'click-button primary-btn')}
110+
onClick={()=>{galaxyOnClick('docs.sidebarCloudAdvert.clickedThrough');}}
111+
>
112+
{label}
113+
</a>
114+
</div>
115+
)
110116
}
111117
</div>
112118
);

0 commit comments

Comments
 (0)