Skip to content

Commit 979f472

Browse files
committed
Added Support Button
1 parent c3a7487 commit 979f472

File tree

7 files changed

+258
-1
lines changed

7 files changed

+258
-1
lines changed

public/css/dashboard.css

+72-1
Original file line numberDiff line numberDiff line change
@@ -840,4 +840,75 @@ body {
840840
::-webkit-scrollbar-thumb {
841841
background: var(--accent-secondary);
842842
border-radius: 4px;
843-
}
843+
}
844+
845+
/* GitHub Star Button */
846+
.github-button {
847+
display: inline-flex;
848+
align-items: center;
849+
font-weight: 500;
850+
font-size: 14px;
851+
text-decoration: none;
852+
border-radius: 6px;
853+
transition: all 0.2s ease;
854+
overflow: hidden;
855+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
856+
}
857+
858+
.github-button:hover {
859+
text-decoration: none;
860+
}
861+
862+
.star-button {
863+
display: flex;
864+
align-items: center;
865+
padding: 5px 12px;
866+
background-color: var(--bg-primary);
867+
color: var(--text-primary);
868+
border: 1px solid var(--border-color);
869+
border-right: 0;
870+
border-top-right-radius: 0;
871+
border-bottom-right-radius: 0;
872+
border-top-left-radius: 6px;
873+
border-bottom-left-radius: 6px;
874+
transition: background-color 0.2s;
875+
}
876+
877+
.star-count {
878+
position: relative;
879+
padding: 5px 12px;
880+
font-weight: 600;
881+
background-color: var(--bg-primary);
882+
color: var(--text-primary);
883+
border: 1px solid var(--border-color);
884+
border-top-right-radius: 6px;
885+
border-bottom-right-radius: 6px;
886+
transition: background-color 0.2s;
887+
}
888+
889+
.star-count::before {
890+
content: '';
891+
position: absolute;
892+
left: -5px;
893+
top: 50%;
894+
transform: translateY(-50%) rotate(45deg);
895+
width: 8px;
896+
height: 8px;
897+
background-color: var(--bg-primary);
898+
border-left: 1px solid var(--border-color);
899+
border-bottom: 1px solid var(--border-color);
900+
}
901+
902+
.github-button:hover .star-button {
903+
background-color: var(--hover-bg);
904+
}
905+
906+
.star-icon {
907+
fill: var(--accent-primary);
908+
margin-right: 4px;
909+
transition: transform 0.3s ease;
910+
}
911+
912+
.github-button:hover .star-icon {
913+
transform: rotate(-15deg) scale(1.2);
914+
}

views/chat.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@
3939
<li><a href="/settings" class="sidebar-link"><i class="fas fa-cog"></i><span>Settings</span></a></li>
4040
<li><a href="/logout" class="sidebar-link"><i class="fa-solid fa-right-from-bracket"></i><span>Logout</span></a></li>
4141
</ul>
42+
<a href="https://github.com/clusterzx/paperless-ai"
43+
class="github-button"
44+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
45+
<span class="star-button">
46+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
47+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
48+
</svg>
49+
Star
50+
</span>
51+
<span id="starCount" class="star-count">1.2k</span>
52+
</a>
53+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
54+
Please support us on GitHub
55+
</p>
4256
</nav>
4357
</aside>
4458

@@ -140,6 +154,23 @@
140154
});
141155
});
142156
</script>
157+
<script>
158+
// get github stars count from repo
159+
async function getStarsCount() {
160+
try {
161+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
162+
if (!response.ok) throw new Error('Failed to fetch repo info');
163+
164+
const data = await response.json();
165+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
166+
} catch (error) {
167+
console.error('Failed to fetch stars count:', error);
168+
}
169+
}
170+
document.addEventListener('DOMContentLoaded', function() {
171+
getStarsCount();
172+
});
173+
</script>
143174
<script src="js/dashboard.js"></script>
144175
<script src="js/chat.js"></script>
145176
</body>

views/dashboard.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@
7171
</a>
7272
</li>
7373
</ul>
74+
<a href="https://github.com/clusterzx/paperless-ai"
75+
class="github-button"
76+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
77+
<span class="star-button">
78+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
79+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
80+
</svg>
81+
Star
82+
</span>
83+
<span id="starCount" class="star-count">1.2k</span>
84+
</a>
85+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
86+
Please support us on GitHub
87+
</p>
7488
</nav>
7589
</aside>
7690

@@ -630,6 +644,23 @@
630644
// Initial update
631645
updateProcessingStatus();
632646
</script>
647+
<script>
648+
// get github stars count from repo
649+
async function getStarsCount() {
650+
try {
651+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
652+
if (!response.ok) throw new Error('Failed to fetch repo info');
653+
654+
const data = await response.json();
655+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
656+
} catch (error) {
657+
console.error('Failed to fetch stars count:', error);
658+
}
659+
}
660+
document.addEventListener('DOMContentLoaded', function() {
661+
getStarsCount();
662+
});
663+
</script>
633664
<script src="js/dashboard.js"></script>
634665
</body>
635666
</html>

views/history.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@
6666
<li><a href="/settings" class="sidebar-link"><i class="fas fa-cog"></i><span>Settings</span></a></li>
6767
<li><a href="/logout" class="sidebar-link"><i class="fa-solid fa-right-from-bracket"></i><span>Logout</span></a></li>
6868
</ul>
69+
<a href="https://github.com/clusterzx/paperless-ai"
70+
class="github-button"
71+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
72+
<span class="star-button">
73+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
74+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
75+
</svg>
76+
Star
77+
</span>
78+
<span id="starCount" class="star-count">1.2k</span>
79+
</a>
80+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
81+
Please support us on GitHub
82+
</p>
6983
</nav>
7084
</aside>
7185

@@ -208,6 +222,23 @@
208222
});
209223
});
210224
</script>
225+
<script>
226+
// get github stars count from repo
227+
async function getStarsCount() {
228+
try {
229+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
230+
if (!response.ok) throw new Error('Failed to fetch repo info');
231+
232+
const data = await response.json();
233+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
234+
} catch (error) {
235+
console.error('Failed to fetch stars count:', error);
236+
}
237+
}
238+
document.addEventListener('DOMContentLoaded', function() {
239+
getStarsCount();
240+
});
241+
</script>
211242
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
212243
<script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
213244
<script src="js/history.js"></script>

views/manual.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@
7171
</a>
7272
</li>
7373
</ul>
74+
<a href="https://github.com/clusterzx/paperless-ai"
75+
class="github-button"
76+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
77+
<span class="star-button">
78+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
79+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
80+
</svg>
81+
Star
82+
</span>
83+
<span id="starCount" class="star-count">1.2k</span>
84+
</a>
85+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
86+
Please support us on GitHub
87+
</p>
7488
</nav>
7589
</aside>
7690

@@ -667,6 +681,23 @@ return object;
667681
});
668682
});
669683
</script>
684+
<script>
685+
// get github stars count from repo
686+
async function getStarsCount() {
687+
try {
688+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
689+
if (!response.ok) throw new Error('Failed to fetch repo info');
690+
691+
const data = await response.json();
692+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
693+
} catch (error) {
694+
console.error('Failed to fetch stars count:', error);
695+
}
696+
}
697+
document.addEventListener('DOMContentLoaded', function() {
698+
getStarsCount();
699+
});
700+
</script>
670701
<script src="js/dashboard.js"></script>
671702
</body>
672703
</html>

views/playground.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@
9595
</a>
9696
</li>
9797
</ul>
98+
<a href="https://github.com/clusterzx/paperless-ai"
99+
class="github-button"
100+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
101+
<span class="star-button">
102+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
103+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
104+
</svg>
105+
Star
106+
</span>
107+
<span id="starCount" class="star-count">1.2k</span>
108+
</a>
109+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
110+
Please support us on GitHub
111+
</p>
98112
</nav>
99113
</aside>
100114

@@ -239,6 +253,23 @@
239253
});
240254
});
241255
</script>
256+
<script>
257+
// get github stars count from repo
258+
async function getStarsCount() {
259+
try {
260+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
261+
if (!response.ok) throw new Error('Failed to fetch repo info');
262+
263+
const data = await response.json();
264+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
265+
} catch (error) {
266+
console.error('Failed to fetch stars count:', error);
267+
}
268+
}
269+
document.addEventListener('DOMContentLoaded', function() {
270+
getStarsCount();
271+
});
272+
</script>
242273
<script src="js/playground.js"></script>
243274
</body>
244275
</html>

views/settings.ejs

+31
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,20 @@
136136
</a>
137137
</li>
138138
</ul>
139+
<a href="https://github.com/clusterzx/paperless-ai"
140+
class="github-button"
141+
style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);">
142+
<span class="star-button">
143+
<svg class="star-icon" height="16" width="16" viewBox="0 0 16 16">
144+
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path>
145+
</svg>
146+
Star
147+
</span>
148+
<span id="starCount" class="star-count">1.2k</span>
149+
</a>
150+
<p style="position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #555; text-align: center;">
151+
Please support us on GitHub
152+
</p>
139153
</nav>
140154
</aside>
141155

@@ -936,6 +950,23 @@
936950
});
937951
});
938952
</script>
953+
<script>
954+
// get github stars count from repo
955+
async function getStarsCount() {
956+
try {
957+
const response = await fetch('https://api.github.com/repos/clusterzx/paperless-ai');
958+
if (!response.ok) throw new Error('Failed to fetch repo info');
959+
960+
const data = await response.json();
961+
document.getElementById('starCount').textContent = data.stargazers_count.toLocaleString();
962+
} catch (error) {
963+
console.error('Failed to fetch stars count:', error);
964+
}
965+
}
966+
document.addEventListener('DOMContentLoaded', function() {
967+
getStarsCount();
968+
});
969+
</script>
939970
<script src="js/settings.js"></script>
940971
</body>
941972
</html>

0 commit comments

Comments
 (0)