自定义 Tumblr 的移动主题 [英] Customizing Tumblr's Mobile Theme

查看:26
本文介绍了自定义 Tumblr 的移动主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望让我的 Tumblr 博客对移动设备更友好,并且我想在我的桌面主题旁边使用移动主题.我知道我可以为移动设备使用默认的移动主题,但是有没有办法让我自定义移动主题,但仍然保留我的常规桌面主题?

I was hoping to make my Tumblr blog more mobile friendly and I would like to use a mobile theme alongside my desktop theme. I see that I can use the default mobile theme for mobile devices, but is there a way for me to customize the mobile theme, but still keep my regular theme for desktops?

推荐答案

只为在搜索时发现此问题的人解答.我不希望他们被对这个问题的评论所误导.不高兴.

Just answering for people who find this while searching. I do not want them to be mislead by the comments on the question. Not happy about it.

到目前为止,可以为移动设备设置单独的主题.您必须将代码放在一个新的 Custom 页面中,网址为 "/iphone-theme" 正如@Ally 也提到的.
是的,它适用于所有移动设备(不仅仅是 iPhone),更具体地适用于手机,甚至适用于许多大型平板电脑 Tumblr 将布局切换到您的 基本主题(这里我说的是基于我不久前的测试;不到几个月.你应该经常测试自己.),我认为这很好.

Until now, it is possible to have separate theme for mobile devices. You have to put the codes for that in a new Custom page with url "/iphone-theme" as @Ally also mentioned.
And yes it works for all mobile devices (not just iPhones), to be more specific for phones, even for a lot of big tablets Tumblr switches the layout to your base theme (here I am talking based on my tests a while ago; less than few months. You should test yourself, always.), which I think is good.

mobile 主题 具有大多数功能,如 base 主题,它还响应 meta 标签(如 meta-if、meta-颜色等.这也意味着您可以在基本主题.因此,例如,您在主题自定义页面"中更改标题为颜色"的选项,它应该看起来像;

The mobile theme has most features like the base theme, it also responds to the meta tags (like meta-if, meta-colors, etc. That also means you can use "Global Appearance" options) in the base theme. So for example you change the option titled "Color" in your "theme customization page", which should look something like;

<meta name="color:Color" content="#FFA500"/> 在您的 基本主题 的 HTML 中.

<meta name="color:Color" content="#FFA500"/> in your base theme's HTML.

如果那里的颜色也设置为类似的颜色,那么你也会影响移动主题中的颜色;body { color: {color:Color}}body { background-color: {color:Color}}.即使移动主题中不存在相同的元标记.

Then you will also affect the color in the mobile theme if the colors there are also set to something like; body { color: {color:Color}} or body { background-color: {color:Color}}. Even if the same meta tag is not present in the mobile theme.

请注意,您不能仅在 移动主题 的 HTML 中使用 meta 标记 在主题自定义页面"中创建选项.

Please note that you can not create options in the "theme customization page" with meta tags only in the mobile theme's HTML.

我用过.为什么我使用它;
我在桌面版本上有高分辨率图像(用于照片"帖子),并为它们提供 JavaScript 图像滑块,有时,移动设备中的某些浏览器因此崩溃(至少对我的观众而言).使用 {PhotoURL-500} 而不是 {PhotoURL-HighRes} 解决了这个问题,并节省了带宽.您无法使用 CSS @media 做到这一点.

I use it. Why I use it;
I have high resolution images (for "Photo" posts) on the desktop version, and JavaScript image slider for them, and some time, some browsers in mobiles devices crash for that reason (at least for my audience). Using {PhotoURL-500} instead of {PhotoURL-HighRes} solves the issue, and saves bandwidth. There is no way you can do that with CSS @media.

致所有人(@Ally除外);在回复之前做一些研究,这甚至不是什么新鲜事.

To everyone (except @Ally); do some research before replying, it's not even a new thing.

也不要相信你在互联网上看到的一切(至少在没有可信来源的情况下).

Also do not believe everything you see on the internet (at least without trusted sources).

更新:

移动主题 覆盖默认移动主题",因此您无需禁用高级选项"中的使用默认移动主题"选项即可查看移动主题 在移动设备上.如果您禁用该选项,您将看到您的基本主题.

The mobile theme overrides the "default mobile theme" so you will not have to disable the option "Use default mobile theme" in "Advanced options" to see the mobile theme on mobile devices. If you disable the option, you will see your base theme.

这篇关于自定义 Tumblr 的移动主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