nodebb-plugin-niki-loyalty 1.3.10 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/widget-niki-floating.html +0 -132
package/package.json
CHANGED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
NİKİ FLOATING WIDGET - NodeBB Widget Alanına Ekleyin
|
|
3
|
-
|
|
4
|
-
KULLANIM:
|
|
5
|
-
1. NodeBB Admin Panel → Widgets
|
|
6
|
-
2. "HTML Widget" veya "Text/HTML" widget'ını seçin
|
|
7
|
-
3. Bu kodu yapıştırın
|
|
8
|
-
4. İstediğiniz alana sürükleyin (Footer, Global, vb.)
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
<!-- Niki Floating Widget Container -->
|
|
12
|
-
<div id="niki-floating-widget" class="niki-floating-widget">
|
|
13
|
-
<a href="/niki-wallet" class="niki-widget-content">
|
|
14
|
-
<img src="/plugins/nodebb-plugin-niki-loyalty/static/logo.png" alt="Niki" class="niki-widget-logo">
|
|
15
|
-
<span class="niki-widget-points">
|
|
16
|
-
<span id="widget-user-points">0</span>
|
|
17
|
-
<small>Puan</small>
|
|
18
|
-
</span>
|
|
19
|
-
</a>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<style>
|
|
23
|
-
/* Niki Floating Widget Stilleri */
|
|
24
|
-
.niki-floating-widget {
|
|
25
|
-
position: fixed !important;
|
|
26
|
-
bottom: 25px;
|
|
27
|
-
left: 25px;
|
|
28
|
-
z-index: 9998;
|
|
29
|
-
animation: nikiFloat 3s ease-in-out infinite;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.niki-widget-content {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 10px;
|
|
36
|
-
background: linear-gradient(135deg, #4E342E 0%, #3E2723 100%);
|
|
37
|
-
padding: 10px 16px 10px 12px;
|
|
38
|
-
border-radius: 50px;
|
|
39
|
-
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
|
40
|
-
text-decoration: none !important;
|
|
41
|
-
color: #fff !important;
|
|
42
|
-
transition: all 0.3s ease;
|
|
43
|
-
border: 2px solid rgba(255, 255, 255, 0.1);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.niki-widget-content:hover {
|
|
47
|
-
transform: scale(1.05);
|
|
48
|
-
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
|
|
49
|
-
text-decoration: none !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.niki-widget-logo {
|
|
53
|
-
width: 40px;
|
|
54
|
-
height: 40px;
|
|
55
|
-
border-radius: 50%;
|
|
56
|
-
object-fit: cover;
|
|
57
|
-
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.niki-widget-points {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
align-items: flex-start;
|
|
64
|
-
line-height: 1.2;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.niki-widget-points #widget-user-points {
|
|
68
|
-
font-size: 18px;
|
|
69
|
-
font-weight: 700;
|
|
70
|
-
color: #ffd700;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.niki-widget-points small {
|
|
74
|
-
font-size: 11px;
|
|
75
|
-
opacity: 0.8;
|
|
76
|
-
color: #fff;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Floating Animasyonu */
|
|
80
|
-
@keyframes nikiFloat {
|
|
81
|
-
|
|
82
|
-
0%,
|
|
83
|
-
100% {
|
|
84
|
-
transform: translateY(0);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
50% {
|
|
88
|
-
transform: translateY(-5px);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Mobilde Küçült */
|
|
93
|
-
@media (max-width: 768px) {
|
|
94
|
-
.niki-floating-widget {
|
|
95
|
-
bottom: 15px;
|
|
96
|
-
left: 15px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.niki-widget-content {
|
|
100
|
-
padding: 8px 12px 8px 8px;
|
|
101
|
-
gap: 8px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.niki-widget-logo {
|
|
105
|
-
width: 32px;
|
|
106
|
-
height: 32px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.niki-widget-points #widget-user-points {
|
|
110
|
-
font-size: 16px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/* Giriş yapmamış kullanıcılar için gizle */
|
|
115
|
-
body:not(.loggedIn) .niki-floating-widget {
|
|
116
|
-
display: none !important;
|
|
117
|
-
}
|
|
118
|
-
</style>
|
|
119
|
-
|
|
120
|
-
<script>
|
|
121
|
-
// Widget puanını güncelle (client.js zaten bunu yapıyor)
|
|
122
|
-
(function () {
|
|
123
|
-
// client.js'deki updateFloatingWidget fonksiyonu widget-user-points'i güncelleyecek
|
|
124
|
-
// Ekstra bir işlem gerekmez, sadece ID'nin doğru olduğundan emin olun
|
|
125
|
-
|
|
126
|
-
// Giriş yapmamış kullanıcılar için widget'ı gizle
|
|
127
|
-
if (typeof app !== 'undefined' && (!app.user || !app.user.uid)) {
|
|
128
|
-
var widget = document.getElementById('niki-floating-widget');
|
|
129
|
-
if (widget) widget.style.display = 'none';
|
|
130
|
-
}
|
|
131
|
-
})();
|
|
132
|
-
</script>
|