|
1 | 1 | <script setup lang="ts"> |
2 | | -
|
3 | 2 | import { homeSponsor } from "../data/sponsors"; |
4 | | -
|
5 | 3 | </script> |
6 | 4 |
|
7 | 5 | <template> |
8 | | - <section v-if="homeSponsor.href && homeSponsor.link" id="special-spsr"> |
9 | | - <span>特别赞助商</span> |
10 | | - <a :href="homeSponsor.href" target="_blank"> |
11 | | - <img width="168" height="42" :src="homeSponsor.link" :alt="homeSponsor.alt" /> |
12 | | - </a> |
13 | | - <span>{{ homeSponsor.text }}</span> |
14 | | - </section> |
15 | | - <section v-else id="special-spsr"> |
16 | | - <span> |
17 | | - <a class="no-sponsor" href="/fastapi_best_architecture_docs/sponsors#展位赞助商"> |
18 | | - 特别赞助位目前空缺 - 现在咨询 |
19 | | - </a> |
20 | | - </span> |
21 | | - </section> |
| 6 | + <section v-if="homeSponsor.href && homeSponsor.link" id="special-spsr"> |
| 7 | + <span>特别赞助商</span> |
| 8 | + <a :href="homeSponsor.href" target="_blank"> |
| 9 | + <img width="121" :src="homeSponsor.link" :alt="homeSponsor.alt" /> |
| 10 | + </a> |
| 11 | + <span>{{ homeSponsor.description }}</span> |
| 12 | + </section> |
| 13 | + <section v-else id="special-spsr"> |
| 14 | + <span class="no-sponsor"> |
| 15 | + <a href="/fastapi_best_architecture_docs/sponsors#展位赞助商">特别赞助位目前空缺 - 现在咨询 💬</a> |
| 16 | + </span> |
| 17 | + </section> |
22 | 18 | </template> |
23 | 19 |
|
24 | 20 | <style scoped> |
25 | | -.no-sponsor{ |
26 | | - color: var(--vp-c-brand-1) |
| 21 | +.no-sponsor { |
| 22 | + animation: no-sponsor 2s ease-in-out infinite; |
| 23 | + display: flex; |
| 24 | + justify-content: center; |
| 25 | + padding: 0 24px; |
| 26 | + color: var(--vp-c-brand-1) !important; |
27 | 27 | } |
28 | 28 |
|
29 | | -.no-sponsor:hover { |
30 | | - color: var(--vp-c-brand-2) !important; |
| 29 | +@keyframes no-sponsor { |
| 30 | + 0%, |
| 31 | + 100% { |
| 32 | + opacity: 1; |
| 33 | + } |
| 34 | + 50% { |
| 35 | + opacity: 0.3; |
| 36 | + } |
31 | 37 | } |
32 | 38 |
|
33 | 39 | #special-spsr { |
34 | | - border-top: 1px solid var(--vp-c-divider); |
35 | | - border-bottom: 1px solid var(--vp-c-divider); |
36 | | - padding: 12px 24px; |
37 | | - display: flex; |
38 | | - align-items: center; |
39 | | - margin: 0 -9999px; |
40 | | - padding: 1 9999px; |
| 40 | + border-top: 1px solid var(--vp-c-divider); |
| 41 | + border-bottom: 1px solid var(--vp-c-divider); |
| 42 | + padding: 12px; |
| 43 | + display: flex; |
| 44 | + align-items: center; |
| 45 | + margin: 0 -9999px; |
| 46 | + padding: 1 9999px; |
41 | 47 | } |
42 | 48 |
|
43 | 49 | #special-spsr span { |
44 | | - color: var(--vp-c-text-2); |
45 | | - font-weight: 500; |
46 | | - font-size: 13px; |
47 | | - vertical-align: middle; |
48 | | - flex: 1; |
| 50 | + color: var(--vp-c-text-2); |
| 51 | + font-size: 13px; |
| 52 | + vertical-align: middle; |
| 53 | + flex: 1; |
49 | 54 | } |
50 | 55 |
|
51 | 56 | #special-spsr span:first-child { |
52 | | - text-align: right; |
53 | | -} |
54 | | -
|
55 | | -#special-spsr a { |
56 | | - display: flex; |
57 | | - justify-content: center; |
58 | | - padding: 0 24px; |
| 57 | + text-align: right; |
59 | 58 | } |
60 | 59 |
|
61 | 60 | #special-spsr img { |
62 | | - height: 42px; |
63 | | - margin: -6px 0; |
| 61 | + height: 52px; |
| 62 | + margin: -6px 0; |
64 | 63 | } |
65 | 64 |
|
66 | 65 | .dark #special-spsr img { |
67 | | - filter: grayscale(1) invert(1); |
| 66 | + filter: grayscale(1) invert(1); |
68 | 67 | } |
69 | 68 |
|
70 | 69 | @media (max-width: 576px) { |
71 | | - #special-spsr { |
72 | | - flex-direction: column; |
73 | | - } |
| 70 | + #special-spsr { |
| 71 | + flex-direction: column; |
| 72 | + } |
74 | 73 |
|
75 | | - #special-spsr img { |
76 | | - height: 36px; |
77 | | - margin: 8px 0; |
78 | | - } |
| 74 | + #special-spsr img { |
| 75 | + height: 52px; |
| 76 | + margin: 8px 0; |
| 77 | + } |
79 | 78 |
|
80 | | - #special-spsr span { |
81 | | - text-align: center !important; |
82 | | - } |
| 79 | + #special-spsr span { |
| 80 | + text-align: center !important; |
| 81 | + } |
83 | 82 | } |
84 | 83 | </style> |
0 commit comments