|
| 1 | +import { Component } from '@angular/core'; |
| 2 | +import { CommonModule } from '@angular/common'; |
| 3 | + |
| 4 | +@Component({ |
| 5 | + selector: 'demo-banner', |
| 6 | + standalone: true, |
| 7 | + imports: [CommonModule], |
| 8 | + template: ` |
| 9 | + <div class="demo-banner"> |
| 10 | + <div class="container"> |
| 11 | + <span class="icon">🚀</span> |
| 12 | + <div class="content"> |
| 13 | + <strong>Interactive Demo</strong> |
| 14 | + <p>Test the ngx-open-web-ui-chat component with your OpenWebUI instance</p> |
| 15 | + </div> |
| 16 | + <div class="links"> |
| 17 | + <a href="https://github.com/JealousyM/ngx-open-web-ui-chat" |
| 18 | + target="_blank" |
| 19 | + rel="noopener" |
| 20 | + class="btn btn-github"> |
| 21 | + <span class="icon-github">⭐</span> |
| 22 | + GitHub |
| 23 | + </a> |
| 24 | + <a href="https://www.npmjs.com/package/ngx-open-web-ui-chat" |
| 25 | + target="_blank" |
| 26 | + rel="noopener" |
| 27 | + class="btn btn-npm"> |
| 28 | + 📦 NPM |
| 29 | + </a> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + `, |
| 34 | + styles: [` |
| 35 | + .demo-banner { |
| 36 | + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| 37 | + color: white; |
| 38 | + box-shadow: 0 2px 8px rgba(0,0,0,0.15); |
| 39 | + position: sticky; |
| 40 | + top: 0; |
| 41 | + z-index: 100; |
| 42 | + } |
| 43 | + |
| 44 | + .container { |
| 45 | + max-width: 1600px; |
| 46 | + margin: 0 auto; |
| 47 | + padding: 12px 20px; |
| 48 | + display: flex; |
| 49 | + align-items: center; |
| 50 | + gap: 16px; |
| 51 | + } |
| 52 | + |
| 53 | + .icon { |
| 54 | + font-size: 28px; |
| 55 | + animation: bounce 2s ease-in-out infinite; |
| 56 | + } |
| 57 | + |
| 58 | + @keyframes bounce { |
| 59 | + 0%, 100% { transform: translateY(0); } |
| 60 | + 50% { transform: translateY(-5px); } |
| 61 | + } |
| 62 | + |
| 63 | + .content { |
| 64 | + flex: 1; |
| 65 | + |
| 66 | + strong { |
| 67 | + font-size: 16px; |
| 68 | + display: block; |
| 69 | + margin-bottom: 2px; |
| 70 | + font-weight: 700; |
| 71 | + } |
| 72 | + |
| 73 | + p { |
| 74 | + margin: 0; |
| 75 | + font-size: 13px; |
| 76 | + opacity: 0.95; |
| 77 | + font-weight: 400; |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + .links { |
| 82 | + display: flex; |
| 83 | + gap: 8px; |
| 84 | + } |
| 85 | + |
| 86 | + .btn { |
| 87 | + padding: 8px 16px; |
| 88 | + background: rgba(255, 255, 255, 0.2); |
| 89 | + backdrop-filter: blur(10px); |
| 90 | + color: white; |
| 91 | + text-decoration: none; |
| 92 | + border-radius: 6px; |
| 93 | + font-weight: 600; |
| 94 | + font-size: 14px; |
| 95 | + transition: all 0.2s; |
| 96 | + display: flex; |
| 97 | + align-items: center; |
| 98 | + gap: 6px; |
| 99 | + border: 1px solid rgba(255, 255, 255, 0.3); |
| 100 | + |
| 101 | + &:hover { |
| 102 | + background: rgba(255, 255, 255, 0.3); |
| 103 | + transform: translateY(-2px); |
| 104 | + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); |
| 105 | + } |
| 106 | + |
| 107 | + &:active { |
| 108 | + transform: translateY(0); |
| 109 | + } |
| 110 | + } |
| 111 | + |
| 112 | + .btn-github { |
| 113 | + .icon-github { |
| 114 | + font-size: 16px; |
| 115 | + } |
| 116 | + } |
| 117 | + |
| 118 | + @media (max-width: 768px) { |
| 119 | + .container { |
| 120 | + flex-wrap: wrap; |
| 121 | + gap: 12px; |
| 122 | + } |
| 123 | + |
| 124 | + .content { |
| 125 | + flex: 1 1 100%; |
| 126 | + |
| 127 | + strong { |
| 128 | + font-size: 14px; |
| 129 | + } |
| 130 | + |
| 131 | + p { |
| 132 | + font-size: 12px; |
| 133 | + } |
| 134 | + } |
| 135 | + |
| 136 | + .links { |
| 137 | + flex: 1 1 100%; |
| 138 | + justify-content: center; |
| 139 | + } |
| 140 | + |
| 141 | + .btn { |
| 142 | + flex: 1; |
| 143 | + justify-content: center; |
| 144 | + font-size: 13px; |
| 145 | + padding: 6px 12px; |
| 146 | + } |
| 147 | + } |
| 148 | + `] |
| 149 | +}) |
| 150 | +export class DemoBannerComponent {} |
| 151 | + |
0 commit comments