Skip to content

Commit

Permalink
CSS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Sep 4, 2022
1 parent fe9bee0 commit ac2ecc6
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 75 deletions.
8 changes: 4 additions & 4 deletions config/style/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

--color-base-foreground: 255, 255, 255;
--color-base-background: 245, 247, 251;
--color-base-200: 226, 232, 240;
--color-base-300: 203, 213, 225;
--color-base-muted: 226, 232, 240;
--color-base-border: 203, 213, 225;
--color-base-content: 0, 0, 0;
}

Expand All @@ -21,7 +21,7 @@

--color-base-background: 23,23,23;
--color-base-foreground: 38,38,38;
--color-base-200: 30, 41, 59;
--color-base-300: 55, 65, 81;
--color-base-muted: 30, 41, 59;
--color-base-border: 55, 65, 81;
--color-base-content: 255, 255, 255;
}
96 changes: 49 additions & 47 deletions src/assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,54 @@
@tailwind components;
@tailwind utilities;

:root {
--color-primary: 0, 0, 0;
--color-primary-content: 255, 255, 255;

:root {
--color-primary: 0, 0, 0;
--color-primary-content: 255, 255, 255;

--color-secondary: 14, 165, 233;
--color-secondary-content: 255, 255, 255;

--color-base-foreground: 255, 255, 255;
--color-base-background: 245, 247, 251;
--color-base-200: 226, 232, 240;
--color-base-300: 203, 213, 225;
--color-base-content: 0, 0, 0;
}

.dark {
--color-primary: 14, 165, 233;
--color-primary-content: 255, 255, 255;

--color-secondary: 14, 165, 233;
--color-secondary-content: 255, 255, 255;

--color-base-background: 23,23,23;
--color-base-foreground: 38,38,38;
--color-base-200: 30, 41, 59;
--color-base-300: 30, 41, 59;
--color-base-content: 255, 255, 255;
}

* {
box-sizing: content-box;
}

body {
@apply
font-main
bg-base-background
dark:text-slate-400;
}

a {
@apply
text-secondary-color;
hover:text-gray-900;
}
--color-secondary: 14, 165, 233;
--color-secondary-content: 255, 255, 255;

--color-base-foreground: 255, 255, 255;
--color-base-background: 245, 247, 251;
--color-base-muted: 226, 232, 240;
--color-base-border: 203, 213, 225;
--color-base-content: 0, 0, 0;

--color-map-georeference-marker: 239, 68, 68;
--color-map-asserted: 249, 115, 22;
}

.dark {
--color-primary: 14, 165, 233;
--color-primary-content: 255, 255, 255;

.dark {
color-scheme: dark;
}
--color-secondary: 14, 165, 233;
--color-secondary-content: 255, 255, 255;

--color-base-background: 23,23,23;
--color-base-foreground: 38,38,38;
--color-base-muted: 30, 41, 59;
--color-base-border: 30, 41, 59;
--color-base-content: 255, 255, 255;
}

* {
box-sizing: content-box;
}

body {
@apply
font-main
bg-base-background
dark:text-slate-400;
}

a {
@apply
text-secondary-color;
hover:text-gray-900;
}

