Skip to content

Commit

Permalink
feat(challenge): Implement details of pass rate
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Oct 3, 2024
1 parent a8a3fb1 commit ec67dff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ ul.credit {
li {
@extend .list-inline-item;
}

&__pass_rate {
&__value {
@extend .text-body;

border-bottom: 1px dotted black;
text-decoration: none;
}
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion templates/components/Challenge/Header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
<ul class="challenge-header__lists">
<li class="challenge-header__lists__difficulty">{{ question.difficulty|trans }}</li>
<li class="challenge-header__lists__type">{{ question.type }}</li>
<li class="challenge-header__lists__pass_rate">通過率 {{ question.passRate }}%</li>
<li class="challenge-header__lists__pass_rate">
通過率
<a class="challenge-header__lists__pass_rate__value" href="#" rel="help" data-bs-toggle="tooltip"
data-bs-placement="bottom"
data-bs-title="{{ question.totalAttemptCount }} 次挑戰中有 {{ question.totalSolvedCount }} 次成功">
{{ question.passRate }}%
</a>
</li>
</ul>

<div class="d-flex justify-content-between align-items-end mt-1">
Expand Down

0 comments on commit ec67dff

Please sign in to comment.