Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

# Only build after new tag.
on:
workflow_dispatch:
push:
tags:
- "*"

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: Setup Node with yarn caching
uses: actions/setup-node@v3
with:
node-version: "18"
cache: yarn

- name: Install dependencies
run: yarn install

- name: Build Retype and replace colors
run: yarn build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_branch: release
enable_jekyll: false
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
8 changes: 5 additions & 3 deletions SDK's/index.md → SDK's.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
icon: code
order: 2
---

# SDK's

A Software Development Kit (SDK) is a set of tools provided by the manufacturer of (usually) a hardware platform, operating system (OS), or programming language. [\[\*\]](https://www.redhat.com/en/topics/cloud-native-apps/what-is-SDK)
Expand All @@ -8,6 +13,3 @@ A Software Development Kit (SDK) is a set of tools provided by the manufacturer

[1]: {{git_home}}/js-sdk
[2]: https://www.npmjs.com/package/@hawapi/js-sdk

<!-- | Java | [:icon-file-code:](./java-sdk.md) - [:icon-mark-github:][2] | :icon-verified: Official | [LucJosin](https://github.com/LucJosin) | -->
<!-- [2]: {{git_home}}/java-sdk -->
2 changes: 0 additions & 2 deletions SDK's/index.yaml

This file was deleted.

38 changes: 3 additions & 35 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,18 @@ All this information is available through a RESTful API implemented with [_Java

<style>
.tiles {
width: 100%;
width: 80%;
text-align: center;
color: #1956AF;
display: grid;
grid-template-columns: repeat(4, 0.2fr);
justify-content: start;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
gap: 1rem;
}

.tiles p .title-box {
height: 7rem;
width: 12rem;
border: 1px solid #fff;
margin: 0 1rem;
border-radius: 20px;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -85,35 +84,4 @@ All this information is available through a RESTful API implemented with [_Java
color: rgb(128 128 128/var(--tw-text-opacity)) !important;
}
}

@media (max-width: 1500px) {
.tiles {
grid-template-columns: repeat(3, 0.2fr);
}
}

@media (max-width: 1300px) {
.tiles {
grid-template-columns: repeat(2, 0.2fr);
}
}

@media (max-width: 480px) {
.tiles {
justify-content: space-evenly;
}

.tiles p .title-box {
height: 6rem;
width: 11rem;
margin: 0 0.5rem;
}
}

@media (max-width: 400px) {
.tiles p .title-box {
height: 6rem;
width: 9rem;
}
}
</style>
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"scripts": {
"build": "./scripts/build-docs.sh",
"build": "retype build && node scripts/js/update-colors.mjs",
"watch": "retype start",
"dev": "retype start",
"get-sdks": "./scripts/get-sdks.sh",
"clean": "./scripts/clean.sh"
"clean": "rm -rf ./build"
},
"devDependencies": {
"retypeapp": "^3.1.0"
"retypeapp": "^3.5.0"
}
}
6 changes: 5 additions & 1 deletion retype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ branding:
background: "#0f0f0f"
text: "#ffffff"
meta:
title: " | HawAPI"
title: " | HawAPI - A Stranger Things API - Docs"
links:
- text: Home
link: https://hawapi.theproject.id
Expand All @@ -28,6 +28,10 @@ links:
link: https://github.com/HawAPI/feedback/discussions
icon: comment-discussion
target: blank
- text: Hawbrary
link: https://hawbrary.theproject.id/
icon: book
target: blank
footer:
copyright: "&copy; Copyright {{ year }}. All rights reserved."
links:
Expand Down
65 changes: 0 additions & 65 deletions scripts/build-docs.sh

This file was deleted.

21 changes: 0 additions & 21 deletions scripts/clean.sh

This file was deleted.

85 changes: 0 additions & 85 deletions scripts/get-sdks.sh

This file was deleted.

8 changes: 6 additions & 2 deletions scripts/js/update-colors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ import * as fs from "fs";
main();

async function main() {
console.log("[update-colors] Updating colors...");

const json = fs.readFileSync("./_assets/colors.json", {
encoding: "utf8",
flag: "r",
});
const colors = new Map(Object.entries(JSON.parse(json)));

fs.readFile("./build/resources/css/retype.css", "utf-8", (err, data) => {
if (err) return console.log(err);
if (err) return console.error(err);

let result = data;
colors.forEach((value, key) => (result = result.replaceAll(key, value)));

fs.writeFile("./build/resources/css/retype.css", result, "utf8", (err) => {
if (err) return console.log(err);
if (err) return console.error(err);
});
});

console.log("[update-colors] Updated colors!");
}