Skip to content

Commit

Permalink
CSS and tailwind changes
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Jul 1, 2022
1 parent 5b92c97 commit 4fa2a4b
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 87 deletions.
17 changes: 17 additions & 0 deletions src/assets/css/leaflet.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:root {
--map-tiles-filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

@media (prefers-color-scheme: dark) {
.map-tiles {
filter:var(--map-tiles-filter, none);
}
}

.dark {
color-scheme: dark;

.map-tiles {
filter:var(--map-tiles-filter, none);
}
}
7 changes: 7 additions & 0 deletions src/assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
@import '@/assets/css/tailwind.css';
@import 'leaflet/dist/leaflet.css';
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400;500;700&display=swap');
@import '@/assets/css/leaflet.scss';

* {
box-sizing: content-box;
}

body {
@apply bg-gray-100;
@apply dark:bg-gray-900;
@apply font-inter;
@apply dark:text-slate-400;
}

.dark {
color-scheme: dark;
}
33 changes: 30 additions & 3 deletions src/components/Autocomplete/Autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,26 @@
<input
v-model="typed"
type="text"
class="autocomplete__input block box-border min-w-full p-2 pl-10 text-gray-900 bg-gray-50 rounded-lg border border-gray-300 sm:text-sm focus:ring-blue-500 focus:border-blue-500"
class="
autocomplete__input
block
box-border
min-w-full
p-2
pl-10
text-gray-900
bg-gray-50
dark:bg-slate-700
dark:text-white
rounded-md
border
dark:border-gray-800
border-gray-300
dark:border-gray-800
sm:text-sm
dark:placeholder:text-white
focus:ring-primary-500
focus:border-primary-500"
:placeholder="placeholder"
>
<AutocompleteSpinner
Expand All @@ -35,12 +54,20 @@

<ul
v-if="list.length"
class="autocomplete__list list absolute z-[500] max-h-52 overflow-y-auto border bg-white"
class="autocomplete__list list absolute z-[500] max-h-52 overflow-y-auto border bg-white dark:bg-gray-800 dark:border-gray-700"
>
<li
v-for="item in list"
:key="item.id"
class="autocomplete__item p-2 border-b bg-white text-sm cursor-pointer hover:bg-gray-200"
class="
autocomplete__item
p-2 border-b
bg-white
text-sm
cursor-pointer
hover:bg-gray-200
dark:border-gray-700
dark:bg-gray-800"
@click="selectItem(item)"
>
<span v-html="item[label]" />
Expand Down
10 changes: 5 additions & 5 deletions src/components/Breadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ul class="inline-flex items-center space-x-1 flex-wrap">
<ul class="inline-flex items-center flex-wrap">
<li
v-for="(item, key, index) in list"
:key="item.id"
Expand All @@ -20,7 +20,7 @@
</svg>
<router-link
v-if="item.length === 1"
class="inline-flex items-center text-sm text-accent-100 hover:text-gray-900"
class="inline-flex items-center text-sm text-accent-100 hover:text-gray-900 text-primary-500"
:to="{ name: 'otus-id', params: { id: item[0].id } }"
>
{{ key }}
Expand All @@ -34,7 +34,7 @@
</li>

<li
class="inline-flex items-center"
class="inline-flex items-center ml-0"
>
<svg
class="w-4 h-4 text-gray-400"
Expand All @@ -57,9 +57,9 @@
</template>

<script setup>
import BreadcrumbDropdown from './BreadcrumbDropdown.vue';
import BreadcrumbDropdown from './BreadcrumbDropdown.vue'
const props = defineProps({
defineProps({
list: {
type: Object,
default: () => ({})
Expand Down
8 changes: 4 additions & 4 deletions src/components/BreadcrumbDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div class="relative">
<div>
<button
class="inline-flex items-center text-sm text-gray-700 hover:text-gray-900"
class="inline-flex items-center text-sm hover:text-gray-900 text-primary-500 dark:hover:text-gray-500"
@click="dropdownOpen = !dropdownOpen"
>
<slot />
<svg
class="h-5 w-5 text-gray-800 print:hidden"
class="h-5 w-5 text-primary-500 print:hidden"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
Expand All @@ -28,12 +28,12 @@

<div
v-if="dropdownOpen"
class="absolute right-0 py-2 bg-white rounded-md shadow-xl z-20"
class="absolute right-0 py-2 bg-white dark:bg-gray-900 rounded-md shadow-xl z-20"
>
<router-link
v-for="otu in list"
:key="otu.id"
class="block px-4 py-2 text-sm capitalize text-gray-700 hover:bg-blue-500 hover:text-white"
class="block px-4 py-2 text-sm capitalize text-gray-700 dark:text-slate-400 hover:bg-gray-700 hover:text-white"
:to="{ name: 'otus-id', params: { id: otu.id } }"
>
{{ otu.name || key }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card/VCardHeader.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="text-fonts-500 p-4 uppercase text-sm dark:text-slate-200">
<div class="p-4 uppercase text-sm dark:text-slate-200">
<slot />
</div>
</template>
2 changes: 1 addition & 1 deletion src/components/Layout/LayoutHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
rounded
border-b
dark:border-b-gray-800
dark:bg-gray-900
dark:bg-gray-800/50
pl-4
pr-4
h-9
Expand Down
3 changes: 2 additions & 1 deletion src/components/Map/VMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ let geoJSONGroup = new L.FeatureGroup()
const leafletMap = ref(null)
const tiles = {
osm: L.tileLayer(map_server_tils, {
maxZoom: 18
maxZoom: 18,
className: 'map-tiles'
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ copyright: All content is CC 0 so that it maybe be shared throughout the world i
citation: Project collaborative. 2022. Website title. Available at https://example.com.
---
<div class="container mx-auto mt-4 pl-4 pr-4">
<div class="prose lg:prose-base max-w-none">
<div class="prose dark:prose-invert lg:prose-base max-w-none">

# {{frontmatter.title}}

Expand Down
2 changes: 1 addition & 1 deletion src/content/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lead: Taxa from your imagination to the web
project: Your project
---
<div class="container mx-auto mt-4 pl-4 pr-4">
<div class="prose lg:prose-base max-w-none">
<div class="prose dark:prose-invert lg:prose-base max-w-none">

# {{frontmatter.title}}
_{{frontmatter.lead}}_
Expand Down
90 changes: 20 additions & 70 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// https://colors.muz.li/palette/24AADB/198599/2c4bdb/24db44/199930
const colors = require('tailwindcss/colors')

module.exports = {
content: [
"./index.html",
Expand All @@ -13,76 +14,25 @@ module.exports = {
inter: ['Inter', 'sans-serif']
},
colors: {
'primary': { // Sky
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e'
},
'secondary-2': {
50: '#ecfeff', //Cyan
100: '#cffafe',
200: '#a5f3fc',
300: '#67e8f9',
400: '#22d3ee',
500: '#06b6d4',
600: '#0891b2',
700: '#0e7490',
800: '#155e75',
900: '#164e63'
},
'secondary-3': { // Indigo
50: '#eef2ff',
100: '#e0e7ff',
200: '#c7d2fe',
300: '#a5b4fc',
400: '#818cf8',
500: '#6366f1',
600: '#4f46e5',
700: '#4338ca',
800: '#3730a3',
900: '#312e81'
},
'secondary-4': { // Green
50: '#f0fdf4',
100: '#dcfce7',
200: '#bbf7d0',
300: '#86efac',
400: '#4ade80',
500: '#22c55e',
600: '#16a34a',
700: '#15803d',
800: '#166534',
900: '#14532d'
},
'secondary-5': { // Lime
50: '#f7fee7',
100: '#ecfccb',
200: '#d9f99d',
300: '#bef264',
400: '#a3e635',
500: '#84cc16',
600: '#65a30d',
700: '#4d7c0f',
800: '#3f6212',
900: '#365314'
},
'fonts': {
50: '#24DBB1', //primary font
100: '#C1BFC4', //secondary herader font
200: '#858388', //secondary font
400: '#7D7C80', //grayed out text
600: '#727E87', //primary header font
800: '#3E9AFC', //link blue
},

'primary': colors.sky,
'secondary-2': colors.cyan,
'secondary-3': colors.indigo,
'secondary-4': colors.green,
'secondary-5': colors.lime
},
typography: ({ theme }) => ({
DEFAULT: {
css: {
'--tw-prose-links': theme('colors.primary[500]'),
},
},
invert: {
css: {
'--tw-prose-links': theme('colors.primary[500]'),
}
}
}),

screens: {
'print': {'raw': 'print'}
}
Expand Down

0 comments on commit 4fa2a4b

Please sign in to comment.