| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <template>
- <div class="course-description">
- <!-- <div class="section-header">
- <div class="header-line"></div>
- <h3 class="section-title">{{$t('common.kechengjieshao')}}</h3>
- </div> -->
-
- <div class="description-content">
- <div class="rich-text" v-html="info.courseIntro"></div>
-
- <div v-if="info.coverImageUrl" class="cover-image-wrapper">
- <img :src="info.coverImageUrl" alt="" class="cover-image">
- <div class="image-glow"></div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- import { getCourseList } from '@/api/course.js'
- import { ref, onMounted } from 'vue'
- defineProps({
- info: {
- type: Object,
- default: () => ({})
- }
- })
- const list = ref([]);
- </script>
- <style scoped lang="scss">
- .course-description {
- background: rgba(255, 255, 255, 0.95);
- backdrop-filter: blur(20px);
- -webkit-backdrop-filter: blur(20px);
- border: 1px solid rgba(255, 255, 255, 0.8);
- border-radius: 20px;
- padding: 24px;
- box-shadow:
- 0 8px 32px rgba(79, 70, 229, 0.08),
- inset 0 1px 0 rgba(255, 255, 255, 0.8);
-
- .section-header {
- display: flex;
- align-items: center;
- gap: 12px;
- margin-bottom: 20px;
-
- .header-line {
- width: 4px;
- height: 24px;
- background: linear-gradient(135deg, #4f46e5, #7c3aed);
- border-radius: 2px;
- box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
- }
-
- .section-title {
- font-size: 18px;
- font-weight: 700;
- color: #1f2937;
- margin: 0;
- letter-spacing: -0.02em;
- }
- }
-
- .description-content {
- .rich-text {
- font-size: 15px;
- line-height: 1.8;
- color: #374151;
-
- :deep(h1), :deep(h2), :deep(h3), :deep(h4) {
- color: #1f2937;
- font-weight: 700;
- margin: 24px 0 12px 0;
- line-height: 1.3;
-
- &:first-child {
- margin-top: 0;
- }
- }
-
- :deep(h1) { font-size: 24px; }
- :deep(h2) { font-size: 20px; }
- :deep(h3) { font-size: 18px; }
- :deep(h4) { font-size: 16px; }
-
- :deep(p) {
- margin: 12px 0;
- text-align: justify;
- }
-
- :deep(ul), :deep(ol) {
- margin: 16px 0;
- padding-left: 24px;
-
- li {
- margin: 8px 0;
- position: relative;
-
- &::marker {
- color: #4f46e5;
- font-weight: 600;
- }
- }
- }
-
- :deep(blockquote) {
- margin: 20px 0;
- padding: 16px 20px;
- background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
- border-left: 4px solid #4f46e5;
- border-radius: 8px;
- font-style: italic;
- color: #4b5563;
- }
-
- :deep(img) {
- max-width: 100%;
- height: auto;
- border-radius: 12px;
- margin: 16px 0;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
- }
-
- :deep(a) {
- color: #4f46e5;
- text-decoration: none;
- font-weight: 500;
- transition: all 0.3s ease;
- border-bottom: 1px solid transparent;
-
- &:hover {
- color: #7c3aed;
- border-bottom-color: #7c3aed;
- }
- }
-
- :deep(code) {
- background: rgba(79, 70, 229, 0.08);
- padding: 2px 6px;
- border-radius: 4px;
- font-family: 'Monaco', 'Menlo', monospace;
- font-size: 13px;
- color: #4f46e5;
- }
-
- :deep(pre) {
- background: #1f2937;
- color: #f9fafb;
- padding: 20px;
- border-radius: 12px;
- overflow-x: auto;
- margin: 20px 0;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
-
- code {
- background: none;
- color: inherit;
- padding: 0;
- }
- }
-
- :deep(table) {
- width: 100%;
- border-collapse: collapse;
- margin: 20px 0;
- font-size: 14px;
-
- th, td {
- padding: 12px 16px;
- text-align: left;
- border-bottom: 1px solid #e5e7eb;
- }
-
- th {
- background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
- font-weight: 600;
- color: #1f2937;
- }
-
- tr:hover {
- background: rgba(79, 70, 229, 0.02);
- }
- }
-
- :deep(hr) {
- border: none;
- height: 1px;
- background: linear-gradient(to right, transparent, #e5e7eb, transparent);
- margin: 32px 0;
- }
-
- :deep(strong), :deep(b) {
- font-weight: 600;
- color: #1f2937;
- }
-
- :deep(em), :deep(i) {
- font-style: italic;
- color: #4b5563;
- }
- }
-
- .cover-image-wrapper {
- position: relative;
- margin-top: 24px;
- border-radius: 16px;
- overflow: hidden;
- box-shadow:
- 0 8px 32px rgba(79, 70, 229, 0.12),
- 0 2px 8px rgba(0, 0, 0, 0.06);
-
- .cover-image {
- width: 100%;
- height: auto;
- display: block;
- transition: transform 0.3s ease;
- }
-
- .image-glow {
- position: absolute;
- top: -50%;
- left: -50%;
- right: -50%;
- bottom: -50%;
- background: radial-gradient(circle at center, rgba(79, 70, 229, 0.15), transparent 70%);
- opacity: 0;
- transition: opacity 0.3s ease;
- pointer-events: none;
- }
-
- &:hover {
- .cover-image {
- transform: scale(1.02);
- }
-
- .image-glow {
- opacity: 1;
- }
- }
- }
- }
- }
- @media (max-width: 768px) {
- .course-description {
- padding: 20px;
- border-radius: 16px;
-
- .section-header {
- margin-bottom: 16px;
-
- .header-line {
- height: 20px;
- }
-
- .section-title {
- font-size: 16px;
- }
- }
-
- .description-content {
- .rich-text {
- font-size: 14px;
- line-height: 1.7;
-
- :deep(h1) { font-size: 20px; }
- :deep(h2) { font-size: 18px; }
- :deep(h3) { font-size: 16px; }
- :deep(h4) { font-size: 15px; }
- }
-
- .cover-image-wrapper {
- margin-top: 20px;
- border-radius: 14px;
- }
- }
- }
- }
- @media (max-width: 480px) {
- .course-description {
- padding: 16px;
- border-radius: 14px;
-
- .description-content {
- .rich-text {
- font-size: 13px;
- line-height: 1.6;
-
- :deep(ul), :deep(ol) {
- padding-left: 20px;
- }
-
- :deep(blockquote) {
- padding: 12px 16px;
- margin: 16px 0;
- }
-
- :deep(pre) {
- padding: 16px;
- font-size: 12px;
- }
-
- :deep(table) {
- font-size: 13px;
-
- th, td {
- padding: 10px 12px;
- }
- }
- }
- }
- }
- }
- </style>
|