Skip to content

Commit

Permalink
fix biome
Browse files Browse the repository at this point in the history
  • Loading branch information
Bigismall committed Nov 11, 2024
1 parent e76e92a commit 3725b05
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"quoteStyle": "single"
}
}
}
}
12 changes: 8 additions & 4 deletions src/layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ export const osmLayers: Record<LayerName, L.TileLayer[]> = {
}),
],
Rail: [
L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
}),
L.tileLayer(
'https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
{
attribution: 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ',
maxZoom: 16,
},
),

L.tileLayer('https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', {
attribution:
'Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors | Map style: &copy; <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',
Expand Down
134 changes: 67 additions & 67 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@
--color--slate-200: #bfc7d9;
--color--slate-150: #cfd5e2;
--color--slate-100: #dfe3eb;
--color--slate-50 : #eff1f4;
--color--slate : var(--color--slate-600);
--color-red-450 : #ee402e;

font-family : Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height : 1.5;
font-weight : 400;
font-size : clamp(10px, 1.5vw, 16px);
color : var(--color--slate-750, #333c4e);
background-color : var(--color--slate-50, #eff1f4);
font-synthesis : none;
text-rendering : optimizeLegibility;
-webkit-font-smoothing : antialiased;
--color--slate-50: #eff1f4;
--color--slate: var(--color--slate-600);
--color-red-450: #ee402e;

font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
font-size: clamp(10px, 1.5vw, 16px);
color: var(--color--slate-750, #333c4e);
background-color: var(--color--slate-50, #eff1f4);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

body {
margin : 0;
padding : 0;
width : 100%;
height : 100vh;
overflow : hidden;
display : block;
position : relative;
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: hidden;
display: block;
position: relative;
accent-color: var(--color-red-450, #ee402e);
}

Expand All @@ -49,30 +49,30 @@ body {
}

header {
margin : 0;
padding : 0 1rem 0 1rem;
height : 2rem;
background-color : var(--color--slate, #525f7a);
color : var(--color--slate-50, #eff1f4);
display : grid;
margin: 0;
padding: 0 1rem 0 1rem;
height: 2rem;
background-color: var(--color--slate, #525f7a);
color: var(--color--slate-50, #eff1f4);
display: grid;
grid-template-columns: 1fr 5.3125rem 1fr;
justify-content : space-between;
align-items : stretch;
flex-direction : row;
justify-content: space-between;
align-items: stretch;
flex-direction: row;
}

.layout {
margin : 0;
padding : 0;
margin: 0;
padding: 0;
place-items: center;
width : 100%;
height : calc(100vh - 2rem);
overflow : hidden;
width: 100%;
height: calc(100vh - 2rem);
overflow: hidden;

display : grid;
display: grid;
grid-template-columns: 50% 50%;
justify-content : space-between;
align-items : stretch;
justify-content: space-between;
align-items: stretch;
}

.layout.w50 {
Expand All @@ -86,38 +86,38 @@ header {
.layout__left,
.layout__right {
display: block;
width : 100%;
height : 100%;
width: 100%;
height: 100%;
}

.layout__frame {
display: block;
margin : 0;
margin: 0;
padding: 0;
border : none;
border: none;
}

.axis {
position : absolute;
top : 0;
left : 0;
display : block;
position: absolute;
top: 0;
left: 0;
display: block;
background-color: var(--color-red-450, #ee402e);
z-index : 2000;
pointer-events : none;
z-index: 2000;
pointer-events: none;
}

.axis__horizontal {
top : calc(50% - 1rem);
left : 0;
width : 100vw;
top: calc(50% - 1rem);
left: 0;
width: 100vw;
height: 1px;
}

.axis__vertical {
top : 2rem;
left : 0;
width : 1px;
top: 2rem;
left: 0;
width: 1px;
height: calc(100vh - 2rem);
}

Expand All @@ -138,12 +138,12 @@ body:has(.layout.w66) .axis__vertical--right {
}

.choice {
display : flex;
flex-direction : row;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items : stretch;
flex-wrap : nowrap;
gap : 0;
align-items: stretch;
flex-wrap: nowrap;
gap: 0;
}

.choice.js-map-type {
Expand All @@ -154,21 +154,21 @@ body:has(.layout.w66) .axis__vertical--right {
display: none;
}

.choice input:checked+label {
color : var(--color--slate-50, #eff1f4);
.choice input:checked + label {
color: var(--color--slate-50, #eff1f4);
background-color: var(--color-red-450, #ee402e);
}

.choice label {
display : block;
margin : 0;
padding : 0 0.5rem;
height : auto;
display: block;
margin: 0;
padding: 0 0.5rem;
height: auto;
line-height: 2rem;
cursor : pointer;
transition : background-color 0.2s ease-in-out;
cursor: pointer;
transition: background-color 0.2s ease-in-out;
}

.choice label:hover {
background-color: var(--color-red-450, #ee402e);
}
}
14 changes: 4 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
Expand All @@ -19,9 +15,7 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"include": [
"src"
]
}
"include": ["src"]
}
14 changes: 8 additions & 6 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import biomePlugin from 'vite-plugin-biome';

export default {
base: '/dualmap/',
plugins: [biomePlugin({
mode: 'check',
files: 'src/*.ts',
applyFixes: true
})],
base: '/dualmap/',
plugins: [
biomePlugin({
mode: 'check',
files: '.',
applyFixes: true,
}),
],
};

0 comments on commit 3725b05

Please sign in to comment.