HomeContent.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <script setup lang="ts">
  2. import Search from "./Search/index.vue";
  3. import HomeCard, { HomeCardContent } from "./HomeCard";
  4. import HomeSection, { HomeSectionContent } from "./HomeSection";
  5. import { ArrowRightBold } from "@element-plus/icons-vue";
  6. import IconNotebook from "~icons/ccrbi-plain/notebook";
  7. import IconBook from "~icons/ccrbi-plain/book";
  8. import IconDirectory from "~icons/ccrbi-plain/directory";
  9. import IconXieTongJianGou from "~icons/ccrbi-colored/xie-tong-jian-gou";
  10. import IconAiZhuShou from "~icons/ccrbi-colored/ai-zhu-shou";
  11. import IconAiChuangJian from "~icons/ccrbi-colored/ai-chuang-jian";
  12. import { useData, withBase, useRouter } from "vitepress";
  13. import path from "path-browserify";
  14. import { useBreakpoints } from "@vueuse/core";
  15. import { computed } from 'vue'
  16. const { localeIndex } = useData();
  17. const router = useRouter();
  18. const withLink = (href: string) => {
  19. return withBase(
  20. path.join("/", localeIndex.value === "root" ? "" : localeIndex.value, "docs", href)
  21. );
  22. };
  23. const breakpoints = useBreakpoints({
  24. tablet: 640,
  25. laptop: 1024,
  26. desktop: 1280,
  27. })
  28. const isMobile = computed(() => breakpoints.isSmaller('tablet'))
  29. const cardNewerbgStyle = computed(() => {
  30. if (isMobile.value) {
  31. return {
  32. left: 0,
  33. right: 0,
  34. bottom: '8px',
  35. margin: 'auto',
  36. width: '134px',
  37. height: '74px',
  38. }
  39. }
  40. return {
  41. right: '16px',
  42. bottom: '24px',
  43. width: '268px',
  44. height: '148px',
  45. }
  46. })
  47. const cardLoginbgStyle = computed(() => {
  48. if (isMobile.value) {
  49. return {
  50. left: 0,
  51. right: 0,
  52. bottom: '8px',
  53. margin: 'auto',
  54. width: '64px',
  55. height: '64px',
  56. }
  57. }
  58. return {
  59. right: '40px',
  60. bottom: '24px',
  61. width: '128px',
  62. height: '128px',
  63. }
  64. })
  65. const cardUsualQuestionbgStyle = computed(() => {
  66. if (isMobile.value) {
  67. return {
  68. right: '24px',
  69. top: 0,
  70. bottom: 0,
  71. margin: 'auto',
  72. width: '102px',
  73. height: '102px',
  74. }
  75. }
  76. return {
  77. right: '10px',
  78. bottom: '0',
  79. width: '122px',
  80. height: '128px',
  81. }
  82. })
  83. const cardAIHowbgStyle = computed(() => {
  84. if (isMobile.value) {
  85. return {
  86. right: '24px',
  87. top: 0,
  88. bottom: 0,
  89. margin: 'auto',
  90. width: '133px',
  91. height: '74px',
  92. }
  93. }
  94. return {
  95. right: '17px',
  96. bottom: '0',
  97. width: '167px',
  98. height: '92px',
  99. }
  100. })
  101. </script>
  102. <template>
  103. <div class="home-content">
  104. <HomeSection>
  105. <template #title>
  106. <h1 :style="{ fontSize: isMobile ? '24px' : undefined }">您好,需要提供什么帮助?</h1>
  107. </template>
  108. <HomeSectionContent>
  109. <Search />
  110. </HomeSectionContent>
  111. </HomeSection>
  112. <HomeSection title="新手入门">
  113. <HomeSectionContent :span="12">
  114. <HomeCard color="skyblue" :backgroundStyle="cardNewerbgStyle" :link="withLink('')">
  115. <template #background>
  116. <img src="@/assets/images/card1.png" />
  117. </template>
  118. <template #title>
  119. <HomeCard.Title showArrow> 平台概览 </HomeCard.Title>
  120. </template>
  121. <HomeCardContent v-if="!isMobile">
  122. <ul>
  123. <li>什么是可可智慧教育平台?</li>
  124. <li>功能概览</li>
  125. </ul>
  126. </HomeCardContent>
  127. </HomeCard>
  128. </HomeSectionContent>
  129. <HomeSectionContent :span="12">
  130. <HomeCard color="primary" :backgroundStyle="cardLoginbgStyle" :link="withLink('#登录')">
  131. <template #background>
  132. <img src="@/assets/images/card2.png" />
  133. </template>
  134. <template #title>
  135. <HomeCard.Title showArrow> 用户登录 </HomeCard.Title>
  136. </template>
  137. <HomeCardContent v-if="!isMobile">
  138. <ul>
  139. <li>如何获取账户?</li>
  140. <li>如何登录?</li>
  141. </ul>
  142. </HomeCardContent>
  143. </HomeCard>
  144. </HomeSectionContent>
  145. </HomeSection>
  146. <HomeSection title="平台使用">
  147. <HomeSectionContent :span="24">
  148. <HomeCard title="基础使用">
  149. <HomeCardContent :span="isMobile ? 24 : 8">
  150. <HomeCard color="white" :link="withLink('课程创建')">
  151. <template #title>
  152. <HomeCard.Title>
  153. <IconNotebook color="#3681FC" />
  154. 创建课程
  155. </HomeCard.Title>
  156. </template>
  157. <HomeCardContent>
  158. 教师通过个人、协同的方式创建多种模式下的平台数字化课程。
  159. </HomeCardContent>
  160. </HomeCard>
  161. </HomeCardContent>
  162. <HomeCardContent :span="isMobile ? 24 : 8">
  163. <HomeCard color="white" :link="withLink('课程授课')">
  164. <template #title>
  165. <HomeCard.Title>
  166. <IconBook color="#FF822B" />
  167. 实施课程
  168. </HomeCard.Title>
  169. </template>
  170. <HomeCardContent>
  171. 开展数字化课程教学与学习,在实施中进行学习证据采集。
  172. </HomeCardContent>
  173. </HomeCard>
  174. </HomeCardContent>
  175. <HomeCardContent :span="isMobile ? 24 : 8">
  176. <HomeCard color="white" :link="undefined">
  177. <template #title>
  178. <HomeCard.Title>
  179. <IconDirectory color="#34CEAE" />
  180. <el-badge value="即将上线"> 创建项目 </el-badge>
  181. </HomeCard.Title>
  182. </template>
  183. <HomeCardContent>
  184. 以项目式学习探究创建项目、记录项目、管理项目。
  185. </HomeCardContent>
  186. </HomeCard>
  187. </HomeCardContent>
  188. </HomeCard>
  189. </HomeSectionContent>
  190. <HomeSectionContent :span="24">
  191. <HomeCard title="进阶使用">
  192. <!-- <HomeCardContent :span="8">
  193. <HomeCard color="white" :link="withLink('TODO1')">
  194. <template #title>
  195. <HomeCard.Title>
  196. <IconXieTongJianGou />
  197. 协同建构
  198. </HomeCard.Title>
  199. </template>
  200. <HomeCardContent>
  201. 师生以协同建构(CocoNote)开展计算机支持下的协作问题解决。
  202. </HomeCardContent>
  203. </HomeCard>
  204. </HomeCardContent> -->
  205. <HomeCardContent :span="isMobile ? 24 : 8">
  206. <HomeCard color="white" :link="withLink('教师管理')">
  207. <template #title>
  208. <HomeCard.Title>
  209. <IconAiChuangJian />
  210. 教师管理
  211. </HomeCard.Title>
  212. </template>
  213. <HomeCardContent>
  214. 创建可重复使用的表单,组织团队资料收集与汇总。
  215. </HomeCardContent>
  216. </HomeCard>
  217. </HomeCardContent>
  218. <HomeCardContent :span="isMobile ? 24 : 8">
  219. <HomeCard color="white" :link="withLink('AI工具')">
  220. <template #title>
  221. <HomeCard.Title>
  222. <IconAiZhuShou />
  223. AI助手
  224. </HomeCard.Title>
  225. </template>
  226. <HomeCardContent> 使用生成式人工智能技术提供对话式工具。 </HomeCardContent>
  227. </HomeCard>
  228. </HomeCardContent>
  229. <HomeCardContent :span="isMobile ? 24 : 8">
  230. <HomeCard color="white" :link="withLink('综合看板')">
  231. <template #title>
  232. <HomeCard.Title>
  233. <IconAiChuangJian />
  234. 综合看板
  235. </HomeCard.Title>
  236. </template>
  237. <HomeCardContent>
  238. 汇总平台使用数据,并以可视化的形式进行查看。
  239. </HomeCardContent>
  240. </HomeCard>
  241. </HomeCardContent>
  242. </HomeCard>
  243. </HomeSectionContent>
  244. </HomeSection>
  245. <HomeSection title="更多资源">
  246. <!-- <HomeSectionContent :span="12">
  247. <HomeCard title="课程案例">
  248. <HomeCardContent :span="24">
  249. <ul class="fancy-list">
  250. <li @click="router.go(withLink('TODO'))">
  251. <el-text class="flex-1" size="large" truncated>
  252. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  253. 100px
  254. </el-text>
  255. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  256. </li>
  257. <li @click="router.go(withLink('TODO'))">
  258. <el-text class="flex-1" size="large" truncated>
  259. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  260. 100px
  261. </el-text>
  262. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  263. </li>
  264. <li @click="router.go(withLink('TODO'))">
  265. <el-text class="flex-1" size="large" truncated>
  266. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  267. 100px
  268. </el-text>
  269. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  270. </li>
  271. </ul>
  272. </HomeCardContent>
  273. <HomeCardContent :span="24">
  274. <el-button round size="large"
  275. >查看更多<el-icon class="el-icon--right"><ArrowRightBold /></el-icon
  276. ></el-button>
  277. </HomeCardContent>
  278. </HomeCard>
  279. </HomeSectionContent> -->
  280. <!-- <HomeSectionContent :span="12">
  281. <HomeCard title="项目案例" :span="12">
  282. <HomeCardContent :span="24">
  283. <ul class="fancy-list">
  284. <li>
  285. <el-text class="flex-1" size="large" truncated>
  286. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  287. 100px
  288. </el-text>
  289. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  290. </li>
  291. <li>
  292. <el-text class="flex-1" size="large" truncated>
  293. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  294. 100px
  295. </el-text>
  296. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  297. </li>
  298. <li>
  299. <el-text class="flex-1" size="large" truncated>
  300. Self element set wadslfkjsa;ldkjf;lsdkjf;lsdajf;lasdkjf;ladskjfidth
  301. 100px
  302. </el-text>
  303. <el-icon class="el-icon--right"><ArrowRightBold /></el-icon>
  304. </li>
  305. </ul>
  306. </HomeCardContent>
  307. <HomeCardContent :span="24">
  308. <el-button round size="large"
  309. >查看更多<el-icon class="el-icon--right"><ArrowRightBold /></el-icon
  310. ></el-button>
  311. </HomeCardContent>
  312. </HomeCard>
  313. </HomeSectionContent> -->
  314. <HomeSectionContent>
  315. <HomeCard>
  316. <HomeCardContent :span="isMobile ? 24 : 12">
  317. <HomeCard title="常见问题" color="white" :backgroundStyle="cardUsualQuestionbgStyle" :link="undefined">
  318. <template #title>
  319. <HomeCard.Title>
  320. <el-badge value="即将上线"> 常见问题 </el-badge>
  321. </HomeCard.Title>
  322. </template>
  323. <template #background>
  324. <img src="@/assets/images/card3.png" />
  325. </template>
  326. <HomeCardContent>
  327. <!-- TODO -->
  328. </HomeCardContent>
  329. </HomeCard>
  330. </HomeCardContent>
  331. <!-- <HomeCardContent :span="8">
  332. <HomeCard
  333. title="更新日志"
  334. color="white"
  335. :backgroundStyle="{
  336. right: '0',
  337. bottom: '0',
  338. width: '160px',
  339. height: '128px',
  340. }"
  341. :link="withLink('TODO1')"
  342. >
  343. <template #background>
  344. <img src="@/assets/images/card4.png" />
  345. </template>
  346. <HomeCardContent>
  347. </HomeCardContent>
  348. </HomeCard>
  349. </HomeCardContent> -->
  350. <HomeCardContent :span="isMobile ? 24 : 12">
  351. <HomeCard title="如何与AI对话" color="white" :backgroundStyle="cardAIHowbgStyle" :link="undefined">
  352. <template #title>
  353. <HomeCard.Title>
  354. <el-badge value="即将上线"> 如何与AI对话 </el-badge>
  355. </HomeCard.Title>
  356. </template>
  357. <template #background>
  358. <img src="@/assets/images/card5.png" />
  359. </template>
  360. <HomeCardContent>
  361. <!-- TODO -->
  362. </HomeCardContent>
  363. </HomeCard>
  364. </HomeCardContent>
  365. </HomeCard>
  366. </HomeSectionContent>
  367. </HomeSection>
  368. </div>
  369. </template>
  370. <style lang="scss" scoped>
  371. @use '@/.vitepress/theme/screen' as *;
  372. .home-content {
  373. display: flex;
  374. flex-direction: column;
  375. align-items: center;
  376. gap: 80px;
  377. padding-top: 80px;
  378. @include breakpoint(mobile) {
  379. gap: 32px;
  380. padding-top: 50px;
  381. }
  382. }
  383. .fancy-list {
  384. list-style-type: none;
  385. margin: 0;
  386. padding: 0;
  387. display: flex;
  388. flex-direction: column;
  389. align-items: stretch;
  390. gap: 10px;
  391. li {
  392. display: flex;
  393. height: 38px;
  394. align-items: center;
  395. transition: all 0.2s;
  396. border: 1px solid transparent;
  397. border-radius: 8px;
  398. padding: 8px 4px;
  399. margin: 0;
  400. cursor: pointer;
  401. &::before {
  402. content: "•";
  403. margin: 0 8px;
  404. }
  405. &:hover {
  406. // border: 1px solid #3681fc;
  407. border-color: #3681fc;
  408. background: #ffffff;
  409. }
  410. span {
  411. flex: 1;
  412. }
  413. }
  414. }
  415. .el-button:not(:hover) {
  416. background-color: transparent;
  417. border: 1px solid #aeccfe;
  418. }
  419. </style>