create-coralite 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/bin/index.js +218 -0
- package/lib/utils.js +130 -0
- package/package.json +39 -0
- package/templates/css/_gitignore +24 -0
- package/templates/css/coralite.config.js +11 -0
- package/templates/css/jsconfig.json +9 -0
- package/templates/css/package.json +13 -0
- package/templates/css/public/favicon.ico +0 -0
- package/templates/css/public/images/icon-coralite.avif +0 -0
- package/templates/css/public/images/icon-css.avif +0 -0
- package/templates/css/public/images/icon-html.avif +0 -0
- package/templates/css/public/images/icon-js.avif +0 -0
- package/templates/css/public/images/logo-coralite.svg +1 -0
- package/templates/css/src/css/styles.css +0 -0
- package/templates/css/src/pages/index.html +18 -0
- package/templates/css/src/templates/coralite-counter.html +34 -0
- package/templates/css/src/templates/coralite-footer.html +3 -0
- package/templates/css/src/templates/coralite-header.html +5 -0
- package/templates/scss/_gitignore +24 -0
- package/templates/scss/coralite.config.js +11 -0
- package/templates/scss/jsconfig.json +9 -0
- package/templates/scss/package.json +11 -0
- package/templates/scss/public/favicon.ico +0 -0
- package/templates/scss/public/images/icon-coralite.avif +0 -0
- package/templates/scss/public/images/icon-css.avif +0 -0
- package/templates/scss/public/images/icon-html.avif +0 -0
- package/templates/scss/public/images/icon-js.avif +0 -0
- package/templates/scss/public/images/logo-coralite.svg +1 -0
- package/templates/scss/src/pages/index.html +24 -0
- package/templates/scss/src/scss/styles.scss +39 -0
- package/templates/scss/src/templates/coralite-footer.html +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Create Coralite Scaffolding
|
|
2
|
+
|
|
3
|
+
The `create-coralite` package is a command-line interface (CLI) tool designed to scaffold new projects using the Coralite static-site-generator (SSG).
|
|
4
|
+
|
|
5
|
+
> **Note**: This guide assumes familiarity with basic terminal operations, Node.js (v22.12.0 or higher), and package managers such as `npm`, `yarn`, or `pnpm`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation & Usage
|
|
10
|
+
|
|
11
|
+
### Install via Package Manager
|
|
12
|
+
|
|
13
|
+
To initialize a new Coralite project:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm create coralite@latest
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Alternatively, use other package managers:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn create coralite
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm create coralite
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> **Note**: The `create-coralite` CLI is registered as both `create-coralite` and `cca` (short for *Coralite Create App*) in the `bin` field of `package.json`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## CLI Options
|
|
34
|
+
|
|
35
|
+
### `-o, --output <name>`
|
|
36
|
+
|
|
37
|
+
- **Purpose**: Set project output directory.
|
|
38
|
+
- **Default**: Empty string → prompt required
|
|
39
|
+
- **Usage Example**:
|
|
40
|
+
```bash
|
|
41
|
+
npm create coralite -o my-project
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### `-t, --template <name>`
|
|
45
|
+
|
|
46
|
+
- **Purpose**: Select styling template for the scaffolded project.
|
|
47
|
+
- **Choices**: `css`, `scss`
|
|
48
|
+
- **Default**: Empty string → user selection required
|
|
49
|
+
- **Usage Example**:
|
|
50
|
+
```bash
|
|
51
|
+
npm create coralite -t scss
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Author & Licensing
|
|
57
|
+
|
|
58
|
+
- **Author**: Thomas David ([https://thomasjackdavid.com](https://thomasjackdavid.com))
|
|
59
|
+
- **License**: AGPL-3.0-only (Affero General Public License, version 3)
|
|
60
|
+
> **Implication**: Any derived work must be open-source and accessible to users.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Repository & Documentation
|
|
65
|
+
|
|
66
|
+
### Source Code
|
|
67
|
+
- Hosted on [Codeberg](https://codeberg.org), a decentralized Git hosting service.
|
|
68
|
+
- Path: [packages/create-coralite](https://codeberg.org/tjdavid/coralite/src/branch/main/packages/create-coralite) within the larger Coralite repository.
|
|
69
|
+
|
|
70
|
+
### Official Documentation
|
|
71
|
+
- Accessible at: [https://coralite.io/docs/create-coralite](https://coralite.io/docs/create-coralite)
|
|
72
|
+
|
|
73
|
+
> **Recommended**: Visit documentation for advanced usage, template details, and project structure reference.
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs, { existsSync } from 'node:fs'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
import { Command, Option } from 'commander'
|
|
7
|
+
import * as prompts from '@clack/prompts'
|
|
8
|
+
import colours from 'kleur'
|
|
9
|
+
import pkg from '../package.json' with { type: 'json' }
|
|
10
|
+
import {
|
|
11
|
+
copy,
|
|
12
|
+
emptyDir,
|
|
13
|
+
extractPackageInfoFromUserAgent,
|
|
14
|
+
formatTargetDir,
|
|
15
|
+
isEmpty,
|
|
16
|
+
isValidPackageName,
|
|
17
|
+
toValidPackageName
|
|
18
|
+
} from '../lib/utils.js'
|
|
19
|
+
|
|
20
|
+
const program = new Command()
|
|
21
|
+
|
|
22
|
+
program
|
|
23
|
+
.name('create-coralite')
|
|
24
|
+
.description('Create a new Coralite project.')
|
|
25
|
+
.version(pkg.version)
|
|
26
|
+
|
|
27
|
+
program
|
|
28
|
+
.addOption(
|
|
29
|
+
new Option('-o, --output <name>', 'target project directory').default('')
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
program
|
|
33
|
+
.addOption(
|
|
34
|
+
new Option('-t, --template <name>', 'use a specific template').choices([
|
|
35
|
+
'css',
|
|
36
|
+
'scss'
|
|
37
|
+
]).default('')
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
program.parse()
|
|
41
|
+
|
|
42
|
+
const options = program.opts()
|
|
43
|
+
const cwd = process.cwd()
|
|
44
|
+
const { blue, magenta, cyan } = colours
|
|
45
|
+
const TEMPLATES = [
|
|
46
|
+
{
|
|
47
|
+
value: 'css',
|
|
48
|
+
name: 'CSS',
|
|
49
|
+
colour: cyan
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: 'scss',
|
|
53
|
+
name: 'SCSS',
|
|
54
|
+
colour: magenta
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
const defaultTarget = 'coralite-project'
|
|
58
|
+
const cancelPrompt = () => prompts.cancel('Operation cancelled')
|
|
59
|
+
const renameFiles = {
|
|
60
|
+
_gitignore: '.gitignore'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function createProject () {
|
|
64
|
+
const argTemplate = options.template
|
|
65
|
+
let target = options.target
|
|
66
|
+
let template = argTemplate
|
|
67
|
+
const pkgInfo = extractPackageInfoFromUserAgent(process.env.npm_config_user_agent)
|
|
68
|
+
|
|
69
|
+
// get project name and target directory
|
|
70
|
+
if (target) {
|
|
71
|
+
target = formatTargetDir(options.target)
|
|
72
|
+
} else {
|
|
73
|
+
const projectName = await prompts.text({
|
|
74
|
+
message: 'Project name:',
|
|
75
|
+
defaultValue: defaultTarget,
|
|
76
|
+
placeholder: defaultTarget,
|
|
77
|
+
validate: (value) => {
|
|
78
|
+
if (value.length && formatTargetDir(value).length === 0) {
|
|
79
|
+
return 'Invalid project name'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
if (prompts.isCancel(projectName)) {
|
|
85
|
+
return cancelPrompt()
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
target = formatTargetDir(projectName)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// handle directory if exist and not empty
|
|
92
|
+
if (existsSync(target) && isEmpty(target)) {
|
|
93
|
+
let message = `Target directory "${target}"`
|
|
94
|
+
|
|
95
|
+
if (target === '.') {
|
|
96
|
+
message = 'Current directory'
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const targetOverwrite = await prompts.select({
|
|
100
|
+
message: message + ' is not empty. Please choose how to proceed:',
|
|
101
|
+
options: [
|
|
102
|
+
{
|
|
103
|
+
label: 'Cancel operation',
|
|
104
|
+
value: 'no'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Remove existing files and continue',
|
|
108
|
+
value: 'yes'
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
if (prompts.isCancel(targetOverwrite)) {
|
|
114
|
+
return cancelPrompt()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (targetOverwrite === 'yes') {
|
|
118
|
+
emptyDir(target)
|
|
119
|
+
} else if (targetOverwrite === 'no') {
|
|
120
|
+
return cancelPrompt()
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// get package name
|
|
125
|
+
let packageName = path.basename(path.resolve(target))
|
|
126
|
+
|
|
127
|
+
if (!isValidPackageName(packageName)) {
|
|
128
|
+
const packageNameResult = await prompts.text({
|
|
129
|
+
message: 'Package name:',
|
|
130
|
+
defaultValue: toValidPackageName(packageName),
|
|
131
|
+
placeholder: toValidPackageName(packageName),
|
|
132
|
+
validate (directory) {
|
|
133
|
+
if (!isValidPackageName(directory)) {
|
|
134
|
+
return 'Invalid package.json name'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
if (prompts.isCancel(packageNameResult)) {
|
|
140
|
+
return cancelPrompt()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
packageName = packageNameResult
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (!template) {
|
|
147
|
+
const selectedTemplate = await prompts.select({
|
|
148
|
+
message: 'Please choose from below: ',
|
|
149
|
+
options: TEMPLATES.map((template) => ({
|
|
150
|
+
label: template.colour(template.name),
|
|
151
|
+
value: template.value
|
|
152
|
+
}))
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
if (prompts.isCancel(selectedTemplate)) {
|
|
156
|
+
return cancelPrompt()
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
template = selectedTemplate
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const root = path.join(cwd, target)
|
|
163
|
+
fs.mkdirSync(root, { recursive: true })
|
|
164
|
+
|
|
165
|
+
const pkgManager = pkgInfo ? pkgInfo.name : 'npm'
|
|
166
|
+
const templateDir = path.resolve(
|
|
167
|
+
fileURLToPath(import.meta.url),
|
|
168
|
+
'../..',
|
|
169
|
+
`templates/${template}`
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
// copy files
|
|
173
|
+
const write = (file, content) => {
|
|
174
|
+
const targetPath = path.join(root, renameFiles[file] ?? file)
|
|
175
|
+
if (content) {
|
|
176
|
+
fs.writeFileSync(targetPath, content)
|
|
177
|
+
} else {
|
|
178
|
+
copy(path.join(templateDir, file), targetPath)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// read all files from template
|
|
183
|
+
const files = fs.readdirSync(templateDir)
|
|
184
|
+
|
|
185
|
+
for (const file of files.filter((f) => f !== 'package.json')) {
|
|
186
|
+
write(file)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// update package.json
|
|
190
|
+
const pkg = JSON.parse(
|
|
191
|
+
fs.readFileSync(path.join(templateDir, 'package.json'), 'utf-8')
|
|
192
|
+
)
|
|
193
|
+
pkg.name = packageName
|
|
194
|
+
write('package.json', JSON.stringify(pkg, null, 2) + '\n')
|
|
195
|
+
|
|
196
|
+
// show success message
|
|
197
|
+
let doneMessage = ''
|
|
198
|
+
const cdProjectName = path.relative(cwd, root)
|
|
199
|
+
doneMessage += `Done. Now run:\n`
|
|
200
|
+
|
|
201
|
+
if (root !== cwd) {
|
|
202
|
+
doneMessage += `\n cd ${
|
|
203
|
+
cdProjectName.includes(' ') ? `"${cdProjectName}"` : cdProjectName
|
|
204
|
+
}`
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (pkgManager === 'yarn') {
|
|
208
|
+
doneMessage += '\n yarn'
|
|
209
|
+
doneMessage += '\n yarn start'
|
|
210
|
+
} else {
|
|
211
|
+
doneMessage += `\n ${pkgManager} install`
|
|
212
|
+
doneMessage += `\n ${pkgManager} run start`
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
prompts.outro(doneMessage)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
createProject().catch((console.error))
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { resolve } from 'path'
|
|
2
|
+
import {
|
|
3
|
+
statSync,
|
|
4
|
+
copyFileSync,
|
|
5
|
+
mkdirSync,
|
|
6
|
+
readdirSync,
|
|
7
|
+
existsSync,
|
|
8
|
+
rmSync
|
|
9
|
+
} from 'fs'
|
|
10
|
+
import colours from 'kleur'
|
|
11
|
+
|
|
12
|
+
const { blue, magenta } = colours
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Formats the target directory path by trimming whitespace and removing trailing slashes
|
|
17
|
+
* @param {string} targetDir - The target directory path to format
|
|
18
|
+
* @returns {string} The formatted directory path
|
|
19
|
+
*/
|
|
20
|
+
export function formatTargetDir (targetDir) {
|
|
21
|
+
return targetDir.trim().replace(/\/+$/g, '')
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Copies a file or directory from source to destination.
|
|
26
|
+
* @param {string} src - The source path to copy from.
|
|
27
|
+
* @param {string} dest - The destination path to copy to.
|
|
28
|
+
*/
|
|
29
|
+
export function copy (src, dest) {
|
|
30
|
+
const stat = statSync(src)
|
|
31
|
+
if (stat.isDirectory()) {
|
|
32
|
+
copyDir(src, dest)
|
|
33
|
+
} else {
|
|
34
|
+
copyFileSync(src, dest)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Validates if a package name is valid according to npm standards.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} projectName - The name of the project/package to validate
|
|
42
|
+
* @returns {boolean} True if the package name is valid, false otherwise
|
|
43
|
+
*/
|
|
44
|
+
export function isValidPackageName (projectName) {
|
|
45
|
+
return /^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(
|
|
46
|
+
projectName
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Converts a project name into a valid package name format.
|
|
52
|
+
*
|
|
53
|
+
* This function sanitizes the input projectName by:
|
|
54
|
+
* 1. Trimming whitespace
|
|
55
|
+
* 2. Converting to lowercase
|
|
56
|
+
* 3. Replacing spaces with hyphens
|
|
57
|
+
* 4. Removing leading dots/underscores
|
|
58
|
+
* 5. Replacing invalid characters with hyphens
|
|
59
|
+
*
|
|
60
|
+
* @param {string} projectName - The original project name to convert
|
|
61
|
+
* @returns {string} A valid package name formatted as a kebab-case string
|
|
62
|
+
*/
|
|
63
|
+
export function toValidPackageName (projectName) {
|
|
64
|
+
return projectName
|
|
65
|
+
.trim()
|
|
66
|
+
.toLowerCase()
|
|
67
|
+
.replace(/\s+/g, '-')
|
|
68
|
+
.replace(/^[._]/, '')
|
|
69
|
+
.replace(/[^a-z\d\-~]+/g, '-')
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Copies a directory and all its contents recursively from source to destination.
|
|
74
|
+
* @param {string} srcDir - The source directory path to copy from
|
|
75
|
+
* @param {string} destDir - The destination directory path to copy to
|
|
76
|
+
*/
|
|
77
|
+
export function copyDir (srcDir, destDir) {
|
|
78
|
+
mkdirSync(destDir, { recursive: true })
|
|
79
|
+
for (const file of readdirSync(srcDir)) {
|
|
80
|
+
const srcFile = resolve(srcDir, file)
|
|
81
|
+
const destFile = resolve(destDir, file)
|
|
82
|
+
copy(srcFile, destFile)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Checks if a directory is empty, ignoring the .git directory
|
|
88
|
+
* @param {string} path - The directory path to check
|
|
89
|
+
* @returns {boolean} True if the directory is empty or contains only a .git directory
|
|
90
|
+
*/
|
|
91
|
+
export function isEmpty (path) {
|
|
92
|
+
const files = readdirSync(path)
|
|
93
|
+
return files.length === 0 || (files.length === 1 && files[0] === '.git')
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Empties a directory by removing all files and subdirectories within it.
|
|
98
|
+
* Skips the '.git' directory if present.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} dir - The path to the directory to empty
|
|
101
|
+
*/
|
|
102
|
+
export function emptyDir (dir) {
|
|
103
|
+
if (!existsSync(dir)) {
|
|
104
|
+
return
|
|
105
|
+
}
|
|
106
|
+
for (const file of readdirSync(dir)) {
|
|
107
|
+
if (file === '.git') {
|
|
108
|
+
continue
|
|
109
|
+
}
|
|
110
|
+
rmSync(resolve(dir, file), {
|
|
111
|
+
recursive: true,
|
|
112
|
+
force: true
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Extracts package information from a user agent string
|
|
119
|
+
* @param {string} userAgent - The user agent string to parse
|
|
120
|
+
* @returns {{name: string, version: string} | undefined} Package information object or undefined if not found
|
|
121
|
+
*/
|
|
122
|
+
export function extractPackageInfoFromUserAgent (userAgent) {
|
|
123
|
+
if (!userAgent) return undefined
|
|
124
|
+
const pkgSpec = userAgent.split(' ')[0]
|
|
125
|
+
const pkgSpecArr = pkgSpec.split('/')
|
|
126
|
+
return {
|
|
127
|
+
name: pkgSpecArr[0],
|
|
128
|
+
version: pkgSpecArr[1]
|
|
129
|
+
}
|
|
130
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-coralite",
|
|
3
|
+
"version": "0.15.0",
|
|
4
|
+
"description": "Coralite scaffolding script",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-coralite": "bin/index.js",
|
|
7
|
+
"cca": "bin/index.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"scaffolding",
|
|
11
|
+
"coralite",
|
|
12
|
+
"static-site-generator",
|
|
13
|
+
"ssg",
|
|
14
|
+
"cli-tool",
|
|
15
|
+
"web-template",
|
|
16
|
+
"boilerplate",
|
|
17
|
+
"project-scaffold"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://codeberg.org/tjdavid/coralite.git",
|
|
23
|
+
"directory": "packages/create-coralite"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://coralite.io/docs/create-coralite",
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Thomas David",
|
|
28
|
+
"url": "https://thomasjackdavid.com"
|
|
29
|
+
},
|
|
30
|
+
"license": "AGPL-3.0-only",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=22.12.0"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@clack/prompts": "^0.11.0",
|
|
36
|
+
"commander": "^13.1.0",
|
|
37
|
+
"kleur": "^4.1.5"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.suo
|
|
21
|
+
*.ntvs*
|
|
22
|
+
*.njsproj
|
|
23
|
+
*.sln
|
|
24
|
+
*.sw?
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="484.879" height="137.715" viewBox="0 0 128.291 36.437"><path d="M15.276 0L.277 8.689l-.239.437L0 27.239l.077.286.077.286.442.414 14.502 8.213h.389.39l14.297-8.115.47-.43.259-.558.003-17.887-.005-.691-.588-.415L15.645 0zm1.051 2.324l12.839 7.281.001.04.001.04-13.642 7.777h-.075c.075 0-13.705-7.824-13.705-7.777v-.094l12.803-7.265.021 7.761c0 .854.121 1.332.929 1.36.624-.006.826-.376.826-.925zm-14.58 9.348l12.871 7.401-.07 15.069-12.801-7.334zm27.419-.092l-.003 15.291-12.843 7.276.009-15.078zm-13.627 1.248c-.362-.006-.795.216-.887.521l.002 3.172c.308.288.432.467.874.458.363-.008.545-.218.797-.501l.002-2.926c-.017-.419-.479-.719-.788-.724z" fill="#fff"/><path d="M16.322 29.697a2.55 2.55 0 0 1 .88-.936c2.265-.511 2.436-.257 3.783-.682 1.073-.376 2.075-.908 2.866-1.737.479-.647.168-1.14-.088-1.353-.293-.243-.671-.391-1.08-.061-1.648 1.605-2.426 1.82-4.624 1.903-.131-.2-.323-.377-.29-.628 1.089-1.225 2.434-2.309 3.93-2.985.826-.044 1.683.004 2.483-.219.914-.306 1.767-.791 2.454-1.47.452-.607.133-.997-.135-1.263-.29-.288-.821-.335-1.155-.041-.401.408-.749.876-1.309 1.058-.356.169-.669.251-1.061.176l-.149-.238c.231-.484.5-.911.899-1.276.566-.285 1.191-.503 1.65-.951.691-.675 1.16-1.515 1.545-2.392.12-.565-.284-.857-.56-.982a.82.82 0 0 0-1.004.328c-.415.814-.773 1.755-1.652 2.154l-.238-.198.092-1.421c.053-.523-.571-.797-.851-.8-.383-.003-.861.337-.896.711v2.736c-.276 1.084-.753 2.084-1.564 2.868-3.121 2.083-2.032 1.845-3.528 2.593-.172-.029-.303-.127-.394-.295zm.005-9.283l-.002 2.516.114-.24c2.285-1.167 3.284-3.026 3.27-5.582L17.9 18.157c.011 1.061-.331 1.753-1.187 2.43-.179.078-.387-.173-.387-.173zm-1.76 9.57l.026-5.602c-.103.189-.39.337-.559.259-.566-.388-1.263-.995-2.117-1.745-.088-.085-.274-.235-.277-.561.153-.799.851-1.007 1.113-1.927.246-.611.211-1.568.17-2.31l-1.929-1.109c.535.528.462 2.213.142 3.045 0 0-.413.635-.555.712s-.555.108-.751-.062c-.854-.742-.921-1.242-.784-3.501.08-1.035-.348-1.504-1.011-1.435s-.75.654-.73.847c.067.497.198.999-.025 1.478-.109.043-.169.063-.285.017l-.422-.438c-.321-.333-.598-.644-.768-1.088l-.346-.65c-.77-.769-1.704-.089-1.505.798.33.654.717 1.386 1.134 1.867s.79.753 1.279.976c.233.094.447.174.667.331a2.13 2.13 0 0 1 .557.58c.149.227.338.428.406.697l-.103.039c-.654.127-1.513-.356-2.034-.745l-.473-.345c-.312-.167-.927-.069-1.184.25s-.272.852-.104 1.007c1.437 1.132 2.922 1.521 4.9 1.67.984.461 1.817 1.096 2.597 1.851l1.565 1.414c.063.343-.053.54-.35.591-1.154-.131-2.326-.248-3.344-.855l-1.154-1.061c-.305-.235-.944-.296-1.298.073s-.252 1.076-.001 1.312c.712.588 1.356 1.103 2.127 1.445.809.358 1.755.532 2.86.668 1.064.108 2.415.198 2.566 1.504zM12.545 7.205a.87.87 0 0 0-.833.86l.1 3.649c-.063.211-.078.43-.577.306-.651-.611-.813-.932-1.145-1.986a.84.84 0 0 0-.22-.407c-.257-.262-.659-.43-1.071-.156-.471.268-.413.831-.341 1.237s.74 1.537.74 1.537c.466.562.971 1.14 1.654 1.435.116.045.387.37.418.686l.083.328 1.446.883h.086.086l.093-.293-.048-.604c-.064-.813-.019-.803.301-1.995.071-.264.106-.292.108-.422l.009-4.331c.002-.393-.445-.738-.886-.728zm5.814.104c-.344-.012-.858.21-.858.839l.059 4.604.381 1.186-.083 1.411c.019.216.103.292.253.229l.61-.349.61-.35.131-.081.13-.081.091-.568c.197-.301.419-.504.745-.683.339-.237.672-.451.917-.794.649-.735 1.006-1.643 1.203-2.444.107-.365-.267-.777-.612-.865-.364-.093-.881.051-.993.359-.232.722-.414 1.688-1.065 2.138l-.259.172c-.316.033-.484-.099-.504-.395l.093-3.702c0-.371-.423-.611-.847-.625z" fill="#d0ff00"/><path d="M45.912 28.362q-1.553 0-2.786-.694-1.234-.705-2.049-1.982-.815-1.289-1.101-3.04-.286-1.762.088-3.877.363-2.004.947-3.69.584-1.696 1.421-3.018.837-1.333 1.938-2.269 1.101-.936 2.489-1.421 1.399-.485 3.095-.485 1.476 0 2.797.485 1.322.474 2.566 1.641.518.463.683 1.035.176.562-.275 1.013-.452.452-1.024.341-.573-.11-1.101-.573-.815-.793-1.696-1.123-.881-.33-1.971-.33-1.222 0-2.225.396-.991.385-1.784 1.123-.782.727-1.388 1.762-.595 1.035-1.013 2.324-.419 1.289-.683 2.797-.264 1.575-.154 2.875.121 1.289.551 2.236.441.947 1.134 1.465.694.507 1.575.507 1.41 0 2.731-.661 1.322-.672 2.368-1.795.551-.584.958-.804.419-.22.782-.22.551 0 .837.286.297.275.308.672 0 .374-.22.749-.22.363-.804 1.013-1.366 1.498-3.216 2.379-1.85.881-3.778.881zm13.309.11q-1.718 0-2.698-1.278-.98-1.289-.98-3.48 0-1.993.628-3.458.639-1.465 1.784-2.258 1.156-.793 2.709-.793.275 0 .639.055.374.044.727.11.352.055.551.099.066 0 .264.044.209.033.76.132.562.099 1.663.319.628.132.936.496.308.363.308.826 0 .738-.496 1.101-.496.352-1.245.297l-.253-.044q.044.143.066.319.022.165.022.352 0 1.443-.441 2.742-.43 1.289-1.178 2.28-.749.991-1.729 1.564-.969.573-2.037.573zm.22-2.445q.694 0 1.267-.65.584-.661.936-1.729.352-1.079.352-2.346 0-.815-.407-1.245-.407-.43-1.101-.43-.716 0-1.267.507-.54.496-.848 1.421-.297.914-.297 2.17 0 1.057.363 1.685.374.617 1.002.617zm11.547 2.324q-.54 0-.958-.352-.419-.363-.308-1.002l1.035-5.892q.033-.165.022-.341-.011-.187-.055-.341-.044-.154-.121-.253-.077-.099-.198-.099-.264 0-.43.121-.154.121-.275.319l-.419.595q-.22.33-.474.551-.242.209-.518.209-.452 0-.815-.275-.352-.286-.352-.859 0-.264.121-.694.121-.441.551-.958.672-.848 1.333-1.311.672-.463 1.608-.43.738.011 1.366.319.639.308 1.057.859.43.551.518 1.3.848-1.256 1.575-1.927.727-.672 1.311-.672.507 0 .716.198.209.187.352.385.154.198.474.198.308 0 .628-.198.33-.198.496-.319.308-.198.76-.22.463-.022.826.231.363.253.363.848 0 .419-.209.694-.198.264-.485.441-.275.165-.529.297-.441.242-1.002.485-.562.242-.925.242-.441 0-.782-.176-.341-.176-.628-.352-.286-.176-.551-.176-.209 0-.595.341-.385.33-.958 1.112-.573.771-1.322 2.104l-.672 3.822q-.099.584-.573.881-.463.297-.958.297zm12.395.143q-1.057 0-1.762-.573-.694-.584-.947-1.652-.242-1.079.022-2.544.352-1.971 1.189-3.403.848-1.432 2.06-2.214 1.222-.782 2.687-.782h3.337q.672 0 .903.441.242.43.11 1.145l-.892 5.231q-.055.319-.077.584-.011.264.011.463.033.198.099.319.077.11.198.11.209 0 .396-.121.187-.132.33-.33l.407-.595q.22-.33.463-.54.253-.22.529-.22.463 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.661.837-1.333 1.289-.661.452-1.586.452-1.245 0-1.894-.881-.65-.881-.76-2.148l.011-.242q-.694 1.123-1.377 1.883-.683.76-1.333 1.145-.65.385-1.289.385zm.749-2.434q.407 0 1.046-.683.65-.694 1.399-1.982.76-1.3 1.487-3.117l.11-.529h-1.454q-.771 0-1.421.496-.65.496-1.112 1.388-.463.881-.672 2.082-.176 1.046.011 1.696.198.65.606.65zm13.661 2.291q-.848 0-1.432-.408-.573-.408-.903-1.068-.319-.661-.407-1.454-.088-.804.044-1.597l2.61-14.868q.11-.584.518-.815.407-.242.859-.242.584 0 1.035.363.452.363.33 1.035L97.88 23.868q-.066.374-.099.705-.022.319 0 .551.022.231.099.363.077.132.198.132.22 0 .407-.121.187-.132.319-.33l.407-.595q.22-.33.474-.54.253-.22.529-.22.452 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.672.837-1.333 1.289-.661.452-1.586.452zm8.331-13.216q-.595 0-1.035-.43-.441-.441-.441-1.068 0-.595.43-1.035.43-.452 1.046-.452.584 0 1.046.43.474.419.474 1.057 0 .628-.452 1.068-.441.43-1.068.43zm-.463 13.216q-.837 0-1.421-.396-.573-.396-.903-1.046-.33-.661-.43-1.443-.088-.793.033-1.586l.958-5.353q.022-.198.176-.485.165-.286.507-.496.352-.22.936-.22.661 0 .969.363.308.352.198.98l-.925 5.209q-.088.507-.11.903-.011.396.055.617.077.22.242.22.22 0 .407-.121.187-.132.319-.33l.407-.595q.22-.33.474-.54.253-.22.529-.22.452 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.672.837-1.333 1.289-.661.452-1.586.452zm8.43 0q-.837 0-1.421-.396-.573-.396-.914-1.035-.33-.65-.43-1.432-.088-.782.044-1.564l.738-4.229h-1.542q-.683 0-1.035-.33-.352-.33-.352-.848 0-.518.352-.848.352-.341 1.024-.341h1.971l1.024-5.837q.088-.485.496-.749.419-.275.87-.275.385 0 .738.121.352.121.551.408.198.275.11.76l-.98 5.573h1.828q.694 0 1.046.341.352.33.352.848 0 .518-.352.848-.352.33-1.046.33h-2.236l-.76 4.306q-.066.341-.088.639-.011.297.011.518.022.22.088.341.066.121.198.121.22 0 .407-.121.187-.132.319-.33l.419-.595q.22-.33.463-.54.253-.22.518-.22.463 0 .815.286.352.275.352.848 0 .264-.121.705-.11.43-.551.958-.661.837-1.333 1.289-.661.452-1.575.452zm8.573.198q-1.674 0-2.544-.98-.859-.991-.859-2.83 0-1.509.507-2.875.507-1.377 1.366-2.445.87-1.068 1.971-1.674 1.112-.617 2.324-.617 1.421 0 2.137.595.727.595.727 1.729 0 .529-.242 1.024-.231.496-.683.958-.441.463-1.057.903-.617.43-1.377.859-.529.308-1.322.716-.793.396-1.619.793 0 .187.022.352.022.154.055.297.077.341.286.584.209.231.507.231.54 0 1.079-.286.551-.297.98-.826.485-.562 1.002-.716.529-.154.947.165.209.154.341.452.143.286.077.694-.055.396-.452.881-.76.925-1.872 1.476-1.101.54-2.302.54zm-.352-6.179q.341-.176.694-.374.352-.198.694-.385.65-.374 1.101-.705.452-.341.705-.628.253-.297.253-.54 0-.176-.11-.319-.11-.154-.319-.154-.672 0-1.267.408-.584.396-1.035 1.101-.441.694-.716 1.597z" fill="#f9f9f9"/></svg>
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<link href="/css/styles.css" rel="stylesheet">
|
|
7
|
+
<title>Coralite Static Site</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<coralite-header></coralite-header>
|
|
11
|
+
<main>
|
|
12
|
+
<h1>Hello Coralite!</h1>
|
|
13
|
+
|
|
14
|
+
<coralite-counter step="1"></coralite-counter>
|
|
15
|
+
</main>
|
|
16
|
+
<coralite-footer></coralite-footer>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template id="coralite-counter">
|
|
2
|
+
<button
|
|
3
|
+
id="counter"
|
|
4
|
+
type="button"
|
|
5
|
+
data-count="{{ initCount }}"
|
|
6
|
+
data-count-step="{{ stepCount }}">
|
|
7
|
+
count is 0
|
|
8
|
+
</button>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
const button = document.getElementById('button')
|
|
12
|
+
const stepCount = button.dataset.step
|
|
13
|
+
let count = button.dataset.count
|
|
14
|
+
|
|
15
|
+
button.addEventListener('click', () => {
|
|
16
|
+
button.textContent = 'count is ' + count + stepCount
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script type="module">
|
|
22
|
+
import { defineComponent } from 'coralite/plugins'
|
|
23
|
+
|
|
24
|
+
export default defineComponent({
|
|
25
|
+
tokens: {
|
|
26
|
+
initCount (values) {
|
|
27
|
+
return values.count || '0'
|
|
28
|
+
},
|
|
29
|
+
stepCount (values) {
|
|
30
|
+
return values.stepCount || '0'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.suo
|
|
21
|
+
*.ntvs*
|
|
22
|
+
*.njsproj
|
|
23
|
+
*.sln
|
|
24
|
+
*.sw?
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="484.879" height="137.715" viewBox="0 0 128.291 36.437"><path d="M15.276 0L.277 8.689l-.239.437L0 27.239l.077.286.077.286.442.414 14.502 8.213h.389.39l14.297-8.115.47-.43.259-.558.003-17.887-.005-.691-.588-.415L15.645 0zm1.051 2.324l12.839 7.281.001.04.001.04-13.642 7.777h-.075c.075 0-13.705-7.824-13.705-7.777v-.094l12.803-7.265.021 7.761c0 .854.121 1.332.929 1.36.624-.006.826-.376.826-.925zm-14.58 9.348l12.871 7.401-.07 15.069-12.801-7.334zm27.419-.092l-.003 15.291-12.843 7.276.009-15.078zm-13.627 1.248c-.362-.006-.795.216-.887.521l.002 3.172c.308.288.432.467.874.458.363-.008.545-.218.797-.501l.002-2.926c-.017-.419-.479-.719-.788-.724z" fill="#fff"/><path d="M16.322 29.697a2.55 2.55 0 0 1 .88-.936c2.265-.511 2.436-.257 3.783-.682 1.073-.376 2.075-.908 2.866-1.737.479-.647.168-1.14-.088-1.353-.293-.243-.671-.391-1.08-.061-1.648 1.605-2.426 1.82-4.624 1.903-.131-.2-.323-.377-.29-.628 1.089-1.225 2.434-2.309 3.93-2.985.826-.044 1.683.004 2.483-.219.914-.306 1.767-.791 2.454-1.47.452-.607.133-.997-.135-1.263-.29-.288-.821-.335-1.155-.041-.401.408-.749.876-1.309 1.058-.356.169-.669.251-1.061.176l-.149-.238c.231-.484.5-.911.899-1.276.566-.285 1.191-.503 1.65-.951.691-.675 1.16-1.515 1.545-2.392.12-.565-.284-.857-.56-.982a.82.82 0 0 0-1.004.328c-.415.814-.773 1.755-1.652 2.154l-.238-.198.092-1.421c.053-.523-.571-.797-.851-.8-.383-.003-.861.337-.896.711v2.736c-.276 1.084-.753 2.084-1.564 2.868-3.121 2.083-2.032 1.845-3.528 2.593-.172-.029-.303-.127-.394-.295zm.005-9.283l-.002 2.516.114-.24c2.285-1.167 3.284-3.026 3.27-5.582L17.9 18.157c.011 1.061-.331 1.753-1.187 2.43-.179.078-.387-.173-.387-.173zm-1.76 9.57l.026-5.602c-.103.189-.39.337-.559.259-.566-.388-1.263-.995-2.117-1.745-.088-.085-.274-.235-.277-.561.153-.799.851-1.007 1.113-1.927.246-.611.211-1.568.17-2.31l-1.929-1.109c.535.528.462 2.213.142 3.045 0 0-.413.635-.555.712s-.555.108-.751-.062c-.854-.742-.921-1.242-.784-3.501.08-1.035-.348-1.504-1.011-1.435s-.75.654-.73.847c.067.497.198.999-.025 1.478-.109.043-.169.063-.285.017l-.422-.438c-.321-.333-.598-.644-.768-1.088l-.346-.65c-.77-.769-1.704-.089-1.505.798.33.654.717 1.386 1.134 1.867s.79.753 1.279.976c.233.094.447.174.667.331a2.13 2.13 0 0 1 .557.58c.149.227.338.428.406.697l-.103.039c-.654.127-1.513-.356-2.034-.745l-.473-.345c-.312-.167-.927-.069-1.184.25s-.272.852-.104 1.007c1.437 1.132 2.922 1.521 4.9 1.67.984.461 1.817 1.096 2.597 1.851l1.565 1.414c.063.343-.053.54-.35.591-1.154-.131-2.326-.248-3.344-.855l-1.154-1.061c-.305-.235-.944-.296-1.298.073s-.252 1.076-.001 1.312c.712.588 1.356 1.103 2.127 1.445.809.358 1.755.532 2.86.668 1.064.108 2.415.198 2.566 1.504zM12.545 7.205a.87.87 0 0 0-.833.86l.1 3.649c-.063.211-.078.43-.577.306-.651-.611-.813-.932-1.145-1.986a.84.84 0 0 0-.22-.407c-.257-.262-.659-.43-1.071-.156-.471.268-.413.831-.341 1.237s.74 1.537.74 1.537c.466.562.971 1.14 1.654 1.435.116.045.387.37.418.686l.083.328 1.446.883h.086.086l.093-.293-.048-.604c-.064-.813-.019-.803.301-1.995.071-.264.106-.292.108-.422l.009-4.331c.002-.393-.445-.738-.886-.728zm5.814.104c-.344-.012-.858.21-.858.839l.059 4.604.381 1.186-.083 1.411c.019.216.103.292.253.229l.61-.349.61-.35.131-.081.13-.081.091-.568c.197-.301.419-.504.745-.683.339-.237.672-.451.917-.794.649-.735 1.006-1.643 1.203-2.444.107-.365-.267-.777-.612-.865-.364-.093-.881.051-.993.359-.232.722-.414 1.688-1.065 2.138l-.259.172c-.316.033-.484-.099-.504-.395l.093-3.702c0-.371-.423-.611-.847-.625z" fill="#d0ff00"/><path d="M45.912 28.362q-1.553 0-2.786-.694-1.234-.705-2.049-1.982-.815-1.289-1.101-3.04-.286-1.762.088-3.877.363-2.004.947-3.69.584-1.696 1.421-3.018.837-1.333 1.938-2.269 1.101-.936 2.489-1.421 1.399-.485 3.095-.485 1.476 0 2.797.485 1.322.474 2.566 1.641.518.463.683 1.035.176.562-.275 1.013-.452.452-1.024.341-.573-.11-1.101-.573-.815-.793-1.696-1.123-.881-.33-1.971-.33-1.222 0-2.225.396-.991.385-1.784 1.123-.782.727-1.388 1.762-.595 1.035-1.013 2.324-.419 1.289-.683 2.797-.264 1.575-.154 2.875.121 1.289.551 2.236.441.947 1.134 1.465.694.507 1.575.507 1.41 0 2.731-.661 1.322-.672 2.368-1.795.551-.584.958-.804.419-.22.782-.22.551 0 .837.286.297.275.308.672 0 .374-.22.749-.22.363-.804 1.013-1.366 1.498-3.216 2.379-1.85.881-3.778.881zm13.309.11q-1.718 0-2.698-1.278-.98-1.289-.98-3.48 0-1.993.628-3.458.639-1.465 1.784-2.258 1.156-.793 2.709-.793.275 0 .639.055.374.044.727.11.352.055.551.099.066 0 .264.044.209.033.76.132.562.099 1.663.319.628.132.936.496.308.363.308.826 0 .738-.496 1.101-.496.352-1.245.297l-.253-.044q.044.143.066.319.022.165.022.352 0 1.443-.441 2.742-.43 1.289-1.178 2.28-.749.991-1.729 1.564-.969.573-2.037.573zm.22-2.445q.694 0 1.267-.65.584-.661.936-1.729.352-1.079.352-2.346 0-.815-.407-1.245-.407-.43-1.101-.43-.716 0-1.267.507-.54.496-.848 1.421-.297.914-.297 2.17 0 1.057.363 1.685.374.617 1.002.617zm11.547 2.324q-.54 0-.958-.352-.419-.363-.308-1.002l1.035-5.892q.033-.165.022-.341-.011-.187-.055-.341-.044-.154-.121-.253-.077-.099-.198-.099-.264 0-.43.121-.154.121-.275.319l-.419.595q-.22.33-.474.551-.242.209-.518.209-.452 0-.815-.275-.352-.286-.352-.859 0-.264.121-.694.121-.441.551-.958.672-.848 1.333-1.311.672-.463 1.608-.43.738.011 1.366.319.639.308 1.057.859.43.551.518 1.3.848-1.256 1.575-1.927.727-.672 1.311-.672.507 0 .716.198.209.187.352.385.154.198.474.198.308 0 .628-.198.33-.198.496-.319.308-.198.76-.22.463-.022.826.231.363.253.363.848 0 .419-.209.694-.198.264-.485.441-.275.165-.529.297-.441.242-1.002.485-.562.242-.925.242-.441 0-.782-.176-.341-.176-.628-.352-.286-.176-.551-.176-.209 0-.595.341-.385.33-.958 1.112-.573.771-1.322 2.104l-.672 3.822q-.099.584-.573.881-.463.297-.958.297zm12.395.143q-1.057 0-1.762-.573-.694-.584-.947-1.652-.242-1.079.022-2.544.352-1.971 1.189-3.403.848-1.432 2.06-2.214 1.222-.782 2.687-.782h3.337q.672 0 .903.441.242.43.11 1.145l-.892 5.231q-.055.319-.077.584-.011.264.011.463.033.198.099.319.077.11.198.11.209 0 .396-.121.187-.132.33-.33l.407-.595q.22-.33.463-.54.253-.22.529-.22.463 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.661.837-1.333 1.289-.661.452-1.586.452-1.245 0-1.894-.881-.65-.881-.76-2.148l.011-.242q-.694 1.123-1.377 1.883-.683.76-1.333 1.145-.65.385-1.289.385zm.749-2.434q.407 0 1.046-.683.65-.694 1.399-1.982.76-1.3 1.487-3.117l.11-.529h-1.454q-.771 0-1.421.496-.65.496-1.112 1.388-.463.881-.672 2.082-.176 1.046.011 1.696.198.65.606.65zm13.661 2.291q-.848 0-1.432-.408-.573-.408-.903-1.068-.319-.661-.407-1.454-.088-.804.044-1.597l2.61-14.868q.11-.584.518-.815.407-.242.859-.242.584 0 1.035.363.452.363.33 1.035L97.88 23.868q-.066.374-.099.705-.022.319 0 .551.022.231.099.363.077.132.198.132.22 0 .407-.121.187-.132.319-.33l.407-.595q.22-.33.474-.54.253-.22.529-.22.452 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.672.837-1.333 1.289-.661.452-1.586.452zm8.331-13.216q-.595 0-1.035-.43-.441-.441-.441-1.068 0-.595.43-1.035.43-.452 1.046-.452.584 0 1.046.43.474.419.474 1.057 0 .628-.452 1.068-.441.43-1.068.43zm-.463 13.216q-.837 0-1.421-.396-.573-.396-.903-1.046-.33-.661-.43-1.443-.088-.793.033-1.586l.958-5.353q.022-.198.176-.485.165-.286.507-.496.352-.22.936-.22.661 0 .969.363.308.352.198.98l-.925 5.209q-.088.507-.11.903-.011.396.055.617.077.22.242.22.22 0 .407-.121.187-.132.319-.33l.407-.595q.22-.33.474-.54.253-.22.529-.22.452 0 .804.286.352.275.352.848 0 .264-.121.705-.11.43-.54.958-.672.837-1.333 1.289-.661.452-1.586.452zm8.43 0q-.837 0-1.421-.396-.573-.396-.914-1.035-.33-.65-.43-1.432-.088-.782.044-1.564l.738-4.229h-1.542q-.683 0-1.035-.33-.352-.33-.352-.848 0-.518.352-.848.352-.341 1.024-.341h1.971l1.024-5.837q.088-.485.496-.749.419-.275.87-.275.385 0 .738.121.352.121.551.408.198.275.11.76l-.98 5.573h1.828q.694 0 1.046.341.352.33.352.848 0 .518-.352.848-.352.33-1.046.33h-2.236l-.76 4.306q-.066.341-.088.639-.011.297.011.518.022.22.088.341.066.121.198.121.22 0 .407-.121.187-.132.319-.33l.419-.595q.22-.33.463-.54.253-.22.518-.22.463 0 .815.286.352.275.352.848 0 .264-.121.705-.11.43-.551.958-.661.837-1.333 1.289-.661.452-1.575.452zm8.573.198q-1.674 0-2.544-.98-.859-.991-.859-2.83 0-1.509.507-2.875.507-1.377 1.366-2.445.87-1.068 1.971-1.674 1.112-.617 2.324-.617 1.421 0 2.137.595.727.595.727 1.729 0 .529-.242 1.024-.231.496-.683.958-.441.463-1.057.903-.617.43-1.377.859-.529.308-1.322.716-.793.396-1.619.793 0 .187.022.352.022.154.055.297.077.341.286.584.209.231.507.231.54 0 1.079-.286.551-.297.98-.826.485-.562 1.002-.716.529-.154.947.165.209.154.341.452.143.286.077.694-.055.396-.452.881-.76.925-1.872 1.476-1.101.54-2.302.54zm-.352-6.179q.341-.176.694-.374.352-.198.694-.385.65-.374 1.101-.705.452-.341.705-.628.253-.297.253-.54 0-.176-.11-.319-.11-.154-.319-.154-.672 0-1.267.408-.584.396-1.035 1.101-.441.694-.716 1.597z" fill="#f9f9f9"/></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<link href="/css/styles.css" rel="stylesheet">
|
|
7
|
+
<title>Coralite - Build for the Web, With the Web!</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Hello Coralite!</h1>
|
|
12
|
+
|
|
13
|
+
<p>Build for the Web, With the Web!</p>
|
|
14
|
+
|
|
15
|
+
<div class="card">
|
|
16
|
+
<img src="/images/icon-coralite.avif" alt="Coralite logo" class="img-fluid">
|
|
17
|
+
<img src="/images/icon-html.avif" alt="HTML logo" class="img-fluid">
|
|
18
|
+
<img src="/images/icon-css.avif" alt="CSS logo" class="img-fluid">
|
|
19
|
+
<img src="/images/icon-js.avif" alt="JS logo" class="img-fluid">
|
|
20
|
+
</div>
|
|
21
|
+
</main>
|
|
22
|
+
<coralite-footer name="coralite"></coralite-footer>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
font-family: "Inter", system-ui, Helvetica, Arial, sans-serif;
|
|
5
|
+
font-optical-sizing: auto;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
min-height: 100vh;
|
|
12
|
+
margin: 0;
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: 1rem;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
text-align: center;
|
|
19
|
+
padding: 0 1rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h1 {
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
img {
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
height: auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$primary: rebeccapurple;
|
|
32
|
+
|
|
33
|
+
.card {
|
|
34
|
+
border: 1px solid darken($primary, 25);
|
|
35
|
+
border-radius: 0.3rem;
|
|
36
|
+
background-color: $primary;
|
|
37
|
+
padding: 1rem;
|
|
38
|
+
box-shadow: 0 0.3rem 0.5rem rgba(0,0,0,0.2);
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template id="coralite-footer">
|
|
2
|
+
<footer class="text-center">
|
|
3
|
+
Made by {{ capitaliseName }}
|
|
4
|
+
</footer>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script type="module">
|
|
8
|
+
import { defineComponent } from 'coralite/plugins'
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
tokens: {
|
|
12
|
+
capitaliseName ({ name }) {
|
|
13
|
+
if (name) {
|
|
14
|
+
return name[0].toUpperCase() + name.slice(1)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return ''
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
</script>
|