-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip generate html docs for fart.css css library * manually update index.html docs * delete generate_docs.ts
- Loading branch information
1 parent
9b4e4e4
commit 4ebcebf
Showing
5 changed files
with
311 additions
and
24 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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
{ | ||
"deno.enable": true, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "denoland.vscode-deno", | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[css]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
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,9 @@ | ||
{ | ||
"lock": false, | ||
"tasks": { | ||
"dev": "deno run -A --watch main.ts" | ||
}, | ||
"imports": { | ||
"@std/http": "jsr:@std/http@^0.224.5" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,16 +1,268 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>fart.css</title> | ||
<meta name="description" content="fart.css is a CSS library." /> | ||
<link rel="stylesheet" href="fart.css" /> | ||
</head> | ||
<body> | ||
<section class="fart-section"> | ||
<h1>fart.css</h1> | ||
<p>fart.css is a CSS library.</p> | ||
</section> | ||
</body> | ||
</html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>fart.css</title> | ||
<meta name="description" content="fart.css is a CSS library." /> | ||
<link rel="stylesheet" href="/" /> | ||
</head> | ||
<body> | ||
<section class="fart-section"> | ||
<nav> | ||
<h1 id="top" class="fart-header">fart.css</h1> | ||
<a | ||
class="fart-button" | ||
href="https://github.com/FartLabs/fart.css" | ||
target="_blank" | ||
>★Source<small>↗</small></a | ||
> | ||
</nav> | ||
|
||
<p> | ||
fart.css is a CSS library of styles reusable across your | ||
<span class="fart-sparkle">fart-tastic</span> | ||
frontends. | ||
</p> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="toc">On this page</h2> | ||
<ul> | ||
<li> | ||
<a href="#getting-started">Getting started</a> | ||
</li> | ||
<li> | ||
<a href="#variables">Variables</a> | ||
</li> | ||
<li> | ||
<a href="#fonts">Fonts</a> | ||
</li> | ||
<li> | ||
<a href="#keyframes">Keyframes</a> | ||
</li> | ||
<li> | ||
<a href="#semantics">Semantics</a> | ||
|
||
<ul> | ||
<li> | ||
<a href="#headings">Headings</a> | ||
</li> | ||
<li> | ||
<a href="#links">Links</a> | ||
</li> | ||
<li> | ||
<a href="#buttons">Buttons</a> | ||
</li> | ||
<li> | ||
<a href="#lists">Lists</a> | ||
</li> | ||
<li> | ||
<a href="#blockquotes">Blockquotes</a> | ||
</li> | ||
<li> | ||
<a href="#fart-break">Break</a> | ||
</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<a href="#misc">Misc</a> | ||
</li> | ||
</ul> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="getting-started">Getting started</h2> | ||
<p> | ||
To get started with fart.css, include the following line in the | ||
<code><head></code> of your HTML file: | ||
</p> | ||
<pre><code><link rel="stylesheet" href="https://css.fart.tools" /></code></pre> | ||
<p> | ||
From there, you can use the classes and styles provided by the fart.css | ||
CSS library. | ||
</p> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="variables">Variables</h2> | ||
<p> | ||
fart.css provides a set of CSS variables | ||
<code>var(--css-variable)</code> for colors: | ||
</p> | ||
<p>Colors are defined in the <a href="root.css">root.css</a> file.</p> | ||
<pre><code>:root { | ||
--fart-green: </code><code style="font-weight: bold; color: var(--fart-green);">#c3ef3c</code><code>; | ||
--fart-dark-green: </code><code style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-dark-green);">#004021</code><code>; | ||
--fart-darker-dark-green: </code><code style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-darker-dark-green);">#002d17</code><code>; | ||
--fart-lighter-dark-green: </code><code style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-lighter-dark-green);">#005b31</code><code>; | ||
|
||
--fart-pink: </code><code style="font-weight: bold; color: var(--fart-pink);">#db7093</code><code>; | ||
--fart-pink-transparent: </code><code style="font-weight: bold; color: var(--fart-pink-transparent);">#db709384</code><code>; | ||
|
||
--fart-white: </code><code style="font-weight: bold; color: var(--fart-white);">#ddd</code><code>; | ||
--fart-off-white: </code><code style="font-weight: bold; color: var(--fart-off-white);">#aaa</code><code>; | ||
}</code></pre> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="fonts">Fonts</h2> | ||
<p> | ||
The <a href="fonts.css">fonts.css</a> file imports | ||
<a href="https://fonts.google.com/specimen/Overpass">Overpass</a> from | ||
Google Fonts. | ||
</p> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="keyframes">Keyframes</h2> | ||
<p> | ||
fart.css provides a set of keyframes for animations in the | ||
<a href="keyframes.css">keyframes.css</a> file. | ||
</p> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="semantics">Semantics</h2> | ||
<p> | ||
fart.css provides implicit styling for a set of common HTML elements in | ||
the <a href="semantics.css">semantics.css</a> file. | ||
</p> | ||
<p>Body and HTML elements are styled with:</p> | ||
<pre><code>html, | ||
body { | ||
background-color: var(--fart-dark-green); | ||
color: var(--fart-white); | ||
font-family: sans-serif; | ||
margin: 0; | ||
}</code></pre> | ||
|
||
<p> | ||
Check out the available styles in the | ||
<a href="semantics.css">semantics.css</a> file. | ||
</p> | ||
|
||
<h3 id="headings">Headings</h3> | ||
<p> | ||
Headings <code><h1></code> through <code><h6></code> are | ||
styled with a custom font and size. | ||
</p> | ||
|
||
<h1>Example h1</h1> | ||
<h2>Example h2</h2> | ||
<h3>Example h3</h3> | ||
<h4>Example h4</h4> | ||
<h5>Example h5</h5> | ||
<h6>Example h6</h6> | ||
|
||
<h3 id="links">Links</h3> | ||
<p> | ||
Links <code><a></code>, <code>.fart-link</code>, and | ||
<code>.fart-link-visible-on-hover</code> are styled with a custom color | ||
and hover effect. Use <code>.fart-link-visible-on-hover</code> to style | ||
links whose underline is only visible on hover. | ||
</p> | ||
<ul> | ||
<li> | ||
<a href="#links">Example link</a> | ||
</li> | ||
<li> | ||
<a class="fart-link" href="#links">Example fart-link</a> | ||
</li> | ||
<li> | ||
<a class="fart-link-visible-on-hover" href="#links" | ||
>Example fart-link-visible-on-hover</a | ||
> | ||
</li> | ||
</ul> | ||
|
||
<h3 id="buttons">Buttons</h3> | ||
<p> | ||
Buttons <code>.fart-button</code> are have a rounded button style with a | ||
custom color and hover effect. | ||
</p> | ||
<a class="fart-button" href="#buttons">Example button</a> | ||
|
||
<h3 id="lists">Lists</h3> | ||
<p> | ||
Lists <code><ul></code> and <code><ol></code> are styled | ||
with a custom color and padding. | ||
</p> | ||
|
||
<ul> | ||
<li>Example list item 1</li> | ||
<li>Example list item 2</li> | ||
<li> | ||
Example nested list | ||
<ul> | ||
<li>Example nested list item 1</li> | ||
<li>Example nested list item 2</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
||
<h3 id="blockquotes">Blockquotes</h3> | ||
<p> | ||
Blockquotes <code><blockquote></code> are styled with a custom | ||
color and padding. | ||
</p> | ||
<blockquote>Example blockquote</blockquote> | ||
|
||
<h3 id="fart-break">Break</h3> | ||
<p> | ||
Use <code><hr></code> or <code>.fart-break</code> to create a | ||
horizontal rule. The rule is styled with a custom color. | ||
</p> | ||
|
||
<hr /> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="misc">Misc</h2> | ||
<p> | ||
fart.css provides miscellaneous styles in the | ||
<a href="misc.css">misc.css</a> file. | ||
</p> | ||
<p><em>TODO: Document miscellaneous styles.</em></p> | ||
</section> | ||
|
||
<section class="fart-section"> | ||
<h2 id="bottom">You made it to the bottom!</h2> | ||
<p> | ||
Thanks for checking out fart.css! If you have any questions or feedback, | ||
<a class="fart-button" href="https://go.fart.tools/chat" target="_blank" | ||
>Chat<small>↗</small></a | ||
> | ||
with the community on Discord and check out our | ||
<a | ||
class="fart-button" | ||
href="https://github.com/FartLabs/fart.css" | ||
target="_blank" | ||
>★Source<small>↗</small></a | ||
> | ||
on GitHub! | ||
</p> | ||
</section> | ||
|
||
<hr /> | ||
|
||
<footer> | ||
<p> | ||
© FartLabs <a class="fart-logo" href="https://fart.tools">🧪</a><br /> | ||
<a class="fart-button" href="https://fart.tools/blog" target="_blank" | ||
>Blog<small>↗</small></a | ||
> | ||
<a | ||
class="fart-button" | ||
href="https://github.com/FartLabs" | ||
target="_blank" | ||
>GitHub<small>↗</small></a | ||
> | ||
<a class="fart-button" href="https://go.fart.tools/chat" target="_blank" | ||
>Chat<small>↗</small></a | ||
> | ||
<a class="fart-button" href="#top">Top<small>↑</small></a> | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
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,13 @@ | ||
import { serveDir, serveFile } from "@std/http"; | ||
|
||
Deno.serve(async (request) => { | ||
const url = new URL(request.url); | ||
if ( | ||
url.pathname === "/" && | ||
request.headers.get("Accept")?.includes("text/css") | ||
) { | ||
return await serveFile(request, "fart.css"); | ||
} | ||
|
||
return await serveDir(request); | ||
}); |
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