mirror of
https://git.nolog.cz/NoLog.cz/headline.git
synced 2025-01-31 03:43:35 +01:00
Refactor
This commit is contained in:
parent
2c25b261d4
commit
90b9f67827
2 changed files with 17 additions and 14 deletions
16
view/helpers.ts
Normal file
16
view/helpers.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* No-op tag function for CSS tagged templates, which works only as a hint for IDE for CSS syntax highlighting.
|
||||
*/
|
||||
export function css(
|
||||
strings: TemplateStringsArray,
|
||||
...exprs: Array<unknown>
|
||||
): string {
|
||||
let result = strings[0];
|
||||
|
||||
for (let i = 1, l = strings.length; i < l; i++) {
|
||||
result += exprs[i - 1];
|
||||
result += strings[i];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import { defineConfig } from "unocss";
|
||||
import presetMini, { theme, Theme } from "@unocss/preset-mini";
|
||||
import { css } from "./helpers";
|
||||
|
||||
const globalCss = (theme: Required<Theme>) => css`
|
||||
/* This file is dynamically generated. Do not edit this file. */
|
||||
|
@ -264,20 +265,6 @@ const globalCss = (theme: Required<Theme>) => css`
|
|||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* No-op tag function for CSS tagged templates, which works only as a hint for IDE for CSS syntax highlighting.
|
||||
*/
|
||||
function css(strings: TemplateStringsArray, ...exprs: Array<unknown>): string {
|
||||
let result = strings[0];
|
||||
|
||||
for (let i = 1, l = strings.length; i < l; i++) {
|
||||
result += exprs[i - 1];
|
||||
result += strings[i];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
presets: [presetMini()],
|
||||
theme: {
|
||||
|
|
Loading…
Reference in a new issue