Browse Source

Improve mobile experience

This includes complying with standards that allow mobile browsers to
create a pseudo-app out of the site, complete with homescreen icon,
splash-screen, and a minimal browser-less UI
spaghetti 7 years ago
parent
commit
56bbe9afb4

+ 22
- 20
design/privateheader.php View File

7
 <html lang="en">
7
 <html lang="en">
8
 <head>
8
 <head>
9
   <title><?=display_str($PageTitle)?></title>
9
   <title><?=display_str($PageTitle)?></title>
10
-  <meta charset="utf-8" />
11
-  <meta name="userid" content="<?=G::$LoggedUser['ID']?>" />
12
-  <meta name="authkey" content="<?=G::$LoggedUser['AuthKey']?>" />
13
-  <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico')?>" />
10
+  <meta charset="utf-8">
11
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
12
+  <meta name="userid" content="<?=G::$LoggedUser['ID']?>">
13
+  <meta name="authkey" content="<?=G::$LoggedUser['AuthKey']?>">
14
+  <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico')?>">
15
+  <link rel="manifest" href="/manifest.php">
14
   <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?>" href="<?=STATIC_SERVER?>opensearch.xml">
16
   <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?>" href="<?=STATIC_SERVER?>opensearch.xml">
15
   <link rel="alternate" type="application/rss+xml"
17
   <link rel="alternate" type="application/rss+xml"
16
       href="feeds.php?feed=feed_news&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
18
       href="feeds.php?feed=feed_news&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
17
-      title="<?=SITE_NAME?> - News" />
19
+      title="<?=SITE_NAME?> - News">
18
   <link rel="alternate" type="application/rss+xml"
20
   <link rel="alternate" type="application/rss+xml"
19
       href="feeds.php?feed=feed_blog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
21
       href="feeds.php?feed=feed_blog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
20
-      title="<?=SITE_NAME?> - Blog" />
22
+      title="<?=SITE_NAME?> - Blog">
21
   <link rel="alternate" type="application/rss+xml"
23
   <link rel="alternate" type="application/rss+xml"
22
       href="feeds.php?feed=feed_changelog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
24
       href="feeds.php?feed=feed_changelog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
23
-      title="<?=SITE_NAME?> - Gazelle Change Log" />
25
+      title="<?=SITE_NAME?> - Gazelle Change Log">
24
   <link rel="alternate" type="application/rss+xml"
26
   <link rel="alternate" type="application/rss+xml"
25
       href="feeds.php?feed=torrents_notify_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
27
       href="feeds.php?feed=torrents_notify_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
26
-      title="<?=SITE_NAME?> - P.T.N." />
28
+      title="<?=SITE_NAME?> - P.T.N.">
27
 <?
29
 <?
28
 if (isset(G::$LoggedUser['Notify'])) {
30
 if (isset(G::$LoggedUser['Notify'])) {
29
   foreach (G::$LoggedUser['Notify'] as $Filter) {
31
   foreach (G::$LoggedUser['Notify'] as $Filter) {
31
 ?>
33
 ?>
32
   <link rel="alternate" type="application/rss+xml"
34
   <link rel="alternate" type="application/rss+xml"
33
       href="feeds.php?feed=torrents_notify_<?=$FilterID?>_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($FilterName)?>"
35
       href="feeds.php?feed=torrents_notify_<?=$FilterID?>_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($FilterName)?>"
34
-      title="<?=SITE_NAME?> - <?=display_str($FilterName)?>" />
36
+      title="<?=SITE_NAME?> - <?=display_str($FilterName)?>">
35
 <?
37
 <?
36
   }
38
   }
37
 }
39
 }
38
 ?>
40
 ?>
39
   <link rel="alternate" type="application/rss+xml"
41
   <link rel="alternate" type="application/rss+xml"
40
       href="feeds.php?feed=torrents_all&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
42
       href="feeds.php?feed=torrents_all&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
41
-      title="<?=SITE_NAME?> - All Torrents" />
43
+      title="<?=SITE_NAME?> - All Torrents">
42
   <link rel="alternate" type="application/rss+xml"
44
   <link rel="alternate" type="application/rss+xml"
43
       href="feeds.php?feed=torrents_movies&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
45
       href="feeds.php?feed=torrents_movies&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
44
-      title="<?=SITE_NAME?> - Movie Torrents" />
46
+      title="<?=SITE_NAME?> - Movie Torrents">
45
   <link rel="alternate" type="application/rss+xml"
47
   <link rel="alternate" type="application/rss+xml"
46
       href="feeds.php?feed=torrents_anime&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
48
       href="feeds.php?feed=torrents_anime&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
47
-      title="<?=SITE_NAME?> - Anime Torrents" />
49
+      title="<?=SITE_NAME?> - Anime Torrents">
48
   <link rel="alternate" type="application/rss+xml"
50
   <link rel="alternate" type="application/rss+xml"
49
       href="feeds.php?feed=torrents_manga&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
51
       href="feeds.php?feed=torrents_manga&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
50
-      title="<?=SITE_NAME?> - Manga Torrents" />
52
+      title="<?=SITE_NAME?> - Manga Torrents">
51
   <link rel="alternate" type="application/rss+xml"
53
   <link rel="alternate" type="application/rss+xml"
52
       href="feeds.php?feed=torrents_games&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
54
       href="feeds.php?feed=torrents_games&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
53
-      title="<?=SITE_NAME?> - Games Torrents" />
55
+      title="<?=SITE_NAME?> - Games Torrents">
54
   <link rel="alternate" type="application/rss+xml"
56
   <link rel="alternate" type="application/rss+xml"
