Skip to content

Commit

Permalink
page refactored with Respo
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed May 18, 2021
1 parent b5ee9e4 commit a6642ca
Show file tree
Hide file tree
Showing 9 changed files with 1,585 additions and 549 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

calcit.cirru -diff linguist-generated
yarn.lock -diff linguist-generated
30 changes: 18 additions & 12 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test page building
name: Upload

on:
push:
Expand All @@ -12,20 +12,26 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: wget
run: mkdir bin/ && wget -O bin/cr_once http://bin.calcit-lang.org/linux/cr_once
run: mkdir ci-bin/ && wget -O ci-bin/cr http://repo.calcit-lang.org/binaries/linux/cr
- name: "permission"
run: chmod +x bin/cr_once
run: chmod +x ci-bin/cr

- name: "prepare modules"
run: >
mkdir -p ~/.config/calcit/modules/
&& cd ~/.config/calcit/modules/
&& git clone https://github.com/calcit-lang/stir-template --branch=0.0.2
mkdir -p ~/.config/calcit/modules/ && cd ~/.config/calcit/modules/
&& git clone https://github.com/calcit-lang/lilac.git
&& git clone https://github.com/calcit-lang/memof.git
&& git clone https://github.com/Respo/respo.calcit.git
&& git clone https://github.com/Respo/reel.calcit.git --branch 0.5.3
&& git clone https://github.com/Respo/respo-markdown.calcit.git
&& git clone https://github.com/Respo/respo-ui.calcit.git
- name: "build page"
run: ./bin/cr_once
- name: "compiles to js"
run: >
./ci-bin/cr --emit-js --once
&& yarn && yarn vite build --base=./
- name: upload HTML to server
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
Expand All @@ -34,8 +40,8 @@ jobs:
flags: '-avzr --progress'
options: ''
ssh_options: ''
src: 'index.html'
dest: 'rsync-user@calcit-lang.org:/web-assets/repo/calcit-lang/calcit-lang.org/'
src: 'dist/*'
dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}'

- name: display status from deploy
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
.compact-inc.cirru
.calcit-error.cirru

index.html
js-out/
node_modules/
dist/
1,682 changes: 1,208 additions & 474 deletions calcit.cirru

Large diffs are not rendered by default.

235 changes: 173 additions & 62 deletions compact.cirru

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
<link rel="stylesheet" type="text/css" href="http://cdn.tiye.me/favored-fonts/main-fonts.css">

<style type="text/css">
body {
margin: 0;
overscroll-behavior-y: none;
}

body * {
flex-shrink: 0;
box-sizing: border-box;
}

::-webkit-scrollbar {
width: 4px;
height: 4px;
}

::-webkit-scrollbar-track {
background-color: hsla(0,0%,100%);
}

::-webkit-scrollbar-thumb {
background-color: hsla(200,100%,76%,0.8);
}

::-webkit-scrollbar-corner {
background-color: transparent;
}

::-webkit-resizer {
background-color:transparent;
}

</style>
</head>

<body>
<div class="app" ></div>

<script type="module" src="./main.js" ></script>

</body>

</html>
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import { main_BANG_ } from "./js-out/app.main.js"

main_BANG_()

if (import.meta.hot) {
import.meta.hot.accept('./js-out/app.main.js', (main) => {
main.reload_BANG_()
})
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"@calcit/procs": "^0.3.16"
},
"devDependencies": {
"vite": "^2.3.3"
},
"version": "0.0.1"
}
112 changes: 112 additions & 0 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6642ca

Please sign in to comment.