优化:优化文章序号及部分图标样式
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -69,4 +69,45 @@ mjx-container {
|
||||
|
||||
mjx-container > svg {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.chinese-zodiac {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: -10.5px;
|
||||
top: -1px;
|
||||
background: #fff;
|
||||
border: 1px solid #84b9e5;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.text-color-red {
|
||||
--color-red: 254 45 70;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(var(--color-red)/var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-color-orange {
|
||||
--color-orange: 255 102 0;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(var(--color-orange)/var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-color-yellow {
|
||||
--color-yellow: 250 169 14;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(var(--color-yellow)/var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-color-gray {
|
||||
--color-gray: 145 149 163;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(var(--color-gray)/var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.mr-\[6px\] {
|
||||
margin-right: 6px;
|
||||
}
|
@@ -36,4 +36,24 @@ export function goToLink(url, paramName, paramValue) {
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生肖图标
|
||||
*
|
||||
* @param year 年份
|
||||
*/
|
||||
export function getChineseZodiac(year) {
|
||||
const arr = ['monkey', 'rooster', 'dog', 'pig', 'rat', 'ox', 'tiger', 'rabbit', 'dragon', 'snake', 'horse', 'goat'];
|
||||
return arr[year % 12];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生肖名称
|
||||
*
|
||||
* @param year 年份
|
||||
*/
|
||||
export function getChineseZodiacAlias(year) {
|
||||
const arr = ['猴年', '鸡年', '狗年', '猪年', '鼠年', '牛年', '虎年', '兔年', '龙年', '蛇年', '马年', '羊年'];
|
||||
return arr[year % 12];
|
||||
}
|
Reference in New Issue
Block a user