misskey/src/client/components/loading.vue

64 lines
903 B
Vue
Raw Normal View History

<template>
2020-02-11 09:52:37 -08:00
<div class="yxspomdl" :class="{ inline }">
2020-02-10 03:44:59 -08:00
<div class="ring"></div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
2020-02-11 09:52:37 -08:00
props: {
inline: {
type: Boolean,
required: false,
default: false
}
}
});
</script>
<style lang="scss" scoped>
2020-02-10 03:44:59 -08:00
@keyframes ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.yxspomdl {
padding: 32px;
text-align: center;
2020-02-11 09:52:37 -08:00
&.inline {
display: inline;
padding: 0;
> .ring:after {
width: 32px;
height: 32px;
}
}
2020-02-10 03:44:59 -08:00
> .ring {
display: inline-block;
opacity: 0.7;
2020-02-11 09:35:03 -08:00
vertical-align: middle;
2020-02-10 03:44:59 -08:00
}
> .ring:after {
content: " ";
display: block;
2020-02-11 09:35:03 -08:00
box-sizing: border-box;
width: 48px;
height: 48px;
2020-02-10 03:44:59 -08:00
border-radius: 50%;
2020-02-11 09:35:03 -08:00
border: solid 4px;
border-color: currentColor transparent transparent transparent;
2020-02-10 03:44:59 -08:00
animation: ring 0.5s linear infinite;
}
}
</style>