Skip to content

Commit

Permalink
docs: Add beta docs announcement banner
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Aug 25, 2023
1 parent 738fe68 commit a837880
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/layouts/partials/announcement-banner.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
function bannerComponent() {
const bannerId = 4;
const bannerId = 5;
const key = `banner-${bannerId}-dismissed`;
const bannerDismissed = localStorage.getItem(key) ?? false;
return {
Expand All @@ -15,7 +15,7 @@
<div class="relative bg-gradient-to-r from-blue-600 via-indigo-700 to-blue-900" x-data="bannerComponent()" x-show="visible" x-cloak>
<div class="max-w-7xl mx-auto py-1 px-3 sm:px-6 lg:px-8">
<div class="pr-16 sm:text-center sm:px-16">
<p class="text-xs md:text-sm lg:text-base text-white" @click="dismiss()">
<p class="text-xs md:text-sm lg:text-base text-white">
{{ .content | safeHTML }}
</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/layouts/partials/top-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
:class="{ 'hidden': isLandingPage }"
class="absolute w-full h-1 bg-gradient-to-r from-blue-300 via-green-300 to-blue-100"
></div>
{{ partial "announcement-banner" (dict "content" ` 🚨 Announcing
<a href="https://vendure.io/" class="text-white font-medium underline"
>Announcing Vendure v2<span aria-hidden="true">&rarr;</span></a
{{ partial "announcement-banner" (dict "content" `🆕
<a href="https://beta-docs.vendure.io/" class="text-white font-medium underline"
>Try our new beta documentation! <span aria-hidden="true">&rarr;</span></a
>
`) }}
<div class="max-w-screen-2xl mx-auto px-4 py-4 sm:px-6 md:pr-10">
Expand Down

0 comments on commit a837880

Please sign in to comment.