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
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

on:
pull_request:
paths:
- 'static/**'
- 'package.json'
- 'biome.json'
push:
branches:
- main
paths:
- 'static/**'
- 'package.json'
- 'biome.json'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run Biome
run: npm run lint
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ instance/

# Virtual environment
venv/
.venv/
env/

# Node.js
node_modules/

# Biome
.biome/

# IDEs and editors
.vscode/
.idea/
Expand Down
26 changes: 26 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off"
},
"style": {
"noUselessElse": "off",
"useExponentiationOperator": "off",
"noParameterAssign": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
}
},
"ignore": ["**/.venv/**", "**/node_modules/**", "**/__pycache__/**"]
},
"formatter": {
"ignore": ["**/.venv/**", "**/node_modules/**", "**/__pycache__/**"]
}
}
179 changes: 179 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "btcmap-admin",
"version": "0.1.0",
"description": "BTC Map Admin - Frontend dev tools",
"private": true,
"scripts": {
"lint": "biome check .",
"format": "biome format --write .",
"lint:fix": "biome check --write ."
},
"devDependencies": {
"@biomejs/biome": "^1.9.0"
}
}
6 changes: 3 additions & 3 deletions static/css/map.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#map {
height: 400px;
width: 100%;
margin-bottom: 20px;
height: 400px;
width: 100%;
margin-bottom: 20px;
}
68 changes: 34 additions & 34 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
body {
padding-top: 5rem;
padding-top: 5rem;
}

.starter-template {
padding: 3rem 1.5rem;
text-align: center;
padding: 3rem 1.5rem;
text-align: center;
}

.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}

.form-signin .form-control {
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
}

.form-signin .form-control:focus {
z-index: 2;
z-index: 2;
}

.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

/* Area details table - prevent field value overflow */
#tags-table {
table-layout: fixed;
width: 100%;
table-layout: fixed;
width: 100%;
}

#tags-table th:first-child,
#tags-table td:first-child {
width: 15%;
width: 15%;
}

#tags-table th:nth-child(2),
#tags-table td:nth-child(2) {
width: 65%;
width: 65%;
}

#tags-table th:last-child,
#tags-table td:last-child {
width: 20%;
white-space: nowrap;
width: 20%;
white-space: nowrap;
}

/* Action buttons - standalone with spacing */
#tags-table .btn-group {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
}

#tags-table .btn-group .btn {
border-radius: 0.25rem !important;
border-radius: 0.25rem !important;
}

#tags-table .tag-value-cell {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}

#tags-table .tag-value-content {
display: block;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
display: block;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}
Loading