Skip to content

Commit 427356d

Browse files
committed
fix: meta tags & release v0.1.1
1 parent 8c79dc2 commit 427356d

File tree

5 files changed

+43
-41
lines changed

5 files changed

+43
-41
lines changed

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@
1717
<meta property="og:url" content="https://yaqiin.org/" />
1818
<meta property="og:title" content="يقين - القرأن الكريم" />
1919
<meta property="og:description" content="منصة القرأن الكريم" />
20-
<meta property="og:image" content="/images/logo.png" />
20+
<meta property="og:image" content="/logo.png" />
2121

2222
<!-- Twitter -->
2323
<meta property="twitter:card" content="summary_large_image" />
2424
<meta property="twitter:url" content="https://yaqiin.org/" />
2525
<meta property="twitter:title" content="يقين - القرأن الكريم" />
2626
<meta property="twitter:description" content="منصة القرأن الكريم" />
27-
<meta property="twitter:image" content="/images/logo.png" />
27+
<meta property="twitter:image" content="/logo.png" />
2828

2929
<!-- Favicon -->
3030
<!-- Standard Favicon -->
31-
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
31+
<link rel="icon" type="image/x-icon" href="/favicon.ico">
3232

3333
<!-- PNG Favicon -->
34-
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
35-
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
34+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
35+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
3636

3737
<!-- Apple Touch Icon (iOS) -->
38-
<link rel="apple-touch-icon" href="/images/apple-touch-icon.png">
38+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
3939

4040
<!-- Android Chrome Icons -->
41-
<link rel="icon" type="image/png" sizes="192x192" href="/images/android-chrome-192x192.png">
42-
<link rel="icon" type="image/png" sizes="512x512" href="/images/android-chrome-512x512.png">
41+
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
42+
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">
4343

4444
<!-- Web App Manifest for PWAs -->
45-
<link rel="manifest" href="/images/site.webmanifest">
45+
<link rel="manifest" href="/site.webmanifest">
4646

4747
<!-- Color Theme -->
4848
<meta name="theme-color" content="#ffffff" />

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite_react_shadcn_ts",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

public/placeholder.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/PageViewer.tsx

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
2-
import { useState, useEffect } from "react";
3-
import { cn } from "@/lib/utils";
4-
import PageSkeleton from "./PageSkeleton";
1+
import { useState, useEffect } from 'react';
2+
import { cn } from '@/lib/utils';
3+
import PageSkeleton from './PageSkeleton';
54

65
interface PageViewerProps {
76
pageNumber: number;
@@ -12,86 +11,90 @@ interface PageViewerProps {
1211
export default function PageViewer({ pageNumber, totalPages, className }: PageViewerProps) {
1312
const [isLoading, setIsLoading] = useState(true);
1413
const [error, setError] = useState<string | null>(null);
15-
14+
1615
// Format page number to 3 digits with leading zeros
1716
const formattedPageNumber = pageNumber.toString().padStart(3, '0');
18-
17+
1918
// SVG path
2019
const pagePath = `https://raw.githubusercontent.com/yaqiin/quran-svg/refs/heads/main/hafs/${formattedPageNumber}.svg`;
21-
20+
2221
useEffect(() => {
2322
// Reset loading state when page changes
2423
setIsLoading(true);
2524
setError(null);
26-
25+
2726
// Simulate loading - in production, this would be real SVG loading
2827
const timer = setTimeout(() => {
2928
setIsLoading(false);
3029
}, 500);
31-
30+
3231
return () => clearTimeout(timer);
3332
}, [pageNumber]);
34-
33+
3534
const handleImageLoad = () => {
3635
setIsLoading(false);
3736
};
38-
37+
3938
const handleImageError = () => {
4039
setIsLoading(false);
4140
setError(`لم يتم العثور على الصفحة ${pageNumber}`);
4241
};
43-
42+
4443
if (pageNumber > totalPages || pageNumber < 1) {
4544
return (
46-
<div className={cn("flex items-center justify-center bg-muted rounded-lg", className)}>
45+
<div className={cn('flex items-center justify-center rounded-lg bg-muted', className)}>
4746
<p className="text-muted-foreground">لا توجد صفحة</p>
4847
</div>
4948
);
5049
}
51-
50+
5251
return (
53-
<div className={cn("relative flex items-center justify-center overflow-hidden bg-white rounded-lg shadow-md", className)}>
52+
<div
53+
className={cn(
54+
'relative flex items-center justify-center overflow-hidden rounded-lg bg-white shadow-md',
55+
className,
56+
)}
57+
>
5458
{isLoading && <PageSkeleton />}
55-
59+
5660
{error ? (
5761
<div className="flex items-center justify-center p-8">
5862
<p className="text-destructive">{error}</p>
5963
</div>
6064
) : (
6165
<>
62-
{/* For the demo, we'll use placeholder images */}
63-
<img
66+
<img
6467
src={pagePath}
6568
alt={`صفحة ${pageNumber}`}
6669
className={cn(
67-
"w-full h-full object-contain transition-opacity duration-300",
68-
isLoading ? "opacity-0" : "opacity-100"
70+
'h-full w-full object-contain transition-opacity duration-300',
71+
isLoading ? 'opacity-0' : 'opacity-100',
6972
)}
7073
onLoad={handleImageLoad}
7174
onError={handleImageError}
7275
/>
73-
76+
7477
{/* This would be the actual SVG in production */}
75-
{/*
76-
<object
78+
{/*
79+
<object
7780
data={pagePath}
7881
type="image/svg+xml"
7982
className={cn(
80-
"w-full h-full transition-opacity duration-300",
83+
"w-full h-full transition-opacity duration-300",
8184
isLoading ? "opacity-0" : "opacity-100"
8285
)}
8386
onLoad={handleImageLoad}
8487
onError={handleImageError}
8588
>
86-
<img
87-
src={`https://placehold.co/800x1200/e2e8f0/1e293b?text=صفحة+${pageNumber}`}
89+
<img
90+
src={`https://placehold.co/800x1200/e2e8f0/1e293b?text=صفحة+${pageNumber}`}
8891
alt={`صفحة ${pageNumber}`}
8992
className="w-full h-full object-contain"
9093
/>
9194
</object>
9295
*/}
93-
94-
<span className="absolute bottom-2 left-1/2 transform -translate-x-1/2 text-xs text-muted-foreground bg-white/80 px-2 py-1 rounded-full">
96+
97+
<span className="absolute bottom-2 left-1/2 -translate-x-1/2 transform rounded-full bg-white/80 px-2 py-1 text-xs text-muted-foreground">
9598
{pageNumber}
9699
</span>
97100
</>

0 commit comments

Comments
 (0)