mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 12:41:20 +08:00
feat: add cargo
cheatsheet.
This commit is contained in:
@ -3,13 +3,23 @@ import path from 'path';
|
||||
import { getSVGNode, ICONS_PATH } from './getSVGNode.mjs';
|
||||
|
||||
export function homeCardIcons(node, parent, isHome) {
|
||||
if (isHome && node && node.type === 'element' && node.properties?.class?.includes('contributing')) {
|
||||
if (
|
||||
isHome &&
|
||||
node &&
|
||||
node.type === 'element' &&
|
||||
(node.properties?.class || node.properties?.className)?.includes('contributing')
|
||||
) {
|
||||
const info = node.properties['data-info'];
|
||||
if (!info) {
|
||||
node.properties['data-info'] = '👆待完善需要您的参与';
|
||||
}
|
||||
}
|
||||
if (isHome && node && node.type === 'element' && node.properties?.class?.includes('home-card')) {
|
||||
if (
|
||||
isHome &&
|
||||
node &&
|
||||
node.type === 'element' &&
|
||||
(node.properties?.class || node.properties?.className)?.includes('home-card')
|
||||
) {
|
||||
node.children = node.children.map((child) => {
|
||||
const href = child.properties?.href;
|
||||
if (href) {
|
||||
|
Reference in New Issue
Block a user