Skip to content

Commit

Permalink
otel page revamp part 1 (#1183)
Browse files Browse the repository at this point in the history
* base

* sign up added

* improved the banner design

* add pricing pointers

* add resource center redirection

* adjusted toc and content layout

* adjusted toc and content layout - actual

* ToC active section highlight plus dynamic scroll

* change active element defintion

* increased the content to test properly

* remove duplicate page feedback

* replaced banner with sign up with strip

* replaced banner sign up with strip sign up

* highlight the strip

* bold title

* broken down into components and fixed scroll up botton

* sidebar with toc and author details

* learn OTel card

* Otel Card

* add job and related articles

* improved design

* change color

* made mobile responsive

* use new opentelemetry layout in blog and comparisons

* transtion duration

* horizontal scroll issue

* add cta_title and cta_text for blog and comparisons, regroup elements in the strip

* added cta title and text manually in a few articles

* event tracking

* remove unnecessary content added for testing

* set max width of the page

* fixed max width on wider screen

* Launch week 3 day 4 blog (#1177)

* added the blog

* fix line break

* Updated launch week page for day 4 (#1178)

* chore(license): start sending region in verify and notify call (#1179)

* chore(license): start sending region in verify and notify calL

* feat(license): avoid potential race condition

* add blog (#1180)

* Update for day 5 (#1181)

* Update for day 5

* removed timer

* minor edit

---------

Co-authored-by: ankit01-oss <>

* Made minor edits to launch week page (#1182)

Co-authored-by: ankit01-oss <>

* chore: updated banner for community call (#1176)

* store data region in localstorage

* remove direct GA4 events

* same event name in both sign up forms

* build

---------

Co-authored-by: Ankit Anand <[email protected]>
Co-authored-by: Vikrant Gupta <[email protected]>
Co-authored-by: CheetoDa <[email protected]>
  • Loading branch information
4 people authored Feb 19, 2025
1 parent bca2401 commit 23b2336
Show file tree
Hide file tree
Showing 34 changed files with 978 additions and 268 deletions.
10 changes: 9 additions & 1 deletion app/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { Authors, Blog } from 'contentlayer/generated'
import PostSimple from '@/layouts/PostSimple'
import PostLayout from '@/layouts/PostLayout'
import PostBanner from '@/layouts/PostBanner'
import OpenTelemetryLayout from '@/layouts/OpenTelemetryLayout'
import { Metadata } from 'next'
import siteMetadata from '@/data/siteMetadata'
import { notFound } from 'next/navigation'
Expand All @@ -19,6 +20,7 @@ const layouts = {
PostSimple,
PostLayout,
PostBanner,
OpenTelemetryLayout,
}

export async function generateMetadata({
Expand Down Expand Up @@ -99,8 +101,14 @@ export default async function Page({ params }: { params: { slug: string[] } }) {
const mainContent = coreContent(post)
const jsonLd = post.structuredData

// Choose layout based on slug or post layout
let layoutName = post.layout || defaultLayout
if (slug.includes('opentelemetry')) {
layoutName = 'OpenTelemetryLayout'
}

// @ts-ignore
const Layout = layouts[post.layout || defaultLayout]
const Layout = layouts[layoutName]

return (
<>
Expand Down
11 changes: 10 additions & 1 deletion app/comparisons/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { Authors, Blog, Comparison, Opentelemetry } from 'contentlayer/gene
import PostSimple from '@/layouts/PostSimple'
import PostLayout from '@/layouts/PostLayout'
import PostBanner from '@/layouts/PostBanner'
import OpenTelemetryLayout from '@/layouts/OpenTelemetryLayout'
import { Metadata } from 'next'
import siteMetadata from '@/data/siteMetadata'
import { notFound } from 'next/navigation'
Expand All @@ -21,6 +22,7 @@ const layouts = {
PostSimple,
PostLayout,
PostBanner,
OpenTelemetryLayout,
}

export async function generateMetadata({
Expand Down Expand Up @@ -101,7 +103,14 @@ export default async function Page({ params }: { params: { slug: string[] } }) {
const mainContent = coreContent(post)
const jsonLd = post.structuredData

const Layout = layouts[post.layout || defaultLayout]
// Choose layout based on slug or post layout
let layoutName = post.layout || defaultLayout
if (slug.includes('opentelemetry')) {
layoutName = 'OpenTelemetryLayout'
}

// @ts-ignore
const Layout = layouts[layoutName]

return (
<>
Expand Down
4 changes: 3 additions & 1 deletion app/opentelemetry/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ import type { Authors, Blog, Opentelemetry } from 'contentlayer/generated'
import PostSimple from '@/layouts/PostSimple'
import PostLayout from '@/layouts/PostLayout'
import PostBanner from '@/layouts/PostBanner'
import OpenTelemetryLayout from '@/layouts/OpenTelemetryLayout'
import { Metadata } from 'next'
import siteMetadata from '@/data/siteMetadata'
import { notFound } from 'next/navigation'
import React from 'react'
import PageFeedback from '../../../components/PageFeedback/PageFeedback'

const defaultLayout = 'PostLayout'
const defaultLayout = 'OpenTelemetryLayout'
const layouts = {
PostSimple,
PostLayout,
PostBanner,
OpenTelemetryLayout,
}

export async function generateMetadata({
Expand Down
7 changes: 4 additions & 3 deletions app/tag-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"community": 6,
"prometheus": 74,
"distributed-tracing": 18,
"monitoring": 54,
"monitoring": 53,
"tech-tutorial": 33,
"javascript": 14,
"tech-resources": 14,
Expand All @@ -24,7 +24,7 @@
"cloud": 1,
"aws": 2,
"talks": 4,
"observability": 37,
"observability": 36,
"opentelemetry-instrumentation": 27,
"go--golang": 4,
"java": 2,
Expand All @@ -41,7 +41,6 @@
"net": 1,
"elixir--erlang": 1,
"fastapi": 1,
"performance": 4,
"golang": 1,
"php": 1,
"ruby": 1,
Expand Down Expand Up @@ -84,9 +83,11 @@
"missing-values": 1,
"time-series": 1,
"opentelemetry-tutorials": 11,
"nodejs": 1,
"java-monitoring": 3,
"javascript-monitoring": 1,
"python-monitoring": 1,
"performance": 3,
"features": 6,
"usecases": 1
}
21 changes: 0 additions & 21 deletions app/teams/Teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import './teams.styles.css'

import React, { useEffect, useState } from 'react'
import ReactGA from 'react-ga4'
import TestimonialSection from './TestimonialSection'

import { ArrowRight, Loader2 } from 'lucide-react'
Expand All @@ -16,8 +15,6 @@ interface ErrorsProps {
companyName?: string
}

ReactGA.initialize('G-6NFJ2Y6NQN')

interface SignUpPageProps {}

interface Region {
Expand Down Expand Up @@ -119,24 +116,6 @@ const Teams: React.FC<SignUpPageProps> = () => {
...payload,
})
}

// Sending a custom event to GA4 using ReactGA
ReactGA.event({
category: 'Signup', // Adjusted to a more general term for the event category
action: 'Submit', // Simplified action
label: 'SigNoz Cloud Signup', // Label to provide more context
nonInteraction: false, // Setting to false as this is an interactive event

// ReactGA.event({
// category: "SigNoz Cloud Signup",
// action: "SigNozCloudSignup",
// value: 99, // optional, must be a number
// nonInteraction: true, // optional, true/false
// transport: "xhr", // optional, beacon/xhr/image
// ...payload
// }, {
// ...payload
})
}

const handleError = () => {
Expand Down
74 changes: 74 additions & 0 deletions components/OpenTelemetryBanner/OpenTelemetryBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/** @jsxImportSource react */
import { ArrowRight } from 'lucide-react'

interface OpenTelemetryBannerProps {
title: string
ctaTitle?: string
ctaText?: string
date: string
readingTime: string
tags?: string[]
}

const OpenTelemetryBanner = ({ title, date, readingTime, tags = [] }: OpenTelemetryBannerProps) => {
return (
<div className="relative overflow-hidden">
<div className="relative w-full px-4 py-8 sm:py-12 md:py-16">
{/* Dotted background pattern */}
<div className="-z-10">
<div className="bg-dot-pattern masked-dots absolute inset-0 flex items-center justify-center opacity-100" />
<div className="absolute left-0 right-0 top-0 mx-auto h-[600px] w-full flex-shrink-0 rounded-[956px] bg-gradient-to-b from-[rgba(190,107,241,1)] to-[rgba(69,104,220,0)] bg-[length:110%] bg-no-repeat opacity-30 blur-[300px] sm:bg-[center_-500px] md:h-[1200px]" />
</div>

<div className="relative mx-auto max-w-7xl">
<div className="flex flex-col space-y-6">
{/* Top row with tags and meta info */}
<div className="flex flex-col space-y-4 sm:flex-row sm:items-start sm:justify-between sm:space-y-0">
{/* Tags */}
<div className="flex flex-wrap items-center gap-2 sm:w-3/4 sm:gap-3">
<a
href="/resource-center/opentelemetry/"
target="_blank"
className="flex w-fit items-center gap-2 rounded-full border border-signoz_ink-300 bg-signoz_ink-300/50 px-3 py-1 text-xs text-gray-400 transition-colors hover:border-signoz_robin-500 hover:text-white sm:px-4 sm:py-1.5 sm:text-sm"
>
<span>Part of OpenTelemetry Track</span>
<ArrowRight size={14} className="rotate-[-45deg]" />
</a>
{tags.map((tag) => (
<div
key={tag}
className="flex items-center gap-2 rounded-full bg-signoz_ink-300 px-3 py-1 sm:px-4 sm:py-1.5"
>
<span className="text-xs font-medium text-white sm:text-sm">{tag}</span>
</div>
))}
</div>

{/* Meta info */}
<div className="flex items-center gap-2 text-xs text-gray-400 sm:text-sm">
<span>
{new Date(date).toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
})}
</span>
<span></span>
<span>{readingTime}</span>
</div>
</div>

{/* Title section */}
<div className="py-2">
<h1 className="text-3xl font-bold leading-tight text-white sm:text-4xl md:text-5xl">
{title}
</h1>
</div>
</div>
</div>
</div>
</div>
)
}

export default OpenTelemetryBanner
51 changes: 51 additions & 0 deletions components/RelatedJobs/RelatedJobs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use client'

import Link from 'next/link'
import { ExternalLink } from 'lucide-react'

const RelatedJobs = () => {
return (
<div className="pt-8 sm:pt-12 md:pt-16">
<div className="mx-auto flex max-w-4xl flex-col items-start lg:flex-row lg:justify-between">
<h2 className="mb-4 w-full text-lg font-semibold text-white sm:text-xl lg:mb-0 lg:w-1/3">
Related Jobs at SigNoz
</h2>
<div className="w-full space-y-3 sm:space-y-4 lg:w-2/3">
<Link
href="https://jobs.gem.com/signoz/am9icG9zdDq9T1P3W7Wo_S8W95vmBUTm"
target="_blank"
className="group flex items-center justify-between rounded-lg border border-signoz_ink-300 bg-signoz_ink-400/50 p-4 transition-colors hover:border-signoz_robin-500 sm:p-6"
>
<div>
<h3 className="text-base font-medium text-white sm:text-lg">Backend Engineer</h3>
<p className="mt-1 text-xs text-gray-400 sm:mt-2 sm:text-sm">Remote</p>
</div>
<ExternalLink
size={20}
className="text-gray-400 transition-colors group-hover:text-white"
/>
</Link>

<Link
href="https://jobs.gem.com/signoz/am9icG9zdDp2psmj00RLKrDBrAoeWtiJ"
target="_blank"
className="group flex items-center justify-between rounded-lg border border-signoz_ink-300 bg-signoz_ink-400/50 p-4 transition-colors hover:border-signoz_robin-500 sm:p-6"
>
<div>
<h3 className="text-base font-medium text-white sm:text-lg">
Site Reliability Engineer (SRE)
</h3>
<p className="mt-1 text-xs text-gray-400 sm:mt-2 sm:text-sm">Remote</p>
</div>
<ExternalLink
size={20}
className="text-gray-400 transition-colors group-hover:text-white"
/>
</Link>
</div>
</div>
</div>
)
}

export default RelatedJobs
4 changes: 2 additions & 2 deletions components/ScrollTopAndComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const ScrollTopAndComment = () => {
}, [])

const handleScrollTop = () => {
window.scrollTo({ top: 0 })
window.scrollTo({ top: 0, behavior: 'smooth' })
}
const handleScrollToComment = () => {
document.getElementById('comment')?.scrollIntoView()
}
return (
<div
className={`fixed bottom-8 right-8 hidden flex-col gap-3 ${show ? 'md:flex' : 'md:hidden'}`}
className={`fixed bottom-8 right-8 z-50 hidden flex-col gap-3 ${show ? 'md:flex' : 'md:hidden'}`}
>
{/* {siteMetadata.comments?.provider && (
<button
Expand Down
37 changes: 37 additions & 0 deletions components/SidebarAuthorInfo/SidebarAuthorInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use client'

import Image from 'next/image'
import Authors from '../../constants/authors.json'

interface SidebarAuthorInfoProps {
authors: string[]
}

const SidebarAuthorInfo = ({ authors }: SidebarAuthorInfoProps) => {
const handelAuthorClick = (author: string) => {
window.open(Authors[author]?.url, '_blank')
}

return (
<div className="flex flex-col">
{authors?.map((author) => (
<div
key={author}
className="flex cursor-pointer items-center gap-2 py-1 text-gray-500 transition-colors hover:text-white"
onClick={() => handelAuthorClick(author)}
>
<Image
className="h-4 w-4 rounded-full"
src={Authors[author]?.image_url}
alt="Rounded avatar"
width={16}
height={16}
/>
<span className="line-clamp-1 text-[11px]">{Authors[author]?.name}</span>
</div>
))}
</div>
)
}

export default SidebarAuthorInfo
Loading

0 comments on commit 23b2336

Please sign in to comment.