.dark {
color-scheme: dark;
}
4 changes: 2 additions & 2 deletions src/components/Autocomplete/Autocomplete.global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
overflow-y-auto
border
bg-base-foreground
border-base-300
border-base-border
!m-0"
>
<li
Expand All @@ -63,7 +63,7 @@
cursor-pointer
hover:bg-secondary-color
hover:bg-opacity-5
border-base-300"
border-base-border"
@click="selectItem(item)"
>
<span v-html="item[label]" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card/VCard.global.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="border-1 card border-base-200 bg-base-foreground print:shadow-none print:border-0 rounded">
<div class="border-1 card border-base-muted bg-base-foreground print:shadow-none print:border-0 rounded">
<slot />
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card/VCardHeader.global.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="p-4 pl-5 pr-5 border-b font-medium border-base-200">
<div class="p-4 pl-5 pr-5 border-b font-medium border-base-muted">
<slot />
</div>
</template>
2 changes: 1 addition & 1 deletion src/components/Gallery/GalleryImage.global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
border
print:hidden
bg-base-0
border-base-200
border-base-muted
"
>
<div class="h-80 max-h-80 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Gallery/GalleryThumbnail.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
class="bg-base-background flex flex-col justify-center cursor-pointer w-24 max-h-20 h-20 border-base-200 rounded-md border"
class="bg-base-background flex flex-col justify-center cursor-pointer w-24 max-h-20 h-20 border-base-muted rounded-md border"
:title="title"
>
<img
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/LayoutHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="
relative
bg-header
border-base-200
border-base-muted
px-2
sm:px-4
py-2.5
Expand Down
8 changes: 1 addition & 7 deletions src/components/Map/VMap.global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,5 @@ const setGeoJSON = geojson => {
</script>
<style>
.leaflet-marker-icon {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: red;
opacity: 0.5;
}
</style>
2 changes: 1 addition & 1 deletion src/components/Map/markers/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import L from 'leaflet'

export const squareMarker = L.divIcon({
className: 'leaflet-marker-icon',
className: 'bg-map-georeference bg-opacity-50 rounded-full',
iconSize: [8, 8],
iconAnchor: [4, 4]
})
2 changes: 1 addition & 1 deletion src/components/Map/utils/geojsonOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default ({
style: (feature) => {
if (feature.properties?.base?.type === 'AssertedDistribution') {
return {
color: generateHue(5),
color: 'rgb(var(--color-map-asserted))',
weight: 1,
dashArray: '3',
dashOffset: '3',
Expand Down
6 changes: 3 additions & 3 deletions src/components/Navbar/NavbarMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
print:hidden"
>
<nav class="font-normal container mx-auto">
<ul class="flex flex-col m-0 p-0 border-t border-base-300">
<ul class="flex flex-col m-0 p-0 border-t border-base-border">
<li
v-for="(item, index) in header_links"
:key="index"
class="border-b border-base-300"
class="border-b border-base-border"
>
<router-link
:to="item.link"
Expand All @@ -51,7 +51,7 @@
</router-link>
</li>
<li>
<SwitchTheme class="text-base-content p-4 pt-3 pb-3 border-b w-full border-base-300" />
<SwitchTheme class="text-base-content p-4 pt-3 pb-3 border-b w-full border-base-border" />
</li>
</ul>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/otus/components/Content/ContentTopic.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<VCardHeader class="border-t border-base-200 first:border-t-0">
<VCardHeader class="border-t border-base-muted first:border-t-0">
{{ title }}
</VCardHeader>
<VCardContent>
Expand Down
10 changes: 10 additions & 0 deletions src/modules/otus/components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
:geojson="geojson"
@geojson:ready="isLoading = false"
/>
<div v-if="false" class="text-sm flex flex-row justify-around">
<div class="flex flex-row items-center p-2">
<div class="w-3 h-3 bg-map-georeference m-1" />
<span>Georeference</span>
</div>
<div class="flex flex-row items-center p-2 ">
<div class="w-3 h-3 m-1 bg-map-asserted" />
<span>Asserted distribution</span>
</div>
</div>
</VCard>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/modules/otus/services/OtuService.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export default class OtuService {
}

static getContent (otuId) {
return makeAPIRequest.get(`/otus/${otuId}/inventory/content`)
return makeAPIRequest.get(`/otus/${otuId}/inventory/content`, { extend: ['depiction']})
}
}
2 changes: 1 addition & 1 deletion src/modules/otus/views/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="
bg-base-foreground
border-b
border-base-200
border-base-muted
pl-4
pr-4"
>
Expand Down
9 changes: 7 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ module.exports = {
base: {
background: withOpacity('--color-base-background'),
foreground: withOpacity('--color-base-foreground'),
200: withOpacity('--color-base-200'),
300: withOpacity('--color-base-300'),
muted: withOpacity('--color-base-muted'),
border: withOpacity('--color-base-border'),
content: withOpacity('--color-base-content')
},

map: {
georeference: withOpacity('--color-map-georeference-marker'),
asserted: withOpacity('--color-map-asserted')
},

primary: {
color: withOpacity('--color-primary'),
content: withOpacity('--color-primary-content')
Expand Down

0 comments on commit ac2ecc6

Please sign in to comment.