Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinAlavik committed Oct 14, 2023
1 parent 8e6b1bb commit 3122e3f
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 11 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# docs
This is the website code for the p-lang docs!
6 changes: 0 additions & 6 deletions book.toml

This file was deleted.

3 changes: 0 additions & 3 deletions src/SUMMARY.md

This file was deleted.

3 changes: 3 additions & 0 deletions src/css/colors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:root {
--background-dark: #121212
}
56 changes: 56 additions & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
* {
margin: 0;
padding: 0;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.page-content {
margin-left: .5rem;
margin-top: 1.75rem;
width: 100%
}

.body {
display: flex;
flex-direction: row;
padding: 1.5rem;
padding-left: .5rem;
}

code {
font-family: Monaco, monospace;
line-height: 100%;
background-color: #f0f0f0;
padding: 0.4em;
letter-spacing: -0.05em;
word-break: normal;
border-radius: 8px;
}

.side-bar {
width: 350px;
height: 100vh;
overflow-y: hidden;
overflow-x: auto;
}

li>a {
color: rgb(0, 122, 128)
}

.current {
color: rgb(43, 0, 128)
}
.currentSub {
color: rgb(128, 0, 105)
}

.side-bar > a > .icon {
width: 150px;
}

.webfooter{
position: fixed;
bottom: 0;
margin: 0.4em;
}
64 changes: 64 additions & 0 deletions src/getting-started.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plang Documents - Introduction</title>
<link rel="stylesheet" href="css/colors.css">
<link rel="stylesheet" href="css/main.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</head>
<body>
<div class="body">
<div class="side-bar">
<a href="index.html">
<img
class="icon"
src="https://avatars.githubusercontent.com/u/146694713?s=400&u=4e01b5afefbf7e40641702e5cbdf785ff183fe35&v=4"
alt="P Icon"
/></a>
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a class="current" href="getting-started.html">Getting Started</a></li>
<ul>
<li><a href="getting-started.html#installing">Installing</a></li>
<li><a href="getting-started.html#pint-first-time">Running pint for the first time</a></li>
</ul>
</ul>
</div>
<div class="page-content">
<h1 class="page-title" id="getting-started">Getting Started</h1>
<p>Simple tutorial on how to get started</p>
<div class="accordion">
<div class="accordion-item" id="installing">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Installing
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne">
<div class="accordion-body">
<strong>This is your first step in the tutorial</strong> To get started, make sure you have installed npm. Check it by running: <code style="margin-right: 5px">npm -v</code> If that ran successfully, you can continue.<br>Now simply run: <code>npm i -g @p-lang/plang</code>
</div>
</div>
</div>
<div class="accordion-item" id="pint-first-time">
<h2 class="accordion-header" id="headingTwo">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
Running pint for the first time
</button>
</h2>
<div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo">
<div class="accordion-body">
Now you can run a special command called <strong>pint</strong>. This is the P interpreter, aka the program you will run your P programs with. <br>You can also now use the prepl (P read-eval-proccess loop) to run P directly in your terminal to start the repl just run <code>pint</code> with no arguments to run a single file using <strong>pint</strong> run:<br><code>pint &lt;filepath&gt;</code><br><br>Congrats you have successfully ran pint for the first time ever!
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="webfooter">&copy; Plang 2023</footer>
<script src="script/main.js"></script>
</body>
</html>
69 changes: 69 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Plang Documents - Introduction</title>
<link rel="stylesheet" href="css/colors.css" />
<link rel="stylesheet" href="css/main.css" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"
></script>
</head>
<body>
<div class="body">
<div class="side-bar">
<a href="index.html">
<img
class="icon"
src="https://avatars.githubusercontent.com/u/146694713?s=400&u=4e01b5afefbf7e40641702e5cbdf785ff183fe35&v=4"
alt="P Icon"
/></a>
<ul>
<li>
<a class="current" href="index.html">Introduction</a>
</li>
<li>
<a href="getting-started.html">Getting Started</a>
</li>
<ul>
<li><a href="getting-started.html#installing">Installing</a></li>
<li>
<a href="getting-started.html#pint-first-time"
>Running pint for the first time</a
>
</li>
</ul>
</ul>
</div>
<div class="page-content">
<h1 class="page-title" id="Introduction">Introduction</h1>
<p>
P is a statically-typed, interpreted programming language written in
100% TypeScript.
</p>
<h2>Links:</h2>
<ul>
<li>
<a href="https://github.com/p-programming-language">Github</a>
</li>
<li>
<a href="https://github.com/p-programming-language/plang"
>Github Repo</a
>
</li>
</ul>
</div>
</div>
<footer class="webfooter">&copy; Plang 2023</footer>
<script src="script/main.js"></script>
</body>
</html>
2 changes: 0 additions & 2 deletions src/intro.md

This file was deleted.

10 changes: 10 additions & 0 deletions src/script/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const installingLink = document.querySelector('ul li a[href*="#installing"]');

if (installingLink) {
const currentURL = window.location.href;
if (currentURL.includes('getting-started.html#installing')) {
installingLink.classList.add('currentSub');
} else if (currentURL.includes('getting-started.html#pint-first-time')) {
installingLink.classList.add('currentSub');
}
}

0 comments on commit 3122e3f

Please sign in to comment.