leadsolution / landing-base Goto Github PK
View Code? Open in Web Editor NEWA Landing Page Starter
License: MIT License
A Landing Page Starter
License: MIT License
Loading distractor on form
Add styled types. It is used for quick-n-local styling.
Handle duplicated specially.
Add free Font Awesome by Default.
Create a branch and try a refactoring to styled components.
Add functions like goToTop
, focusFirst
and autoFill
See security warnings
Assets like images should be in a public directory, not static https://nextjs.org/docs#static-file-serving-eg-images
Convert everything to plain-old functions and use hooks.
Add an empty array on useEffect
to ensure it behaves like componentDidMount
.
Missing text area type form FormField
Setup it more like landings are coming
Since there is some navigation, would be nice to have a main layout for the pages.
Add some outputs and use Start-Process instead of start
Add some default validations and a mechanism to add custom validations
Better error messages after form submission.
Latest landings got some navigation...
Add some common styles.
Also, add more Bootstrap variables examples.
Replace type=date by Cleave
case "date":
return (
<Cleave
type="tel"
className="form-control"
id={name}
name={name}
required={required}
disabled={disabled}
placeholder={placeholder}
options={{
blocks: [2, 2, 4],
delimiters: ["/", "/"],
numericOnly: true
}}
/>
);
Built-in
e.g.:
type FieldProps = {
name: string,
label: string,
type?: string,
required?: boolean,
placeholder?: string,
children?: React.ReactNode,
}
function Field({ name, label, type = "text", required = true, children = [], placeholder = undefined }: FieldProps) {
function input() {
switch (type) {
case "tel":
return <Cleave type="tel" name={name} id={name} className="form-control" options={{ phone: true, phoneRegionCode: "br" }} required={required} placeholder={placeholder} />
case "tax":
return <Cleave type="tel" name={name} id={name} className="form-control" required={required} placeholder={placeholder} options={{
blocks: [3, 3, 3, 2],
delimiters: ['.', '.', '-'],
numericOnly: true
}} />
case "select":
return (
<select name={name} id={name} className="form-control" required={required}>
<option value="" selected disabled>{placeholder}</option>
{children}
</select>
);
default:
return <input type={type} name={name} id={name} className="form-control" required={required} placeholder={placeholder} />;
}
}
return (
<div className="form-control">
<label htmlFor={name}>{label}</label>
{input}
</div>
);
}
Example
.color-secondary {
color: $secondary;
}
Bring the Directus API out of the box!
Mark examples as required
It doesn't scale to have two files for each component. Maybe the styles should go on styled tags?
They don't auto fit the form-container.
<Cleave
type="text"
className="form-control"
id={name}
name={name}
required={required}
disabled={disabled}
placeholder={placeholder}
options={{
blocks: [2, 3, 3, 4, 2],
delimiters: [".", ".", "/", "-"],
numericOnly: true,
}}
/>
Add a default favicon and its meta-tags
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Hello, world!</title>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.