fix(home): 当首页个人说明过长时将会截断

fix #248
This commit is contained in:
LIlGG 2022-04-05 13:05:47 +08:00
parent be22153fab
commit 0424371e4b
8 changed files with 24 additions and 12 deletions

View File

@ -2,7 +2,7 @@
<p align="center"> <p align="center">
<a href="https://github.com/halo-dev/halo"><img alt="Halo version" src="https://img.shields.io/badge/halo-1.4.3%2B-brightgreen?style=for-the-badge" /></a> <a href="https://github.com/halo-dev/halo"><img alt="Halo version" src="https://img.shields.io/badge/halo-1.4.3%2B-brightgreen?style=for-the-badge" /></a>
<a href="https://github.com/LIlGG/halo-theme-sakura"><img alt="Build Status" src="https://img.shields.io/badge/build-positive-brightgreen?style=for-the-badge"></a> <a href="https://github.com/LIlGG/halo-theme-sakura"><img alt="Build Status" src="https://img.shields.io/badge/build-positive-brightgreen?style=for-the-badge"></a>
<a href="https://github.com/prettier/prettier"><img alt="Code Style: Prettier" src="https://img.shields.io/badge/release-1.3.3-blue?style=for-the-badge"></a> <a href="https://github.com/prettier/prettier"><img alt="Code Style: Prettier" src="https://img.shields.io/badge/release-1.3.4-blue?style=for-the-badge"></a>
<a href="./LICENSE"><img alt="LICENSE MIT" src="https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge"></a> <a href="./LICENSE"><img alt="LICENSE MIT" src="https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge"></a>
</p> </p>
<p align="center"> <p align="center">

View File

@ -24,7 +24,7 @@
</#if> </#if>
<div class="header-info no-select <div class="header-info no-select
<#if user.description?default("")?trim?length gt 1> <#if user.description?default("")?trim?length gt 1>
info-desc"><p><i class="fa fa-quote-left"></i>${user.description}<i class="fa fa-quote-right"></i></p> info-desc"><p><i class="fa fa-quote-left"></i><span class="desc">${user.description}</span><i class="fa fa-quote-right"></i></p>
<#else> <#else>
"> ">
</#if> </#if>

View File

@ -1,6 +1,6 @@
{ {
"name": "halo-theme-sakura", "name": "halo-theme-sakura",
"version": "1.3.3", "version": "1.3.4",
"description": "<h1 align=\"center\">Sakura<img src=\"https://media.giphy.com/media/mGcNjsfWAjY5AEZNw6/giphy.gif\" width=\"50\"></h1>\r <p align=\"center\">\r <a href=\"https://lixingyong.com\">预览</a> | <a href=\"#安装主题\">安装</a> | <a href=\"https://lixingyong.com/s/halo-theme-sakure\">更新日志</a>\r </p>", "description": "<h1 align=\"center\">Sakura<img src=\"https://media.giphy.com/media/mGcNjsfWAjY5AEZNw6/giphy.gif\" width=\"50\"></h1>\r <p align=\"center\">\r <a href=\"https://lixingyong.com\">预览</a> | <a href=\"#安装主题\">安装</a> | <a href=\"https://lixingyong.com/s/halo-theme-sakure\">更新日志</a>\r </p>",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -5,7 +5,7 @@
* @version 1.0 * @version 1.0
*/ */
var Util = { var Util = {
_version: '1.3.3', _version: '1.3.4',
/** /**
* 获取当前浏览器语言 * 获取当前浏览器语言
* 使用当前方法只会得到语言前两个字符 * 使用当前方法只会得到语言前两个字符
@ -44,7 +44,7 @@ var Util = {
/** /**
* 获取存储在浏览器 cookie 内的数据 * 获取存储在浏览器 cookie 内的数据
* @param {String} key * @param {String} key
* @return 如果没能获取到数据则返回 null否则返回目标数据字符串 * @return 如果没能获取到数据则返回 null否则返回目标数据字符串
*/ */
getCookie: function (key) { getCookie: function (key) {
@ -125,7 +125,7 @@ var Util = {
}, },
/** /**
* 异步加载 JS * 异步加载 JS
* @param {*} url 需要加载 JS 地址 * @param {*} url 需要加载 JS 地址
* @param {*} callback 加载完成回调 * @param {*} callback 加载完成回调
*/ */
@ -598,7 +598,7 @@ Log.ENABLE_VERBOSE = true;
/** /**
* 自定义异常 * 自定义异常
* @param {*} message * @param {*} message
*/ */
var RuntimeException = function (message) { var RuntimeException = function (message) {
this._message = message; this._message = message;
@ -616,4 +616,4 @@ var RuntimeException = function (message) {
return this.name + ': ' + this.message; return this.name + ': ' + this.message;
} }
} }
} }

2
script/utils.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
@charset "utf-8"; @charset "utf-8";
/* /*
Description: Halo 版本的 Sakura 主题原版地址 https://github.com/mashirozx/Sakura Description: Halo 版本的 Sakura 主题原版地址 https://github.com/mashirozx/Sakura
Version: 1.3.3 Version: 1.3.4
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: LIlGG Text Domain: LIlGG
@ -3859,6 +3859,18 @@ li.feature-2 {
white-space: nowrap; white-space: nowrap;
} }
/**
* fix #248
*/
.info-desc .desc {
width: 94%;
overflow: hidden;
white-space: nowrap;
text-overflow: clip;
word-break: keep-all;
display: inline-flex;
}
.top-social { .top-social {
height: 32px; height: 32px;
margin-top: 30px; margin-top: 30px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long