Skip to content

Commit c59d917

Browse files
committed
docs: improve landing page styles
1 parent 7b4d57e commit c59d917

File tree

22 files changed

+178
-34
lines changed

22 files changed

+178
-34
lines changed

docs/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { createDocNodes, createDocPages } = require("./builders");
22

33
exports.createPages = (pageTools) => {
4-
createDocPages(pageTools);
4+
return createDocPages(pageTools);
55
};
66

77
exports.onCreateNode = (nodeTools) => {

docs/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"prismjs": "^1.20.0",
3636
"prop-types": "^15.7.2",
3737
"react": "^16.13.1",
38+
"react-device-detect": "^1.13.1",
3839
"react-dom": "^16.13.1",
3940
"react-helmet": "^6.0.0",
4041
"react-particles-js": "^3.2.1",

docs/src/components/layouts/docs-layout.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ const DocsLayout = ({ children, content, allContent }) => {
8282
})}
8383
</ul>
8484
</div>
85+
<div className="fixed bottom-0 my-2 w-full flex justify-center z-30 lg:hidden">
86+
<button
87+
className="mx-auto px-5 py-1 bg-gray-200 text-primary rounded-md focus:outline-none"
88+
onClick={() => {
89+
toggleSidebar(!isHidden);
90+
}}
91+
>
92+
<i
93+
class={`ri-${
94+
isHidden ? "menu-4-fill" : "close-circle-line"
95+
} text-xl`}
96+
></i>
97+
</button>
98+
</div>
8599
</div>
86100
);
87101
};

