制作Tumblr登陆页面 [英] Making Tumblr Landing Page

查看:126
本文介绍了制作Tumblr登陆页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Tumblr上,我正在尝试制作一个登录页面,例如,一个Enter按钮,将用户带到主页。我发现以下代码将网站重定向到/欢迎页面,我将其放在索引页面中。

On Tumblr, I am trying to make a landing page with, for example, an "Enter" button that brings the user to the home page. I found the following code that redirects the site to a /welcome page, which I placed in the index page.

<script type="text/javascript">
if(location.href == 'http://ihadcats.tumblr.com/') location.replace('http://ihadcats.tumblr.com/welcome');;
</script>

当然,在欢迎页面上,按< a href =http://ihadcats.tumblr.com它只是循环回到欢迎页面。

Of course, on the 'welcome' page, when you press <a href="http://ihadcats.tumblr.com" it just loops back to the welcome page.

我创建了一个自定义页面'/ home',用来代替索引页面。我将正常的索引代码放入一个单独的'/ home'页面,但代码不会呈现。它显示,例如{Title}而不是实际的标题。

I created a custom page '/home', to use instead of the index page. I placed the normal index code into a separate '/home' page, but the code doesn't render. It displays, for example "{Title}" instead of the actual title.

当加载索引页面时,Tumblr会使用很多自己的脚本。加载'/ home'页面时,没有加载Tumblr的脚本。虽然两个页面中的代码完全相同。任何想法?

When the Index page is loaded, Tumblr bakes in a lot of its own scripts. When the '/home' page is loaded, none of Tumblr's scripts are loaded. Though the code in both pages is exactly the same. Any ideas?

推荐答案

Tumblr变量和块不会在自定义页面上呈现,只能在主题代码中呈现。基本上它不会将它们视为特殊的关键词或任何它只是看到它们的正常网页会看到它们。

Tumblr variables and blocks don't render on custom pages, only in the main theme code. Basically it doesn't see them as special key words or anything it just sees them as a normal webpage would see them.

至于制作登陆页面,你可以标记每一个发布你使用像'x'这样的任意标签,然后让你的索引页面成为登陆页面,然后将所有代码包装在 {block:TagPage} {/ block:TagPage} 以便主题代码仅显示在标签页面上(您可以像正常一样对永久链接页面进行编码)。

As for making a landing page you can tag every post you make with some arbitrary tag like 'x' and then make your index page a landing page and then wrap all your code in {block:TagPage} {/block:TagPage} so that the theme code only displays on tag pages (and you would code permalink pages like normal).

或者你可以按照上面的建议做,并做一个欢迎'弹出'的各种。

Alternatively you could do as suggested above and make a welcome 'popup' of sorts.

这篇关于制作Tumblr登陆页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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