-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Loïc Knuchel
committed
Nov 25, 2023
1 parent
8d3acc0
commit 8fc95ad
Showing
5 changed files
with
41 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule Azimutt.Services.BlackFridaySrv do | ||
@moduledoc false | ||
|
||
def should_display? do | ||
Date.compare(DateTime.utc_now(), ~D[2023-11-30]) == :lt && Azimutt.config(:host) == "azimutt.app" | ||
end | ||
|
||
def code do | ||
"BLACKFRIDAY2023" | ||
end | ||
end |
24 changes: 1 addition & 23 deletions
24
backend/lib/azimutt_web/templates/layout/_organization_right_bar.html.heex
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
23 changes: 23 additions & 0 deletions
23
backend/lib/azimutt_web/templates/partials/_blackfriday_card.html.heex
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,23 @@ | ||
<%= if @plan == :free && Azimutt.Services.BlackFridaySrv.should_display? do %> | ||
<section class="py-6 pl-6 lg:w-80 mx-auto"> | ||
<div class="relative isolate overflow-hidden bg-gray-900 px-3 py-4 text-center shadow-2xl rounded-2xl"> | ||
<h2 class="mt-0 mx-auto text-xl font-bold tracking-tight text-white">BlackFriday Offer!</h2> | ||
<p class="mx-auto mt-3 text-gray-300"> | ||
Get <span class="underline">50% OFF</span> for one year with code: | ||
<span class="font-extrabold bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500 text-transparent bg-clip-text"><%= Azimutt.Services.BlackFridaySrv.code %></span> | ||
</p> | ||
<div class="mt-4 flex items-center justify-center gap-x-6"> | ||
<a href={Routes.organization_billing_path(@conn, :index, @organization, source: "orga-card")} class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">Claim discount!</a> | ||
</div> | ||
<svg viewBox="0 0 512 512" class="absolute left-1/2 top-1/2 -z-10 h-[32rem] w-[32rem] -translate-x-1/2 [mask-image:radial-gradient(closest-side,white,transparent)]" aria-hidden="true"> | ||
<circle cx="256" cy="256" r="256" fill="url(#827591b1-ce8c-4110-b064-7cb85a0b1217)" fill-opacity="0.7" /> | ||
<defs> | ||
<radialGradient id="827591b1-ce8c-4110-b064-7cb85a0b1217"> | ||
<stop stop-color="#7775D6" /> | ||
<stop offset="1" stop-color="#E935C1" /> | ||
</radialGradient> | ||
</defs> | ||
</svg> | ||
</div> | ||
</section> | ||
<% end %> |
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