Skip to content
Snippets Groups Projects
Commit 873c10cd authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files

smaller measure circle at end of PDF

parent ea9ad5ff
No related branches found
No related tags found
No related merge requests found
......@@ -43,28 +43,32 @@ function getProgressFromLevel ($level)
}
$expectedDashOffset = (new \App\Helpers\SVG(getProgressFromLevel($action->expected_level), 100))->dashArray();
$actualDashOffset = (new \App\Helpers\SVG(getProgressFromLevel($action->actual_level), 100))->dashArray();;
$svgSize = isset($size) ? $size : 150;
$globalSize = isset($size) ? $size+$size/8 : 190;
?>
<div style="height: 180px;position:relative">
<div style="height: {{$globalSize}}px;position:relative">
<p style="text-align: center;z-index: 1;position: absolute;top: 25%;left: 0;right: 0;" class="@if($action->actual_level === 3) custom-crown @endif">
@if ($action->actual_level === 3)
<i class="fas fa-crown"></i>
@endif
@if($svgSize >= 150)
<span class="@if($action->actual_level === 3) text-white @else text-muted @endif text-uppercase small">Niveau</span> <br/>
<span class="h1">{{$action->actual_level}}</span>
@endif
<span class="h1" @if($svgSize < 150) style="margin-top: 0; padding-top: 0;line-height:1em" @endif>{{$action->actual_level}}</span>
</p>
@if($action->actual_level === 3)
{{-- Show crown for level 3--}}
<div style="position: relative">
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" fill="#468355" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="{{$svgSize}}" height="{{$svgSize}}" fill="#468355" viewBox="0 0 16 16">
<path d="m8 1.288 6.842 5.56L12.267 15H3.733L1.158 6.847 8 1.288zM16 6.5 8 0 0 6.5 3 16h10l3-9.5z"/>
</svg>
<svg
xmlns="http://www.w3.org/2000/svg" width="110"
height="110" fill="#468355"
xmlns="http://www.w3.org/2000/svg" width="{{$svgSize-40}}"
height="{{$svgSize-40}}" fill="#468355"
viewBox="0 0 16 16"
style="top: 23px">
<path d="m8 0 8 6.5-3 9.5H3L0 6.5 8 0z"/>
......@@ -72,16 +76,16 @@ function getProgressFromLevel ($level)
</div>
@else
{{-- Show circle for other levels--}}
<div style="position: relative;width:160px;height:160px;margin: 0 auto;">
<div style="position: relative;width:{{$svgSize+10}}px;height:{{$svgSize+10}}px;margin: 0 auto;">
<!-- BASE CIRCLE -->
<svg data-v-4d45322b="" height="160" width="160">
<svg data-v-4d45322b="" height="{{$svgSize+10}}" width="{{$svgSize+10}}">
<circle data-v-4d45322b="" stroke="lightgray" stroke-dasharray="414.6902302738527 414.6902302738527"
stroke-width="7" fill="transparent" r="66" cx="80" cy="80" style="stroke-dashoffset: 0px;"></circle>
stroke-width="7" fill="transparent" r="{{($svgSize-18) / 2}}" cx="{{($svgSize+10) / 2}}" cy="{{($svgSize+10) / 2}}" style="stroke-dashoffset: 0px;"></circle>
</svg>
<!-- ACTUAL LEVEL -->
<svg
height="160"
width="160"
height="{{$svgSize+10}}"
width="{{$svgSize+10}}"
>
<circle
stroke="{{$actualColor}}"
......@@ -89,9 +93,9 @@ function getProgressFromLevel ($level)
{{-- style="stroke-dashoffset: {{$actualDashOffset}};"--}}
stroke-width="7"
fill="transparent"
r="66"
cx="80"
cy="80"
r="{{($svgSize-18) / 2}}"
cx="{{($svgSize+10) / 2}}"
cy="{{($svgSize+10) / 2}}"
/>
</svg>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment