-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first party third-party-capital scripts (#23)
- Loading branch information
Showing
16 changed files
with
576 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const query = ref('Space+Needle,Seattle+WA') | ||
function changeQuery() { | ||
query.value = 'Brooklyn+Bride,New+York+NY' | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div> | ||
<GoogleMaps | ||
api-key="API_KEY" | ||
width="600" | ||
height="400" | ||
:q="query" | ||
/> | ||
</div> | ||
<div class="button-container"> | ||
<button | ||
class="button" | ||
@click="changeQuery" | ||
> | ||
change query | ||
</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.button-container { | ||
margin: 20px 0; | ||
} | ||
.button { | ||
background-color: orange; | ||
border-radius: 8px; | ||
padding: 4px 8px; | ||
cursor: pointer; | ||
} | ||
.button:not(:last-child) { | ||
margin-right: 8px; | ||
} | ||
</style> |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script lang="ts" setup> | ||
import { useScriptGoogleTagManager } from '../../../src/runtime/registry/google-tag-manager' | ||
import { useHead } from '#imports' | ||
useHead({ | ||
title: 'Google Analytics', | ||
}) | ||
// composables return the underlying api as a proxy object and a $script with the script state | ||
const { datalayer, $script } = useScriptGoogleTagManager({ id: 'GTM-MNJD4B' }) | ||
datalayer.push({ | ||
event: 'page_view', | ||
page_title: 'Google Analytics', | ||
page_location: 'https://harlanzw.com/third-parties/google-analytics', | ||
page_path: '/third-parties/google-analytics', | ||
}) | ||
$script.then(({ google_tag_manager, dataLayer }) => { | ||
// eslint-disable-next-line no-console | ||
console.log('google_tag_manager is ready', google_tag_manager) | ||
// eslint-disable-next-line no-console | ||
console.log('google_tag_manager is ready', window.google_tag_manager) | ||
// eslint-disable-next-line no-console | ||
console.log('dataLayer', dataLayer) | ||
// eslint-disable-next-line no-console | ||
console.log(google_tag_manager['GTM-MNJD4B'].dataLayer.reset) | ||
// eslint-disable-next-line no-console | ||
console.log(google_tag_manager.dataLayer.gtmDom) | ||
dataLayer.push({ | ||
event: 'pageview', | ||
page_path: '/google-tag-manager', | ||
}) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<ClientOnly> | ||
<div> | ||
status: {{ $script.status.value }} | ||
</div> | ||
</ClientOnly> | ||
</div> | ||
</template> |
This file contains 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 characters
This file contains 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 characters
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
const label = ref('Play!') | ||
const videoid = ref('d_IFKP1Ofq0') | ||
function changeVideo() { | ||
videoid.value = 'N8siuNjyV7A' | ||
} | ||
function changeLabel() { | ||
label.value = 'Spiele!' | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div> | ||
<YoutubeEmbed | ||
:video-id="videoid" | ||
:play-label="label" | ||
/> | ||
</div> | ||
<div class="button-container"> | ||
<button | ||
class="button" | ||
@click="changeVideo" | ||
> | ||
change video | ||
</button> | ||
<button | ||
class="button" | ||
@click="changeLabel" | ||
> | ||
change label | ||
</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.button-container { | ||
margin: 20px 0; | ||
} | ||
.button { | ||
background-color: orange; | ||
border-radius: 8px; | ||
padding: 4px 8px; | ||
cursor: pointer; | ||
} | ||
.button:not(:last-child) { | ||
margin-right: 8px; | ||
} | ||
</style> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 characters
Oops, something went wrong.