Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

首页Projpct的链接怎么修改成本页打开 #13

Open
xcdler opened this issue Jan 18, 2020 · 2 comments
Open

首页Projpct的链接怎么修改成本页打开 #13

xcdler opened this issue Jan 18, 2020 · 2 comments

Comments

@xcdler
Copy link

xcdler commented Jan 18, 2020

function Projects($sorts = NULL) {
    $options = Typecho_Widget::widget('Widget_Options');
    $Project = NULL;
    if ($options->Projects) {
        $list = explode("\r\n", $options->Projects);
        foreach ($list as $val) {
            list($name, $url, $description, $sort) = explode("|", $val);
            if ($sorts) {
                $arr = explode("|", $sorts);
                if ($sort && in_array($sort, $arr)) {
                    $Project .= $url ? '
  • '.$name.': '.$description.'
  • ' : '
  • '.$name.': '.$description.'
  • '; } } else { $Project .= $url ? '
  • '.$name.': '.$description.'
  • ' : '
  • '.$name.': '.$description.'
  • '; } } } echo $Project ? $Project : '世间无限丹青手,一片伤心画不成。'; }

    暗色主题在新标签页中打开链接,浏览器会有会闪白,我想修改一下变成本页打开。
    我看了一下代码,发现简单的删除target="_blank"不起作用,首页会不展示项目列表了。
    不是很懂代码,想问下作者怎么修改可以达到效果。

    @Seevil
    Copy link
    Owner

    Seevil commented Feb 11, 2020

    我测试删除target="_blank" 就可以了

    @xcdler
    Copy link
    Author

    xcdler commented Mar 14, 2020

    测试了一下,又可以了,可能是当时哪里没搞好吧,感谢回复!!!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants