Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Update banners and add CTAs for PulumiUP in docs and blog pages #25

Merged
merged 7 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion themes/default/assets/sass/components/_audio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pulumi-audio {
}

.audio-button {
@apply btn btn-orange inline-block;
@apply btn btn-orange inline-block rounded border-orange-600;
box-shadow: 0 0 15px, 0 0 2px, 0 0 1em $orange600, 0 0 0.5em $orange600, 0 0 0.1em $orange600;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Element, h, Prop, State, } from '@stencil/core';
import { parseCookie, parseUTMCookieString } from "../../util/util";
import { parseCookie, parseUTMCookieString, getQueryVariable } from "../../util/util";

interface UTMData {
campaign: string;
Expand Down Expand Up @@ -114,6 +114,9 @@ export class HubspotForm {
if (utmMediumInput) {
utmMediumInput.value = utmData.medium;
}

// Set the internal ad id.
this.setInternalAdId();
}

// When the form is submitted, notify Segment.
Expand Down Expand Up @@ -147,6 +150,17 @@ export class HubspotForm {
}
}

// Get the Internal Ad ID query param and update the corresponding form field.
private setInternalAdId() {
const internalAdId = getQueryVariable("iaid");
if (internalAdId) {
const internalAdIdInput: HTMLInputElement = this.el.querySelector(`input[name="last_internal_ad_conversion"]`);
if (internalAdIdInput) {
internalAdIdInput.value = internalAdId;
}
}
}

// Parse the current cookie and return any UTM fields.
private getUTMCookieData(): UTMData {
const cookies = parseCookie();
Expand Down
6 changes: 3 additions & 3 deletions themes/default/components/src/util/util.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as uuid from "uuid";

// Extracts a query string variable from the browser's location.
export function getQueryVariable(paramKey): string {
export function getQueryVariable(paramKey: string): string | null {
const query = window.location.search.substring(1);
const vars = query.split("&");

let paramVal = null
let paramVal = null;
vars.forEach( v => {
const pair = v.split("=");
if (pair[0] === paramKey) {
paramVal = decodeURIComponent(pair[1].replace(/\+/g, "%20"));
}
})
});
return paramVal;
}

Expand Down
3 changes: 3 additions & 0 deletions themes/default/layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ <h1 class="no-anchor"><a data-track="blog-title" href="{{ .Permalink }}">{{ .Tit
<div class="md:w-3/12 md:pl-8 mt-16">
<div class="sticky-sidebar">
{{ partial "blog/right-nav.html" . }}
<div class="mt-8">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to make this a partial that accepts a path and an ID? Looks like the markup is identical otherwise.

<a href="{{ relref . "/pulumi-up" }}?iaid=blog-right-nav"><img src="/images/pulumiup/pulumiup-rectangle-cta.png" alt="Register now for PulumiUP" /></a>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions themes/default/layouts/docs/aws-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<div>
{{ partial "docs/feedback.html" . }}
</div>

<div class="mt-8">
<a href="{{ relref . "/pulumi-up" }}?iaid=docs-right-nav"><img src="/images/pulumiup/pulumiup-rectangle-cta.png" alt="Register now for PulumiUP" /></a>
</div>
</div>

<div class="md:w-3/12 pr-8 mt-2 mb-8 pb-8 border-b-2 border-gray-400 md:border-none md:pb-0 md:mb-0">
Expand Down
4 changes: 4 additions & 0 deletions themes/default/layouts/docs/aws-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<div>
{{ partial "docs/feedback.html" . }}
</div>

<div class="mt-8">
<a href="{{ relref . "/pulumi-up" }}?iaid=docs-right-nav"><img src="/images/pulumiup/pulumiup-rectangle-cta.png" alt="Register now for PulumiUP" /></a>
</div>
</div>

<div class="md:w-3/12 pr-8 mt-2 mb-8 pb-8 border-b-2 border-gray-400 md:border-none md:pb-0 md:mb-0">
Expand Down
4 changes: 4 additions & 0 deletions themes/default/layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ <h1>{{ .Title }}</h1>
<div>
{{ partial "docs/feedback.html" . }}
</div>

<div class="mt-8">
<a href="{{ relref . "/pulumi-up" }}?iaid=docs-right-nav"><img src="/images/pulumiup/pulumiup-rectangle-cta.png" alt="Register Now For PulumiUP" /></a>
</div>
</div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions themes/default/layouts/docs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ <h1>{{ .Title }}</h1>
<div>
{{ partial "docs/feedback.html" . }}
</div>
<div class="mt-8">
<a href="{{ relref . "/pulumi-up" }}?iaid=docs-right-nav"><img src="/images/pulumiup/pulumiup-rectangle-cta.png" alt="Register Now For PulumiUP" /></a>
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion themes/default/layouts/page/pulumi-up.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span class="green-neon-sign-xl">UP</span>
</div>
<div class="flex justify-center items-center">
<pulumi-audio class="orange-neon"
<pulumi-audio
paused-text="FEEL THE VIBE"
playing-text="PAUSE THE VIBE"
url="https://www.pulumi.com/uploads/pulumiup-background-loop.mp4"
Expand Down
2 changes: 1 addition & 1 deletion themes/default/layouts/partials/alert.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $text := "We're cooking up something brand new for you. Be the first know what it is." }}
{{ $text := "PulumiUP: A two-hour virtual event for cloud engineers. Save your spot!" }}
{{ $url := relref . "/pulumi-up" }}
{{ $color := "orange"}}

Expand Down
8 changes: 4 additions & 4 deletions themes/default/layouts/partials/banner.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $name := "snowflake-case-study" }}
{{ $summary := "Learn how Snowflake uses Pulumi to dramatically decrease infrastructure deployment time. 🚀" }}
{{ $url := relref . "/case-studies/snowflake" }}
{{ $label := "Read Now"}}
{{ $name := "pulumiup-banner" }}
{{ $summary := "PulumiUP: Hear from technical leaders as they present the vision for the future of cloud engineering." }}
{{ $url := relref . "/pulumi-up" }}
{{ $label := "Save Your Spot"}}
{{ $external := false }}

{{/* When a banner is dismissed, its `name` property is recorded in localStorage to
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.