Skip to content

Commit

Permalink
add live dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Jun 26, 2024
1 parent c02abb0 commit df57086
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# website

The UNAVI website, located at [unavi.xyz](https://unavi.xyz).

## Development

Start a live server with:

```bash
nix run
```
10 changes: 10 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
pkgs = import nixpkgs { inherit system; };
in
{
apps.default = flake-utils.lib.mkApp {
drv = pkgs.writeShellApplication {
name = "generate-readme";
text = ''
${pkgs.nodePackages.live-server}/bin/live-server src --mount=/public:public
'';
};

};

packages.default = pkgs.stdenv.mkDerivation {
pname = "website";
version = "0.0.0";
Expand Down
5 changes: 5 additions & 0 deletions public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ body {
"Liberation Mono", "Courier New", monospace;
}

.content {
text-align: center;
}

nav > a {
color: var(--primary-color);
text-decoration: none;
transition: color 0.2s;
}

Expand Down
14 changes: 8 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
<meta property="og:type" content="website" />
<meta property="og:url" content="https://unavi.xyz/" />
<title>UNAVI</title>
<link rel="stylesheet" href="css/index.css" />
<link rel="stylesheet" href="public/css/index.css" />
</head>
<body>
<h1>UNAVI</h1>
<nav>
<a href="https://docs.unavi.xyz">[docs]</a>
<a href="https://github.com/unavi-xyz/unavi">[github]</a>
</nav>
<div class="content">
<h1>UNAVI</h1>
<nav>
<a href="https://docs.unavi.xyz">[docs]</a>
<a href="https://github.com/unavi-xyz/unavi">[github]</a>
</nav>
</div>
</body>
</html>

0 comments on commit df57086

Please sign in to comment.