Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 42 additions & 5 deletions src/components/Loader/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,54 @@ import Dart from './dart.vue';
import flutter from './flutter.vue';

const myArray = ref(['Explore', 'Learn', 'Apply', 'Go Forword', 'Win']);
let mainText = ref("Explore");
let myArrayIndex = ref(0);
let mainText = ref('Explore');

const dartArray = ref([
'Dart Tutorial', 'Dart Basics', 'Conditions and Loops', 'Dart Functions',
'Dart Collection', 'File Handling', 'OOP In Dart', 'Null Safety',
'Asynchronous Programming',
]);
let dartArrayIndex = ref(0);
let dartText = ref('Dart Tutorial');

const flutterArray = ref([
'Flutter Tutorial', 'StatLess/StateFul', 'Basics Widget', 'Scroll Widget',
'Overflow Widget', 'Reusabele Widget', 'Static Assetes', 'Local DB',
'Request Response', 'Asynchronous Widgets',
]);
let flutterArrayIndex = ref(0);
let flutterText = ref('Flutter Tutorial');

// ADJUST SIZE OF THE LOADER
let LoaderWrapper = ref(null);
onMounted(() => {
setSize();
setInterval(() => {
const randomIndex = Math.floor(Math.random() * myArray.value.length);
mainText.value = myArray.value[randomIndex];
// Main Text
if (myArrayIndex.value == myArray.value.length) {
myArrayIndex.value = 0;
}
myArrayIndex.value = myArrayIndex.value + 1;
mainText.value = myArray.value[myArrayIndex.value -1];

// Dart
if (dartArrayIndex.value == dartArray.value.length) {
dartArrayIndex.value = 0;
}
dartArrayIndex.value = dartArrayIndex.value + 1;
dartText.value = dartArray.value[dartArrayIndex.value -1];

// Flutter
if (flutterArrayIndex.value == flutterArray.value.length) {
flutterArrayIndex.value = 0;
}
flutterArrayIndex.value = flutterArrayIndex.value + 1;
flutterText.value = flutterArray.value[flutterArrayIndex.value -1];

}, 2000);
})

const setSize = () => {
let loader = LoaderWrapper.value;
let parent = loader.parentElement.parentElement;
Expand Down Expand Up @@ -43,13 +80,13 @@ window.addEventListener("resize", function () {
<template>
<div class="LoaderWrapper" ref="LoaderWrapper">
<div class="Loader">
<flutter></flutter>
<flutter :flutterText="flutterText"></flutter>
<div class="LoaderInnerWrapper">
<div class="LoaderFirstChild">
<div class="maintext">{{ mainText }}</div>
<Author></Author>
</div>
<Dart></Dart>
<Dart :dartText="dartText"></Dart>
</div>
</div>
</div>
Expand Down
91 changes: 57 additions & 34 deletions src/components/Loader/author.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<script setup></script>
<template>
<div class="AuthorDetails">
<div class="Author">
Author: Sudipta Mandal
<div class="CircularIndicator">
<div class="indicatorOne">
<div class="indicatorTwo"></div>
<div class="indicatorTwo">
<div class="Author">
Author: Sudipta Mandal
</div>
</div>
</div>
</div>
</div>
Expand All @@ -19,12 +22,61 @@
width: 100%;
height: 100%;
}
.CircularIndicator{
position: fixed;
height: 2rem;
width: 2rem;
top: calc(50% - 4rem);
left: 55%;
content: "";
border-radius: 50%;
border: 2px solid #bcbcbcdf;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.indicatorOne {
position: absolute;
width: 3px;
height: 14vh;
transform: rotateZ(35deg);
}

.indicatorOne::after {
content: '';
position: absolute;
width: 3px;
height: 6vh;
left: 0;
top: 0;
background-color: #bcbcbcdf;
}
.indicatorTwo{
position: absolute;
width: 4vw;
height: 3px;
top: 0;
left: -2vw;
transform: rotateZ(-35deg);
display: flex;
align-items: flex-start;
justify-content: flex-start;
}
.indicatorTwo::after {
content: '';
position: absolute;
width: 2vw;
height: 3px;
right: 0;
background-color: #bcbcbcdf;
}
.Author{
position: absolute;
display: flex;
white-space: nowrap;
right: -5rem;
top: calc(50% - 9vh - 2rem);
top: -2rem;
left: 4vw;
background-color: #303232a6;
border: 1px solid #fff;
padding: 1rem;
Expand All @@ -35,33 +87,4 @@
font-weight: bold;
text-shadow: 1px 1px #242323;
}
.indicatorOne{
position: absolute;
bottom: -3vh;
height: 3vh;
left: 50%;
width: 3px;
background-color: #ffffffc6;
}
.indicatorTwo{
position: absolute;
right: 0;
bottom: 0;
width: 5vh;
height: 3px;
background-color: #ffffffc6;
/* transform: rotateZ(90deg); */
}
.indicatorTwo::after{
position: absolute;
height: 2rem;
width: 2rem;
top: calc(-1rem + 1.5px);
left: -2rem;
content: "";
/* background-color: rgb(30, 29, 29); */
border-radius: 50%;
border: 2px solid #ffffffc6;
box-sizing: border-box;
}
</style>
55 changes: 48 additions & 7 deletions src/components/Loader/dart.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<script setup></script>
<script setup>
let props = defineProps({
dartText: String,
})
</script>
<template>
<div class="DartTutorialDetails">
<div class="DartTutorial">
Dart Tutorial
<div class="CircularIndicator">
<div class="indicatorOne">
<div class="indicatorTwo"></div>
<div class="DartTutorial">
{{ dartText }}
</div>
</div>
</div>
</div>
Expand All @@ -20,7 +25,45 @@
width: 100%;
height: 100%;
}
.CircularIndicator{
position: fixed;
height: 2rem;
width: 2rem;
bottom: 12rem;
left: calc(50% - 1rem);
content: "";
border-radius: 50%;
border: 2px solid #ffffffc6;;
box-sizing: border-box;
}
.indicatorOne{
position: absolute;
right: calc(1rem - 3px);
bottom: -5vh;
height: 5vh;
width: 3px;
background-color: #ffffffc6;
display: flex;
align-items: center;
justify-content: center;
}
.DartTutorial{
position: absolute;
display: flex;
white-space: nowrap;
bottom: -3.8rem;
background-color: #303232a6;
border: 1px solid #fff;
padding: 1rem;
box-shadow: 0 0 2rem #00ff6e;
border-radius: 0.5rem;
z-index: 100;
font-size: 1.6rem;
font-weight: bold;
text-shadow: 1px 1px #242323;
transition: all 0.8s;
}
/* .DartTutorial{
position: absolute;
display: flex;
white-space: nowrap;
Expand Down Expand Up @@ -51,7 +94,6 @@
height: 5vh;
width: 3px;
background-color: #ffffffc6;
/* transform: rotateZ(45deg); */
}
.indicatorTwo::after{
position: absolute;
Expand All @@ -60,9 +102,8 @@
left: calc(-1rem + 1.5px);
top: -2rem;
content: "";
/* background-color: rgb(30, 29, 29); */
border-radius: 50%;
border: 2px solid #ffffffc6;
box-sizing: border-box;
}
} */
</style>
Loading