asdf
This commit is contained in:
parent
f0e7a7d32d
commit
447e402929
|
@ -3,5 +3,5 @@ root = true
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
||||||
[*.{svelte,ts}]
|
[*.{svelte,ts,json}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,5 +1,7 @@
|
||||||
.DS_Store
|
|
||||||
node_modules
|
node_modules
|
||||||
|
*/package-lock.json
|
||||||
|
!/package-lock.json
|
||||||
|
|
||||||
/build
|
/build
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
|
|
5
compile-database/README.md
Normal file
5
compile-database/README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
compile-database
|
||||||
|
===
|
||||||
|
|
||||||
|
This is a script that converts the files from the `material` directory into an
|
||||||
|
sqlite database with some indexing to allow fast search during run-time.
|
6
compile-database/package.json
Normal file
6
compile-database/package.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"name": "compile-database",
|
||||||
|
"devDependencies": {
|
||||||
|
"ts-node": "^10.2.1"
|
||||||
|
}
|
||||||
|
}
|
716
package-lock.json
generated
716
package-lock.json
generated
File diff suppressed because it is too large
Load diff
30
package.json
30
package.json
|
@ -1,30 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "web",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "svelte-kit dev",
|
|
||||||
"build": "svelte-kit build",
|
|
||||||
"preview": "svelte-kit preview",
|
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
||||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
|
||||||
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
|
||||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/kit": "next",
|
"compile-database": "file:compile-database",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
"web": "file:web"
|
||||||
"@typescript-eslint/parser": "^4.19.0",
|
}
|
||||||
"eslint": "^7.22.0",
|
|
||||||
"eslint-config-prettier": "^8.1.0",
|
|
||||||
"eslint-plugin-svelte3": "^3.2.0",
|
|
||||||
"node-sass": "^6.0.1",
|
|
||||||
"prettier": "~2.2.1",
|
|
||||||
"prettier-plugin-svelte": "^2.2.0",
|
|
||||||
"svelte": "^3.34.0",
|
|
||||||
"svelte-check": "^2.0.0",
|
|
||||||
"svelte-preprocess": "^4.0.0",
|
|
||||||
"tslib": "^2.0.0",
|
|
||||||
"typescript": "^4.0.0"
|
|
||||||
},
|
|
||||||
"type": "module"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,142 +0,0 @@
|
||||||
<div id="app" class="container">
|
|
||||||
<header class="header">
|
|
||||||
<div class="brand"><a href="/">Edu</a></div>
|
|
||||||
<nav class="header-nav">
|
|
||||||
<ul class="list list-reset">
|
|
||||||
<li><a href="/about">About</a></li>
|
|
||||||
<li><a href="/learn">Learn</a></li>
|
|
||||||
<li><a href="/browse">Browse</a></li>
|
|
||||||
<li><a href="/contribute">Contribute</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<slot></slot>
|
|
||||||
|
|
||||||
<footer class="footer">
|
|
||||||
<div class="footer-blocks">
|
|
||||||
<div class="footer-block">
|
|
||||||
<div class="footer-block-title">For Students</div>
|
|
||||||
<ul class="list-reset">
|
|
||||||
<li><a href="/about">Edu</a></li>
|
|
||||||
<li><a href="/about">Edu</a></li>
|
|
||||||
<li><a href="/about">Edu</a></li>
|
|
||||||
<li><a href="/about">Edu</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer-block">
|
|
||||||
<div class="footer-block-title">About Us</div>
|
|
||||||
<ul class="list-reset">
|
|
||||||
<li><a href="/about">About Me</a></li>
|
|
||||||
<li><a href="/about">About Me</a></li>
|
|
||||||
<li><a href="/about">About Me</a></li>
|
|
||||||
<li><a href="/about">About Me</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
#app {
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
padding-right: 15px;
|
|
||||||
padding-left: 15px;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.container {
|
|
||||||
width: 750px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
.container {
|
|
||||||
width: 970px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
.container {
|
|
||||||
width: 1170px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-reset {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 80px;
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
margin-right: 32px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: black;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-nav {
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
.list {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-grow: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
margin-bottom: 0;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin: 0;
|
|
||||||
box-sizing: inherit;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
padding: 0 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
.footer-blocks {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-right: -24px;
|
|
||||||
margin-left: -24px;
|
|
||||||
margin-top: -12px;
|
|
||||||
|
|
||||||
.footer-block {
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-basis: 160px;
|
|
||||||
box-sizing: content-box;
|
|
||||||
padding: 12px 24px;
|
|
||||||
|
|
||||||
.footer-block-title {
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: lighten(black, 20%);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
3
web/.gitignore
vendored
Normal file
3
web/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
30
web/package.json
Normal file
30
web/package.json
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name": "web",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "svelte-kit dev",
|
||||||
|
"build": "svelte-kit build",
|
||||||
|
"preview": "svelte-kit preview",
|
||||||
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||||
|
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
||||||
|
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@sveltejs/kit": "next",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
||||||
|
"@typescript-eslint/parser": "^4.19.0",
|
||||||
|
"eslint": "^7.22.0",
|
||||||
|
"eslint-config-prettier": "^8.1.0",
|
||||||
|
"eslint-plugin-svelte3": "^3.2.0",
|
||||||
|
"node-sass": "^6.0.1",
|
||||||
|
"prettier": "~2.2.1",
|
||||||
|
"prettier-plugin-svelte": "^2.2.0",
|
||||||
|
"svelte": "^3.34.0",
|
||||||
|
"svelte-check": "^2.0.0",
|
||||||
|
"svelte-preprocess": "^4.0.0",
|
||||||
|
"tslib": "^2.0.0",
|
||||||
|
"typescript": "^4.0.0"
|
||||||
|
},
|
||||||
|
"type": "module"
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
<link rel="icon" href="/favicon.png" />
|
<link rel="icon" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
%svelte.head%
|
%svelte.head%
|
||||||
|
<style>html, body { margin: 0; paddding: 0; }</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="svelte">%svelte.body%</div>
|
<div id="svelte">%svelte.body%</div>
|
0
src/global.d.ts → web/src/global.d.ts
vendored
0
src/global.d.ts → web/src/global.d.ts
vendored
169
web/src/routes/__layout.svelte
Normal file
169
web/src/routes/__layout.svelte
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
<div id="app">
|
||||||
|
<div class="content-wrap">
|
||||||
|
<div class="container">
|
||||||
|
<header class="header">
|
||||||
|
<div class="brand"><a href="/">Edu</a></div>
|
||||||
|
<nav class="header-nav">
|
||||||
|
<ul class="list list-reset">
|
||||||
|
<li><a href="/about">About</a></li>
|
||||||
|
<li><a href="/learn">Learn</a></li>
|
||||||
|
<li><a href="/browse">Browse</a></li>
|
||||||
|
<li><a href="/contribute">Contribute</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="container">
|
||||||
|
<div class="footer-blocks">
|
||||||
|
<div class="footer-block">
|
||||||
|
<div class="footer-block-title">Eduproj</div>
|
||||||
|
<ul class="list-reset">
|
||||||
|
<li>Hellosus</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-block">
|
||||||
|
<div class="footer-block-title">For Students</div>
|
||||||
|
<ul class="list-reset">
|
||||||
|
<li><a href="/about">Edu</a></li>
|
||||||
|
<li><a href="/about">Edu</a></li>
|
||||||
|
<li><a href="/about">Edu</a></li>
|
||||||
|
<li><a href="/about">Edu</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-block">
|
||||||
|
<div class="footer-block-title">About Us</div>
|
||||||
|
<ul class="list-reset">
|
||||||
|
<li><a href="/about">About Me</a></li>
|
||||||
|
<li><a href="/about">About Me</a></li>
|
||||||
|
<li><a href="/about">About Me</a></li>
|
||||||
|
<li><a href="/about">About Me</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$footer-height: 180px;
|
||||||
|
|
||||||
|
#app {
|
||||||
|
font-family: sans-serif;
|
||||||
|
position: relative;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
|
.content-wrap {
|
||||||
|
padding-bottom: $footer-height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-left: 15px;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.container {
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.container {
|
||||||
|
width: 970px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.container {
|
||||||
|
width: 1170px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-reset {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 80px;
|
||||||
|
|
||||||
|
.brand {
|
||||||
|
margin-right: 32px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: black;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-nav {
|
||||||
|
flex-grow: 1;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-grow: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin: 0;
|
||||||
|
box-sizing: inherit;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
padding: 0 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: #eee;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: $footer-height;
|
||||||
|
padding-top: 24px;
|
||||||
|
|
||||||
|
.footer-blocks {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: -24px;
|
||||||
|
margin-left: -24px;
|
||||||
|
margin-top: -12px;
|
||||||
|
|
||||||
|
.footer-block {
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-basis: 160px;
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding: 12px 24px;
|
||||||
|
|
||||||
|
.footer-block-title {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: lighten(black, 20%);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in a new issue