Initial commit
This commit is contained in:
105
index.css
Normal file
105
index.css
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Zalando+Sans+Expanded:ital,wght@0,200..900;1,200..900&display=swap');
|
||||||
|
|
||||||
|
.box {
|
||||||
|
margin-left: 10%;
|
||||||
|
margin-right: 10%;
|
||||||
|
margin-top: 5%;
|
||||||
|
padding: 5%;
|
||||||
|
padding-top: 3%;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: #161031;
|
||||||
|
color: white;
|
||||||
|
font-family: "Inter";
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
padding-top: 5%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 40px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero_content {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
background-color: #080511;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #26146b;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #a594f9;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature {
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid #26146b;
|
||||||
|
background-color: #15094a;
|
||||||
|
font-size: 25px;
|
||||||
|
padding: 2%;
|
||||||
|
padding-top: 0.5%;
|
||||||
|
width: auto;
|
||||||
|
min-width: 350px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
max-height: 600px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big {
|
||||||
|
font-size: 40px;
|
||||||
|
font-family: "Inter";
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
font-family: "Inter";
|
||||||
|
font-size: 30px;
|
||||||
|
color: white;
|
||||||
|
background-color: #15094a;
|
||||||
|
padding: 20px;
|
||||||
|
border-width: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #080511;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: "Zalando Sans Expanded", sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 60px;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-family: "Zalando Sans Expanded", sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 50px;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-family: "Zalando Sans Expanded", sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 35px;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
99
index.html
Normal file
99
index.html
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="index.css?v=1">
|
||||||
|
<title>Solstice</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="main">
|
||||||
|
<div class="box" id="main">
|
||||||
|
<div class="hero-content">
|
||||||
|
<img src="https://sols.dev/solstice.svg" width="200" height="200"></img>
|
||||||
|
<h1>Solstice</h1>
|
||||||
|
<p class="big">A programming language focused on ease of use.</p>
|
||||||
|
<button onclick="window.location.href = 'https://chsp.au/max/solstice'">View Code</button>
|
||||||
|
<button onclick="window.location.href = '#installing'">Install</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<h2>Features</h2>
|
||||||
|
<div class="feature-row">
|
||||||
|
<div class="feature">
|
||||||
|
<h3>Small and fast</h3>
|
||||||
|
<p>Solstice's compiler is 1216 lines of C++, and compiles code at lightning speed.</p>
|
||||||
|
</div>
|
||||||
|
<div class="feature">
|
||||||
|
<h3>Built on Ground</h3>
|
||||||
|
<p>Solstice compiles for the Ground VM, a speedy, light platform.</p>
|
||||||
|
</div>
|
||||||
|
<div class="feature">
|
||||||
|
<h3>Simple syntax</h3>
|
||||||
|
<p>Solstice feels familiar, but light. There's no quirks in the syntax, just pure bliss.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<h2>Examples</h2>
|
||||||
|
<div class="feature-row">
|
||||||
|
<div class="feature">
|
||||||
|
<h3>92nd Fibonacci Number</h3>
|
||||||
|
<pre class="code">
|
||||||
|
<code>a = 0
|
||||||
|
b = 1
|
||||||
|
n = 92
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
while i != n {
|
||||||
|
temp = a + b
|
||||||
|
a = b
|
||||||
|
b = temp
|
||||||
|
|
||||||
|
i = i + 1
|
||||||
|
}
|
||||||
|
|
||||||
|
puts a</code></pre>
|
||||||
|
</div>
|
||||||
|
<div class="feature">
|
||||||
|
<h3>Guess The Password</h3>
|
||||||
|
<pre class="code">
|
||||||
|
<code>accessNotGranted = true
|
||||||
|
|
||||||
|
while accessNotGranted {
|
||||||
|
password = input("Password: ")
|
||||||
|
if password == "dingus" {
|
||||||
|
accessNotGranted = false
|
||||||
|
}
|
||||||
|
if password != "dingus" {
|
||||||
|
puts "Incorrect password!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
puts "Welcome!"</code></pre>
|
||||||
|
</div>
|
||||||
|
<div class="feature">
|
||||||
|
<h3>Count to 100,000</h3>
|
||||||
|
<pre class="code">
|
||||||
|
<code>number = 0
|
||||||
|
|
||||||
|
while number < 100000 {
|
||||||
|
number = number + 1
|
||||||
|
puts number
|
||||||
|
}</code></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box" id="installing">
|
||||||
|
<h2>Getting Solstice</h2>
|
||||||
|
<p>Solstice is an in-development language, and you can find the latest code on the <a href="https://chsp.au/max/solstice">Git repository</a>. At present, the stability of Solstice is questionable, so don't trust it to handle your nuclear codes or anything like that yet.</p>
|
||||||
|
<p>This script will automatically build and install Solstice and Ground from source for you, or update them if they are already installed.</p>
|
||||||
|
<pre class="code" style="overflow-y: auto">
|
||||||
|
<code>bash -c "$(curl -fsSL https://sols.dev/install.sh)"</code></pre>
|
||||||
|
<p>If you find any issues while trying Solstice, please report them <a href="https://chsp.au/max/solstice/issues">here</a>! Solstice needs all the help it can get.</p>
|
||||||
|
<p>Stable-ish builds are avaliable in <a href="https://chsp.au/max/solstice/releases">the releases tab</a> of the Git repository. These builds are likely to be more stable, but don't treat them as a stable branch yet.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
90
install.sh
Normal file
90
install.sh
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
if [ -p "/usr/local/bin" ]; then
|
||||||
|
echo "Your path is missing /usr/local/bin, you might want to add it. Type the following"
|
||||||
|
echo "\$PATH=/usr/local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Note: This script requires sudo access."
|
||||||
|
# Check for required commands
|
||||||
|
if ! command -v git 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
echo "Git is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v c++ 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
echo "A compiler linked to `c++` is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v gmake 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
echo "gmake is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if Ground is installed
|
||||||
|
if ! command -v ground 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
read -p "Ground has not been installed on your system. Ground is the runtime VM for Solstice. Would you like to install it? (y/n) " consent
|
||||||
|
if [ "$consent" != "y" ]
|
||||||
|
then
|
||||||
|
echo "Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing Ground..."
|
||||||
|
mkdir -p ~/.local/share/solstice-installer
|
||||||
|
cd ~/.local/share/solstice-installer
|
||||||
|
git clone https://chookspace.com/ground/cground
|
||||||
|
cd cground
|
||||||
|
make both
|
||||||
|
sudo make install
|
||||||
|
echo "Success!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if Solstice is installed
|
||||||
|
if ! command -v solstice 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
read -p "Solstice has not been installed on your system, would you like to install it? (y/n) " consent
|
||||||
|
if [ "$consent" != "y" ]
|
||||||
|
then
|
||||||
|
echo "Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing Solstice..."
|
||||||
|
mkdir -p ~/.local/share/solstice-installer
|
||||||
|
cd ~/.local/share/solstice-installer
|
||||||
|
git clone https://chookspace.com/max/solstice
|
||||||
|
cd solstice
|
||||||
|
make
|
||||||
|
sudo mkdir -p /usr/local/bin
|
||||||
|
sudo cp solstice /usr/local/bin/solstice
|
||||||
|
echo "Success!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Solstice is already installed, updating...";
|
||||||
|
cd ~/.local/share/solstice-installer/solstice
|
||||||
|
git pull --dry-run
|
||||||
|
cd ..
|
||||||
|
cd cground
|
||||||
|
git pull --dry-run
|
||||||
|
read -p "Do these changes look okay? If it says 'already up to date', type 'n' (y/n) " consent
|
||||||
|
if [ "$consent" != "y" ]
|
||||||
|
then
|
||||||
|
echo "Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Updating Ground..."
|
||||||
|
git pull
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
cd ..
|
||||||
|
echo "Updating Solstice..."
|
||||||
|
cd solstice
|
||||||
|
git pull
|
||||||
|
make
|
||||||
|
sudo cp solstice /usr/local/bin/solstice
|
||||||
52
solstice.svg
Normal file
52
solstice.svg
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="100.00389mm"
|
||||||
|
height="100.00055mm"
|
||||||
|
viewBox="0 0 100.00389 100.00055"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient8">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#64ffe1;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop8" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#a3b9f5;stop-opacity:1;"
|
||||||
|
offset="0.5"
|
||||||
|
id="stop10" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d1b8fb;stop-opacity:1;"
|
||||||
|
offset="0.75"
|
||||||
|
id="stop11" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f3cdff;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop9" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
xlink:href="#linearGradient8"
|
||||||
|
id="linearGradient9"
|
||||||
|
x1="-42.253399"
|
||||||
|
y1="135.74071"
|
||||||
|
x2="-41.225731"
|
||||||
|
y2="239.96782"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.73239966,-0.77274564,0.76516532,0.73965537,-4.0932457,-8.6853091)" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-69.164575,-124.62841)">
|
||||||
|
<path
|
||||||
|
id="path1"
|
||||||
|
style="fill:url(#linearGradient9);fill-opacity:1;stroke:#ffffff;stroke-width:0.281629;stroke-opacity:0"
|
||||||
|
d="m 100.38267,124.7767 a 31.775753,32.090549 0 0 0 -22.257004,9.893 31.775753,32.090549 0 0 0 0.979215,45.36846 l -0.0038,0.004 45.917939,44.38672 43.95132,-46.37229 -45.91795,-44.38673 -0.004,0.004 a 31.775753,32.090549 0 0 0 -22.66587,-8.8969 z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user