Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Dec 12, 2023
0 parents commit cc5b85f
Show file tree
Hide file tree
Showing 27 changed files with 1,643 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish on GitHub Pages

on:
push:
branches: [ main ]

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Setup Deno environment
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Build site
run: deno task build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: '_site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint_and_fmt:
runs-on: ubuntu-latest
strategy:
matrix:
deno: [v1.x]
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Lint files
run: deno lint
- name: Check formatting
run: deno fmt --check
test:
runs-on: ubuntu-latest
strategy:
matrix:
deno: [v1.x, canary]
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Run unit tests on Deno
run: deno test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_site
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"deno.config": "./deno.json",
"[json][jsonc][markdown][typescript][typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Cataclysm: Bright Nights Blog

Weekly changelogs and development updates for Cataclysm: Bright Nights.

## How to run

```sh
git https://github.com/scarf005/bn-blog
cd bn-blog
deno task serve
```

## License

[AGPL 3.0 only](./LICENSE)
11 changes: 11 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { lume } from "./lume_core.ts"
import relativeUrls from "lume/plugins/relative_urls.ts"

const site = lume()

site.copy([".css"])
site.ignore("./README.md")
site.data("layout", "_includes/base.ts")
site.use(relativeUrls())

export default site
35 changes: 35 additions & 0 deletions _includes/base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export const repo = "https://github.com/scarf005/bn-blog"

const footer = /*html*/ `
<footer>
© 2023 <a href="https://github.com/scarf005">scarf</a>
| <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL-3.0-Only</a>
| <a href="${repo}">Source</a>
</footer>
`

const render = (title: string, { content, head = "" }: Lume.Data): string => /*html*/ `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${title}</title>
<link rel="stylesheet" href="/assets/style.css">
${head}
</head>
<body>
<main>
<h1>${title}</h1>
${content}
</main>
${footer}
</body>
</html>
`

export default (data: Lume.Data) => {
const title = data.title ?? data.page.data.basename

return render(title, data)
}
15 changes: 15 additions & 0 deletions assets/list.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ul {
list-style: none;
}

ul ul li {
list-style: disc;
}

ul ul li li {
list-style: circle;
}

ul ul li li li {
list-style: square;
}
26 changes: 26 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
body {
display: flex;
flex-direction: column;
align-items: center;
margin: 40px auto;
max-width: 800px;
line-height: 1.6;
font-size: 18px;
color: #444;
}

img {
max-width: 100%;
display: block;
height: auto;
}

a {
text-decoration-line: underline;
}

h1,
h2,
h3 {
line-height: 1.2;
}
24 changes: 24 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"exclude": ["_site"],
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
"build": "deno task lume",
"serve": "deno task lume -s"
},
"fmt": {
"semiColons": false,
"lineWidth": 100,
"useTabs": true,
"proseWrap": "never"
},
"compilerOptions": {
"types": ["lume/types.ts"],
"exactOptionalPropertyTypes": true,
"noErrorTruncation": true
},
"unstable": ["ffi", "http"],
"nodeModulesDir": false,
"imports": {
"lume/": "https://deno.land/x/[email protected]/"
}
}
541 changes: 541 additions & 0 deletions deno.lock

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions index.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const layout = "base.ts"
export const title = "카타클리즘: 밝은 밤 변경 내역"
export const head = /*html*/`
<link rel="stylesheet" href="/assets/list.css">
`
type Renderer = (content: string) => string

export const section = (render: Renderer) => (page: Lume.Page["data"]): string => /*html*/ `
<li>
<h2 id="${page.basename}">
<a href="#${page.basename}">${page.basename}</a>
</h2>
${render(page.content as string)}
</li>`

export default ({ search }: Lume.Data, { md }: Lume.Helpers): string => {
const pages = search.pages().filter((page) => page.page.src.ext === ".md")

return /*html*/ `
<ul>
${pages.map(section(md)).join("\n")}
</ul>
`
}
52 changes: 52 additions & 0 deletions lume_core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import Site, { SiteOptions } from "lume/core/site.ts"
import { DeepPartial } from "lume/core/utils/object.ts"

// vendored from "lume/mod.ts"

import url, { Options as UrlOptions } from "lume/plugins/url.ts"
// import json, { Options as JsonOptions } from "lume/plugins/json.ts"
import markdown, { Options as MarkdownOptions } from "lume/plugins/markdown.ts"
import modules, { Options as ModulesOptions } from "lume/plugins/modules.ts"
import search, { Options as SearchOptions } from "lume/plugins/search.ts"
// import paginate, { Options as PaginateOptions } from "lume/plugins/paginate.ts"
// import yaml, { Options as YamlOptions } from "lume/plugins/yaml.ts"

export interface PluginOptions {
url?: UrlOptions
// json?: JsonOptions
markdown?: MarkdownOptions
modules?: ModulesOptions
search?: SearchOptions
// paginate?: PaginateOptions
// yaml?: YamlOptions
}

