Tailwind and Qwik overhaul

This commit is contained in:
saboooor 2022-12-08 02:40:14 -07:00
commit d6223496f0
46 changed files with 3809 additions and 893 deletions

33
.eslintignore Normal file
View file

@ -0,0 +1,33 @@
**/*.log
**/.DS_Store
*.
.vscode/settings.json
.history
.yarn
bazel-*
bazel-bin
bazel-out
bazel-qwik
bazel-testlogs
dist
dist-dev
lib
lib-types
etc
external
node_modules
temp
tsc-out
tsdoc-metadata.json
target
output
rollup.config.js
build
.cache
.vscode
.rollup.cache
dist
tsconfig.tsbuildinfo
vite.config.ts
*.spec.tsx
*.spec.ts

40
.eslintrc.cjs Normal file
View file

@ -0,0 +1,40 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:qwik/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-spread': 'off',
'no-case-declarations': 'off',
'no-console': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
};

View file

@ -1,47 +0,0 @@
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2021
},
"rules": {
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"handle-callback-err": "off",
"indent": ["error", "tab"],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"no-console": "off",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
"no-trailing-spaces": ["error"],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "single"],
"semi": ["error", "always"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"yoda": "error"
}
}

136
.gitignore vendored
View file

@ -1,119 +1,41 @@
# Build
/dist
/lib
/lib-types
/server
# Development
node_modules
# Cache
.cache
.mf
.vscode
.rollup.cache
tsconfig.tsbuildinfo
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Editor
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# Yarn
.yarn/*
!.yarn/releases
config/
data/

6
.prettierignore Normal file
View file

@ -0,0 +1,6 @@
# Files Prettier should not format
**/*.log
**/.DS_Store
*.
dist
node_modules

View file

@ -1,6 +1,3 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"],
"css.lint.unknownAtRules": "ignore",
}

21
LICENSE
View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Saboor Bilal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

65
README.md Normal file
View file

