Skip to content

Commit

Permalink
add discount banner to start page + button to needle cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Dec 29, 2024
1 parent 7927af8 commit df41914
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 10 deletions.
143 changes: 143 additions & 0 deletions documentation/.vuepress/components/discountbanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<script setup lang="ts">
import { ref } from 'vue';
type Discount = {
banner: {
title: string,
subtitle: string,
}
url: string,
}
const discount = ref<Discount | null>(null);
if (typeof window !== "undefined") {
const url = "https://cloud.needle.tools/api/v1/get/discounts";
fetch(url)
.then(response => response.json())
.then(data => {
const value: Discount = data.current_discounts?.[0];
discount.value = value;
console.log(value);
});
}
</script>

<template>
<div v-if="discount" class="discount_banner">
<div class="content">
<h2 class="main_text">{{ discount.banner.title }}</h2>
<div class="text">{{ discount.banner.subtitle }}</div>
</div>

<div class="action">
<a target="_blank" tabindex="-1" :href="discount.url">
Claim now
</a>
</div>
</div>
<div v-else class="banner">
<img src="/imgs/banner.webp" alt="Needle Engine banner" />
</div>
</template>

<style scoped>
.discount_banner {
margin: 1rem 0;
border-radius: 1rem;
outline: 1px solid var(--c-border);
border: 1px solid rgba(255, 255, 255, 0.74);
line-height: initial !important;
background: var(--c-background-secondary);
background-color: #a9d43a;
background: linear-gradient(20deg, #b2f040 50%, #f1dc36 100%);
box-shadow:
inset 0 0 1rem rgba(255, 255, 255, 0.5),
0 0 1rem rgba(0, 0, 0, 0.185);
color: rgb(0, 0, 0);
@media screen and (max-width: 800px) {
width: calc(100%);
margin-left: 0;
}
transition: all 0.4s ease-in-out;
&:hover {
transform: translateY(-4px);
transition: all 0.4s ease-in-out;
& button {
transition: all 0.2s ease-in-out;
background: #414424 !important;
text-shadow: 0 0 0.5em rgba(255, 255, 255, 0.9);
}
}
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 2rem;
text-align: start;
padding: 1.3rem;
padding-left: 1.5rem;
padding-bottom: 1.5rem;
& .content {
display: flex;
flex-direction: column;
gap: 0;
max-width: 60ch;
user-select: none;
& > * {
text-decoration: none;
border: none;
}
& .main_text {
margin: 0;
padding: 0;
}
& .text {
line-height: 1.2em;
}
}
& .action {
/* align-self: start; */
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: start;
justify-content: start;
& a {
transition: all 0.4s ease-in-out;
background-color: var(--c-brand-secondary);
background-color: rgb(14, 14, 14);
box-shadow:
0 0 0.3rem rgba(0, 0, 0, 0.5),
0 0 1rem rgba(255, 255, 255, 0.411);
color: white;
text-shadow: 0 0 0.5em rgba(255, 255, 255, 0.808);
border: none;
outline: none;
font-size: 1.2rem;
border-radius: 1rem;
padding: .3rem 1rem;
}
}
}
</style>
24 changes: 14 additions & 10 deletions documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ lastUpdated: false
footer: "Copyright © 2024 Needle Tools GmbH"
---

![](/imgs/banner.webp)

**Needle Engine** is a web engine for complex and simple 3D applications alike. Work on your machine and deploy anywhere. Needle Engine is flexible, extensible and has built-in support for **collaboration and XR**. It is built around the **glTF standard** for 3D assets.

Powerful integrations for **Unity** and **Blender** allow artists and developers to collaborate and manage web applications inside battle-tested 3d editors. These **Integrations** allow you to use editor features for creating models, authoring materials, animating and sequencing animations, baking lightmaps and more with ease.

Our powerful **compression and optimization pipeline for the web** make sure your files are ready, small and load fast.

<discountbanner />

<quoteslides>
<div>Unbelievable Unity editor integration by an order of magnitude,<br/>and as straightforward as the docs claim. Wow. — Chris Mahoney</div>
Expand All @@ -32,11 +25,10 @@ Our powerful **compression and optimization pipeline for the web** make sure you
<div>This is amazing and if you are curious about WebXR with Unity this will help us get there — Dilmer Valecillos</div>

<div>We just gotta say WOW 🤩 — Unity for Digital Twins</div>


</quoteslides>



<actiongroup>
<action href="getting-started/">
Get started ⭐
Expand All @@ -50,9 +42,21 @@ Our powerful **compression and optimization pipeline for the web** make sure you
<action subtitle="with AI support" href="https://forum.needle.tools?utm_source=needle_docs&utm_content=actionbutton">
Get Help 💬
</action>
<action href="https://cloud.needle.tools">
Cloud ⛅️
</action>
</actiongroup>




**Needle Engine** is a web engine for complex and simple 3D applications alike. Work on your machine and deploy anywhere. Needle Engine is flexible, extensible and has built-in support for **collaboration and XR**. It is built around the **glTF standard** for 3D assets.

Powerful integrations for **Unity** and **Blender** allow artists and developers to collaborate and manage web applications inside battle-tested 3d editors. These **Integrations** allow you to use editor features for creating models, authoring materials, animating and sequencing animations, baking lightmaps and more with ease.

Our powerful **compression and optimization pipeline for the web** makes sure your files are ready, small and load fast.


<!-- <video-embed src="https://www.youtube.com/watch?v=p83q4siNeWo" /> -->

<br/>
Expand Down

0 comments on commit df41914

Please sign in to comment.