# è头ç¯åä½ç¼è¾å°å¾
### ððððð ðððð ðððððð ððð
![alt GithubStars](https://img.shields.io/github/stars/elpwc/EldenRingOnlineMap.svg?style=flat)
![alt GithubStars](https://img.shields.io/github/forks/elpwc/EldenRingOnlineMap.svg?style=flat)
![alt license](https://img.shields.io/badge/license-MIT-green)
å°åï¼https://www.elpwc.com/eldenringmap/
## ææ¯æ
- Frontend: Svelte + Leaflet, via TypeScript
- Backend: PHP + MySQL, based on Apache + nginx, WinServer
ä¸å¼å§åªæ¯éæåç个人ç¨çå°ç½ç«ï¼å 为ä¸ç´æå¨å°é² Svelte æ¡æ¶ï¼å°±å¾å¤§èå°ä½¿ç¨äº
éç¨çº¯ PHP åå端æ¥å£ä¹æ¯å¾æ¹ä¾¿çäºçåå
å°å¾æ¯åºäº Leaflet å®ç°çï¼ç°è¡çæ¬çå°æ å
¨é¨ä½¿ç¨ DOM 渲æã
## æªå¾
![alt screenshot](./images/ss1.png)
![alt screenshot](./images/ss2.png)
## å
³äºåä¸å¼å
è头ç¯å°å¾çæ¥è®¿é®éä¸ç´ç»´æå¨20-30ä¸ä¹é´ï¼å¨å¦æ¤åºå¤§çç¨æ·éé¢åï¼æ笨æçææ¯æ°´å¹³å·²ç»ä¸è¶³ä»¥è·å¾ä¸æ¥æ¥å¢å ç计ååè½ãåé¦çbugçå¼åï¼æ以ï¼æ¬¢è¿éè¿é®ä»¶/QQ/issueèç³» åä¸å°å¼åéæ¥~
## è´¡ç®è
| ||
|-|-|
|spking11([@spking11](https://github.com/spking11))|Ranger([@RangerChen](https://github.com/RangerChen))|
## å¼åä¸é¨ç½²
### å端
å端æ¡æ¶ï¼
Svelteï¼ä¸ä¸ªæ¯è¾æ°çè½»éåçå端æ¡æ¶ï¼å
·ä½ä¿¡æ¯å¯ä»¥åè[å®ç½](https://svelte.dev/)æ[ä¸æç½](https://www.sveltejs.cn/)
> Svelte æ¯ä¸ç§å
¨æ°çæ建ç¨æ·çé¢çæ¹æ³ãä¼ ç»æ¡æ¶å¦ React å Vue å¨æµè§å¨ä¸éè¦å大éçå·¥ä½ï¼è Svelte å°è¿äºå·¥ä½æ¾å°æ建åºç¨ç¨åºçç¼è¯é¶æ®µæ¥å¤çã
nodejs version: 16.13.0
npm version: 8.1.2
pnpm version: 7.0.0-beta.2
1. å
éä»åºå°æ¬å°
```bash
git clone https://github.com/elpwc/EldenRingOnlineMap.git
```
2. ä¾èµå®è£
**ç±äºé¡¹ç®å½å使ç¨äº npm è¿è¡å
管çï¼æ¨èä½¿ç¨ `npm` æ `pnpm` è¿è¡ä¾èµå®è£
**
[pnpmä¼ éé¨](https://www.pnpm.cn/)
å¦ææ¬å°çç¯å¢ä½¿ç¨çæ¯ `yarn`ï¼æ交 pull request æ¯å¯ä»¥å¿½ç¥ `yarn.lock` æ件
```bash
npm i // or pnpm install | yarn
```
3. å¼åç¯å¢è°è¯
```bash
npm run dev // or pnpm dev | yarn dev
```
4. æ建æå
```bash
npm run build // or pnpm build | yarn build
```
5. é¨ç½²
æå
åçéææ件ä½äº `/public` æ件夹ä¸ï¼å¯ä»¥ç´æ¥ä½ä¸ºéæèµæºé¨ç½²å¨éææå¡å¨ä¸ã
### å端
ä¾èµ`php`,`mysql`,ï¼
1. åå§åæ°æ®åº
æ¾å°æ°æ®åºåå§åèæ¬æ件 `/database.sql`ï¼éè¿æ°æ®åºå®¢æ·ç«¯è½¯ä»¶(e.g. navicat)æ§è¡èæ¬å³å¯ï¼
2. é
ç½®æ°æ®åº
æ°æ®åºé
ç½®å¨ `/public/api/private/` ä¸ï¼
```bash
âââ public
â âââ api
â â âââ private
â â â âââ admin.example.php // Admin 模å¼å¯ç
â â â âââ dbcfg.example.php // æ°æ®åºé
ç½®æ件
â â â âââ illegal_words_list.example.php // å±è½è¯å表
```
å¯å¨æ¹å¼ï¼
å¨å¯¹åºçé
ç½®ä¸å¢å äºèªå·±çå
容åï¼éå½åï¼å°æ件åä¸ç `.example` å°±å¯ä»¥çæäº
e.g. `admin.example.php` -> `admin.php`
å¨å端è¿å
¥ç®¡çå模å¼çåæ³å¯ä»¥å¯ä»¥ç»è¯» `src/pages/About.svelte` å
容ï¼è¿å
¥äºå°±å¯ä»¥ç´æ¥å¨å端对å个æ°æ®å æ¹äº(说æ页ä¼åºç°ä¸ä¸ªï¼Adminï¼åæ ·è¯´æå·²è¿å
¥ Admin 模å¼ï¼
3. é¨ç½²
ç´æ¥å° `/public` æ件夹çå
容é¨ç½²è³ Apache æå¡å¨ä¸å³å¯ã
PSï¼å
³äºå个æ件ç说æå¨ `/src/description.txt` ä¸ï¼
## å¼æºè®¸å¯
MIT
å¨å
å«æ¤åè®®çåæä¸å¯ä»¥éæ使ç¨ãä¿®æ¹ãåå¸ EldenRingMap ç代ç ã