onnxruntime/tailwind.config.js
Maanav Dalal e8b82b6f3f
Large UX updates, replaced banner, moved analytics, linted everything (#20004)
https://maanavd.github.io/onnxruntime/

### Description
Many changes, most small, but quite a few. Listed here:

- Infinitely scrolling testimonial banner on homepage
- New Microsoft-approved cookie consent banner (only shows up in correct
regions, here's a screen of it working):
![image](https://github.com/microsoft/onnxruntime/assets/24942306/b210b55f-d0cb-413a-a5c7-7156e003414a)
You can duplicate this behavior if you want using: [this
link](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/wcp/privacy/wcp-cookie-consent-api#cookie-consent-library---javascript:~:text=siteConsent.manageConsent()%3B%0A%20%20%20%20%7D-,How%20to%20test%20if%20banner%20is%20loading%20for%20EU%20visitors,-You%20can%20use)
- removed SAOS animations, relying on native tailwind animations
- ran a linting pass
- easter egg for hovering onnxruntime pinwheel

---------

Co-authored-by: MaanavD <maanavdalal@microsoft.com>
2024-03-21 14:40:45 -07:00

54 lines
No EOL
1.1 KiB
JavaScript

import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette';
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,svelte,js,ts}'],
theme: {
extend: {
animation:{
scroll:
'scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite'
},
keyframes:{
scroll: {
to: {
transform: 'translate(calc(-50% - 0.5rem))'
}
}
}
}
},
plugins: [require('daisyui')],
daisyui: {
themes: [
{
darkmode: {
...require('daisyui/src/theming/themes')['[data-theme=business]'],
primary: '#0099cc',
'base-100': '#212933',
info: '#d1d1d1',
},
lightmode: {
...require('daisyui/src/theming/themes')['[data-theme=corporate]'],
primary: '#80dfff',
'base-100': '#f3f4f6',
info: '#d1d1d1',
}
}
],
base: true,
styled: true,
utils: true
}
};
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme('colors'));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
':root': newVars
});
}