<template>
	<div>
		<van-row>
			<van-col span="24">
				<van-image style="width: 100%; height: 18rem; background-color: #eeeeee;" fit="cover" position="left"
					:src="getImageUrl(headimage)" />
			</van-col>
		</van-row>
		<van-row justify="center" align="center" style="text-align: center;">
			<van-col span="12">
				<van-image style="width: 50%; height: 50%;background-color: #e2f2f2;" :src="getImageUrl(addimage)"
					@click="viewClick('/ancestralHallAdd')" />
				<div style="color: #f59a23;font-weight: 900;font-size: 18px;" @click="viewClick('/ancestralHallAdd')">
					组建新祠堂</div>
			</van-col>
			<van-col span="12" style="align-items: center;">
				<div style="color: #f59a23;font-weight: 900;font-size: 36px;">王</div>
				<div style="height: 100rpx;background-color: #ffffff;">
					<div style="color: #f59a23;font-weight: 400;font-size: 18px;">王氏祠堂</div>
					<div style="color: #000000;font-size: 14px;">创建人：王世元</div>
				</div>
			</van-col>
		</van-row>

		<!-- <view class="uni-padding-wrap uni-common-mt">
				<view class="uni-flex uni-row" style="-webkit-justify-content: space-between;justify-content: space-between;">
					<view class="flex-item" style="width: 45%; text-align: center;height: 300rpx;background-color: #e2f2f2;"
						@click="viewClick('/pages/sacrifice/ancestralHall/add')">
						<image style="width: 30%; height: 30%;margin-top: 20%; background-color: #e2f2f2;" :src="addimage">
						</image>
						<view style="margin-top: 10%;">
							<text style="color: #f59a23;font-weight: 900;font-size: 18px;">组建新祠堂</text>
						</view>
					</view>
					<view class="flex-item" style="width: 45%;text-align: center;height: 100%;background-color: #e2f2f2;">
						<view class="text uni-flex"
							style="height: 200rpx;-webkit-flex: 1;flex: 1;-webkit-justify-content: center;justify-content: center;-webkit-align-items: center;align-items: center;">
							<text style="color: #f59a23;font-weight: 900;font-size: 36px;">王</text>
						</view>
						<view style="height: 100rpx;background-color: #ffffff;text-align: center">
							<view>
								<text style="color: #f59a23;font-weight: 400;font-size: 18px;">王氏祠堂</text>
							</view>
							<view class="textbomcenter">
								<text style="color: #000000;font-size: 14px;">创建人：王世元</text>
							</view>
						</view>
					</view>
				</view>
			</view> -->
	</div>
</template>

<script setup>
	import {
		ref
	} from "vue";
	import {
		useRouter
	} from "vue-router";
	const router = useRouter();

	const headimage = ref("image/ancestralHall1.png");
	const addimage = ref("image/ancestralHall2.png");

	const viewClick = (url) => {
		router.push(url);
	};

	const getImageUrl = (name) => {
		return new URL(`/src/assets/${name}`, import.meta.url).href
	}
</script>

<style lang="scss">
	.textbomcenter {
		// text-align: center;
		// left: 0;
		// right: 0;
		// position: static;
		// bottom: 15rpx;
		// text-decoration: underline;
		// font-weight: 400;
		// color: cornflowerblue;

		text-align: center;
		left: 0;
		right: 0;
		bottom: 5rpx;
		display: flex;
		align-items: baseline;
	}
</style>