fix responsiveness of landing-page (#125)
This commit is contained in:
parent
d128747240
commit
70ae327f02
4 changed files with 28 additions and 9 deletions
|
@ -2,18 +2,20 @@
|
||||||
import { Icon } from "astro-icon";
|
import { Icon } from "astro-icon";
|
||||||
---
|
---
|
||||||
|
|
||||||
<button class="copy-btn flex items-center">
|
<button
|
||||||
|
class="copy-btn flex items-center w-4/5 mt-3 justify-center astro-md:w-1/2 astro-lg:w-[28%] astro-lg:mt-0 astro-lg:ml-3"
|
||||||
|
>
|
||||||
<span>npm install @astro-reactive/form @astro-reactive/validator</span>
|
<span>npm install @astro-reactive/form @astro-reactive/validator</span>
|
||||||
<Icon name="mdi:content-copy" width="40px" height="40px" />
|
<Icon name="mdi:content-copy" width="40px" height="40px" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.copy-btn {
|
.copy-btn {
|
||||||
max-width: 50%;
|
/* max-width: 50%; */
|
||||||
background-color: #2f2f2f;
|
background-color: #2f2f2f;
|
||||||
border: 1px solid #e0e0e0;
|
border: 1px solid #e0e0e0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 8px 16px;
|
padding: 6px 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -21,10 +21,13 @@ const pngSrcset = png.map(({ srcset }) => srcset).join(",");
|
||||||
|
|
||||||
<section class="relative h-full bg-black">
|
<section class="relative h-full bg-black">
|
||||||
<Starfield />
|
<Starfield />
|
||||||
<div class="relative grid h-full sm:grid-cols-2 place-items-center">
|
<div
|
||||||
|
class="relative flex flex-col-reverse justify-end pt-16 h-full astro-lg:grid-cols-2 place-items-center astro-lg:grid astro-lg:pt-0 astro-img:pt-10"
|
||||||
|
>
|
||||||
|
<!-- <div class="relative grid h-full astro-lg:grid-cols-2 place-items-center"> -->
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<h2
|
<h2
|
||||||
class="flex flex-col self-end gap-2 sm:gap-4 sm:self-auto sm:justify-self-end"
|
class="flex flex-col items-center gap-2 sm:gap-4 sm:self-auto sm:justify-self-end w-screen"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="font-extrabold tracking-tighter text-center text-8xl gradient-text"
|
class="font-extrabold tracking-tighter text-center text-8xl gradient-text"
|
||||||
|
@ -34,9 +37,11 @@ const pngSrcset = png.map(({ srcset }) => srcset).join(",");
|
||||||
<br /> faster.
|
<br /> faster.
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="flex space-x-2 mt-8 justify-center">
|
<div
|
||||||
|
class="mt-8 flex justify-center flex-col items-center astro-lg:flex-row astro-lg:justify-center astro-sm:w-screen"
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
class="flex space-x-2 items-center bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded transition-colors"
|
class="flex items-center w-4/5 astro-md:w-1/2 justify-center bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded transition-colors astro-lg:w-auto"
|
||||||
>
|
>
|
||||||
<span>Get Started</span>
|
<span>Get Started</span>
|
||||||
<Icon name="mdi:arrow-right" width="20px" height="20px" />
|
<Icon name="mdi:arrow-right" width="20px" height="20px" />
|
||||||
|
@ -45,13 +50,13 @@ const pngSrcset = png.map(({ srcset }) => srcset).join(",");
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<picture
|
<picture
|
||||||
class="self-start w-2/3 max-w-3xl sm:w-10/12 sm:self-auto sm:justify-self-start"
|
class="w-2/3 max-w-3xl sm:w-10/12 sm:self-auto sm:justify-self-start flex justify-center"
|
||||||
>
|
>
|
||||||
<source type="image/avif" srcset={avifSrcset} sizes={sizes} />
|
<source type="image/avif" srcset={avifSrcset} sizes={sizes} />
|
||||||
<source type="image/webp" srcset={webpSrcset} sizes={sizes} />
|
<source type="image/webp" srcset={webpSrcset} sizes={sizes} />
|
||||||
<source type="image/png" srcset={pngSrcset} sizes={sizes} />
|
<source type="image/png" srcset={pngSrcset} sizes={sizes} />
|
||||||
<img
|
<img
|
||||||
class="object-cover w-full h-full"
|
class="object-cover w-full h-full ml-[-3rem] astro-lg:ml-0 astro-img:w-[50%]"
|
||||||
src={png[0].url}
|
src={png[0].url}
|
||||||
width={png[0].width}
|
width={png[0].width}
|
||||||
height={png[0].height}
|
height={png[0].height}
|
||||||
|
|
|
@ -3,6 +3,13 @@ const defaultTheme = require("tailwindcss/defaultTheme");
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ["./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}"],
|
content: ["./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}"],
|
||||||
theme: {
|
theme: {
|
||||||
|
screens: {
|
||||||
|
"astro-sm": { max: "1000px" },
|
||||||
|
"astro-md": { min: "640px", max: "1000px" },
|
||||||
|
"astro-img": { min: "600px", max: "1000px" },
|
||||||
|
"astro-lg": { min: "1000px" },
|
||||||
|
...defaultTheme.screens,
|
||||||
|
},
|
||||||
extend: {
|
extend: {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: ["Inter", ...defaultTheme.fontFamily.sans],
|
sans: ["Inter", ...defaultTheme.fontFamily.sans],
|
||||||
|
|
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -21,6 +21,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apps/demo": {
|
"apps/demo": {
|
||||||
|
"name": "demo-astro-reactive-library",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
"apps/demo/packages/form": {},
|
"apps/demo/packages/form": {},
|
||||||
"apps/demo/packages/validator": {},
|
"apps/demo/packages/validator": {},
|
||||||
"apps/docs": {
|
"apps/docs": {
|
||||||
|
"name": "docs-astro-reactive-library",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -59,6 +61,7 @@
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
},
|
},
|
||||||
"apps/landing-page": {
|
"apps/landing-page": {
|
||||||
|
"name": "astro-reactive-library-landing-page",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -10474,6 +10477,7 @@
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
},
|
},
|
||||||
"packages/form": {
|
"packages/form": {
|
||||||
|
"name": "@astro-reactive/form",
|
||||||
"version": "0.4.6",
|
"version": "0.4.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -10508,6 +10512,7 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"packages/validator": {
|
"packages/validator": {
|
||||||
|
"name": "@astro-reactive/validator",
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
Loading…
Reference in a new issue