File tree Expand file tree Collapse file tree 4 files changed +103
-0
lines changed
Expand file tree Collapse file tree 4 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 1+ * {
2+ margin : 0px ;
3+ }
4+ # iphone {
5+ width : 100% ;
6+ display : flex;
7+ justify-content : center;
8+ border-bottom : 2px solid # a9a9a8 ;
9+ padding : 3px 0px ;
10+ display : none;
11+ }
12+ # iphone img {
13+ height : 65px ;
14+ width : 65px ;
15+ object-fit : contain;
16+ border-radius : 50% ;
17+ margin-right : 13px ;
18+ }
19+ # close-iphone {
20+ font-weight : bold;
21+ font-size : 26px ;
22+ line-height : 65px ;
23+ color : # 888888 ;
24+ margin : 0px 13px ;
25+ cursor : pointer;
26+ }
27+ # text-iphone {
28+ width : 40% ;
29+ }
30+ # app_name-iphone {
31+ font-weight : bold;
32+ font-family : Arial, Helvetica, sans-serif;
33+ font-size : 18px ;
34+ padding : 11px 0px ;
35+ color : black;
36+ }
37+ # app_title-iphone {
38+ font-size : 14px ;
39+ font-family : monospace;
40+ color : black;
41+ }
42+ # iphone button {
43+ width : 25% ;
44+ background : rgb (255 , 54 , 54 );
45+ color : white;
46+ height : 40px ;
47+ border : 0px ;
48+ margin-top : 15px ;
49+ border-radius : 14px ;
50+ }
Original file line number Diff line number Diff line change 1+ let section_iphone = document . getElementById ( "iphone" ) ;
2+
3+ // لجلب بيانات عن جهاز المستخدم
4+ let user_device = navigator . userAgent . toLocaleLowerCase ( ) ;
5+
6+ // للتحقق من إن كان مستخدم يملك جهاز يعمل بنظام ايفون او لا
7+ if ( user_device . includes ( "iphone" ) ) {
8+
9+ // لتاخير عرض الصندوق حسب المدة الذي تحدده بعد فتح مستخدم للموقعك
10+ setTimeout ( ( ) => {
11+ section_iphone . style . display = "flex" ;
12+ } , 5 * 1000 ) ;
13+
14+ // لكي يودي المستخدم إلى صفحة تحميل تطبيق عند نقر على الزر
15+ let app_downlaod = document . getElementById ( "app_downlaod-iphone" ) ;
16+ app_downlaod . addEventListener ( "click" , ( ) => {
17+ window . open ( "http://codershiyar.com/app" , "_blank" )
18+ } ) ;
19+ } else {
20+ // لإخفاء العنصر عندما يكون مستخدم جهازه يعمل بنظام ليس بنظام ايفون
21+ section_iphone . style . display = "none" ;
22+ }
23+
24+ // لإخفاء العنصر عند نقر على علامة اكس
25+ let close_iphone = document . getElementById ( "close-iphone" ) ;
26+ close_iphone . addEventListener ( "click" , ( ) => {
27+ section_iphone . style . display = "none" ;
28+ } ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < title > Coder Shiyar</ title >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
7+
8+ < link rel ="stylesheet " href ="app.css ">
9+ </ head >
10+ < body >
11+
12+ < section id ="iphone ">
13+ < span id ="close-iphone "> × </ span >
14+ < img src ="logo_icon.png "/>
15+ < span id ="text-iphone ">
16+ < p id ="app_name-iphone "> SHIYAR APP </ p >
17+ < p id ="app_title-iphone "> Free on Iphone Story </ p >
18+ </ span >
19+ < button id ="app_downlaod-iphone "> Open - فتح</ button >
20+ </ section >
21+
22+
23+ < script src ="app.js "> </ script >
24+ </ body >
25+ </ html >
You can’t perform that action at this time.
0 commit comments