/**
* Stripped down version of `lume` because some plugins weren't needed.
*/
export const lume = (
options: DeepPartial<SiteOptions> = {},
pluginOptions: PluginOptions = {},
): Site => {
const site = new Site(options as Partial<SiteOptions>)

// Ignore some files by the watcher
site.options.watcher.ignore.push("/deno.lock", "/node_modules/.deno", "/.git")
site.options.watcher.ignore.push((path) => path.endsWith("/.DS_Store"))

return site
.ignore("node_modules")
.ignore("import_map.json")
.ignore("deno.json")
.ignore("deno.jsonc")
.ignore("deno.lock")
.mergeKey("tags", "stringArray")
.use(url(pluginOptions.url))
// .use(json(pluginOptions.json))
.use(markdown(pluginOptions.markdown))
.use(modules(pluginOptions.modules))
// .use(paginate(pluginOptions.paginate))
.use(search(pluginOptions.search))
// .use(toml(pluginOptions.toml))
// .use(yaml(pluginOptions.yaml));
}
22 changes: 22 additions & 0 deletions pages/2023-11-26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### 버그 수정

- [무술이 모든 데미지 유형에 보너스를 적용](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3728)
- [환경 보호력이 스턴, 마비, 실명, 수액 상태이상을 방어](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3755)
- [더 합리적인 수리 확률 시스템](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3731)

### 기능 추가

- [몬스터용 냉기와 전기 저항 JSON 필드](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3750)
- [대걸레가 3x3 범위를 청소](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3752)

![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/54838975/f1797873-c580-4250-9d1a-02ac693a3336)

- [중화기 사용 제약 완화](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3751)
- 기존에는 거치대 (모래주머니, 흙더미, 창틀 등) 위에 서 있어야만 사용 가능
- 주위에 서 있어도 사용 가능하게 변경 (단, 해당 칸이 막혀있으면 안 됌)
- [NPC 에필로그](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3756)

![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/54838975/5c5c5e1c-5e31-47f4-821c-de7941b314a3) ![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/54838975/68ac59ac-d6b7-4982-839e-37d78b84a641)

- [담수화 연구시설 (DDA)](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3762)
- `안전 장소` 시나리오의 시작 위치로 추가
9 changes: 9 additions & 0 deletions pages/2023-11-27.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### 기능 추가

- [z축 수영 기능 (DDA)](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3764)
- 담수화 연구시설 풀장에 잠수해서 빠져나올수 있음
- [파워 아머 소폭 너프 및 편의성 개선](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3758)

### 버그 수정

- [어린이 진균체를 죽여도 죄책감이 들지 않게 변경](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3770)
20 changes: 20 additions & 0 deletions pages/2023-11-28.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### 기능 추가

![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/54838975/d8106561-3799-4cbc-8118-bfbfb552b0b6)

- [`파워 아머 군인` 시작 직업](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3771)
- 경량 파워 아머와 경기관총으로 시작
- `추락지점``중과부적` 시나리오에서 시작 가능
- [매지클리즘 마법 시전 재료 (DDA)](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3772)
- [좀비 종류별 CBM 다양성 개선](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3769)

![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/54838975/ce416cc7-5436-4227-8241-6b3ed5e9be70)

- [일지에 현재 위치 표시](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/2202)
- [추가 그래피티, 묘비명, 생존자 노트 문구](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3767)
- [탄약 주머니 버프](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3775)
- [다리 탄약주머니 아이템, 스태프 슬링 분해 레시피](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3777)
- [여러 시작 직업 수정](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3778)
- 전기기사: 전압계 추가
- 군인: 수통과 수류탄 주머니 및 기타 장구 추가
- 바이오닉 병사와 저격수의 무기를 리브텍 총기로 변경
16 changes: 16 additions & 0 deletions pages/2023-12-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### 버그 수정

- [무가당 연유 갈증 해소량 너프](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3789)
- [구역 나무베기시 오류 메시지 해결](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3801)
- [관을 묻을 수 없던 문제 해결](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3793)
- [이셔우드 맵 버그픽스](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3802)

### 기능 추가

- [추가 군인 직업](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3783)
- Fuji의 군사 직업 팩 모드에서 본편으로 포팅
- 유탄발사기 사수, 기관총 사수, 지정사수, 전투 공병 추가
- [좀비 종류별 CBM 다양성 개선 (파트 2)](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3781)
- [슬라임스프링이 함정을 피함](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3795)
- [파라미터 기반 맵 생성 (DDA)](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3780)
- 벽지 색상, 지붕 파괴 등 지형 상태를 파라미터로 지정 가능
11 changes: 11 additions & 0 deletions pages/2023-12-03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 버그 수정

- [생존 도전과제 기간 문구 수정](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3803)

### 기능 추가

- [디버그용 무제한 스태미나 변이](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3805)

### 코드 리팩토링

- [`Urban Development` 모드를 본편에 통합](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3817)
9 changes: 9 additions & 0 deletions pages/2023-12-04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### 기능 추가

![](https://github.com/cataclysmbnteam/Cataclysm-BN/assets/10834235/61bd5dd3-e1ab-4b61-9f16-4a19d78aa526)

- [Lua 기반 텔레포터 모드](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3165)

### 버그 수정

- [비행 시에만 비행 소음 페널티 적요여](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3806)
Loading

0 comments on commit cc5b85f

Please sign in to comment.