Basic design created
This commit is contained in:
17
app/Views/Components/Icon.vue
Normal file
17
app/Views/Components/Icon.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script setup>
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import * as SolidIcons from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
const props = defineProps({
|
||||
name: { type: String, required: true },
|
||||
})
|
||||
|
||||
if (SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`]) {
|
||||
library.add(SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`])
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<font-awesome-icon :icon="name" />
|
||||
</template>
|
||||
23
app/Views/Components/ShadowedBox.vue
Normal file
23
app/Views/Components/ShadowedBox.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
style: { type: String},
|
||||
class: { type: String},
|
||||
})
|
||||
|
||||
console.log(props.style)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="shadowed-box" :style=props.style :class=props.class>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.shadowed-box {
|
||||
box-shadow: 2px 2px 5px #c0c0c0;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
41
app/Views/Partials/GlobalWidgets/GlobalWidgets.vue
Normal file
41
app/Views/Partials/GlobalWidgets/GlobalWidgets.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<script setup>
|
||||
|
||||
import ShadowedBox from "../../Components/ShadowedBox.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<diV class="widget-container">
|
||||
<shadowed-box class="widget-box">
|
||||
Widget 1
|
||||
</shadowed-box>
|
||||
|
||||
<shadowed-box class="widget-box">
|
||||
Widget 2
|
||||
</shadowed-box>
|
||||
<shadowed-box class="widget-box">
|
||||
Widget 3
|
||||
</shadowed-box>
|
||||
<shadowed-box class="widget-box">
|
||||
Widget 4
|
||||
</shadowed-box>
|
||||
</diV>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.widget-container {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.widget-box {
|
||||
flex-grow: 1; display: inline-block;
|
||||
width: calc(25% - 40px);
|
||||
height: 150px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user