45 lines
1.0 KiB
Vue
45 lines
1.0 KiB
Vue
<template>
|
|
<mainLayout>
|
|
<div class="home">
|
|
<h1 class="text-3xl font-bold text-D mb-4">Contoh penggunaan halaman</h1>
|
|
|
|
<div class="message-model">
|
|
<p>{{ message }}</p>
|
|
</div>
|
|
|
|
<hr class="my-6 border-D" />
|
|
<h1 class="text-xl font-bold text-D mb-4">Contoh grid</h1>
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
|
<div v-for="value in data" :key="value" class="p-5 shadow-lg rounded-lg shadow-C bg-A text-D text-lg">
|
|
Item: {{ value }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</mainLayout>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
import mainLayout from '../layouts/mainLayout.vue'
|
|
|
|
const message = ref("Style dan message dari script dan style di dalam halaman")
|
|
|
|
const data = ref([1, 2, 3, 4, 5])
|
|
</script>
|
|
|
|
<style scoped>
|
|
.message-model {
|
|
border: 1px solid yellow;
|
|
text-align: center;
|
|
border-radius: 10px;
|
|
width: 80%;
|
|
margin: auto;
|
|
background-color: yellow;
|
|
padding: 20px;
|
|
}
|
|
|
|
.message-model p {
|
|
font-weight: bold;
|
|
font-size: 24px;
|
|
}
|
|
</style> |