| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/support/vue-app/src/components/ |
Upload File : |
<template>
<div class="timeline">
<div class="timeline-line">
<div class="progress-bar" :style="{ width: progressWidth }"></div>
</div>
<div class="timeline-item" v-for="(step, index) in steps" :key="index">
<div :class="['circle', { active: index + 1 <= currentStep }]">
{{ index + 1 }}
</div>
<div :class="['label', { 'next-step': index === currentStep }]">
<span>{{ step.label }}</span>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
currentStep: {
type: Number,
default: 0
},
},
data() {
return {
steps: [
{ label: 'OFF ROAD FREQUENCY' },
{ label: 'ADVENTURE TYPE' },
{ label: 'TOWING CAPACITY' },
{ label: 'TYRE SIZE' }
]
};
},
computed: {
progressWidth() {
return ((this.currentStep - 1) / (this.steps.length - 1)) * 100 + '%';
}
}
};
</script>
<style scoped>
.timeline {
display: flex;
justify-content: space-between;
position: relative;
width: 100%;
max-width: 996px;
margin: 80px auto;
}
.timeline .label span {
font-size: 16px;
font-weight: 700;
}
.timeline-line {
position: absolute;
top: 15%;
/* left: 33px;
right: 20px; */
/* width: 93%; */
height: 9px;
background-color: lightgray;
z-index: 0;
left: 37px;
right: 30px;
}
.progress-bar {
height: 9px;
background-color: #0D3379;
/* Dark Blue */
z-index: 1;
}
.timeline-item {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 2;
max-width: 75px;
}
.circle {
width: 30px;
height: 30px;
border-radius: 50%;
background-color: #CCCCCC;
color: #171717;
display: flex;
font-size: 16px;
font-weight: 700;
align-items: center;
justify-content: center;
margin-bottom: 5px;
}
.circle.active {
background-color: #002855;
/* Dark Blue */
color: #FFFFFF;
}
.label {
text-align: center;
}
.label.next-step span {
color: #002855;
/* Dark Blue for the next step */
}
</style>