fix/progress bar limitation added
This commit is contained in:
1 parent
629e4f8ae8
commit
043c24a417
3 files changed
+5
-5
No files matched your search
@@ -22,11 +22,11 @@
|
||||
</div>
|
||||
<strong class="text-green-500">
|
||||
<div class="float-right mb-2">
|
||||
<%=Math.floor(plan.progress) %>% complete
|
||||
<%=Math.floor(plan.progress) > 100 ? 100 : Math.floor(plan.progress) %>% complete
|
||||
</div>
|
||||
<div class="bg-gray-400 mt-7">
|
||||
<div class="bg-green-600 h-2.5 rounded-full dark:bg-green-500"
|
||||
style="width: <%= plan.progress %>%;"></div>
|
||||
style="width: <%= plan.progress > 100 ? 100 : plan.progress %>%;"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<div>
|
||||
<div class="flex justify-between mb-1">
|
||||
<span class="text-sm font-medium text-blue-700 dark:text-blue-400">Progress</span>
|
||||
<span class="text-sm font-medium text-blue-700 dark:text-blue-400"><%= plan.progress %>%</span>
|
||||
<span class="text-sm font-medium text-blue-700 dark:text-blue-400"><%-plan.progress > 100 ? 100 : plan.progress%>%</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-3 dark:bg-gray-700">
|
||||
<div class="bg-blue-600 h-3 rounded-full dark:bg-blue-500" style="width: <%= plan.progress %>%;"></div>
|
||||
<div class="bg-blue-600 h-3 rounded-full dark:bg-blue-500" style="width: <%= plan.progress > 100 ? 100 : plan.progress %>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
<a href="/plans/<%= plan._id %>" class="block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
|
||||
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"><%= plan.name %></h5>
|
||||
<div class="w-full bg-black rounded-full h-2.5 mb-4 dark:bg-black">
|
||||
<div class="bg-green-600 h-2.5 rounded-full dark:bg-green-500" style="width: <%= plan.progress %>%;"></div>
|
||||
<div class="bg-green-600 h-2.5 rounded-full dark:bg-green-500" style="width: <%= plan.progress > 100 ? 100 : plan.progress %>%;"></div>
|
||||
</div>
|
||||
<p class="font-normal text-gray-700 dark:text-gray-400"><%= plan.description %></p>
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user