Skip to content

Commit 79e97de

Browse files
committed
polish
1 parent 25c2744 commit 79e97de

4 files changed

Lines changed: 21 additions & 15 deletions

File tree

content/assets/tree3d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tags:
1414
---
1515

1616

17-
{{< timer/timer title="Free Download" link="https://drive.google.com/file/d/1Yhpeiz0uGWgJhYcjNDVsBFqAinhzDHVZ/view?usp=drive_link" timer="true" >}}
17+
{{< timer/timer title="Free Download" link="https://drive.google.com/file/d/1Yhpeiz0uGWgJhYcjNDVsBFqAinhzDHVZ/view?usp=drive_link" timer="true" showbutton="false" >}}
1818

1919

2020

content/blog/blender/snake-3d-model-tutorial-blender-asset.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ POWERHOUSE A16 BIONIC CHIP — The superfast chip powers advanced features like
3030

3131
### Free 3D Model 🧊
3232

33+
<div style="text-align:center">
34+
<h4>Click and wait for 20 seconds 👇
35+
</div>
36+
3337
{{< timer/timer title="Free Download" link="/assets/download/" >}}
3438

3539

content/blog/blender/tree3d-blender-3d-model.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ POWERHOUSE A16 BIONIC CHIP — The superfast chip powers advanced features like
3131

3232
### Free 3D Model 🧊
3333

34+
<div style="text-align:center">
35+
<h4>Click and wait for 20 seconds 👇
36+
</div>
37+
3438
{{< timer/timer title="Free Download" link="/assets/tree3d/" >}}
3539

3640

layouts/shortcodes/timer/timer.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
{{ $title := .Get "title" }}
2-
{{ $link := .Get "link" }}
3-
{{ $timer := .Get "timer" | default "false" }}
4-
{{ $showbutton := .Get "showbutton" | default "true" }}
5-
6-
{{ if eq $timer "true" }}
1+
{{ $title := .Get "title" }} {{ $link := .Get "link" }} {{ $timer := .Get
2+
"timer" | default "false" }} {{ $showbutton := .Get "showbutton" | default
3+
"true" }} {{ if eq $timer "true" }}
74
<div class="timer-container">
8-
{{/* {{ if eq $showbutton "true" }}
5+
{{/* {{ if eq $showbutton "true" }}
96
<button class="timer-btn" data-link="{{ $link }}">{{ $title }}</button>
10-
{{ end }} */}}
7+
{{ end }} */}}
118
<span class="timer-label"></span>
129
<progress class="timer-progress" value="0" max="20"></progress>
1310
</div>
1411

1512
{{ else if eq $showbutton "true" }}
16-
<a href="{{ $link }}" class="timer-btn">
17-
{{ $title }}
18-
</a>
13+
<a href="{{ $link }}" class="timer-btn"> {{ $title }} </a>
1914
{{ end }}
2015

2116
<script>
@@ -48,11 +43,11 @@
4843
var progress = document.querySelector(".timer-progress");
4944
var link = "{{ $link }}";
5045
var countdown = 20;
51-
label.textContent = " Redirecting in " + countdown + "s...";
46+
label.textContent = " Downloading in " + countdown + "s...";
5247
progress.value = 0;
5348
var timer = setInterval(function () {
5449
countdown--;
55-
label.textContent = " Redirecting in " + countdown + "s...";
50+
label.textContent = " Downloading in " + countdown + "s...";
5651
progress.value = 20 - countdown;
5752
if (countdown <= 0) {
5853
clearInterval(timer);
@@ -62,7 +57,6 @@
6257
});
6358
</script>
6459

65-
6660
<style>
6761
.timer-btn {
6862
margin-top: 1.5rem;
@@ -77,18 +71,21 @@
7771
text-decoration: none;
7872
text-align: center;
7973
width: -webkit-fill-available;
74+
font-size: 1.2rem;
8075
}
8176
.timer-btn:disabled {
8277
background: #aaa;
8378
cursor: not-allowed;
8479
}
8580
.timer-label {
8681
margin-top: 1.5rem;
82+
margin-bottom: 1.5rem;
8783
margin-left: 10px;
8884
color: #333;
8985
font-weight: bold;
9086
display: block;
9187
text-align: center;
88+
font-size: 1.5rem;
9289
}
9390

9491
.timer-progress {
@@ -98,6 +95,7 @@
9895
appearance: none;
9996
background-color: #e0e0e0;
10097
overflow: hidden;
98+
margin-bottom: 1.5rem;
10199
}
102100
.timer-progress::-webkit-progress-bar {
103101
background-color: #e0e0e0;

0 commit comments

Comments
 (0)