标签:
我们发现在使用SDK创建HTML5应用的时候,模版应用会产生如下的代码:
<link href="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" /> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/fast-buttons.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/core.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/buttons.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/page.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/pagestacks.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/popovers.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/list.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/toolbars.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/tabs.js"></script> <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/shape.js"></script>
上述代码显示,当我们的应用在不同的平台上依赖于系统所提供ambiance文件,同样的应用可能会有不同的表现形式。为了使得我们的HTML在不同的平台上显示相同,我们可以使用一个工具来完成。
ls -altr /etc/alternatives/awk
liuxg@liuxg:~$ ls -altr /etc/alternatives/awk lrwxrwxrwx 1 root root 13 9月 27 2014 /etc/alternatives/awk -> /usr/bin/mawk liuxg@liuxg:~$
http://bazaar.launchpad.net/~dbarth/ubuntu-html5-theme/cmdline-tool/download/head:/ubuntuhtml5theme-20150319111737-5oucox80hsx3rmj1-1/ubuntu-html5-theme
$chmod +x ubuntu-html5-theme
# To list the available HTML5 toolkit / theme releases: $ ubuntu-html5-theme list trunk 14.10 14.04 13.10 rtm-14.09 # To install a toolkit release in the current project directory $ ubuntu-html5-theme install 14.10 Downloading release 14.10... Branched 177 revisions. # To convert the index.html file of an existing project $ ubuntu-html5-theme convert
<script src="ambiance/js/fast-buttons.js"></script> <script src="ambiance/js/core.js"></script> <script src="ambiance/js/buttons.js"></script> <script src="ambiance/js/dialogs.js"></script> <script src="ambiance/js/page.js"></script> <script src="ambiance/js/pagestacks.js"></script> <script src="ambiance/js/tab.js"></script> <script src="ambiance/js/tabs.js"></script>
标签:
原文地址:http://blog.csdn.net/ubuntutouch/article/details/44940677