-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(outline-templates): Adding starting point for
modern
template.
- Loading branch information
Showing
33 changed files
with
7,382 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
root: true, | ||
// This tells ESLint to load the config from the package `eslint-config-custom` | ||
extends: ["custom"], | ||
settings: { | ||
next: { | ||
rootDir: ["apps/*/"], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo | ||
|
||
# vercel | ||
.vercel | ||
|
||
# vscode | ||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Project Title | ||
|
||
This project is a modern, efficient, and robust web development environment that leverages several cutting-edge technologies to streamline the development process and enhance the final product's quality. | ||
|
||
## Getting Started | ||
|
||
To get started with this project, you'll need to have Node.js and Yarn installed on your local machine. Once you have these prerequisites, you can clone the repository and install the dependencies. | ||
|
||
## Installation | ||
|
||
Follow these steps to get the project up and running on your local machine: | ||
|
||
1. Clone the repository: `git clone https://github.com/your-repo-url.git` | ||
2. Navigate into the project directory: `cd your-repo-name` | ||
3. Install the dependencies: `yarn install` | ||
4. Build the project: `yarn build` | ||
5. Start the development server: `yarn start` | ||
|
||
Now, you should be able to see the project running on `http://localhost:3000`. | ||
|
||
## Tools Used | ||
|
||
* **Turborepo & Yarn Workspaces**: These tools are used for managing packages within the project. Turborepo allows for efficient handling of multi-package repositories, enabling faster build times and improved code sharing across packages. Yarn Workspaces further enhances this by ensuring consistent dependency management, whether the packages are private or public. | ||
|
||
* **TypeScript**: This project uses TypeScript, a statically typed superset of JavaScript, to ensure type safety. This leads to more robust code and allows developers to catch errors early in the development process. | ||
|
||
* **Lit2**: Lit2 is used for scaffolding components in this project. It's a simple and powerful library for building fast, lightweight web components. With Lit2, components are easy to create, understand, and test. | ||
|
||
* **Astro**: Astro is used for documenting components in this project. It allows developers to write documentation directly alongside their code, making it easier to keep the documentation up-to-date and accurate. Astro's ability to render components in a static HTML format also improves the performance of the documentation site. |
21 changes: 21 additions & 0 deletions
21
packages/outline-templates/modern/apps/documentation/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build output | ||
dist/ | ||
|
||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
3 changes: 3 additions & 0 deletions
3
packages/outline-templates/modern/apps/documentation/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Lit Project Documentation with Astro | ||
|
||
https://docs.astro.build/en/guides/integrations-guide/lit/ |
8 changes: 8 additions & 0 deletions
8
packages/outline-templates/modern/apps/documentation/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineConfig } from "astro/config"; | ||
|
||
import lit from "@astrojs/lit"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [lit()] | ||
}); |
29 changes: 29 additions & 0 deletions
29
packages/outline-templates/modern/apps/documentation/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "documentation", | ||
"type": "module", | ||
"private": true, | ||
"version": "1.0.0", | ||
"scripts": { | ||
"dev": "astro dev --port=3042", | ||
"start": "yarn dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"astro": "^2.9.7" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/lit": "^2.1.0", | ||
"@phase2/outline-core-link": "^0.0.6", | ||
"@webcomponents/template-shadowroot": "^0.2.1", | ||
"lit": "^2.7.0", | ||
"postcss": "^8.4.28", | ||
"postcss-preset-env": "^9.1.1" | ||
}, | ||
"postcss": { | ||
"plugins": { | ||
"postcss-preset-env": {} | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/outline-templates/modern/apps/documentation/postcss.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
plugins: [require('postcss-preset-env')()], | ||
}; |
9 changes: 9 additions & 0 deletions
9
packages/outline-templates/modern/apps/documentation/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
packages/outline-templates/modern/apps/documentation/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions
61
packages/outline-templates/modern/apps/documentation/src/components/Card.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
interface Props { | ||
title: string; | ||
body: string; | ||
href: string; | ||
} | ||
const { href, title, body } = Astro.props; | ||
--- | ||
|
||
<li class="link-card"> | ||
<a href={href}> | ||
<h2> | ||
{title} | ||
<span>→</span> | ||
</h2> | ||
<p> | ||
{body} | ||
</p> | ||
</a> | ||
</li> | ||
<style> | ||
.link-card { | ||
list-style: none; | ||
display: flex; | ||
padding: 1px; | ||
background-color: #23262d; | ||
background-image: none; | ||
background-size: 400%; | ||
border-radius: 7px; | ||
background-position: 100%; | ||
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1); | ||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); | ||
} | ||
.link-card > a { | ||
width: 100%; | ||
text-decoration: none; | ||
line-height: 1.4; | ||
padding: calc(1.5rem - 1px); | ||
border-radius: 8px; | ||
color: white; | ||
background-color: #23262d; | ||
opacity: 0.8; | ||
} | ||
h2 { | ||
margin: 0; | ||
font-size: 1.25rem; | ||
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1); | ||
} | ||
p { | ||
margin-top: 0.5rem; | ||
margin-bottom: 0; | ||
} | ||
.link-card:is(:hover, :focus-within) { | ||
background-position: 0; | ||
background-image: var(--accent-gradient); | ||
} | ||
.link-card:is(:hover, :focus-within) h2 { | ||
color: rgb(var(--accent-light)); | ||
} | ||
</style> |
39 changes: 39 additions & 0 deletions
39
packages/outline-templates/modern/apps/documentation/src/layouts/Layout.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
interface Props { | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="description" content="Astro description"> | ||
<meta name="viewport" content="width=device-width" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title}</title> | ||
</head> | ||
<body> | ||
<slot /> | ||
</body> | ||
</html> | ||
<style is:global> | ||
:root { | ||
--accent: 136, 58, 234; | ||
--accent-light: 224, 204, 250; | ||
--accent-dark: 49, 10, 101; | ||
--accent-gradient: linear-gradient(45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60%); | ||
} | ||
html { | ||
font-family: system-ui, sans-serif; | ||
background: #13151A; | ||
background-size: 224px; | ||
} | ||
code { | ||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, | ||
Bitstream Vera Sans Mono, Courier New, monospace; | ||
} | ||
</style> |
126 changes: 126 additions & 0 deletions
126
packages/outline-templates/modern/apps/documentation/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
import Layout from '../layouts/Layout.astro'; | ||
import Card from '../components/Card.astro'; | ||
import '@phase2/outline-core-link' | ||
--- | ||
|
||
<Layout title="Welcome to Astro."> | ||
<main> | ||
<svg | ||
class="astro-a" | ||
width="495" | ||
height="623" | ||
viewBox="0 0 495 623" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M167.19 364.254C83.4786 364.254 0 404.819 0 404.819C0 404.819 141.781 19.4876 142.087 18.7291C146.434 7.33701 153.027 0 162.289 0H332.441C341.703 0 348.574 7.33701 352.643 18.7291C352.92 19.5022 494.716 404.819 494.716 404.819C494.716 404.819 426.67 364.254 327.525 364.254L264.41 169.408C262.047 159.985 255.147 153.581 247.358 153.581C239.569 153.581 232.669 159.985 230.306 169.408L167.19 364.254ZM160.869 530.172C160.877 530.18 160.885 530.187 160.894 530.195L160.867 530.181C160.868 530.178 160.868 530.175 160.869 530.172ZM136.218 411.348C124.476 450.467 132.698 504.458 160.869 530.172C160.997 529.696 161.125 529.242 161.248 528.804C161.502 527.907 161.737 527.073 161.917 526.233C165.446 509.895 178.754 499.52 195.577 500.01C211.969 500.487 220.67 508.765 223.202 527.254C224.141 534.12 224.23 541.131 224.319 548.105C224.328 548.834 224.337 549.563 224.347 550.291C224.563 566.098 228.657 580.707 237.264 593.914C245.413 606.426 256.108 615.943 270.749 622.478C270.593 621.952 270.463 621.508 270.35 621.126C270.045 620.086 269.872 619.499 269.685 618.911C258.909 585.935 266.668 563.266 295.344 543.933C298.254 541.971 301.187 540.041 304.12 538.112C310.591 533.854 317.059 529.599 323.279 525.007C345.88 508.329 360.09 486.327 363.431 457.844C364.805 446.148 363.781 434.657 359.848 423.275C358.176 424.287 356.587 425.295 355.042 426.275C351.744 428.366 348.647 430.33 345.382 431.934C303.466 452.507 259.152 455.053 214.03 448.245C184.802 443.834 156.584 436.019 136.218 411.348Z" | ||
fill="url(#paint0_linear_1805_24383)"></path> | ||
<defs> | ||
<linearGradient | ||
id="paint0_linear_1805_24383" | ||
x1="247.358" | ||
y1="0" | ||
x2="247.358" | ||
y2="622.479" | ||
gradientUnits="userSpaceOnUse" | ||
> | ||
<stop stop-opacity="0.9"></stop> | ||
<stop offset="1" stop-opacity="0.2"></stop> | ||
</linearGradient> | ||
</defs> | ||
</svg> | ||
<h1>Welcome to <span class="text-gradient">Astro</span></h1> | ||
<p class="instructions"> | ||
To get started, open the directory <code>src/pages</code> in your project.<br /> | ||
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above. | ||
</p> | ||
<ul role="list" class="link-card-grid"> | ||
<Card | ||
href="https://docs.astro.build/" | ||
title="Documentation" | ||
body="Learn how Astro works and explore the official API docs." | ||
/> | ||
<Card | ||
href="https://astro.build/integrations/" | ||
title="Integrations" | ||
body="Supercharge your project with new frameworks and libraries." | ||
/> | ||
<Card | ||
href="https://astro.build/themes/" | ||
title="Themes" | ||
body="Explore a galaxy of community-built starter themes." | ||
/> | ||
<Card | ||
href="https://astro.build/chat/" | ||
title="Community" | ||
body="Come say hi to our amazing Discord community. ❤️" | ||
/> | ||
</ul> | ||
<p> | ||
<outline-core-link><a href="https://github.com/phase2/outine">outline</a></outline-core-link> | ||
</p> | ||
</main> | ||
</Layout> | ||
|
||
<style> | ||
main { | ||
margin: auto; | ||
padding: 1rem; | ||
width: 800px; | ||
max-width: calc(100% - 2rem); | ||
color: white; | ||
font-size: 20px; | ||
line-height: 1.6; | ||
} | ||
.astro-a { | ||
position: absolute; | ||
top: -32px; | ||
left: 50%; | ||
transform: translatex(-50%); | ||
width: 220px; | ||
height: auto; | ||
z-index: -1; | ||
} | ||
h1 { | ||
font-size: 4rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
text-align: center; | ||
margin-bottom: 1em; | ||
} | ||
.text-gradient { | ||
background-image: var(--accent-gradient); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
background-size: 400%; | ||
background-position: 0%; | ||
} | ||
.instructions { | ||
margin-bottom: 2rem; | ||
border: 1px solid rgba(var(--accent-light), 25%); | ||
background: linear-gradient(rgba(var(--accent-dark), 66%), rgba(var(--accent-dark), 33%)); | ||
padding: 1.5rem; | ||
border-radius: 8px; | ||
} | ||
.instructions code { | ||
font-size: 0.8em; | ||
font-weight: bold; | ||
background: rgba(var(--accent-light), 12%); | ||
color: rgb(var(--accent-light)); | ||
border-radius: 4px; | ||
padding: 0.3em 0.4em; | ||
} | ||
.instructions strong { | ||
color: rgb(var(--accent-light)); | ||
} | ||
.link-card-grid { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr)); | ||
gap: 2rem; | ||
padding: 0; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
packages/outline-templates/modern/apps/documentation/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strict" | ||
} |
Oops, something went wrong.