mirror of
https://github.com/kevinnlsamuel/rainbowcroissant.git
synced 2025-12-06 10:06:01 +05:30
11ty migrate (#6)
* purge sveltekit * install eleventy * move out stuff. move stuff around * add basic stuff * update picocss + knls patch for navlist margins * install some stuff for 11ty markdown attributes configure eleventy renderFile plugin * make base layout * more complete base layout * style base to full page body * PAGES * add npm build script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
/build
|
/build
|
||||||
|
/_site
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
.env
|
.env
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -12,8 +12,8 @@ POD_OPTIONS_TEMPLATE = \
|
|||||||
$(POD_MOUNTS) $(EXTRA_FLAGS) \
|
$(POD_MOUNTS) $(EXTRA_FLAGS) \
|
||||||
node:alpine
|
node:alpine
|
||||||
|
|
||||||
dev: EXTRA_FLAGS = --publish 5173:5173
|
dev: EXTRA_FLAGS = --publish 8080:8080
|
||||||
dev: SCRIPT = dev -- --host
|
dev: SCRIPT = dev
|
||||||
dev: run
|
dev: run
|
||||||
|
|
||||||
format:
|
format:
|
||||||
|
|||||||
38
README.md
38
README.md
@@ -1,38 +0,0 @@
|
|||||||
# create-svelte
|
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
|
||||||
|
|
||||||
## Creating a project
|
|
||||||
|
|
||||||
If you're seeing this, you've probably already done this step. Congrats!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# create a new project in the current directory
|
|
||||||
npm create svelte@latest
|
|
||||||
|
|
||||||
# create a new project in my-app
|
|
||||||
npm create svelte@latest my-app
|
|
||||||
```
|
|
||||||
|
|
||||||
## Developing
|
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# or start the server and open the app in a new browser tab
|
|
||||||
npm run dev -- --open
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
To create a production version of your app:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
You can preview the production build with `npm run preview`.
|
|
||||||
|
|
||||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
||||||
19
eleventy.config.cjs
Normal file
19
eleventy.config.cjs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
const { EleventyHtmlBasePlugin, EleventyRenderPlugin } = require("@11ty/eleventy");
|
||||||
|
const markdownItAttrs = require("markdown-it-attrs");
|
||||||
|
|
||||||
|
module.exports = function(eleventyConfig){
|
||||||
|
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
||||||
|
eleventyConfig.addPlugin(EleventyRenderPlugin);
|
||||||
|
|
||||||
|
eleventyConfig.amendLibrary("md", mdLib => mdLib.use(markdownItAttrs));
|
||||||
|
|
||||||
|
eleventyConfig.addPassthroughCopy("static");
|
||||||
|
|
||||||
|
return {
|
||||||
|
pathPrefix: "/",
|
||||||
|
dir: {
|
||||||
|
input: "src",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
4002
package-lock.json
generated
4002
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
@@ -3,35 +3,12 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "eleventy --serve",
|
||||||
"build": "vite build",
|
"build": "eleventy"
|
||||||
"preview": "vite preview",
|
|
||||||
"test": "playwright test",
|
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
||||||
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
|
||||||
"format": "prettier --plugin-search-dir . --write ."
|
|
||||||
},
|
},
|
||||||
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.28.1",
|
"@11ty/eleventy": "^2.0.1",
|
||||||
"@sveltejs/adapter-auto": "^2.0.0",
|
"markdown-it-attrs": "^4.1.6"
|
||||||
"@sveltejs/adapter-static": "^2.0.3",
|
}
|
||||||
"@sveltejs/kit": "^1.20.4",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
||||||
"@typescript-eslint/parser": "^5.45.0",
|
|
||||||
"autoprefixer": "^10.4.15",
|
|
||||||
"eslint": "^8.28.0",
|
|
||||||
"eslint-config-prettier": "^8.5.0",
|
|
||||||
"eslint-plugin-svelte": "^2.30.0",
|
|
||||||
"postcss": "^8.4.28",
|
|
||||||
"prettier": "^2.8.0",
|
|
||||||
"prettier-plugin-svelte": "^2.10.1",
|
|
||||||
"svelte": "^4.0.5",
|
|
||||||
"svelte-check": "^3.4.3",
|
|
||||||
"tailwindcss": "^3.3.3",
|
|
||||||
"tslib": "^2.4.1",
|
|
||||||
"typescript": "^5.0.0",
|
|
||||||
"vite": "^4.4.2"
|
|
||||||
},
|
|
||||||
"type": "module"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
||||||
|
|
||||||
const config: PlaywrightTestConfig = {
|
|
||||||
webServer: {
|
|
||||||
command: 'npm run build && npm run preview',
|
|
||||||
port: 4173
|
|
||||||
},
|
|
||||||
testDir: 'tests',
|
|
||||||
testMatch: /(.+\.)?(test|spec)\.[jt]s/
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
4
src/_data/site.json
Normal file
4
src/_data/site.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "Rainbow Croissant",
|
||||||
|
"desc": "tech aids for EFL Uni students"
|
||||||
|
}
|
||||||
36
src/_includes/base.liquid
Normal file
36
src/_includes/base.liquid
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>
|
||||||
|
{%if title%}
|
||||||
|
{{title | append: " | " | append: site.name}}
|
||||||
|
{%else%}
|
||||||
|
{{site.name}}
|
||||||
|
{%endif%}
|
||||||
|
</title>
|
||||||
|
<meta name="description" content="{{site.desc}}">
|
||||||
|
<link rel="stylesheet" href="/static/pico.min.css">
|
||||||
|
<link rel="stylesheet" href="/static/site.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="container">
|
||||||
|
<nav>
|
||||||
|
<ul><li><h1><a href="/">{{site.name}}</a></h1></li></ul>
|
||||||
|
{% renderFile './src/_includes/navlist.md' %}
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="container">
|
||||||
|
{{-content-}}
|
||||||
|
</main>
|
||||||
|
<footer class="container">
|
||||||
|
<h1>{{site.name}}</h1>
|
||||||
|
<p>/ ˈreɪnˌboʊ krəˈsɑnt /</p>
|
||||||
|
<p>{{site.desc}}</p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
3
src/_includes/navlist.md
Normal file
3
src/_includes/navlist.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
- [Services](/services)
|
||||||
|
- [Quick](/quick)
|
||||||
13
src/index.md
Normal file
13
src/index.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
layout: base
|
||||||
|
title: home
|
||||||
|
---
|
||||||
|
|
||||||
|
<q>{{site.name}}</q> is called what it is
|
||||||
|
because it's a free domain that happened
|
||||||
|
to also be pretty catchy.
|
||||||
|
|
||||||
|
These are supposed to be tools that will
|
||||||
|
make EFL University a little easier.
|
||||||
|
|
||||||
|
PS: It's pronounced [kruh-**sahnt**] in English. ([Dictionary.com](https://www.dictionary.com/browse/croissant))
|
||||||
18
src/quick.md
Normal file
18
src/quick.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
layout: base
|
||||||
|
title: quick links
|
||||||
|
---
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
|
||||||
|
# Quick Links
|
||||||
|
|
||||||
|
to pages related to the EFL University
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
- [Web OPAC](http://14.139.86.102:8080/newgenlibctxt/){ target="_blank" }
|
||||||
|
- [remotexs](https://efluniversity.remotexs.in/){ target="_blank" }
|
||||||
|
|
||||||
|
</article>
|
||||||
16
src/services.md
Normal file
16
src/services.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
layout: base.liquid
|
||||||
|
title: services
|
||||||
|
---
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h1>COMING SOON…</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
a collection of tools to make life a
|
||||||
|
little easier in this uni… maybe…
|
||||||
|
|
||||||
|
…someone has to make them and they are lazy
|
||||||
|
|
||||||
|
</article>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
5
static/pico.min.css
vendored
Normal file
5
static/pico.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/pico.min.css.map
Normal file
1
static/pico.min.css.map
Normal file
File diff suppressed because one or more lines are too long
1
static/site.css
Normal file
1
static/site.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
body{display:flex;flex-direction:column;justify-content:space-between;min-height:100dvh;min-height:100vh;}header{--spacing:.1rem;}header h1{--typography-spacing-vertical:0px;}footer h1{--typography-spacing-vertical:.3rem;--font-size:1rem;}main{flex-grow:1;}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import adapter from '@sveltejs/adapter-static';
|
|
||||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
|
||||||
const config = {
|
|
||||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
||||||
// for more information about preprocessors
|
|
||||||
preprocess: vitePreprocess(),
|
|
||||||
|
|
||||||
kit: {
|
|
||||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
|
||||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
|
||||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
|
||||||
adapter: adapter({
|
|
||||||
pages: 'build',
|
|
||||||
assets: 'build',
|
|
||||||
fallback: undefined,
|
|
||||||
precompress: false,
|
|
||||||
strict: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
0
src/app.d.ts → svelte.src/app.d.ts
vendored
0
src/app.d.ts → svelte.src/app.d.ts
vendored
@@ -1,6 +0,0 @@
|
|||||||
import { expect, test } from '@playwright/test';
|
|
||||||
|
|
||||||
test('index page has expected h1', async ({ page }) => {
|
|
||||||
await page.goto('/');
|
|
||||||
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
|
|
||||||
});
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./.svelte-kit/tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"allowJs": true,
|
|
||||||
"checkJs": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"sourceMap": true,
|
|
||||||
"strict": true
|
|
||||||
}
|
|
||||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
|
||||||
//
|
|
||||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
|
||||||
// from the referenced tsconfig.json - TypeScript does not merge them in
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import { sveltekit } from '@sveltejs/kit/vite';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [sveltekit()]
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user