Skip to content

Commit

Permalink
(ui) examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Jan 1, 2024
1 parent ab91cc1 commit c0414ab
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 11 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,17 @@ https://instachart.coveritup.app/radar?title=Radar+Chart&data={
| `values` || Array (int) |

```sh
https://instachart.coveritup.app/funnel?title=Radar+Chart&data={
"names": ["Mon","Tue", "Wed", "Sat"],
"values": [2,1,4,6]
https://instachart.coveritup.app/funnel?title=Radar+Chart&width=500&data={
"names": ["Mon","Tue", "Thu", "Fri", "Sat", "Sun"],
"values": [100,80,60,40,20,10]
}
```

<br>

<p align="center">
<a href='https://instachart.coveritup.app/funnel?title=Funnel+Chart&width=520&subtitle=Sleeping+Hours&data={%20"names":%20["Mon","Tue",%20"Wed",%20"Sat"],%20"values":%20[2,1,4,6]%20}'>
<img alt="funnel chart" src='https://instachart.coveritup.app/funnel?title=Funnel+Chart&width=520&subtitle=Sleeping+Hours&data={%20"names":%20["Mon","Tue",%20"Wed",%20"Sat"],%20"values":%20[2,1,4,6]%20}'>
<a href='https://instachart.coveritup.app/funnel?title=Radar+Chart&width=620&data={%20%22names%22:%20[%22Mon%22,%22Tue%22,%20%22Thu%22,%20%22Fri%22,%20%22Sat%22,%20%22Sun%22],%20%22values%22:%20[100,80,60,40,20,10]%20}'>
<img alt="funnel chart" src='https://instachart.coveritup.app/funnel?title=Radar+Chart&width=620&data={%20%22names%22:%20[%22Mon%22,%22Tue%22,%20%22Thu%22,%20%22Fri%22,%20%22Sat%22,%20%22Sun%22],%20%22values%22:%20[100,80,60,40,20,10]%20}'>
</a>
</p>

Expand Down Expand Up @@ -260,3 +260,4 @@ curl -sLk https://raw.githubusercontent.com/kevincobain2000/instachart/master/in
- **v1.0.2** - `funnel` charts and `table` as image.
- **v1.0.3** - Fixes a few padding issues.
- **v1.0.4** - Adds `/` for frontend. And Installation instructions for self-hosting.
- **v1.0.5** - Frontend page with examples.
47 changes: 47 additions & 0 deletions frontend/src/components/Compare.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
---

<!--Main-->
<div
class="container pt-24 md:pt-36 mx-auto flex flex-wrap flex-col md:flex-row items-center"
>
<!--Left Col-->
<div
class="flex flex-col w-full xl:w-2/5 justify-center lg:items-start overflow-y-hidden"
>
<h1
class="my-4 text-3xl md:text-5xl text-white opacity-75 font-bold leading-tight text-center md:text-left"
>
Compare with
<span
class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500"
>
other services - free plans
</span>
</h1>

<div
class="bg-gray-900 opacity-75 w-full shadow-lg rounded-lg px-8 pt-6 pb-6 overflow-auto no-scrollbar"
>
<div class="mb-4">
<b>Image-Charts:</b> Quota 60 charts per minute
<br>
<b class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500">InstaChart:</b> <b class="text-slate-100">Free</b>
<br><br>
<b>QuickChart:</b> Rate limits enforced
<br>
<b class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500">InstaChart:</b> <b class="text-slate-100">Free</b>
</div>
</div>
</div>

<!--Right Col-->
<div class="w-full xl:w-3/5 pt-5 overflow-hidden">
<img
class="mx-auto w-full md:w-4/5"
src="https://instachart.coveritup.app/bar?title=Performance+200RPS&horizontal=true&metric=secs%20&theme=dark&subtitle=Response+Time&data={%20%22x%22:%20[%22Total%22,%20%22Fastest%22,%20%22Average%22],%20%22y%22:%20[[3,0.27,0.7]]%20}"
/>
</div>
</div>
<style></style>
9 changes: 9 additions & 0 deletions frontend/src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
impactful visuals!
</p>
</div>
<div class="flex items-center justify-between pt-4">
<a
class="bg-gradient-to-t from-green-800 to-green-500 hover:from-green-500 hover:to-green-500 text-white font-bold py-2 px-4 rounded focus:ring transform transition hover:scale-105 duration-300 ease-in-out"
type="button"
href="https://github.com/kevincobain2000/instachart"
>
Read docs
</a>
</div>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Nav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import medium from '@assets/medium.svg?raw'
<div class="w-full container mx-auto">
<div class="w-full flex items-center justify-between">

<a class="flex items-center text-indigo-400 no-underline hover:no-underline font-bold text-2xl lg:text-4xl" href="/">
<img src="/favicon.ico" alt="" width="30">
<a class="flex items-center text-indigo-400 no-underline hover:no-underline font-bold text-3xl" href="/">
<img src="/favicon.ico" alt="" width="25">
Insta<span class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500">Chart</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/RadarChart.astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ https://instachart.coveritup.app/radar?title=Radar
<!--Right Col-->
<div class="w-full xl:w-3/5 pt-5 overflow-hidden">
<img
class="mx-auto w-full md:w-4/5 transform transition duration-700 ease-in-out"
src="https://instachart.coveritup.app/radar?title=Radar+Chart&height=520&data={%20%22names%22:%20[%22Mon%22,%22Tue%22,%20%22Wed%22,%20%22Fri%22],%20%22labels%22:%20[%22Work%22,%20%22Relax%22,%20%22Travel%22],%20%22values%22:%20[[1,2,3,4],%20[15,7,8,9],%20[15,17,5,7]]%20}&theme=dark"
class="mx-auto w-full md:w-4/5"
src="https://instachart.coveritup.app/radar?title=Radar+Chart&height=660&data={%20%22names%22:%20[%22Mon%22,%22Tue%22,%20%22Wed%22,%20%22Fri%22],%20%22labels%22:%20[%22Work%22,%20%22Relax%22,%20%22Travel%22],%20%22values%22:%20[[1,2,3,4],%20[15,7,8,9],%20[15,17,5,7]]%20}&theme=dark"
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/SelfHosting.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import octocat from "@assets/octocat.svg?raw";
<h1
class="my-4 text-3xl md:text-5xl text-white opacity-75 font-bold leading-tight text-center md:text-left"
>
Free cloud
Free!
<span
class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500"
>
And
With
</span>
Self Hosted Options.
</h1>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Hero from "@components/Hero.astro";
import BarChart from "@components/BarChart.astro";
import RadarChart from "@components/RadarChart.astro";
import SelfHosting from "@components/SelfHosting.astro";
import Compare from "@components/Compare.astro";
import PieChart from "@components/PieChart.astro";
import Footer from "@components/Footer.astro";
---
Expand All @@ -25,6 +26,7 @@ import Footer from "@components/Footer.astro";
<PieChart />
<RadarChart />
<SelfHosting />
<Compare />
<Footer />
</div>
</Layout>
Expand Down

0 comments on commit c0414ab

Please sign in to comment.