Giter Site home page Giter Site logo

Comments (4)

cherrot avatar cherrot commented on August 18, 2024

不知道有没有理解你的问题,我的问题是小屏(iphone)浏览器上导航栏不会默认收起。因为不太会js,所以就先临时workaround了:
cherrot/cherrot.github.io@1297da0

  // only remove open in small screen
  if($(window).width() <= 1024) {
    menu.add(sidebar).add(main).removeClass('open');
  }

from suyan.github.io.

basicworld avatar basicworld commented on August 18, 2024

你说的导航栏问题是:刚进入首页的时候,默认显示文章列表,对么?我刚刚也解决了一下,用的你的关键代码(谢谢!),不过我检测了useragent:
basicworld.github.io/commit/d792352

  // test if it is phone
  // if true then remove open
  var Agents = new Array("Android", "iPhone", "iPod");
  var userAgentInfo = navigator.userAgent; 
  for (var v = 0; v < Agents.length; v++) {  
    if (userAgentInfo.indexOf(Agents[v]) > 0) { 
      menu.add(sidebar).add(main).removeClass('open');
      break; 
    }  
  }

不过我的问题不是这个,而是:这个主题在浏览长网页时,safari的导航栏(有前进、后退、分享等按钮那一栏)、地址栏不能收起

试了下你的博客,也是这样的

from suyan.github.io.

cherrot avatar cherrot commented on August 18, 2024

不用iphone不了解,不过我猜safari是在网页完全加载完后会自动收起导航栏?
如果是这样,那有些资源由于GFW所以一直超时,可能就会触发你的问题?(比如disqus评论、google的web fonts、gravatar头像等)

from suyan.github.io.

basicworld avatar basicworld commented on August 18, 2024

越过GFW测的,我再折腾一下^_^

from suyan.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.