55
       href="feeds.php?feed=torrents_other&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
57
       href="feeds.php?feed=torrents_other&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
56
-      title="<?=SITE_NAME?> - Other Torrents" />
58
+      title="<?=SITE_NAME?> - Other Torrents">
57
   <link rel="stylesheet" type="text/css"
59
   <link rel="stylesheet" type="text/css"
58
-      href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/global.css')?>" />
59
-  <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/tooltipster/style.css')?>" type="text/css" media="screen" />
60
+      href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/global.css')?>">
61
+  <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/tooltipster/style.css')?>" type="text/css" media="screen">
60
 <?
62
 <?
61
 if (empty(G::$LoggedUser['StyleURL'])) {
63
 if (empty(G::$LoggedUser['StyleURL'])) {
62
   if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) {
64
   if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) {
69
   if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?>
71
   if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?>
70
 <meta name="theme-color" content="<?=$StyleColors[G::$LoggedUser['StyleName']]?>">
72
 <meta name="theme-color" content="<?=$StyleColors[G::$LoggedUser['StyleName']]?>">
71
 <? } ?>
73
 <? } ?>
72
-<link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen" href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/'.G::$LoggedUser['StyleName'].'/style.css')?>" />
74
+<link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen" href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/'.G::$LoggedUser['StyleName'].'/style.css')?>">
73
 <?
75
 <?
74
 } else {
76
 } else {
75
   $StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']);
77
   $StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']);
82
     $StyleURL = G::$LoggedUser['StyleURL'];
84
     $StyleURL = G::$LoggedUser['StyleURL'];
83
   }
85
   }
84
 ?>
86
 ?>
85
-<link rel="stylesheet" type="text/css" media="screen" href="<?=$StyleURL?>" title="External CSS" />
87
+<link rel="stylesheet" type="text/css" media="screen" href="<?=$StyleURL?>" title="External CSS">
86
 <?
88
 <?
87
 }
89
 }
88
 $ExtraCSS = explode(',', $CSSIncludes);
90
 $ExtraCSS = explode(',', $CSSIncludes);
91
     continue;
93
     continue;
92
   }
94
   }
93
 ?>
95
 ?>
94
-  <link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT.STATIC_SERVER."styles/$CSS/style.css")?>" />
96
+  <link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT.STATIC_SERVER."styles/$CSS/style.css")?>">
95
 <?
97
 <?
96
 }
98
 }
97
 
99
 

+ 5
- 3
design/publicheader.php View File

6
 <html>
6
 <html>
7
 <head>
7
 <head>
8
   <title><?=display_str($PageTitle)?></title>
8
   <title><?=display_str($PageTitle)?></title>
9
-  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
9
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
10
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
   <meta name="theme-color" content="#461640">
11
   <meta name="theme-color" content="#461640">
11
-  <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>" />
12
-  <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css" />
12
+  <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>">
13
+  <link rel="manifest" href="/manifest.php">
14
+  <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
13
 <?
15
 <?
14
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
16
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
15
   foreach($Scripts as $Script) {
17
   foreach($Scripts as $Script) {

+ 14
- 0
manifest.php View File

1
+<? require 'classes/config.php'; ?>
2
+{
3
+  "name": "<?=SITE_NAME?>",
4
+  "short_name": "<?=SITE_NAME?>",
5
+  "start_url": "index.php",
6
+  "display": "standalone",
7
+  "background_color": "#FCC2E6",
8
+  "theme_color": "#451740",
9
+  "icons": [{
10
+    "src": "static/common/icon.png",
11
+    "sizes": "512x512",
12
+    "type": "image/png"
13
+  }]
14
+}

+ 2
- 2
sections/login/login.php View File

17
   <table class="layout">
17
   <table class="layout">
18
     <tr>
18
     <tr>
19
       <td colspan="2">
19
       <td colspan="2">
20
-        <input type="text" name="username" id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}" autofocus="autofocus" placeholder="Username" size="40" />
20
+        <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username" id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}" autofocus="autofocus" placeholder="Username" size="40" />
21
       </td>
21
       </td>
22
     </tr>
22
     </tr>
23
     <tr>
23
     <tr>
25
         <input type="password" name="password" id="password" class="inputtext" required="required" maxlength="307200" pattern=".{6,307200}" placeholder="Password" />
25
         <input type="password" name="password" id="password" class="inputtext" required="required" maxlength="307200" pattern=".{6,307200}" placeholder="Password" />
26
       </td>
26
       </td>
27
       <td>
27
       <td>
28
-        <input type="text" name="twofa" id="twofa" class="inputtext" maxlength="6" pattern="[0-9]{6}" placeholder="2FA" size="6" title="Leave blank if you have not enabled 2FA" />
28
+        <input type="text" name="twofa" id="twofa" class="inputtext" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" placeholder="2FA" size="6" title="Leave blank if you have not enabled 2FA" />
29
       </td>
29
       </td>
30
     </tr>
30
     </tr>
31
     <tr>
31
     <tr>

BIN
static/common/icon.png View File


+ 1
- 1
static/functions/jquery.js
File diff suppressed because it is too large
View File


+ 2
- 1
static/styles/public/style.css View File

118
   background-size: contain;
118
   background-size: contain;
119
   display: flex;
119
   display: flex;
120
   align-items: center;
120
   align-items: center;
121
+  margin: 0 10%;
121
 }
122
 }
122
 
123
 
123
 #maincontent {
124
 #maincontent {
124
-  margin: auto 10% auto auto;
125
+  margin: auto 0 auto auto;
125
   background-color: transparent;
126
   background-color: transparent;
126
 }
127
 }
127
 
128
 

Loading…
Cancel
Save