mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
135 lines
3.3 KiB
Plaintext
135 lines
3.3 KiB
Plaintext
@go.Package { name = "github.com/onsonr/sonr/pkg/nebula/models" }
|
|
|
|
module models
|
|
|
|
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
|
|
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
|
// │ General Components │
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
typealias FormState = "initial" | "error" | "success" | "warning"
|
|
|
|
class Image {
|
|
src: String
|
|
width: String
|
|
height: String
|
|
}
|
|
|
|
class Link {
|
|
text: String
|
|
href: String
|
|
}
|
|
|
|
class SocialLink {
|
|
link: Link
|
|
icon: String
|
|
}
|
|
|
|
class Button {
|
|
text: String
|
|
href: String
|
|
}
|
|
|
|
class Input {
|
|
label: String
|
|
type: String
|
|
placeholder: String
|
|
value: String?
|
|
error: String?
|
|
help: String?
|
|
required: Bool
|
|
}
|
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
|
// │ Homepage Components │
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
class Stats {
|
|
firstValue: String
|
|
firstLabel: String
|
|
secondValue: String
|
|
secondLabel: String
|
|
thirdValue: String
|
|
thirdLabel: String
|
|
}
|
|
|
|
class Hero {
|
|
titleFirst: String
|
|
titleEmphasis: String
|
|
titleSecond: String
|
|
subtitle: String
|
|
primaryButton: Button
|
|
secondaryButton: Button
|
|
image: Image
|
|
}
|
|
|
|
class Footer {
|
|
logo: Image
|
|
mediumLink: SocialLink
|
|
twitterLink: SocialLink
|
|
discordLink: SocialLink
|
|
githubLink: SocialLink
|
|
companyLinks: List<Link>
|
|
resourcesLinks: List<Link>
|
|
}
|
|
|
|
hero : Hero
|
|
stats : Stats
|
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
|
// │ Registration Components │
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
class RegistrationForm {
|
|
title: String
|
|
description: String
|
|
state: FormState
|
|
inputs: List<Input>
|
|
}
|
|
|
|
registrationForm : RegistrationForm = new RegistrationForm {
|
|
title = "Register";
|
|
description = "Create your Sonr account";
|
|
state = "initial";
|
|
inputs = [
|
|
new Input {
|
|
label = "Username";
|
|
type = "text";
|
|
placeholder = "Enter your username";
|
|
value = "";
|
|
error = "";
|
|
help = "";
|
|
required = true;
|
|
},
|
|
new Input {
|
|
label = "Email";
|
|
type = "email";
|
|
placeholder = "Enter your email";
|
|
value = "";
|
|
error = "";
|
|
help = "";
|
|
required = true;
|
|
},
|
|
new Input {
|
|
label = "Password";
|
|
type = "password";
|
|
placeholder = "Enter your password";
|
|
value = "";
|
|
error = "";
|
|
help = "";
|
|
required = true;
|
|
},
|
|
new Input {
|
|
label = "Confirm Password";
|
|
type = "password";
|
|
placeholder = "Confirm your password";
|
|
value = "";
|
|
error = "";
|
|
help = "";
|
|
required = true;
|
|
}
|
|
];
|
|
};
|