Skip to content

Commit

Permalink
margin
Browse files Browse the repository at this point in the history
  • Loading branch information
sealrealize committed Jan 14, 2024
1 parent 225145c commit 99e0263
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 7 deletions.
6 changes: 3 additions & 3 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ disableTextInHeader = false

[buymeacoffee]
#identifier = ""
globalWidget = true
globalWidgetMessage = "Cookie consent. This site is not gathering cookies"
#globalWidget = true
#globalWidgetMessage = "Cookie consent. This site is not gathering cookies"
#globalWidgetColor = "#FFDD00"
globalWidgetPosition = "Right"
#globalWidgetPosition = "Right"

[verification]
# google = ""
Expand Down
8 changes: 4 additions & 4 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: ""
description: ""
---
{{< rawhtml >}}
<section class="cointainer mb-6">
<section class="cointainer mb-8">
<!-- Jumbotron -->
<div class="bg-neutral-50 px-6 py-6 text-center dark:bg-neutral-900 md:px-12 lg:text-left">
<div class="w-100 mx-auto sm:max-w-2xl">
Expand All @@ -16,11 +16,11 @@ description: ""
</h2>
<p class="mt-8 mx-auto text-2xl mb-10 prose dark:prose-invert max-lg">
AstroWind is a free, customizable and production-ready template for Astro 4.0 + Tailwind CSS. Suitable for Startups, Small Business, SaaS websites, Professional Portfolios, Marketing websites, Landing Pages & Blogs. </p>
<a href="#" class="inline-flex justify-center items-center py-3 px-5 sm:ms-4 text-center rounded-full text-neutral-50
<a href="#" class="inline-flex justify-center items-center mt-4 py-3 px-5 sm:ms-4 text-center rounded-full text-neutral-50
bg-primary-600 dark:bg-primary-500">
Read more
</a>
<a href="#" class="inline-flex justify-center items-center py-3 px-5 text-center">
<a href="#" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-center">
Ask a Question
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/></svg>
Expand All @@ -39,7 +39,7 @@ description: ""
</section>
<!-- Quote -->
<section>
<div class="bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-500 dark:to-secondary-700 py-6 mt-30 mb-20 rounded-lg text-neutral-50">
<div class="bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-500 dark:to-secondary-700 py-6 mb-20 rounded-lg text-neutral-50">
<div class="container text-center text-lg">
Philosophy: Keep It Simple Stupid principle. Delicate dance of flow and elegance!
</div>
Expand Down
84 changes: 84 additions & 0 deletions layouts/partials/cookie-consent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!-- component -->
<div class="relative flex justify-center items-center">

<button onclick="showMenu(true)" class="focus:ring-2 focus:ring-offset-2 focus:ring-gray-800 focus:outline-none absolute z-0 top-48 py-2 px-7 bg-gray-800 text-white rounded text-base hover:bg-black">
Open</button>

<div id="menu" class="w-full h-full bg-gray-900 bg-opacity-80 top-0 fixed sticky-0">
<div class="2xl:container 2xl:mx-auto py-48 px-4 md:px-28 flex justify-center items-center">
<div class="w-96 md:w-auto dark:bg-gray-800 relative flex flex-col justify-center items-center bg-white py-16 px-4 md:px-24 xl:py-24 xl:px-36">
<div role="banner">

</div>
<div class="mt-12">
<h1 role="main" class="text-3xl dark:text-white lg:text-4xl font-semibold leading-7 lg:leading-9 text-center text-gray-800">
We use cookies</h1>
</div>
<div class="mt">
<p class="mt-6 sm:w-80 text-base dark:text-white leading-7 text-center text-gray-800">
Please, accept these sweeties to continue enjoying our site!</p>
</div>
<button class="w-full dark:text-gray-800 dark:hover:bg-gray-100 dark:bg-white sm:w-auto mt-14 text-base leading-4 text-center text-white py-6 px-16 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-800 bg-gray-800 hover:bg-black">
Mmm... Sweet!</button>
<a href="javascript:void(0)" class="mt-6 dark:text-white dark:hover:border-white text-base leading-none focus:outline-none hover:border-gray-800 focus:border-gray-800 border-b border-transparent text-center text-gray-800">
Nope.. I am on a diet</a>
<button onclick="showMenu(true)" class="text-gray-800 dark:text-gray-400 absolute top-8 right-8 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-800" aria-label="close">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 6L6 18" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round" />
<path d="M6 6L18 18" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
</div>
</div>
</div>
</div>
<script>let menu = document.getElementById("menu");
const showMenu = (flag) => {
menu.classList.toggle("hidden");
};
</script>


<!-- Cookies -->
<div class="absolute bottom-0 left-0 p-4 bg-neutral-50 border-t-4">
<h2 class="mb-2 text-xl font-heading">Cookie Policy</h2>
<p class="mb-4">Our site uses cookies, which helps us to improve our site and enables us to deliver the best possible service and customer experience. By clicking Accept, you are agreeing to our cookie policy. <a class="font-semibold text-primary-500 hover:underline" href="#">Terms</a>.</p>
<div class="justify-center">
<a class="rounded-full inline-flex items-center px-4 py-2 leading-none text-neutral-50" href="#" style="background-color:#4caf50">
<svg class="w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12" /></svg>
Accept
</a>
<a class="rounded-full inline-flex items-center px-4 py-2 leading-none text-neutral-50" href="#" style="background-color:#f44336">
<svg class="w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" /></svg>
Decline
</a>
<a class="rounded-full inline-flex items-center px-4 py-2 leading-none text-neutral-50" href="#" style="background-color:#607d8b">
<svg class="w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3" />
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" /></svg>
Cookie Policy
</a>
</div>
</div>
<!-- /Cookie -->


<script>
const cookieContainer = document.querySelector(".cookie-container");
const cookieButton = document.querySelector(".cookie-btn");

cookieButton.addEventListener("click", () => {
cookieContainer.classList.remove("active");
localStorage.setItem("cookieBannerDisplayed", "true");
});

setTimeout(() => {
if (!localStorage.getItem("cookieBannerDisplayed")) {
cookieContainer.classList.add("active");
}
}, 2000);
</script>

0 comments on commit 99e0263

Please sign in to comment.