@ -0,0 +1,65 @@
# Qwik City App ⚡️
- [Qwik Docs](https://qwik.builder.io/)
- [Discord](https://qwik.builder.io/chat)
- [Qwik GitHub](https://github.com/BuilderIO/qwik)
- [@QwikDev](https://twitter.com/QwikDev)
- [Vite](https://vitejs.dev/)
---
## Project Structure
This project is using Qwik with [QwikCity](https://qwik.builder.io/qwikcity/overview/). QwikCity is just a extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more.
Inside your project, you'll see the following directory structure:
```
├── public/
│ └── ...
└── src/
├── components/
│ └── ...
└── routes/
└── ...
```
- `src/routes`: Provides the directory based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info.
- `src/components`: Recommended directory for components.
- `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.
## Add Integrations and deployment
Use the `pnpm qwik add` command to add additional integrations. Some examples of integrations include: Cloudflare, Netlify or Express server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/static-site-generation/static-site-config/).
```shell
pnpm qwik add # or `yarn qwik add`
```
## Development
Development mode uses [Vite's development server](https://vitejs.dev/). During development, the `dev` command will server-side render (SSR) the output.
```shell
npm start # or `yarn start`
```
> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.
## Preview
The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to locally preview a production build, and it should not be used as a production server.
```shell
pnpm preview # or `yarn preview`
```
## Production
The production build will generate client and server modules by running both client and server build commands. Additionally, the build command will use Typescript to run a type check on the source code.
```shell
pnpm build # or `yarn build`
```

Binary file not shown.

1
assets/bulma.min.js vendored
View file

@ -1 +0,0 @@
document.addEventListener('DOMContentLoaded', ()=>{const a = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);a.forEach(a=>{a.addEventListener('click', ()=>{const b = a.dataset.target, c = document.getElementById(b);a.classList.toggle('is-active'), c.classList.toggle('is-active');});});});

View file

@ -1 +0,0 @@
<script>location.replace("https://docs.google.com/drawings/d/11Azp-D7rhhGxVQSDELEExcTiO5FBAAuPzJAWXiJruwo/edit?usp=sharing");</script>

View file

@ -1,6 +0,0 @@
<meta http-equiv="Refresh" content="0; url='https://github.com/saboooor'" />
<meta content="GitHub - saboooor" property="og:title" />
<meta content="Check out my GitHub!" property="og:description" />
<meta content="https://github.com/saboooor" property="og:url" />
<meta content="https://avatars.githubusercontent.com/u/42164502" property="og:image" />
<meta content="#BD7C4A" data-react-helmet="true" name="theme-color" />

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#a1a09e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>

Before

Width:  |  Height:  |  Size: 306 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#a1a09e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-branch"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>

Before

Width:  |  Height:  |  Size: 372 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#a1a09e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 KiB

View file

@ -1,51 +0,0 @@
html {
overflow: overlay;
}
*::-webkit-scrollbar {
width: 16px;
height: 16px;
}
*::-webkit-scrollbar-thumb {
background-color: hsl(216,7.2%,13.5%);
}
*::-webkit-scrollbar-thumb, *::-webkit-scrollbar-track {
border: 4px solid transparent;
background-clip: padding-box;
border-radius: 8px;
}
*::-webkit-scrollbar-track {
margin-bottom: 8px;
background: hsl(210,9.8%,20%);
}
.navbar .navbar-link, .navbar a.navbar-item {
color: white;
border-radius: 4px;
}
.navbar-dropdown {
background-color: #222;
border-top: none;
}
.navbar-dropdown .navbar-item:hover {
background-color: #222;
}
.navbar-divider {
background-color: #ffffff60;
}
@media screen and (max-width: 1023px) {
.navbar-menu {
background-color: #22222280;
margin: 10px;
border-radius: 10px;
}
}
.feather {
margin-right: 10px;
vertical-align: middle;
}

View file

@ -1,148 +0,0 @@
.navbar.is-dark {
border-bottom: 1.5px solid rgba(0, 0, 0, 0.5);
background: rgb(54, 57, 63);
}
.hero.is-dark {
border-bottom: 1.5px solid rgba(0, 0, 0, 0.5);
background: rgb(54, 57, 63);
}
.media+.media {
border-top: none;
}
.media.trail {
padding-top: 0;
margin-top: 6px;
}
.media {
padding-left: 10px;
padding-right: 10px;
border-radius: 4px;
}
.media:hover {
background: rgba(0, 0, 0, 0.1);
}
.embed {
border-radius: 4px;
background: rgba(0, 0, 0, 0.2);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 8px 10px;
font-size: 0.875rem;
margin: 10px 0;
}
.embed .card-block {
padding: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-bottom: 10px;
}
.embed a {
color: #0096cf;
}
.embed img.embed-thumb {
max-width: 80px;
border-radius: 4px;
-ms-flex-negative: 0;
flex-shrink: 0;
width: auto;
-o-object-fit: contain;
object-fit: contain;
margin-left: 20px;
}
.embed img.embed-img {
max-width: 300px;
border-radius: 4px;
}
.embed .embed-footer {
font-size: 12px;
}
.embed .embed-footer span {
color: rgba(255, 255, 255, 0.6);
}
.embed .embed-inner .embed-title {
color: #fff;
font-size: 1rem;
font-weight: 600;
}
.embed .embed-inner .embed-author {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-bottom: 5px;
font-size: 0.875rem;
font-weight: 600;
}
.embed .embed-inner .embed-author img.embed-author-icon {
margin-right: 9px;
width: 20px;
height: 20px;
-o-object-fit: contain;
object-fit: contain;
border-radius: 50%;
}
.embed .embed-inner .embed-author .embed-author-name {
display: inline-block;
font-weight: 600;
font-size: 14px;
color: #fff !important;
}
.embed .embed-inner .fields {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
box-lines: miltiple;
margin-top: -10px;
}
.embed .embed-inner .fields .field {
-webkit-box-flex: 0;
-ms-flex: 0;
flex: 0;
box-flex: 1;
padding-top: 10px;
max-width: 506px;
min-width: 100%;
}
.embed .embed-inner .fields .field.inline {
box-flex: 1;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
min-width: 150px;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.embed .embed-inner .fields .field .field-name {
color: #fff;
font-size: 14px;
margin-bottom: 4px;
font-weight: 600;
}
.embed .embed-inner .fields .field .field-value {
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
font-weight: 500;
line-height: 1.1em;
white-space: pre-wrap;
margin-top: 6px;
word-wrap: break-word;
}
code {
background: rgba(0, 0, 0, 0.2);
border-radius: 4px;
color: white;
}

4
config.example.json Normal file
View file

@ -0,0 +1,4 @@
{
"port": 5173,
"filesport": 5174
}

9
express.js Normal file
View file

@ -0,0 +1,9 @@
const express = require('express');
const config = require('./config');
const path = require('path');
const app = express();
app.use('/', express.static(path.resolve('files')));
app.get('/', (req, res) => res.redirect('/files'));
app.listen(config.filesport, () => {
console.log(`Files hosted at: http://localhost:${config.filesport}/`);
});

142
index.js
View file

@ -1,142 +0,0 @@
const { createLogger, format, transports } = require('winston');
const fs = require('fs');
const rn = new Date();
const date = `${minTwoDigits(rn.getMonth() + 1)}-${minTwoDigits(rn.getDate())}-${rn.getFullYear()}`;
function minTwoDigits(n) { return (n < 10 ? '0' : '') + n; }
const logger = createLogger({
format: format.combine(
format.colorize(),
format.timestamp(),
format.printf(log => `[${log.timestamp.split('T')[1].split('.')[0]} ${log.level}]: ${log.message}`),
),
transports: [
new transports.Console(),
new transports.File({ filename: `logs/${date}.log` }),
],
rejectionHandlers: [
new transports.Console(),
new transports.File({ filename: `logs/${date}.log` }),
],
});
logger.info('Logger started');
// We import modules.
const ejs = require('ejs');
const path = require('path');
const express = require('express');
const config = require('./config.json');
const session = require('express-session');
const showdown = require('showdown');
const converter = new showdown.Converter();
converter.setOption('omitExtraWLInCodeBlocks', true);
converter.setOption('noHeaderId', true);
converter.setOption('simplifiedAutoLink', true);
converter.setOption('excludeTrailingPunctuationFromURLs', true);
converter.setOption('strikethrough', true);
converter.setOption('simpleLineBreaks', true);
converter.setOption('requireSpaceBeforeHeadingText', true);
converter.setOption('openLinksInNewWindow', true);
converter.setOption('emoji', true);
converter.setOption('underline', true);
// We instantiate express app and the session store.
const app = express();
const MemoryStore = require('memorystore')(session);
// We initialize the memorystore middleware with our express app.
app.use(
session({
store: new MemoryStore({ checkPeriod: 86400000 }),
secret: config.secret,
resave: false,
saveUninitialized: false,
}),
);
// We bind the domain.
app.locals.domain = config.domain.split('//')[1];
// We set out templating engine.
app.engine('ejs', ejs.renderFile);
app.set('view engine', 'ejs');
const formidable = require('formidable');
// Post endpoint for uploading files
app.post('/fileupload', upload_file);
function upload_file(req, res) {
if (req.method == 'POST') {
// create an incoming form object
const form = new formidable.IncomingForm();
// store all uploads in the /uploads directory
form.uploadDir = path.basename(path.dirname('/files/json_files/'));
// every time a file has been uploaded successfully,
// rename it to it's orignal name
form.on('file', function(field, file) {
fs.renameSync(`./files/${file.newFilename}`, `./files/${file.originalFilename}`);
});
// log any errors that occur
form.on('error', function(err) { logger.error(err); });
// once all the files have been uploaded, send a response to the client
form.on('end', function() {
// res.end('success');
res.statusMessage = 'Process cashabck initiated';
res.statusCode = 200;
res.end();
});
// parse the incoming request containing the form data
form.parse(req);
}
}
const crypto = require('crypto');
/** Sync */
function suffix() {
return crypto.randomBytes(5).toString('hex');
}
// Post endpoint for user to upload files
app.use(express.json());
app.post('/transcript', parseTranscript);
function parseTranscript(req, res) {
if (req.method == 'POST') {
const url = suffix();
fs.writeFile(`transcript/${url}.json`, JSON.stringify(req.body), function(err) {
if (err) throw err;
logger.info(`File is created successfully. (${config.domain}/transcript/${url})`);
});
res.statusMessage = `${config.domain}/transcript/${url}`;
res.statusCode = 200;
res.end();
}
}
// Host root endpoint.
app.use('/', express.static(path.resolve('assets'), { extensions: ['html'] }));
// Host files.
app.use('/files/', express.static(path.resolve('files')));
// renderTemplate function
const renderTemplate = (res, req, template, files) => {
res.render(
path.resolve(`templates/${template}`),
Object.assign({ files: files ? fs.readdirSync(`./${files}`) : null, fs, req, converter }),
);
};
// All files
app.get('/', (req, res) => renderTemplate(res, req, 'index.ejs'));
app.get('/files', (req, res) => renderTemplate(res, req, 'files.ejs', 'files'));
app.get('/forks', (req, res) => renderTemplate(res, req, 'forks.ejs'));
app.get('/transcript/:file', (req, res) => renderTemplate(res, req, 'transcript.ejs', 'transcript'));
// Listen on port
app.listen(config.port, null, null, () => {
logger.info(`Website running on port ${config.port}.`);
logger.info(config.domain);
const timer = (Date.now() - rn) / 1000;
logger.info(`Done (${timer}s)! I am running!`);
});

View file

@ -1,21 +1,46 @@
{
"name": "smhsmh.club",
"version": "2.0.0",
"description": "sab's hellhole of a website",
"repository": {
"type": "git",
"url": "git+https://github.com/saboooor/smhsmh.club.git"
"name": "my-qwik-basic-starter",
"description": "App with Routing built-in (recommended)",
"engines": {
"node": ">=15.0.0"
},
"scripts": {
"build": "qwik build",
"build.client": "vite build",
"build.preview": "vite build --ssr src/entry.preview.tsx",
"build.types": "tsc --incremental --noEmit",
"dev": "vite --mode ssr",
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
"lint": "eslint \"src/**/*.ts*\"",
"preview": "qwik build preview && vite preview --open & node express",
"start": "vite --open --mode ssr & node express",
"start:express": "node express",
"start:vite": "vite --open --mode ssr",
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/qwik": "0.15.2",
"@builder.io/qwik-city": "0.0.128",
"@types/eslint": "8.4.10",
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "5.45.1",
"@typescript-eslint/parser": "5.45.1",
"autoprefixer": "10.4.11",
"eslint": "8.29.0",
"eslint-plugin-qwik": "0.15.2",
"node-fetch": "3.3.0",
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8",
"typescript": "4.9.3",
"vite": "3.2.5",
"vite-tsconfig-paths": "4.0.0"
},
"main": "index.js",
"license": "MIT",
"dependencies": {
"ejs": "^3.1.8",
"eslint": "^8.22.0",
"express": "^4.18.1",
"express-session": "^1.17.3",
"formidable": "^2.0.1",
"memorystore": "^1.6.7",
"showdown": "^2.1.0",
"winston": "^3.8.1"
"@types/compression": "^1.7.2",
"@types/express": "^4.17.14",
"compression": "^1.7.4",
"express": "^4.18.2",
"path": "^0.12.7",
"showdown": "^2.1.0"
}
}

3036
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

6
postcss.config.js Normal file
View file

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

9
public/manifest.json Normal file
View file

@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": "qwik-project-name",
"short_name": "Welcome to Qwik",
"start_url": ".",
"display": "standalone",
"background_color": "#fff",
"description": "A Qwik project app."
}

View file

@ -1,5 +0,0 @@
{
"extends": [
"config:base"
]
}

View file

@ -0,0 +1,99 @@
import { component$ } from '@builder.io/qwik';
import { Link } from '@builder.io/qwik-city';
export default component$(() => {
return (
<header>
<nav class="z-10 fixed top-0 w-screen my-3 pointer-events-none">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div class="relative flex h-16 items-center justify-between">
<div class="flex md:flex-1 items-center justify-center md:items-stretch md:justify-start">
<Link href="/" class="transition duration-200 pointer-events-auto text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl pl-2 pr-3 py-2 rounded-full text-sm font-medium flex items-center">
<img class="h-8 w-8 mr-3 rounded-full" src="https://avatars.githubusercontent.com/u/42164502" alt="sab's pfp" />
smhsmh.club
</Link>
</div>
<div class="flex-1 items-center hidden justify-center md:flex">
<div class="md:ml-6 md:block">
<div class="pointer-events-auto flex space-x-4">
<Link href="/forks" class="transition duration-200 text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium">
Fork Graph
</Link>
<Link href="/resume" class="transition duration-200 text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium">
Resume
</Link>
<a href="https://github.com/saboooor" class="transition duration-200 text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium">
GitHub
</a>
</div>
</div>
</div>
<div class="flex-1 items-center hidden justify-end md:flex md:items-stretch">
<div class="md:ml-6 md:block">
<div class="pointer-events-auto flex space-x-4">
<a href="https://cactie.smhsmh.club" class="transition duration-200 group text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-8 w-8 group-hover:mr-3 rounded-full" src={`https://cactie.smhsmh.club/assets/images/Cactie.webp`} alt="Cactie Bot" />
<span class="hidden group-hover:flex">Cactie Bot</span>
</a>
<a href="https://netherdepths.com" class="transition duration-200 group text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-8 w-8 group-hover:mr-3 rounded-full" src={`https://raw.githubusercontent.com/saboooor/Nether-Depths/main/Branding/nd.png`} alt="Nether Depths" />
<span class="hidden group-hover:flex">Nether Depths</span>
</a>
<a href="https://simplymc.art" class="transition duration-200 group text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-8 w-8 group-hover:mr-3 rounded-full" src={`https://www.simplymc.art/images/icon.png`} alt="SimplyMC" />
<span class="hidden group-hover:flex">SimplyMC</span>
</a>
<a href="https://github.com/pemigrade/botflop" class="transition duration-200 group text-gray-300 bg-gray-900 hover:bg-gray-800 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-full text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-8 w-8 group-hover:mr-3 rounded-full" src={`https://i.imgur.com/deE1oID.png`} alt="Botflop" />
<span class="hidden group-hover:flex">Botflop</span>
</a>
</div>
</div>
</div>
<div class="flex flex-1 items-center justify-end md:items-stretch md:hidden">
<button type="button" id="mobile-menu-button" onClick$={() => document.getElementById('mobile-menu')?.classList.toggle("hidden")} class="pointer-events-auto inline-flex items-center justify-center rounded-full p-2 text-gray-400 bg-gray-900 hover:text-white focus:outline-none focus:bg-gray-800" aria-controls="mobile-menu" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
<div class="hidden px-6" id="mobile-menu">
<div class="pointer-events-auto space-y-1 py-3 px-3 justify-center items-center bg-gray-800 rounded-2xl">
<Link href="/forks" class="text-gray-300 bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
Fork Graph
</Link>
<Link href="/resume" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
Resume
</Link>
<a href="https://github.com/saboooor" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
GitHub
</a>
<a href="https://cactie.smhsmh.club" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-6 w-6 mr-3 rounded-full" src={`https://cactie.smhsmh.club/assets/images/Cactie.webp`} alt="Cactie Bot" />
Cactie Bot
</a>
<a href="https://netherdepths.com" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-6 w-6 mr-3 rounded-full" src={`https://raw.githubusercontent.com/saboooor/Nether-Depths/main/Branding/nd.png`} alt="Nether Depths" />
Nether Depths
</a>
<a href="https://simplymc.art" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-6 w-6 mr-3 rounded-full" src={`https://www.simplymc.art/images/icon.png`} alt="SimplyMC" />
SimplyMC
</a>
<a href="https://github.com/pemigrade/botflop" class="text-gray-300 hover:bg-gray-700 hover:text-white hover:drop-shadow-2xl px-3 py-2 rounded-xl text-sm font-medium flex items-center whitespace-nowrap">
<img class="h-6 w-6 mr-3 rounded-full" src={`https://i.imgur.com/deE1oID.png`} alt="Botflop" />
Botflop
</a>
</div>
</div>
</nav>
</header>
);
});

View file

@ -0,0 +1,34 @@
import { component$ } from '@builder.io/qwik';
import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
/**
* The RouterHead component is placed inside of the document `<head>` element.
*/
export const RouterHead = component$(() => {
const head = useDocumentHead();
const loc = useLocation();
return (
<>
<title>{head.title}</title>
<meta content={head.title} property="og:title"/>
<meta content="#c37f0c" name="theme-color"/>
<link rel="canonical" href={loc.href} />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
{head.meta.map((m) => (
<meta {...m} />
))}
{head.links.map((l) => (
<link {...l} />
))}
{head.styles.map((s) => (
<style {...s.props} dangerouslySetInnerHTML={s.style} />
))}
</>
);
});

17
src/entry.dev.tsx Normal file
View file

@ -0,0 +1,17 @@
/*
* WHAT IS THIS FILE?
*
* Development entry point using only client-side modules:
* - Do not use this mode in production!
* - No SSR
* - No portion of the application is pre-rendered on the server.
* - All of the application is running eagerly in the browser.
* - More code is transferred to the browser than in SSR mode.
* - Optimizer/Serialization/Deserialization code is not exercised!
*/
import { render, RenderOptions } from '@builder.io/qwik';
import Root from './root';
export default function (opts: RenderOptions) {
return render(document, <Root />, opts);
}

20
src/entry.preview.tsx Normal file
View file

@ -0,0 +1,20 @@
/*
* WHAT IS THIS FILE?
*
* It's the bundle entry point for `npm run preview`.
* That is, serving your app built in production mode.
*
* Feel free to modify this file, but don't remove it!
*
* Learn more about Vite's preview command:
* - https://vitejs.dev/config/preview-options.html#preview-options
*
*/
import { createQwikCity } from '@builder.io/qwik-city/middleware/node';
import render from './entry.ssr';
import qwikCityPlan from '@qwik-city-plan';
/**
* The default export is the QwikCity adaptor used by Vite preview.
*/
export default createQwikCity({ render, qwikCityPlan });

27
src/entry.ssr.tsx Normal file
View file

@ -0,0 +1,27 @@
/**
* WHAT IS THIS FILE?
*
* SSR entry point, in all cases the application is render outside the browser, this
* entry point will be the common one.
*
* - Server (express, cloudflare...)
* - npm run start
* - npm run preview
* - npm run build
*
*/
import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
import { manifest } from '@qwik-client-manifest';
import Root from './root';
export default function (opts: RenderToStreamOptions) {
return renderToStream(<Root />, {
manifest,
...opts,
// Use container attributes to set attributes on the html tag.
containerAttributes: {
lang: 'en-us',
...opts.containerAttributes,
},
});
}

23
src/global.css Normal file
View file

@ -0,0 +1,23 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
html {
overflow: overlay;
background-color: hsl(0deg, 0%, 5%);
}
* { scroll-behavior: smooth; }
*::-webkit-scrollbar {
appearance: none;
-webkit-appearance: none;
width: 8px;
}
*::-webkit-scrollbar-track {
background-color: #00000000;
border-radius: 3px;
}
*::-webkit-scrollbar-thumb {
background-color: #ffffff60;
border-radius: 2px;
}

29
src/root.tsx Normal file
View file

@ -0,0 +1,29 @@
import { component$, useStyles$ } from '@builder.io/qwik';
import { QwikCityProvider, RouterOutlet, ServiceWorkerRegister } from '@builder.io/qwik-city';
import { RouterHead } from './components/router-head/router-head';
import globalStyles from './global.css?inline';
export default component$(() => {
/**
* The root of a QwikCity site always start with the <QwikCityProvider> component,
* immediately followed by the document's <head> and <body>.
*
* Dont remove the `<head>` and `<body>` elements.
*/
useStyles$(globalStyles);
return (
<QwikCityProvider>
<head>
<meta charSet="utf-8" />
<link rel="manifest" href="/manifest.json" />
<RouterHead />
</head>
<body class="bg-gray-900 text-gray-300">
<RouterOutlet />
<ServiceWorkerRegister />
</body>
</QwikCityProvider>
);
});

View file

@ -0,0 +1,22 @@
import { component$ } from '@builder.io/qwik';
import type { DocumentHead } from '@builder.io/qwik-city';
export default component$(() => {
return (
<section class="flex mx-auto max-w-6xl px-6 items-center" style={{ minHeight: 'calc(100dvh - 64px)' }}>
<div class="justify-center align-center mx-auto">
<img class="rounded-xl ease-in-out filter drop-shadow-2xl" src={`https://raw.githubusercontent.com/saboooor/fork-graph/main/img.png?v=5`} alt="fork graph" />
</div>
</section>
);
});
export const head: DocumentHead = {
title: 'Home',
meta: [
{
name: 'description',
content: 'smhsmh.club'
}
]
}

41
src/routes/index.tsx Normal file
View file

@ -0,0 +1,41 @@
import { component$ } from '@builder.io/qwik';
import type { DocumentHead } from '@builder.io/qwik-city';
export default component$(() => {
return (
<section class="flex mx-auto max-w-6xl px-6 items-center" style={{ minHeight: 'calc(100dvh - 64px)' }}>
<div class="text-center sm:text-left justify-start">
<div class="flex sm:hidden relative justify-center align-center sm:ml-auto mb-10" style="width: 100%;">
<img class="rounded-full ease-in-out filter drop-shadow-2xl" src={`https://avatars.githubusercontent.com/u/42164502`} style={{ maxWidth: '40%', filter: 'drop-shadow(0 5rem 10rem rgb(251 146 60))' }} alt="sab's pfp" />
</div>
<h1 class="font-bold tracking-tight text-white text-5xl">
smhsmh
</h1>
<p class="mt-5 text-2xl text-gray-400">
Welcome to sab's hellhole
</p>
</div>
<div class="hidden sm:flex relative justify-end align-center sm:ml-auto" style={{ maxWidth: '30%', filter: 'drop-shadow(0 5rem 10rem rgb(251 146 60 / 0.3))' }}>
<img class="rounded-full ease-in-out filter drop-shadow-2xl" src={`https://avatars.githubusercontent.com/u/42164502`} alt="sab's pfp" />
</div>
</section>
);
});
export const head: DocumentHead = {
title: 'smhsmh',
meta: [
{
name: 'description',
content: 'Welcome to sab\'s hellhole'
},
{
name: 'og:description',
content: 'Welcome to sab\'s hellhole'
},
{
name: 'og:image',
content: 'https://avatars.githubusercontent.com/u/42164502'
}
]
}

13
src/routes/layout.tsx Normal file
View file

@ -0,0 +1,13 @@
import { component$, Slot } from '@builder.io/qwik';
import Header from '../components/header/header';
export default component$(() => {
return (
<main>
<Header />
<section class="pt-16">
<Slot />
</section>
</main>
);
});

View file

@ -0,0 +1,87 @@
import { component$ } from '@builder.io/qwik';
import type { DocumentHead } from '@builder.io/qwik-city';
export default component$(() => {
return (
<section class="sm:flex mx-auto max-w-6xl px-6 py-12" style={{ minHeight: 'calc(100dvh - 64px)' }}>
<div class="justify-start">
<h1 class="font-bold tracking-tight text-white text-5xl">
Muhammad Saboor, Bilal
</h1>
<p class="mt-5 text-3xl text-gray-200">
(Saboor)
</p>
<p class="mt-5 text-xl text-gray-400">
Culinary student with a passion for cooking various foods and working in fast paced environments and self-taught full-stack software developer with an equal passion for technology.
</p>
<h1 class="mt-10 font-bold tracking-tight text-white text-2xl">
EXPERIENCE
</h1>
<p class="mt-5 text-lg text-gray-400">
<span class="font-bold">Website Developer</span> <a href="https://burgersonfleek.ca">burgersonfleek.ca</a><br/>
Nov 2020 - Present
</p>
<p class="mt-5 text-lg text-gray-400">
<span class="font-bold">Culinary Arts Yr 2</span> Harry Ainlay HS<br/>
Sept 2021 - Jan 2022
</p>
<p class="mt-5 text-lg text-gray-400">
<span class="font-bold">Culinary Arts Yr 1</span> Harry Ainlay HS<br/>
Sept 2019 - Jan 2020
</p>
<h1 class="mt-10 font-bold tracking-tight text-white text-2xl">
EDUCATION
</h1>
<p class="mt-5 text-lg text-gray-400">
<span class="font-bold">Harry Ainlay High School</span> High School Diploma<br/>
Sept 2019 - Jun 2022
</p>
</div>
<div class="justify-end">
<h1 class="mt-10 sm:mt-0 font-bold tracking-tight text-white text-2xl">
SKILLS
</h1>
<p class="mt-5 text-lg text-gray-400">
Exceptional communication.
</p>
<p class="text-lg text-gray-400">
Effective and efficient problem solving.
</p>
<p class="text-lg text-gray-400">
Proficient short term memory.
</p>
<h1 class="mt-10 font-bold tracking-tight text-white text-2xl">
CERTIFICATIONS
</h1>
<p class="mt-5 text-lg text-gray-400">
<span class="font-bold">
Food Sanitation and Hygiene Certificate of Achievement
</span><br/>
November 26, 2019
</p>
<h1 class="mt-10 font-bold tracking-tight text-white text-2xl">
LANGUAGES
</h1>
<p class="mt-5 text-lg text-gray-400">
English, Urdu
</p>
<h1 class="mt-10 font-bold tracking-tight text-white text-2xl">
CODE LANGUAGES & FRAMEWORKS
</h1>
<p class="mt-5 text-lg text-gray-400">
JavaScript, TypeScript, NodeJS, Qwik, HTML, CSS, ExpressJS, EJS.
</p>
</div>
</section>
);
});
export const head: DocumentHead = {
title: 'Home',
meta: [
{
name: 'description',
content: 'smhsmh.club'
}
]
}

View file

@ -0,0 +1,18 @@
/*
* WHAT IS THIS FILE?
*
* The service-worker.ts file is used to have state of the art prefetching.
* https://qwik.builder.io/qwikcity/prefetching/overview/
*
* Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
* You can also use this file to add more functionality that runs in the service worker.
*/
import { setupServiceWorker } from '@builder.io/qwik-city/service-worker';
setupServiceWorker();
addEventListener('install', () => self.skipWaiting());
addEventListener('activate', () => self.clients.claim());
declare const self: ServiceWorkerGlobalScope;

32
tailwind.config.js Normal file
View file

@ -0,0 +1,32 @@
/** @type {import('tailwindcss').Config} */
const gray = {
50: "hsl(0deg, 0%, 95%)",
100: "hsl(0deg, 0%, 85%)",
200: "hsl(0deg, 0%, 75%)",
300: "hsl(0deg, 0%, 65%)",
400: "hsl(0deg, 0%, 55%)",
500: "hsl(0deg, 0%, 45%)",
600: "hsl(0deg, 0%, 35%)",
700: "hsl(0deg, 0%, 25%)",
800: "hsl(0deg, 0%, 15%)",
900: "hsl(0deg, 0%, 5%)"
};
const discord = {
600: "#36393F",
700: "#32353B",
800: "#2F3136",
900: "#202225"
};
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
colors: { gray, discord },
},
},
plugins: [],
};

View file

@ -1,25 +0,0 @@
<%- include("partials/header", { title: 'sab\'s personal file host', description: 'what are you doing in my files stepbro', image: null }) %>
<section class="hero is-black is-fullheight-with-navbar">
<div class="hero-body">
<div class="container has-text-centered">
<nav class="panel is-dark">
<p class="panel-heading">
Files
</p>
<% files.forEach(file => { %>
<a class="panel-block" href="/files/<%= file %>" style="background-color: #303030">
<%= file %>
</a>
<% }); %>
</nav>
</div>
</div>
</section>
</body>
</html>
<script src="/bulma.min.js"></script>

View file

@ -1,15 +0,0 @@
<% const img = 'https://raw.githubusercontent.com/saboooor/fork-graph/main/img.png?v=4'; %>
<%- include("partials/header", { title: 'Last updated August 30, 2022', description: 'Go to github.com/saboooor/fork-graph to propose any changes', image: { url: img, big: true } }) %>
<section class="hero is-dark is-fullheight-with-navbar has-text-centered">
<div class="hero-body">
<div class="container has-text-centered">
<img src="<%= img %>" style="max-height: calc(100vh - 220px); border-radius: 10px;"></iframe>
</div>
</div>
</section>
</body>
</html>
<script src="/bulma.min.js"></script>

View file

@ -1,18 +0,0 @@
<%- include("partials/header", { title: 'smhsmh', description: 'Welcome to sab\'s hellhole', image: { url: 'https://avatars.githubusercontent.com/u/42164502' } }) %>
<section class="hero is-dark is-fullheight-with-navbar">
<div class="hero-body">
<div class="container has-text-centered">
<p class="title">
smhsmh
</p>
<p class="subtitle">
Welcome to sab's hellhole
</p>
</div>
</div>
</section>
</body>
</html>
<script src="/bulma.min.js"></script>

View file

@ -1,80 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
<meta content="<%= title %>" property="og:title" />
<meta content="<%= description %>" property="og:description" />
<meta content="https://smhsmh.club" property="og:url" />
<meta content="#000000" data-react-helmet="true" name="theme-color" />
<% if (image) { %>
<% if (image.big) { %> <meta name="twitter:card" content="summary_large_image"/> <% } %>
<meta content="<%= image.url %>" property="og:image"/>
<% } %>
<link rel="stylesheet prefetch" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="/styles.css" />
</head>
<body class="has-navbar-fixed-top">
<nav class="navbar is-black is-spaced is-fixed-top" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img class="is-rounded" src="https://avatars.githubusercontent.com/u/42164502">
</figure>
<%= title %>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbar" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="/forks">
<img src="/icons/git-branch.svg" style="margin-right: 15px">
Fork Graph
</a>
<a class="navbar-item" href="/github">
<img src="/icons/github.svg" style="margin-right: 15px">
GitHub
</a>
<a class="navbar-item" href="/files">
<img src="/icons/folder.svg" style="margin-right: 15px">
Files
</a>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-dark" href="https://cactie.smhsmh.club">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://cactie.smhsmh.club/assets/images/Cactie.webp">
</figure>
Cactie Bot
</a>
<a class="button is-dark" href="https://netherdepths.com">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://raw.githubusercontent.com/saboooor/Nether-Depths/main/Branding/nd.png">
</figure>
Nether Depths
</a>
<a class="button is-dark" href="https://github.com/pemigrade/botflop">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://i.imgur.com/deE1oID.png">
</figure>
Botflop
</a>
<a class="button is-dark" href="https://github.com/saboooor/guilded-discord-bridge">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img class="is-rounded" src="https://cdn.discordapp.com/avatars/875133848831279124/8529004a528e8701eb486fa458d1bf8d.webp">
</figure>
Guilded-Discord Bridge
</a>
</div>
</div>
</div>
</div>
</nav>

View file

@ -1,202 +0,0 @@
<html lang="en">
<%
const logs = JSON.parse(fs.readFileSync(`./transcript/${req.params.file}.json`).toString());
let lastmsgname = '';
console.log(`Transcript ${req.params.file} was accessed`);
%>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title># <%= logs.channel %></title>
<meta content="Transcript of #<%= logs.channel %>" property="og:title" />
<meta content="<%= logs.logs.length %> Messages - Created <%= new Date(logs.time).toLocaleString('default', { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true }) %>" property="og:description" />
<meta content="https://smhsmh.club" property="og:url" />
<meta content="#000000" data-react-helmet="true" name="theme-color" />
<link rel="stylesheet prefetch" href="https://cdn.jsdelivr.net/npm/bulma/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="/styles.css" />
<link rel="stylesheet" type="text/css" href="/transcript.css" />
</head>
<body class="has-navbar-fixed-top">
<nav class="navbar is-fixed-top is-dark" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item">
<svg width="24" height="24" viewBox="0 0 24 24">
<path fill="rgb(255, 255, 255, 0.3)" d="M5.88657 21C5.57547 21 5.3399 20.7189 5.39427 20.4126L6.00001 17H2.59511C2.28449 17 2.04905 16.7198 2.10259 16.4138L2.27759 15.4138C2.31946 15.1746 2.52722 15 2.77011 15H6.35001L7.41001 9H4.00511C3.69449 9 3.45905 8.71977 3.51259 8.41381L3.68759 7.41381C3.72946 7.17456 3.93722 7 4.18011 7H7.76001L8.39677 3.41262C8.43914 3.17391 8.64664 3 8.88907 3H9.87344C10.1845 3 10.4201 3.28107 10.3657 3.58738L9.76001 7H15.76L16.3968 3.41262C16.4391 3.17391 16.6466 3 16.8891 3H17.8734C18.1845 3 18.4201 3.28107 18.3657 3.58738L17.76 7H21.1649C21.4755 7 21.711 7.28023 21.6574 7.58619L21.4824 8.58619C21.4406 8.82544 21.2328 9 20.9899 9H17.41L16.35 15H19.7549C20.0655 15 20.301 15.2802 20.2474 15.5862L20.0724 16.5862C20.0306 16.8254 19.8228 17 19.5799 17H16L15.3632 20.5874C15.3209 20.8261 15.1134 21 14.8709 21H13.8866C13.5755 21 13.3399 20.7189 13.3943 20.4126L14 17H8.00001L7.36325 20.5874C7.32088 20.8261 7.11337 21 6.87094 21H5.88657ZM9.41045 9L8.35045 15H14.3504L15.4104 9H9.41045Z"></path>
</svg>
<span style="margin-left: 12px; font-weight: 600;"><%= logs.channel %></span>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbar" class="navbar-menu">
<div class="navbar-start">
<div class="navbar-item has-dropdown is-hoverable" style="border-left: 2px solid rgb(255, 255, 255, 0.1);">
<a class="navbar-link">
More Info
</a>
<div class="navbar-dropdown">
<a class="navbar-item">
Created on <%= new Date(logs.time).toLocaleString('default', { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric', hour: 'numeric', minute: 'numeric', hour12: true }) %>
</a>
<a class="navbar-item">
Created in <%= logs.guild ? logs.guild.name : 'an unknown server' %>
</a>
<hr class="navbar-divider">
<a class="navbar-item">
Users who may access this transcript:
</a>
<% if (!logs.access && !logs.guild) { %>
<a class="navbar-item">
Anyone
</a>
<% } else if (!logs.access) { %>
<a class="navbar-item">
Anyone in <%= logs.guild.name %>
</a>
<% } else { %>
<a class="navbar-item">
Restricted (How did you get here?)
</a>
<% } %>
</div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-dark" href="https://cactie.smhsmh.club">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://cactie.smhsmh.club/assets/images/Cactie.webp">
</figure>
Cactie Bot
</a>
<a class="button is-dark" href="https://netherdepths.com">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://raw.githubusercontent.com/saboooor/Nether-Depths/main/Branding/nd.png">
</figure>
Nether Depths
</a>
<a class="button is-dark" href="https://github.com/pemigrade/botflop">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img src="https://i.imgur.com/deE1oID.png">
</figure>
Botflop
</a>
<a class="button is-dark" href="https://github.com/saboooor/guilded-discord-bridge">
<figure class="image" style="margin-right: 10px; max-width: 28px;">
<img class="is-rounded" src="https://cdn.discordapp.com/avatars/875133848831279124/8529004a528e8701eb486fa458d1bf8d.webp">
</figure>
Guilded-Discord Bridge
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<section class="hero is-dark is-fullheight-with-navbar">
<div class="hero-body">
<div class="container">
<% logs.logs.forEach(msg => { %>
<% if (lastmsgname != msg.author.name) { %>
<article class="media">
<figure class="media-left image is-32x32">
<img class="is-rounded" src="<%= msg.author.avatar %>">
</figure>
<div class="media-content">
<div class="content">
<strong style="color: <%= msg.author.color %>"><%= msg.author.name %></strong> <small style="opacity: 0.6;"><%= msg.time %></small>
<% if (msg.content) { %>
<%- converter.makeHtml(msg.content) %>
<% } %>
<% if (msg.embeds) { %>
<% msg.embeds.forEach(embed => { %>
<div class="embed" style="border-left: 5px solid #<%= embed.color ? embed.color : msg.author.color %>">
<div class="embed-inner">
<% if (embed.author) { %>
<div class="embed-author">
<% if (embed.author.iconURL) { %> <img class="embed-author-icon" src="<%= embed.author.iconURL %>"> <% }; %>
<% if (embed.author.name) { %> <a class="embed-author-name" <% if (embed.author.url) { %> href="<%= embed.author.url %>" <% } %>><%= embed.author.name %></a> <% }; %>
</div>
<% }; %>
<% if (embed.title) { %> <p class="embed-title"><%= embed.title %></p> <% }; %>
<% if (embed.description) { %> <%- converter.makeHtml(embed.description) %> <% }; %>
<% if (embed.fields) { %>
<div class="fields">
<% embed.fields.forEach(field => { %>
<div class="field <%= field.inline ? 'inline' : '' %>">
<p class="field-name"><%- converter.makeHtml(field.name) %></p>
<p class="field-value"><%- converter.makeHtml(field.value) %></p>
</div>
<% }); %>
</div>
<% }; %>
<% if (embed.image) { %> <img class="embed-img" src="<%= embed.image %>"> <% }; %>
<% if (embed.footer) { %> <span class="embed-footer"><%= embed.footer %></span> <% }; %>
</div>
<% if (embed.thumb) { %> <img class="embed-thumb" src="<%= embed.thumb %>"> <% }; %>
</div>
<% }); %>
<% } %>
</div>
</div>
</article>
<% } else { %>
<article class="media trail">
<figure class="media-left image is-32x32"></figure>
<div class="media-content">
<div class="content">
<% if (msg.content) { %>
<%- converter.makeHtml(msg.content) %>
<% } %>
<% if (msg.embeds) { %>
<% msg.embeds.forEach(embed => { %>
<div class="embed" style="border-left: 5px solid #<%= embed.color ? embed.color : msg.author.color %>">
<div class="embed-inner">
<% if (embed.author) { %>
<div class="embed-author">
<% if (embed.author.iconURL) { %> <img class="embed-author-icon" src="<%= embed.author.iconURL %>"> <% }; %>
<% if (embed.author.name) { %> <a class="embed-author-name" <% if (embed.author.url) { %> href="<%= embed.author.url %>" <% } %>><%= embed.author.name %></a> <% }; %>
</div>
<% }; %>
<% if (embed.title) { %> <p class="embed-title"><%= embed.title %></p> <% }; %>
<% if (embed.description) { %> <%- converter.makeHtml(embed.description) %> <% }; %>
<% if (embed.fields) { %>
<div class="fields">
<% embed.fields.forEach(field => { %>
<div class="field <%= field.inline ? 'inline' : '' %>">
<p class="field-name"><%- converter.makeHtml(field.name) %></p>
<p class="field-value"><%- converter.makeHtml(field.value) %></p>
</div>
<% }); %>
</div>
<% }; %>
<% if (embed.image) { %> <img class="embed-img" src="<%= embed.image %>"> <% }; %>
<% if (embed.footer) { %> <span class="embed-footer"><%= embed.footer %></span> <% }; %>
</div>
<% if (embed.thumb) { %> <img class="embed-thumb" src="<%= embed.thumb %>"> <% }; %>
</div>
<% }); %>
<% } %>
</div>
</div>
</article>
<% } %>
<% lastmsgname = msg.author.name }); %>
</div>
</div>
</section>
</body>
</html>
<script src="/bulma.min.js"></script>

27
tsconfig.json Normal file
View file

@ -0,0 +1,27 @@
{
"compilerOptions": {
"allowJs": true,
"target": "ES2022",
"module": "es2022",
"lib": ["es2022", "DOM", "WebWorker", "DOM.Iterable"],
"jsx": "react-jsx",
"jsxImportSource": "@builder.io/qwik",
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"incremental": true,
"isolatedModules": true,
"outDir": "tmp",
"noEmit": true,
"types": ["node", "vite/client"],
"paths": {
"~/*": ["./src/*"]
}
},
"files": ["./.eslintrc.cjs"],
"include": ["src"]
}

40
vite.config.ts Normal file
View file

@ -0,0 +1,40 @@
import { defineConfig } from 'vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { qwikCity } from '@builder.io/qwik-city/vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import config from './config.json';
export default defineConfig(() => {
return {
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
build: {
target: "es2022"
},
publicDir: 'files',
optimizeDeps: {
esbuildOptions: {
target: "es2022"
}
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
hmr: {
clientPort: config.port
},
port: config.port,
strictPort: true,
host: "0.0.0.0"
},
server: {
hmr: {
clientPort: config.port
},
port: config.port,
strictPort: true,
host: "0.0.0.0"
}
};
});