Skip to content

Commit

Permalink
优化图片显示效果;更换字节跳动的 cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyjay committed Jul 22, 2022
1 parent e111979 commit 7515499
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ Both api automatically return the corresponding cross-domain header based on the
- scheduled job to clearing historical logs
- support 8 free image-hosting
### Optimization
- Left and right page flip arrows are now automatically hidden
- Show work title and author name when hovering
- Picture display effect
- Left and right arrows will auto hidden now
- Show works title and author name when hovering
- Upgrade front-end dependency package to the latest, reduce dependency
- Improve logging function
- Enrich interface data to fit more scenarios
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
- clear-log 任务用于清除历史日志文件
- 共计 8 个国内外公开、免费的图床
### 优化
- 图片显示效果
- 左右翻页箭头现在会自动隐藏了
- 鼠标悬浮时显示作品标题及作者名称
- 升级前端依赖包至最新、减少依赖
Expand Down
8 changes: 4 additions & 4 deletions app/Views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pixiv 每日排行榜 Top<?=Config::$limit?> 小挂件</title>

<link rel="stylesheet" href="https://cdn.staticfile.org/bootstrap/5.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/5.1.3/css/bootstrap.min.css">
<style>
body { background: <?=Config::$background_color?>; }

Expand All @@ -22,7 +22,7 @@
.carousel-item a div {
background-position : center;
background-repeat : no-repeat;
background-attachment : fixed;
background-size: contain;
}

/* 左右翻页箭头动画、隐藏 bs 自带的箭头 */
Expand Down Expand Up @@ -111,7 +111,7 @@ function gtag(){dataLayer.push(arguments);}
</script>
</head>
<body>
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="false">
<div class="carousel-inner">
<?php foreach ($pixivJson['data'] as $k => $data): ?>
<?php if ($k >= Config::$limit) break; ?>
Expand Down Expand Up @@ -144,6 +144,6 @@ function gtag(){dataLayer.push(arguments);}
<span class="visually-hidden">Next</span>
</button>
</div>
<script src="https://cdn.staticfile.org/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>

0 comments on commit 7515499

Please sign in to comment.