* auto-switch to mobile version is enabled by default

This commit is contained in:
Max Pozdeev 2020-09-26 23:57:10 +03:00
parent b8d1a23205
commit 85fb8dea69
5 changed files with 12 additions and 3 deletions

View file

@ -8,6 +8,9 @@
"author_url": "http://www.mytinytodo.net"
},
"My Tiny Todolist": "My Tiny Todolist",
"desktop_version": "Desktop version",
"mobile_version": "Mobile version",
"powered_by": "Powered by",
"htab_newtask": "New task",
"htab_search": "Search",
"btn_add": "Add",

View file

@ -8,6 +8,9 @@
"author_url": "http://www.mytinytodo.net"
},
"My Tiny Todolist": "My Tiny Todolist",
"desktop_version": "Версия для компьютера",
"mobile_version": "Мобильная версия",
"powered_by": "Работает на",
"htab_newtask": "Новая задача",
"htab_search": "Поиск",
"btn_add": "Добавить",

View file

@ -281,10 +281,10 @@ $().ready(function(){
<div id="footer">
<div id="footer_content">
<span>Powered by <strong><a href="http://www.mytinytodo.net/">myTinyTodo</a></strong> <?php mttinfo('version'); ?></span>
<span><?php _e('powered_by');?> <a href="http://www.mytinytodo.net/" class="powered-by-link">myTinyTodo</a>&nbsp;<?php mttinfo('version'); ?></span>
<span id="mobileordesktop">
<?php if(Config::get('mobile')): ?><a href="<?php echo getDesktopUrl(); ?>">Desktop</a>
<?php else: ?><a href="<?php mttinfo('mobile_url'); ?>">Mobile</a>
<?php if(Config::get('mobile')): ?><a href="<?php echo getDesktopUrl(); ?>"><?php _e('desktop_version');?></a>
<?php else: ?><a href="<?php mttinfo('mobile_url'); ?>"><?php _e('mobile_version');?></a>
<?php endif; ?>
</span>
</div>

View file

@ -23,7 +23,9 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
#space { height:30px; }
#footer { height:30px; margin-top:-30px; }
#footer_content { background-color:#b5d5ff; padding:5px; font-size:0.9rem; display:flex; justify-content:space-between; }
#footer_content span:last-child { text-align:center; }
#footer_content a { color:#000000; }
#footer_content a.powered-by-link { font-weight:bold; }
.topblock-title { display:flex; align-items:center; }
.topblock-bar { flex-grow:1; display:flex; justify-content:flex-start; border-bottom:1px solid #b5d5ff; padding-bottom:5px; }

View file

@ -112,6 +112,7 @@ class Config
'dateformatshort' => array('default'=>'j M', 'type'=>'s'),
'template' => array('default'=>'default', 'type'=>'s'),
'showdate' => array('default'=>0, 'type'=>'i'),
'detectmobile' => array('default'=>1, 'type'=>'i')
);
public static $config;