package main

type HomePageParams struct {
	HeadParams

	Npubs     []string
	LastNotes []string
}

templ homepageTemplate(params HomePageParams) {
	<!DOCTYPE html>
	<html class="theme--default font-light">
		<meta charset="UTF-8"/>
		<head>
			<title>njump - jump on board on Nostr, start now!</title>
			<meta name="description" content=""/>
			@headCommonTemplate(params.HeadParams)
			<script src="https://unpkg.com/typewriter-effect@latest/dist/core.js"></script>
		</head>
		<body
			class="mb-16 bg-white text-gray-600 dark:bg-neutral-900 dark:text-neutral-50 print:text-black"
		>
			@topTemplate(params.HeadParams)
			<div
				class="mx-auto flex flex-col sm:items-center sm:justify-center sm:px-0"
			>
				<div
					class="w-full px-4 max-w-screen-2xl sm:flex sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12 print:w-full"
				>
					<!-- Title nimation -->
					<div class="mb-10 px-4 sm:mb-20 mt-8 border-l-[0.8rem] border-strongpink pl-4">
						<h1 class="font-bold">
							<div class="text-[3.5em] sm:text-[4em] leading-[1em] text-neutral-300">
								NOSTR <span class="text-neutral-400">IS</span>
							</div>
							<div class="text-[2.5em] h-20 sm:h-auto sm:text-[5em] leading-[1em] break-words" id="tw">A PROTOCOL</div>
							<script>
var tw = document.getElementById('tw')
new Typewriter(tw, {
  strings: [
    '',
    'A PROTOCOL',
    'MANY PLATFORMS',
    'FREEDOM',
    'A SOCIAL PLACE',
    'UNCENSORED',
    'REALLY WEIRD',
    'FULL OF ENERGY',
    'UNIVERSAL',
    'YOUR HAPPINESS',
    'PERMISSIONLESS',
    'HEALTHY',
    'OPEN SOURCE',
    'COOL TO DEVELOP',
    'RESILIENT',
    'YOUR NEXT IDEA',
    '.......'
  ],
  autoStart: true,
  loop: true,
  cursorClassName: 'typewriter-cursor'
})
</script>
						</h1>
					</div>
				</div>
				<div
					class="w-full px-4 max-w-screen-2xl sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12 sm:gap-10 print:w-full"
				>
					<!-- Intro -->
					<div class="sm:flex sm:gap-20">
						<div>
							<h2 class="text-4xl text-strongpink">Freedom at risk</h2>
							<div class="text-xl mt-2">The original principles of the internet, rooted in decentralization, user empowerment, openness, collaboration, and freedom of expression, were not designed to be dominated by centralized control systems led by governments and capitalist markets.</div>
							<div class="mt-2 text-neutral-500 dark:text-neutral-300">Current social networks such as Twitter, Threads and Instagram struggle with challenges of censorship, user bans, server closures, and spam. This underscores the necessity for a decentralized, censorship-resistant, and user-centric social network.</div>
						</div>
						<div class="mt-8 sm:mt-0">
							<h2 class="text-4xl text-strongpink">The Nostr revolution</h2>
							<div class="text-xl mt-2">Nostr, acronym for  “Notes and Other Stuff Transmitted by Relays”, revolutionizes social networking and online communication by eliminating dependency of centralized servers.It employs a client-relay model, where users run clients, and anyone can operate relays.</div>
							<div class="mt-2 text-neutral-500 dark:text-neutral-300">This protocol ensures tamperproof communication through cryptographic keys and signatures. By enabling users to establish pathways and publish notes to relays and incentivizing relay operators, Nostr addresses many shortcomings of existing systems.</div>
						</div>
					</div>
					<!-- Main section -->
					<div id="why-nostr" class="mt-16 mb-12 sm:text-center">
						<div class="text-4xl text-strongpink">Empowering freedom in Nostr</div>
						<div class="text-2xl">A secure, user-centric protocol and social network</div>
					</div>
					<div class="sm:flex sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You own your identity, signed</h3>
							<p>Nostr uses a public key system, where your identity is tied to a unique cryptographic key. You have full control over your identity without relying on a central authority. Nostr's protocol eliminates the need for Know Your Customer (KYC) processes. No email, ID, thumbprint, or eyeball scans required. Your privacy is entirely yours to safeguard.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home01.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home01-dark.png"/>
						</div>
					</div>
					<div class="sm:flex sm:flex-row-reverse sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You own your data, signed</h3>
							<p>Users sign their posts with their cryptographic keys in Nostr. This cryptographic signature ensures the authenticity of your data, and you maintain ownership over it. Each client validates these signatures, ensuring data integrity. Users select relays for data exchange, and relays communicate directly with users, not with each other.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home02.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home02-dark.png"/>
						</div>
					</div>
					<div class="sm:flex sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You own your audience</h3>
							<p>In Nostr, you have full control over your audience. Users choose their preferred relay servers and can recommend relays to maintain their follower base, even if they switch relays. Additionally, users can mute other users, words, and contents (if the feature is available), shaping their social media feed according to their preferences.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home03.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home03-dark.png"/>
						</div>
					</div>
					<div class="sm:flex sm:flex-row-reverse sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You are free to speak</h3>
							<p>You can publish anything you want as long as relays are willing to accept it. If no one accepts what you have to say you can easily run your own relay. Relays can ban some users from publishing to them, but if you have people that follow you can always find another relay to publish to and your follower clients should be capable of finding you there and continue to get your updates.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home04.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home04-dark.png"/>
						</div>
					</div>
					<div class="sm:flex sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You are free to be anonymous</h3>
							<p>Nostr supports user anonymity. Users can choose to be anonymous or use pseudonyms without compromising their ability to participate. Nostr is also available On TOR that prevents tracking of users. Nostr does not have the capacity to provide user data to governments, safeguarding users' freedom of expression from prohibitions or restrictions.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home05.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home05-dark.png"/>
						</div>
					</div>
					<div class="sm:flex sm:flex-row-reverse sm:gap-20 mt-8 sm:mt-20 items-center">
						<div class="sm:w-1/2">
							<h3 class="text-2xl mb-4 text-strongpink">You are free to develop</h3>
							<p>Nostr encourages development and customization. Users are free to develop on the platform, contributing to the growth and evolution of the network. Anyone can build on Nostr, creating clients, relays, tools, and apps. Users have the freedom to establish payment methods for their features, providing developers with a potential source of revenue.</p>
						</div>
						<div class="sm:w-1/2 mt-4 sm:mt-0">
							<img class="dark:hidden" src="/njump/static/home/home06.png"/>
							<img class="hidden dark:inline" src="/njump/static/home/home06-dark.png"/>
						</div>
					</div>
				</div>

				<!-- Join Nostr -->
				<dov class="mt-14 text-2xl font-semibold self-center">What are you waiting for?</dov>
				<a href="https://nstart.me" class="mt-4 self-center px-8 py-1 text-2xl bg-strongpink text-neutral-50 rounded-md ">Join Nostr</a>

				<!-- Get started -->
				<div id="getstarted" class="relative px-4 sm:px-0 sm:flex mt-20 py-14 sm:py-28 justify-center bg-gradient-to-br from-slate-600 to-slate-900 text-neutral-50 dark:from-slate-700 dark:to-slate-950">
					<div class="w-full max-w-screen-2xl sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12">
						<h2 class="text-4xl mb-10 sm:mb-12">Get started with Nostr</h2>
						<div class="sm:flex sm:flex-row sm:flex-wrap sm:w-4/5">
							<div class="sm:basis-1/2 sm:pr-20 mb-8">
								<h3 class="text-2xl mb-1 text-strongpink">Create an account</h3>
								<p>With Nostr there is not a central provider that give you an account, in fact your account is powered just by cryptography, and you could create one (or more!) yourself by hand, without any limit. But usually the easiest way is to use our <a href="https://nstart.me" class="underline">new online wizard</a> to bootstrap a new account in seconds and then use it everywhere.</p>
							</div>
							<div class="sm:basis-1/2 sm:pr-20 mb-8">
								<h3 class="text-2xl mb-1 text-strongpink">Secure your key</h3>
								<p>An account is a key-pair. The private key (nsec) is your digital identity, if you lose or leak it, you are burned; so you need to keep your key-pair secure and private. Use a password manager, make a backup on paper and use it only in trusted apps. Never enter your nsec in a website, install a <a href="#signers" class="underline">signer extension</a>.</p>
							</div>
							<div class="sm:basis-1/2 sm:pr-20 mb-8 sm:mb-0">
								<h3 class="text-2xl mb-1 text-strongpink">Pick an app</h3>
								<p>Nostr developers already have built several applications that cover different areas; probably the easiest way to start using Nostr and learn more is downloading a <a href="#social" class="underline">social client</a> and start getting involved with the community and learn more. Need help? Use the #asknostr hashtag!</p>
							</div>
							<div class="sm:basis-1/2 sm:pr-20 mb-8 sm:mb-0">
								<h3 class="text-2xl mb-1 text-strongpink">Explore Nostr</h3>
								<p>After you are familiar with the basic concepts you can explore other social clients and other <a href="#readwrite" class="underline">Nostr applications</a>; your already have your digital identity and it works everywhere, so you can simply login in using your nsec. As usual be sure that the app is from a trusted source!</p>
							</div>
						</div>
					</div>
					<div class="justify-end -mr-4 sm:-mr-0 sm:absolute flex sm:flex-row-reverse sm:top-1/2 sm:right-0 sm:transform sm:-translate-y-1/2 sm:w-1/4">
						<img src="/njump/static/home/client.png" class="sm:h-full sm:object-cover" alt="Nostr Client"/>
					</div>
				</div>
				<!-- Resources -->
				<div
					id="resources"
					class="w-full px-4 py-14 sm:py-28 max-w-screen-2xl sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12 sm:gap-10 print:w-full"
				>
					<div id="why-nostr" class="mb-10 sm:mb-12 text-center">
						<div class="text-4xl text-strongpink">Nostr resources</div>
						<div class="text-2xl">Discover how many things you can do with Nostr</div>
					</div>
					<div class="grid grid-cols-1 sm:grid-cols-3 gap-y-8 sm:gap-x-8 sm:gap-y-12">
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 id="social" class="text-2xl text-strongpink">Microblogging</h2>
							<a href="https://apps.apple.com/us/app/damus/id1628663131" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Damus</h3>
							</a>
							<a href="https://coracle.social" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Coracle</h3>
							</a>
							<a href="https://github.com/dluvian/voyage/releases" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Voyage</h3>
							</a>
						</div>
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 class="text-2xl text-strongpink">Streaming</h2>
							<a href="https://zap.stream" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Zap.stream</h3>
							</a>
							<a href="https://stemstr.app" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Stemstr</h3>
							</a>
							<a href="https://nostrnests.com" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Nests</h3>
							</a>
						</div>
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 id="readwrite" class="text-2xl text-strongpink">Long-form</h2>
							<a href="https://highlighter.com" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Highlighter</h3>
							</a>
							<a href="https://comet.md/" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Comet</h3>
							</a>
							<a href="Habla" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Habla</h3>
							</a>
						</div>
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 class="text-2xl text-strongpink">Community</h2>
							<a href="https://chachi.chat/" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Chachi</h3>
							</a>
							<a href="https://flotilla.social/" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Flotilla</h3>
							</a>
							<a href="https://www.0xchat.com" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">0xchat</h3>
							</a>
						</div>
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 class="text-2xl text-strongpink">Other Stuff</h2>
							<a href="https://nostur.com" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Nostur</h3>
							</a>
							<a href="https://yakihonne.com" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Yakihonne</h3>
							</a>
							<a href="https://njump.me/npub10r8xl2njyepcw2zwv3a6dyufj4e4ajx86hz6v4ehu4gnpupxxp7stjt2p8" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Zapstore</h3>
							</a>
						</div>
						<div class="sm:basis-1/3 text-center bg-neutral-200/50 dark:bg-neutral-700/60 rounded-md p-8">
							<h2 id="signers" class="text-2xl text-strongpink">Key Management</h2>
							<a href="https://chromewebstore.google.com/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">nos2x</h3>
							</a>
							<a href="https://github.com/greenart7c3/Amber" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">Amber</h3>
							</a>
							<a href="https://nsec.app" class="group bg-slate-200" target="_blank">
								<h3 class="text-xl mt-4 group-hover:text-strongpink">nsec.app</h3>
							</a>
						</div>
					</div>
					<div class="mt-12 text-center">This is only a quick selection of the 80+ applications that have already been built on Nostr, <a class="underline" href="https://www.nostrapps.com" target="_blank">discover them all</a>!</div>
				</div>
				<!-- Develop on Nostr -->
				<div id="development" class="relative px-4 sm:px-0 sm:flex mb-20 py-14 sm:py-28 justify-center bg-gradient-to-br from-sky-100 to-purple-100 dark:from-slate-700 dark:to-slate-950 dark:text-neutral-50">
					<div class="w-full max-w-screen-2xl sm:w-11/12 sm:px-4 md:w-10/12 lg:w-9/12">
						<h2 class="text-4xl mb-10 sm:mb-12 sm:text-center">Develop on Nostr</h2>
						<div class="sm:flex sm:gap-20">
							<div class="basis-1/3">
								<h2 class="text-2xl text-strongpink">Where it all started</h2>
								<div class="mt-2">The Nostr "manifesto" was published in 2019 and slowly but surely the community gathered around the idea and expanded it, turning it into a fast, flexible and usable protocol that is used by real people everyday.</div>
								<a class="block underline mt-2 text-right" href="https://fiatjaf.com/nostr.html" target="_blank">Read more >></a>
							</div>
							<div class="basis-1/3">
								<h2 class="text-2xl text-strongpink">Discover the NIPs</h2>
								<div class="mt-2">NIPs stand for "Nostr Implementation Possibilities", they exist to document what may be implemented by Nostr compatible relay and client software; study them to develop your new Nostr application.</div>
								<a class="block underline mt-2 text-right" href="https://github.com/nostr-protocol/nips" target="_blank">Read more >></a>
							</div>
							<div class="basis-1/3">
								<h2 class="text-2xl text-strongpink">The design guide</h2>
								<div class="mt-2">Nostrdesign.org is the official resource with which you can discover how to best develop the interface for your Nostr application, discover new paradigms and optimise the UI and user experience.</div>
								<a class="block underline mt-2 text-right" href="https://nostrdesign.org/" target="_blank">Read more >></a>
							</div>
						</div>
					</div>
				</div>
			</div>
			@footerTemplate()
		</body>
	</html>
}
