<template>
    <div class="ask-page">
        <div class="left">
            <div class="left-title">
                <img src="./assets/icon01.png" alt="">
                <div class="tit">新闻资讯</div>
                <div class="more" @click="handleToMoreNews">更多 +</div>
            </div>
            <div class="left-main">
                <div v-for="item in leftList" :key="item.id" class="main-item">
                    <img :src="item.image" alt="">
                    <div class="item-content">
                        <div class="title">{{item.title}}</div>
                        <div class="content">{{item.content}}</div>
                        <div class="time">{{item.time}}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="right">
            <div class="right-title">
                <img src="./assets/icon02.png" alt="">
                <div class="tit">社交媒体</div>
                <div class="more">更多 +</div>
            </div>
            <div class="right-main">
                <div class="trump">
                    <img src="./assets/title01.png" alt="">
                    <div class="trump-main">
                        <div class="cl1">{{ rightList[0].name }}</div>
                        <div class="cl2">{{ rightList[0].content }}</div>
                        <div class="cl3">{{ rightList[0].time }}</div>
                    </div>
                </div>
                <div class="mask">
                    <img src="./assets/title02.png" alt="">
                    <div class="mask-main">
                        <div class="cl1">{{ rightList[1].name }}</div>
                        <div class="cl2">{{ rightList[1].content }}</div>
                        <div class="cl3">{{ rightList[1].time }}</div>
                    </div>
                </div>
                <div class="malaby">
                    <img src="./assets/title03.png" alt="">
                    <div class="malaby-main">
                        <div class="cl1">{{ rightList[2].name }}</div>
                        <div class="cl2">{{ rightList[2].content }}</div>
                        <div class="cl3">{{ rightList[2].time }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from "vue";
import router from "@/router"
import image01 from './assets/image01.png'
import image02 from './assets/image02.png'
import image03 from './assets/image03.png'
import image04 from './assets/image04.png'
import image05 from './assets/image05.png'

import title01 from './assets/title01.png'
import title02 from './assets/title02.png'
import title03 from './assets/title03.png'


const leftList = ref([
    {   
        id:1,
        title:'美国NSF寻求建立政企共同资助的研究生奖学金模式',
        content:'美国国家科学基金会（NSF）开始寻求建立与行业合作伙伴共同资助的新研究生奖学金计划...',
        time:'11-4 · 华盛顿邮报',
        image:image01
    },
    {   
        id:2,
        title:'美国NSF投资2.8亿美元支持人工智能项目开发',
        content:'自7月23日白宫发布《赢得人工智能竞赛：美国人工智能行动计划》以来，美国国家科学基...',
        time:'11-4 · 纽约时报',
        image:image02
    },
    {   
        id:3,
        title:'美国NASA资助地球观测和大型望远镜新技术',
        content:'美国国家航空航天局（NASA）先后资助两项任务，以促进地球观测和大型望远镜新技术的...',
        time:'11-3 · 洛杉矶时报',
        image:image03
    },
    {   
        id:4,
        title:'美国NSF、NIH和FDA支持数字医学孪生技术应用开发',
        content:'美国国家科学基金会（NSF）、美国国立卫生研究院（NIH）和美国食品药品监督管理局（F...',
        time:'11-3 · 今日美国',
        image:image04
    },
    {   
        id:5,
        title:'美国NIH拨款推进All of Us研究计划数据集应用',
        content:'美国国立卫生研究院（NIH）宣布拨款970万美元，支持利用“All of Us”研究计划的数据...',
        time:'11-2 ·  ​福克斯新闻网',
        image:image05
    }
])

const rightList = ref([
    {
        id:1,
        name:'唐纳德·特朗普',
        content:'埃隆·马斯克在强力支持我竞选总统之前，早就知道我强烈反对‘电动汽车强制令’。这太荒谬了，这一直是我竞选活动的主要部分。电动汽车没问题，但不应该强迫每个人都拥有一辆。埃隆获得的补贴可能远远超过历史上任何一个人。如果没有补贴，埃隆可能不得不关门大吉，回到南非老家。',
        time:'15:23 · 发布于真实社交',
        title:title01
    },
    {
        id:2,
        name:'埃隆·马斯克',
        content:'如果这个疯狂的支出法案获得通过，‘美国党’将在第二天成立。',
        time:'14:49 · 发布于X',
        title:title02
    },
    {
        id:3,
        name:'塞巴斯蒂安·马拉比',
        content:'提出特朗普政府的AI政策强调技术开放与快速应用，但可能以牺牲安全防范为代价，开启了“潘多拉魔盒”。',
        time:'11:05 · 发布于X',
        title:title03
    }
])


// 查看更多新闻资讯
const handleToMoreNews = () => {
	const route = router.resolve("/newsBrief");
	window.open(route.href, "_blank");
};

</script>

<style scoped lang="scss">
* {
	margin: 0;
	padding: 0;
}
.ask-page {
    width: 1600px;
    height: 450px;
    display: flex;
	justify-content: space-between;
    .left {
        width: 792px;
        height: 450px;
        margin-right: 16px;
        border-radius: 10px;
        border: 1px solid rgb(234, 236, 238);
        box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
        background-color: #fff;
        .left-title {
            width: 792px;
            height: 48px;
            border-bottom: 1px solid rgb(234, 236, 238);
            position: relative;
            img {
                width: 19px;
                height: 19px;
                position: absolute;
                top: 16px;
                left: 21px;
            }
            .tit {
                margin-left: 60px;
                width: 80px;
                height: 48px;
                padding: 11px 0;
                font-size: 20px;
                font-weight: 700;
                font-family: 'Microsoft YaHei';
                line-height: 26px;
                color: rgb(5, 95, 194);
            }
            .more {
                width: 49px;
                height: 24px;
                font-size: 16px;
                font-weight: 400;
                font-family: 'Microsoft YaHei';
                line-height: 24px;
                color: rgb(5, 95, 194);
                position: absolute;
                top: 12px;
                right: 27px;
                cursor: pointer;
            }
        }
        .left-main {
            width: 792px;
            height: 402px;
            padding: 20px 22px 21px 21px;
            .main-item {
                width: 749px;
                height: 64px;
                display: flex;
                border-bottom: 1px solid rgba(240, 242, 244, 1);
                margin-bottom: 14px;
                img {
                    width: 72px;
                    height: 48px;
                    margin-right: 20px;
                    cursor: pointer;
                }
                .item-content {
                    width: 657px;
                    height: 50px;
                    position: relative;
                    .title {
                        font-size: 16px;
                        font-weight: 700;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                        cursor: pointer;
                    }
                    .content {
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                        cursor: pointer;
                    }
                    .time {
                        position: absolute;
                        top: 0px;
                        right: 0px;
                        font-size: 14px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 22px;
                        color: rgb(95, 101, 108);
                        cursor: pointer;
                    }
                }
            }
        }
    }
    .right {
        width: 792px;
        height: 450px;
        border-radius: 10px;
        border: 1px solid rgb(234, 236, 238);
        box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
        background-color: #fff;
        .right-title {
            width: 792px;
            height: 48px;
            border-bottom: 1px solid rgb(234, 236, 238);
            position: relative;
            img {
                width: 19px;
                height: 19px;
                position: absolute;
                top: 16px;
                left: 21px;
            }
            .tit {
                margin-left: 60px;
                width: 80px;
                height: 48px;
                padding: 11px 0;
                font-size: 20px;
                font-weight: 700;
                font-family: 'Microsoft YaHei';
                line-height: 26px;
                color: rgb(5, 95, 194);
            }
            .more {
                width: 49px;
                height: 24px;
                font-size: 16px;
                font-weight: 400;
                font-family: 'Microsoft YaHei';
                line-height: 24px;
                color: rgb(5, 95, 194);
                position: absolute;
                top: 12px;
                right: 27px;
                cursor: pointer;
            }
        }
        .right-main {
            width: 792px;
            height: 402px;
            padding: 23px 30px 25px 21px;
            .trump {
                width: 740px;
                height: 148px;
                margin-bottom: 16px;
                display: flex;
                img {
                    width: 36px;
                    height: 36px;
                    margin-right: 8.5px;
                }
                .trump-main {
                    width: 695.6px;
                    height: 148px;
                    background-image: url('./assets/title01bg.png');
                    padding: 11px 14px 12px 22.5px;
                    background-size: cover;
                    position: relative;
                    .cl1 {
                        font-size: 16px;
                        font-weight: 700;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                        margin-bottom: 5px;
                    }
                    .cl2 {
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                    }
                    .cl3 {
                        position: absolute;
                        top: 11px;
                        right: 14px;
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 30px;
                        color: rgb(95, 101, 108);
                    }
                }
            }
            .mask {
                width: 740px;
                height: 76px;
                margin-bottom: 16px;
                display: flex;
                img {
                    width: 36px;
                    height: 36px;
                    margin-right: 8.5px;
                }
                .mask-main {
                    width: 695.6px;
                    height: 76px;
                    background-image: url('./assets/title02bg.png');
                    padding: 11px 14px 12px 22.5px;
                    background-size: cover;
                    position: relative;
                    .cl1 {
                        font-size: 16px;
                        font-weight: 700;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                        margin-bottom: 5px;
                    }
                    .cl2 {
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                    }
                    .cl3 {
                        position: absolute;
                        top: 11px;
                        right: 14px;
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 30px;
                        color: rgb(95, 101, 108);
                    }
                }
            }
            .malaby {
                width: 740px;
                height: 98px;
                margin-bottom: 16px;
                display: flex;
                img {
                    width: 36px;
                    height: 36px;
                    margin-right: 8.5px;
                }
                .malaby-main {
                    width: 695.6px;
                    height: 98px;
                    background-image: url('./assets/title03bg.png');
                    padding: 11px 14px 12px 22.5px;
                    background-size: cover;
                    position: relative;
                    .cl1 {
                        font-size: 16px;
                        font-weight: 700;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                        margin-bottom: 5px;
                    }
                    .cl2 {
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 24px;
                        color: rgb(59, 65, 75);
                    }
                    .cl3 {
                        position: absolute;
                        top: 11px;
                        right: 14px;
                        font-size: 16px;
                        font-weight: 400;
                        font-family: 'Microsoft YaHei';
                        line-height: 30px;
                        color: rgb(95, 101, 108);
                    }
                }
            }
        }
    }
}
</style>