docs/src/components/parts/footer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ const Footer = () => {
5252
<div>Lesy CLI Framework</div>
5353
</h3>
5454
</div>
55-
<div className="w-full lg:w-6/12 flex">
55+
<div className="w-full lg:w-6/12 flex flex-wrap lg:flex-no-wrap">
5656
{data.map((d) => (
57-
<div className="w-4/12">
58-
<h5 className="lowercase text-primary text-xl font-heading font-bold mb-3 ">
57+
<div className="w-6/12 lg:w-4/12">
58+
<h5 className="lowercase text-primary text-base lg:text-xl font-heading font-bold lg:mb-3 ">
5959
{d.title}
6060
</h5>
6161
{d.links.map((l) => (

docs/src/components/parts/newsletter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const NewsletterSection = () => {
1616
};
1717

1818
return (
19-
<div className="container mx-auto px-5 py-24 pb-10 lg:pb-24 lg:flex">
19+
<div className="container mx-auto px-5 py-24 lg:flex">
2020
<div className="w-full lg:w-6/12">
2121
<h2 className="text-3xl text-left inline-block font-bold text-heading font-heading">
2222
Sign up for latest news and updates
@@ -26,18 +26,18 @@ const NewsletterSection = () => {
2626
</p>
2727
</div>
2828
<form className="w-full lg:w-6/12 mt-2" onSubmit={onSubscribe}>
29-
<div className="flex items-center">
29+
<div className="flex items-center flex-wrap lg:flex-no-wrap">
3030
<input
3131
type="email"
3232
placeholder="[email protected]"
33-
className="w-full px-4 py-4 mr-2 bg-gray-100 rounded-md border border-gray-400 focus:outline-none"
33+
className="w-full px-4 py-2 lg:mr-2 bg-gray-100 rounded-md border border-gray-400 focus:outline-none"
3434
onChange={onChange}
3535
required
3636
onInvalid={(e) =>
3737
e.target.setCustomValidity("Please enter valid email address")
3838
}
3939
/>
40-
<button className="bg-secondary text-white px-5 py-4 rounded shadow w-1/4 font-bold">
40+
<button className="bg-secondary text-white px-5 py-2 mt-3 lg:mt-0 rounded shadow w-full lg:w-1/4 font-semibold">
4141
Notify
4242
</button>
4343
</div>

docs/src/components/sidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const Sidebar = ({ allContent }) => {
4747

4848
return (
4949
<div
50-
className={`bg-light border-r border-gray-300 fixed w-full lg:w-1/5 overflow-auto h-screen `}
50+
className={`bg-light border-r border-gray-300 fixed top-0 w-full lg:w-1/5 overflow-auto min-h-screen `}
5151
>
5252
<div className="top-0 bg-white z-10 hidden lg:block sticky">
5353
<Brand />
@@ -60,7 +60,7 @@ const Sidebar = ({ allContent }) => {
6060
<i class="ri-arrow-left-line mr-2"></i> Back to main menu
6161
</Link>
6262
)}
63-
<div className="py-3 px-10 flex">
63+
<div className="py-3 px-10 flex max-h-screen">
6464
<ul className="level-0 w-full">
6565
{pages.map((page) => {
6666
return (

docs/src/components/visuals/particles-bg.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import React from "react";
22
import Particles from "react-particles-js";
3-
const isMobile =
4-
typeof navigator == "function"
5-
? /iPhone|iPad|iPod|Android/i.test(navigator.userAgent)
6-
: false;
3+
import { isMobile } from "react-device-detect";
74

85
const ParticlesBg = () => {
6+
console.log("==>", isMobile);
97
return (
108
<div className="absolute top-0 left-0 w-full">
119
<Particles

docs/src/components/visuals/section-headlines.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React from "react";
22

33
const SectionHeadlines = ({ title, subtitle }) => {
44
const heading = title.replace(
@@ -8,7 +8,7 @@ const SectionHeadlines = ({ title, subtitle }) => {
88
return (
99
<div className="flex flex-col items-center pt-16">
1010
<h2
11-
className="text-heading font-heading font-extrabold text-5xl"
11+
className="text-heading font-heading font-extrabold text-5xl text-center leading-tight"
1212
dangerouslySetInnerHTML={{ __html: heading }}
1313
></h2>
1414
<p className="text-center text-lg my-6 lg:w-2/4">{subtitle}</p>

docs/src/markdown/docs/dev/recipies/sample2.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,101 @@ title: Sample2
33
path: /docs/dev/sample2
44
icon: terminal-box-fill
55
---
6+
7+
Each and every part of Lesy is carefully handcrafted to provide a better experience to both developers and users. Yet, there is always a scope to improve the code base for the modern future.
8+
9+
Few things are considered as rules while developing,
10+
11+
- **Simpler** - _Dont complicate unneccesarily_
12+
- **Maintainable** - _Stick with standard_
13+
- **Decoupled** - _Do only one thing perfectly_
14+
- **Extensible** - _Allow awesome minds to plug things_
15+
16+
### Project structure
17+
18+
First lets see how the code is organised.
19+
20+
```bash
21+
lesy/
22+
┣ benchmark/
23+
┣ docs/
24+
┗ packages/
25+
┣ cli/
26+
┣ compiler/ # includes ts node if it is typescript project
27+
┣ core/ # handles user input and output
28+
┣ testbed/
29+
┣ types/
30+
┣ helpers/
31+
┗ validator/
32+
┣ misc/
33+
┣ pilot-ui/
34+
┗ test-utils/
35+
┗ plugins/
36+
┣ lesy-plugin-config/
37+
┣ lesy-plugin-demo/
38+
┣ lesy-plugin-generator/
39+
┣ lesy-plugin-help/
40+
┣ lesy-plugin-pilot/
41+
┣ lesy-plugin-prompt/
42+
┣ lesy-plugin-sidekick/
43+
┣ lesy-plugin-store/
44+
┗ lesy-plugin-validator/
45+
```
46+
47+
There were around **18 packages** in the lesy framework. But what really matters is `core` and `compiler`, others are supporting features.
48+
49+
### Core
50+
51+
As the name says, it is the heart <i class="ri-heart-3-fill text-primary"></i> of the project. Main responsibility of the core is take user commands, convert them to objects and run them. Nothing more. It is slim, and can live without other things in the project.
52+
53+
Core components include,
54+
55+
#### Command Contoller
56+
57+
Takes commands, process and strore them in a nice format
58+
59+
#### Middleware Controller
60+
61+
Takes middlewares, stores in an array and execute when requested
62+
63+
#### Feature Controller
64+
65+
Takes features, stores and run when called
66+
67+
#### Loader
68+
69+
Load files and delegate to above controllers
70+
71+
#### Utilities
72+
73+
Wrap useful third party modules for commands to use
74+
75+
#### Core
76+
77+
Orchestrate all the above components and run commands and middlewares
78+
79+
### Compiler
80+
81+
### Plugins
82+
83+
### Misc
84+
85+
### Testbed
86+
87+
### Types
88+
89+
### CLI
90+
91+
### Helpers
92+
93+
### Build
94+
95+
### Release
96+
97+
### Docs
98+
99+
### Pilot UI
100+
101+
### Benchmark
102+
103+
### How it works

0 commit comments

Comments
 (0)