![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
theme-class-generator
Advanced tools
A function which can generate theme style classes from a simple config
A function which can generate theme style classes from a simple config
Admin UI专用的主题样式类生成工具
let classes = themeClassGenerator({
theme: {
colors: { // 彩色配置,默认配置如下
primary: '#1c86e2',
info: '#68217a',
warning: '#f5ae08',
danger: '#ea3a46',
success: '#0cb470',
'custom-color': '#f00'
},
shadows: { // 阴影配置,默认配置如下
primary: '2px 2px 4px #1c86e2',
info: '2px 2px 4px #68217a',
warning: '2px 2px 4px #f5ae08',
danger: '2px 2px 4px #ea3a46',
success: '2px 2px 4px #0cb470',
'custom-shadow': '3px 3px 6px #00f'
},
radiuses: {
small: '3px',
large: '5px'
'custom-radius': '13px'
}
},
prefix: 'au-theme', // 样式类的前缀
lightnessReverse: false, // 反转lightness排序(黑白主题)
colorTopBottom: 10, // top和bottom颜色距离纯黑和纯白的lightness的距离,越小越接近纯黑纯白
colorUpDown: 10, // 彩色上下接近色与正色的lightness距离
baseColorLevel: 12, // 无彩色分级数量
baseColorHue: 10%, // 无彩色饱和度
baseShadowOpacity: 0.2, // 无彩色阴影不透明度
colorShadowOpacity: 0.6 // 彩色阴影不透明度
})
let style = document.createElement('style')
style.innerHTML = classes
document.getElementsByTagName('head')[0].appendChild(style)
具体使用详见Admin UI 文档 - 主题 章节
FAQs
A function which can generate theme style classes from a simple config
The npm package theme-class-generator receives a total of 52 weekly downloads. As such, theme-class-generator popularity was classified as not popular.
We found that theme-class-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.