{"action":"created","issue":{"url":"https://api.github.com/repos/comfusion/after-dark/issues/98","repository_url":"https://api.github.com/repos/comfusion/after-dark","labels_url":"https://api.github.com/repos/comfusion/after-dark/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/comfusion/after-dark/issues/98/comments","events_url":"https://api.github.com/repos/comfusion/after-dark/issues/98/events","html_url":"https://github.com/comfusion/after-dark/issues/98","id":321255741,"number":98,"title":"Search and noscript","user":{"login":"liara","id":4127869,"avatar_url":"https://avatars3.githubusercontent.com/u/4127869?v=4","gravatar_id":"","url":"https://api.github.com/users/liara","html_url":"https://github.com/liara","followers_url":"https://api.github.com/users/liara/followers","following_url":"https://api.github.com/users/liara/following{/other_user}","gists_url":"https://api.github.com/users/liara/gists{/gist_id}","starred_url":"https://api.github.com/users/liara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liara/subscriptions","organizations_url":"https://api.github.com/users/liara/orgs","repos_url":"https://api.github.com/users/liara/repos","events_url":"https://api.github.com/users/liara/events{/privacy}","received_events_url":"https://api.github.com/users/liara/received_events","type":"User","site_admin":false},"labels":[{"id":442936421,"url":"https://api.github.com/repos/comfusion/after-dark/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-08T16:22:18Z","updated_at":"2018-05-12T12:17:42Z","closed_at":null,"author_association":"NONE","body":"If I disable javascript in firefox on, for example, [hackcabin.com](https://hackcabin.com/search/), I see:\r\n\r\n![search](https://0x0.st/sjcC.png)\r\n\r\nI'm not sure that's supposed to be rendered like that, or is it? I made that whole div tag invisible, but I guess that's not the correct way to do it:\r\n\r\n```\r\n  <div id=\"search-app\" style=\"display:none\">\r\n    <section>\r\n      <noscript>\r\n        Aw-shucks! Search requires use of JavaScript to function properly.\r\n      </noscript>\r\n      <form v-on:submit.prevent class=\"form\" action=\"{{ \"search\" | absURL }}\">\r\n        <fieldset class=\"form-group\">\r\n          <input v-model=\"query\" id=\"query\" name=\"s\" type=\"search\" class=\"form-control\" maxlength=\"32\" autocomplete=\"off\">\r\n          <div class=\"help-block\">Press <kbd>s</kbd> to focus search input anytime.</div>\r\n        </fieldset>\r\n      </form>\r\n    </section>\r\n    <section v-if=\"results.length\">\r\n      <p><i>Showing results for “{ resultsForSearch }”.</i></p>\r\n      <div id=\"search-results\">\r\n        <article v-for=\"result in results\" itemscope itemtype=\"http://schema.org/CreativeWork\">\r\n          <header itemprop=\"name\">\r\n            <h2 itemprop=\"name\"><a :href=\"result.item.url\">{ result.item.title }</a></h2>\r\n          </header>\r\n          <div v-html=result.item.summary itemprop=\"description\"></div>\r\n          <nav class=\"readmore\"><a itemprop=\"url\" :href=\"result.item.url\">Read More&nbsp;&raquo;</a></nav>\r\n        </article>\r\n      </div>\r\n    </section>\r\n  </div>\r\n  <script>document.getElementById('search-app').style.display='';</script>\r\n  <noscript>\r\n    Aw-shucks! Search requires use of JavaScript to function properly.\r\n  </noscript>\r\n```\r\n\r\nOr maybe It's just my browser.\r\n\r\nAnother thing, It's not a Hugo or After Dark issuse, but in case somebody encounters problems with Netlify, looks like one has to disable asset optimization for Search to work: [link](https://discourse.gohugo.io/t/help-chart-js-in-stylesheet/7887/8)\r\n\r\nBesides that, Search works great for me. Also great theme. Thank you for your work.\r\n"},"comment":{"url":"https://api.github.com/repos/comfusion/after-dark/issues/comments/388551223","html_url":"https://github.com/comfusion/after-dark/issues/98#issuecomment-388551223","issue_url":"https://api.github.com/repos/comfusion/after-dark/issues/98","id":388551223,"user":{"login":"liara","id":4127869,"avatar_url":"https://avatars3.githubusercontent.com/u/4127869?v=4","gravatar_id":"","url":"https://api.github.com/users/liara","html_url":"https://github.com/liara","followers_url":"https://api.github.com/users/liara/followers","following_url":"https://api.github.com/users/liara/following{/other_user}","gists_url":"https://api.github.com/users/liara/gists{/gist_id}","starred_url":"https://api.github.com/users/liara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liara/subscriptions","organizations_url":"https://api.github.com/users/liara/orgs","repos_url":"https://api.github.com/users/liara/repos","events_url":"https://api.github.com/users/liara/events{/privacy}","received_events_url":"https://api.github.com/users/liara/received_events","type":"User","site_admin":false},"created_at":"2018-05-12T12:17:42Z","updated_at":"2018-05-12T12:17:42Z","author_association":"NONE","body":"@jhabdas Are you ok with this? \r\n\r\ncritical-theme.css\r\n\r\n```css\r\n[v-cloak] {\r\n  display: none;\r\n}\r\n```\r\n\r\nsearch.html\r\n\r\n```html\r\n <noscript>\r\n    Aw-shucks! Search requires use of JavaScript to function properly.\r\n  </noscript>\r\n  <div id=\"search-app\">\r\n    <div v-cloak>\r\n      <section>\r\n        <form v-on:submit.prevent class=\"form\" action=\"{{ \"search\" | absURL }}\">\r\n          <fieldset class=\"form-group\">\r\n            <input v-model=\"query\" id=\"query\" name=\"s\" type=\"search\" class=\"form-control\" maxlength=\"32\" autocomplete=\"off\">\r\n            <div class=\"help-block\">Press <kbd>s</kbd> to focus search input anytime.</div>\r\n          </fieldset>\r\n        </form>\r\n      </section>\r\n      <section v-if=\"results.length\">\r\n        <p><i>Showing results for “{ resultsForSearch }”.</i></p>\r\n        <div id=\"search-results\">\r\n          <article v-for=\"result in results\" itemscope itemtype=\"http://schema.org/CreativeWork\">\r\n            <header itemprop=\"name\">\r\n              <h2 itemprop=\"name\"><a :href=\"result.item.url\">{ result.item.title }</a></h2>\r\n            </header>\r\n            <div v-html=result.item.summary itemprop=\"description\"></div>\r\n            <nav class=\"readmore\"><a itemprop=\"url\" :href=\"result.item.url\">Read More&nbsp;&raquo;</a></nav>\r\n          </article>\r\n        </div>\r\n      </section>\r\n    </div>\r\n  </div>\r\n```\r\n"}}
{"actor":{"display_login":"liara"}}