This commit is contained in:
728
2022-08-11 13:01:30 +08:00
commit 3de41ba9e4
7 changed files with 239 additions and 0 deletions

3
ismism.ts/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/target
/gen
/registries

3
ismism.ts/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"deno.enable": true
}

38
ismism.ts/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,38 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "source build.zsh release",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"panel": "dedicated",
"showReuseMessage": false,
"clear": true
}
},
{
"label": "test",
"type": "shell",
"command": "source build.zsh test; http-server --logger target",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"panel": "dedicated",
"showReuseMessage": false,
"clear": true
}
}
]
}

8
ismism.ts/build.zsh Normal file
View File

@ -0,0 +1,8 @@
echo "building $1"
rm -rf target
mkdir target
cp ui/index.html target/index.html
deno bundle ui/bind.ts target/bind.js

46
ismism.ts/deno.json Normal file
View File

@ -0,0 +1,46 @@
{
"compilerOptions": {
"allowJs": true,
"lib": [
"dom",
"dom.iterable",
"dom.asynciterable",
"deno.ns"
],
"strict": true
},
"lint": {
"files": {
"include": [
"src/",
"ui/"
]
},
"rules": {
"tags": [
"recommended"
],
"include": [
"ban-untagged-todo"
],
"exclude": [
"no-unused-vars"
]
}
},
"fmt": {
"files": {
"include": [
"src/",
"ui/"
]
},
"options": {
"useTabs": true,
"lineWidth": 80,
"indentWidth": 4,
"singleQuote": true,
"proseWrap": "preserve"
}
}
}

1
ismism.ts/ui/bind.ts Normal file
View File

@ -0,0 +1 @@
console.log("binding")

140
ismism.ts/ui/index.html Normal file
View File

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>主义主义 活动公示</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<style>
* {
box-sizing: border-box;
--color-purple: purple;
--color-gray: gray;
--color-white: darkgray;
--interval: 20px;
}
body {
font-family: "PingFang SC", "Lantinghei SC", "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", STHeitiSC-Light, simsun, "WenQuanYi Zen Hei", "WenQuanYi Micro Hei", sans-serif;
padding: var(--interval);
background: var(--color-purple);
}
.header {
padding: 30px;
text-align: center;
background: var(--color-gray);
}
.header h1 {
font-size: 50px;
}
.left {
float: left;
width: 75%;
}
.right {
float: left;
width: 25%;
padding-left: var(--interval);
}
.noimg {
background: var(--color-white);
width: 100%;
padding: var(--interval);
}
.card {
background: var(--color-gray);
padding: var(--interval);
margin-top: var(--interval);
}
.row:after {
content: "";
display: table;
clear: both;
}
.footer {
background: var(--color-gray);
text-align: center;
padding: var(--interval);
margin-top: var(--interval);
}
@media screen and (max-width: 800px) {
.left,
.right {
width: 100%;
padding: 0;
}
}
</style>
<body>
<div class="header">
<h1>主义主义 活动公示</h1>
<p>This is a test.</p>
</div>
<div class="row">
<div class="left">
<div class="card">
<h2>TITLE HEADING</h2>
<h5>Title description, Dec 7, 2017</h5>
<div class="noimg" style="height:200px;">Image</div>
<p>Some text..</p>
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do
eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation
ullamco.</p>
</div>
<div class="card">
<h2>TITLE HEADING</h2>
<h5>Title description, Sep 2, 2017</h5>
<div class="noimg" style="height:200px;">Image</div>
<p>Some text..</p>
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do
eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation
ullamco.</p>
</div>
</div>
<div class="right">
<div class="card">
<h2>About Me</h2>
<div class="noimg" style="height:100px;">Image</div>
<p>Some text about me in culpa qui officia deserunt mollit anim..</p>
</div>
<div class="card">
<h3>Popular Post</h3>
<div class="noimg">Image</div><br>
<div class="noimg">Image</div><br>
<div class="noimg">Image</div>
</div>
<div class="card">
<h3>Follow Me</h3>
<p>Some text..</p>
</div>
</div>
</div>
<div class="footer">
<h2>Footer</h2>
</div>
</body>
<script src="bind.js"></script>
</html>