-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for website source, hosted on: small-js.org
- Loading branch information
1 parent
2f36f2e
commit 56b7527
Showing
33 changed files
with
653 additions
and
21 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,14 +1,31 @@ | ||
*.js | ||
*.map | ||
*.env | ||
*.lnk | ||
*.cmd | ||
*.vsix | ||
.DS_Store | ||
**/node_modules | ||
**/out | ||
!/Browser/web/Test/ScriptFunction.js | ||
/Test/ | ||
/Browser/web/App.js | ||
/Browser/web/Smalltalk | ||
/Examples/Benchmark/web/App.js | ||
/Examples/Benchmark/web/Smalltalk | ||
/Examples/Benchmark/web/Script | ||
/Examples/Counter/web/App.js | ||
/Examples/Counter/web/Smalltalk | ||
/Examples/Love/ | ||
/Website | ||
/Examples/Shop/Client/web/App.js | ||
/Examples/Shop/Client/web/Smalltalk | ||
/Examples/Shop/Client/web/Tools | ||
/Examples/Shop/ClientSpa/web/App.js | ||
/Examples/Shop/ClientSpa/web/Smalltalk | ||
/Examples/Todo/web/App.js | ||
/Examples/Todo/web/Smalltalk | ||
/Test/ | ||
todo.txt | ||
.DS_Store | ||
/Website/web/App.js | ||
/Website/web/Smalltalk | ||
/Website/web/Examples/Benchmark | ||
/Website/web/Examples/Counter | ||
/Website/web/Examples/Todo | ||
/Website/web/Tools |
Binary file not shown.
Binary file not shown.
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
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
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
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 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Chrome", | ||
"request": "launch", | ||
"type": "chrome", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFolder}/web" | ||
}, | ||
{ | ||
"name": "Launch Edge", | ||
"request": "launch", | ||
"type": "msedge", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFolder}/web" | ||
}, | ||
{ | ||
"name": "Launch Firefox", | ||
"request": "launch", | ||
"type": "firefox", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFolder}/web" | ||
} | ||
] | ||
} |
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,19 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "tsc: watch - tsconfig.json", | ||
"type": "typescript", | ||
"tsconfig": "tsconfig.json", | ||
"option": "watch", | ||
"problemMatcher": [ | ||
"$tsc-watch" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"runOptions": { "runOn": "folderOpen" } | ||
} | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
} | ||
] | ||
} |
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 @@ | ||
# SmallJS official website | ||
|
||
<img src="web/SmallJS.png" alt="SmallJS logo" width="300"/> | ||
<br> | ||
<br> | ||
This folder contains the source of the official SmallJS website, hosted on: | ||
|
||
<a href="https://small-js.org" style="font-weight:bold; font-size:x-large">small-js.org</a> | ||
|
||
If you want to improve the site, please create a pull-request on GitHub: | ||
|
||
<a href="https://github.com/Small-JS/SmallJS" style="font-weight:bold; font-size:x-large">github.com/Small-JS/SmallJS</a> | ||
|
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,33 @@ | ||
#!/bin/bash | ||
# This script builds Website project. | ||
|
||
# Exit script if a step fails | ||
set -e | ||
# Set working directiry to script directory | ||
cd "$(dirname "$0")" | ||
|
||
echo "==== Website" | ||
|
||
# Compile TypeScript | ||
|
||
echo "tsc Website" | ||
tsc | ||
|
||
# Copy examples | ||
# This assumes the selected examples have been built beforehand. | ||
# Just copy the generated web apps for use in iframes. | ||
|
||
echo "Copying example web apps" | ||
|
||
# Must remove destination folders first, | ||
# otherwise "cp -r" will behave differently. | ||
|
||
rm -r web/Examples/Benchmark | ||
cp -r ../Examples/Benchmark/web web/Examples/Benchmark | ||
|
||
rm -r web/Examples/Counter | ||
cp -r ../Examples/Counter/web web/Examples/Counter | ||
|
||
rm -r web/Examples/Todo | ||
cp -r ../Examples/Todo/web web/Examples/Todo | ||
|
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 @@ | ||
// Redirect to home page | ||
|
||
window.location.replace( "Home/Home.html" + window.location.search ); |
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,20 @@ | ||
// Replace tags <include src="<file path>"> with referenced HTML | ||
|
||
function loadIncludes() | ||
{ | ||
const includeNodes = document.getElementsByTagName( 'include' ); | ||
for( const includeNode of includeNodes ) { | ||
let filePath = includeNode.getAttribute( 'src' ); | ||
if( filePath ) | ||
fetch( filePath ).then( file => | ||
{ | ||
file.text().then( content => | ||
{ | ||
includeNode.insertAdjacentHTML( 'afterend', content ); | ||
includeNode.remove(); | ||
} ); | ||
} ); | ||
}; | ||
} | ||
|
||
loadIncludes(); |
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,11 @@ | ||
#!/bin/bash | ||
# Start static web server. | ||
|
||
# Exit script if a step fails | ||
set -e | ||
# Set working directory to script directory | ||
cd "$(dirname "$0")" | ||
|
||
echo -n "Directory: " | ||
pwd | ||
http-server web -c-1 -p 3000 |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esNext", | ||
"module": "esNext", | ||
"outDir": "web", | ||
"strict": true, | ||
"sourceMap": true | ||
} | ||
} |
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,54 @@ | ||
|
||
body { | ||
font-family: system-ui; | ||
font-size: medium; | ||
background-color: #F0F0F0; | ||
} | ||
|
||
#formTable { | ||
background-color: white; | ||
margin-left: auto; | ||
margin-right: auto; | ||
border: solid; | ||
border-width: 2px; | ||
border-spacing: 16px; | ||
border-radius: 10px; | ||
border-color: grey; | ||
width: 800px; | ||
box-shadow: 10px 10px 5px grey; | ||
} | ||
|
||
.title { | ||
font-size: X-Large; | ||
font-weight: bold; | ||
text-align: center; | ||
background-color: #C5ECF9; | ||
margin-top: 0px; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.horizontal-center { | ||
text-align: center; | ||
} | ||
|
||
.horizontal-left { | ||
text-align: left; | ||
} | ||
|
||
.bold-horizontal-center { | ||
text-align: center; | ||
font-weight: bold; | ||
} | ||
|
||
.vertical-center | ||
{ | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.bold | ||
{ | ||
font-weight: bold; | ||
} | ||
|
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,2 @@ | ||
@import "../App.css"; | ||
|
Oops, something went wrong.