Commit Graph

139 Commits

Author SHA1 Message Date
curben 2ae8f9b08e fix(css): use sans-serif for content, serif for title
* Based on Wikipedia style
* https://css-tricks.com/sans-serif/
2019-06-11 19:09:55 +09:30
curben b99bcb4c26 style: Add credit to loading.svg 2019-06-10 18:23:17 +09:30
curben fb36bca7f1 refactor: use page.subtitle instead of page.excerpt
* Source file (.md) looks a bit clearer this way.
* Remove unused options in openGraph.js
2019-06-08 17:31:39 +09:30
curben a5d1791b14 feat(search): replace gitlab search with duckduckgo
todo: algolia
2019-06-07 18:39:51 +09:30
curben 105de8515c refactor(es6): arrow function 2019-06-07 09:42:16 +09:30
curben 60fa21c1ee fix(post): Display post content without excerpt
https://hexo.io/docs/variables.html
2019-06-06 20:57:28 +09:30
curben 7a3f86f5b7 refactor(css): remove unused attribute 2019-06-06 19:48:13 +09:30
curben 48db9251c6 feat(archive-page): Add post excerpt 2019-06-06 19:45:50 +09:30
curben 513bd9f7e1 fix(archive-page): bold title and decrease font-size of date
* Replace px with em
* Remove unused class
2019-06-06 19:24:20 +09:30
curben cfd1b62843 fix(css): smaller title and title's margin-bottom 2019-06-05 13:37:47 +09:30
curben dec7ae72f7 feat: Add homepage link to mobile page title 2019-06-05 13:15:51 +09:30
curben ad7616ebab fix(css): use ch to set max-width and padding
https://jrl.ninja/etc/1/
https://secretgeek.github.io/html_wysiwyg/html.html
https://news.ycombinator.com/item?id=20100232
https://www.reddit.com/r/css/comments/bb73cw/58_bytes_of_css_to_look_great_nearly_everywhere/ekj8yhm/
2019-06-05 13:03:40 +09:30
curben bb87e3b914 fix: display date using <span> instead of <a>
* unify date_format options
2019-06-04 13:55:43 +09:30
curben ab5161bbc8 style: parse date only, ignore time 2019-06-04 13:35:48 +09:30
curben 8717b52283 fix(sitemap): use post.lastUpdated
* post.updated = execution time of 'hexo generate'
* use moment.format() instead of Date.toISOString() to avoid timezone conversion
  - Use '[T00:00:00.000Z]' to ignore time, instead of '[T]HH:mm:ss.sss[Z]'
  - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
2019-06-04 13:08:09 +09:30
curben fba0d3deab feat(openGraph): add post's published time to meta tag
* Rename function name to camel case (standardjs)
* Skip timezone conversion, but not using the date() helper
* Open Graph tag is based on Wordpress Yoast, noticed through
https://dvt.name/2019/06/03/hacking-the-casio-f-91w-to-handle-1000-psi/
2019-06-03 22:56:46 +09:30
curben 60d62f94f3 feat: add search function to mobile page
* add a gap after search form to prevent misclick
* use addEventListener() instead of onclick()
  - https://stackoverflow.com/a/34216918
2019-06-01 18:51:51 +09:30
curben 824c11059d refactor: remove fill attribute from svg
it's already set in typing.css
2019-06-01 18:01:43 +09:30
curben c601a31b13 refactor: array in one line 2019-05-30 19:20:20 +09:30
curben 0fe5658173 fix(sitemap): remove index.html from url
a92dbbb83c
3fccc82d3a
2019-05-30 19:18:11 +09:30
curben 4a785a6cf1 fix: exclude webmaster verification file from rendering
fix(sitemap): skipRenderList shouldn't be a constant due to line 13-17
2019-05-30 18:15:15 +09:30
curben 69d7aabe63 feat: add Google Webmaster
exclude the verification file from sitemap.xml
2019-05-30 18:04:31 +09:30
curben eb2a009ac0 feat: add sitemap.xml
https://github.com/hexojs/hexo-generator-sitemap
2019-05-27 11:58:48 +09:30
curben 00fbcce468 refactor: unify HTTP header settings into _headers 2019-05-26 15:09:27 +09:30
curben 415952ff69 docs(open_graph): add comment 2019-05-26 00:10:44 +09:30
curben cab3baeaf8 style: standardjs lint 2019-05-25 23:58:52 +09:30
curben 7ebcc03977 fix(open_graph): use data-src attribute in img tag
* compatibility with cloudinary (see scripts/cloudinary.js)
  * helper has to be registered via a function
    - https://github.com/hexojs/hexo/issues/1462#issuecomment-277474592
    - https://github.com/hexojs/hexo/issues/743#issuecomment-168262852
    - https://hexo.io/api/helper
    - https://github.com/hexojs/hexo/blob/master/lib/plugins/helper/open_graph.js
2019-05-25 22:21:44 +09:30
curben 9daf4d98b9 docs(copy-button): clarify the source of cheerio package 2019-05-25 22:20:54 +09:30
curben cf16dd3e43 refactor: move creation of 'Copy' button from client to server
* https://github.com/cheeriojs/cheerio#append-content-content--
  * cheerio doesn't have .createElement() function
    - https://code.tutsplus.com/tutorials/jquery-14-released-the-15-new-features-you-must-know--net-8590
2019-05-25 20:14:02 +09:30
curben 3dfc57dbbe refactor: replace for loop with forEach()
https://stackoverflow.com/a/34832466/9645167
2019-05-25 17:49:36 +09:30
curben e312ed2b69 feat: add alt attribute to <img>
* https://support.google.com/webmasters/answer/114016?hl=en
  * remove version tag from cloudinary link
    * cache of previous version should be purged by now
  * img tag doesn't need to be self-closing
2019-05-23 16:46:02 +09:30
curben 15048c2d1f fix: search.svg does not load in Firefox due to CSP
* Use default-src 'self' as a workaround
https://pokeinthe.io/2016/04/09/black-icons-with-svg-and-csp/
https://bugzilla.mozilla.org/show_bug.cgi?id=1303364
https://github.com/w3c/webappsec-csp/issues/199
https://github.com/w3c/webappsec-csp/issues/198

* use 'self' instead of localhost and netlify.com
* set other directives to 'none'
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
* font-src neeeds to be whitelisted before using fork-awesome
2019-05-22 12:39:53 +09:30
curben 4791c98a00 refactor: remove jquery and fancybox
todo https://github.com/dimsemenov/photoswipe
2019-05-22 11:13:21 +09:30
curben 08fb7897e1 fix: replace 'https' with 'https:' in CSP
https://content-security-policy.com/#source_list
2019-05-22 11:00:00 +09:30
curben 0e686c620b refactor: Use pure JS equivalent of jQuery's $.ready()
https://stackoverflow.com/a/9899701
2019-05-22 10:52:58 +09:30
curben 821ac056b7 feat: add CSP via <meta> tag
* <meta> doesn't support frame-ancestors directive
  * '*--curben.netlify.com' is invalid
  * add localhost
  * block-all-mixed-content works with localhost
2019-05-21 14:41:56 +09:30
curben 03c527b2f5 refactor: move inline search function to js file
avoid inline script for CSP
2019-05-21 14:12:30 +09:30
curben 045882e527 feat: add tooltip to search button
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc

inline svg doesn't require xmlns attribute
https://github.com/svg/svgo/blob/master/plugins/removeXMLNS.js
2019-05-21 13:37:10 +09:30
curben bc4082ac06 refactor: use image file instead of inline 2019-05-21 13:10:40 +09:30
curben 2ac754fa4d style: arrow function
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
2019-05-21 11:22:01 +09:30
curben e7a6071d08 refactor: move inline cloudinary js into js file
to make way for CSR policy
2019-05-21 10:49:30 +09:30
curben 47e7982432 refactor: use image file instead of inline
page source looks cleaner this way
2019-05-21 10:12:35 +09:30
curben ba48027e74 refactor: switch to regular cloudinary js
* it's hosted at cdnjs, inline with other js source
    - better for HTTP/2 multiplexing if same host
  * update jquery
2019-05-19 12:07:34 +09:30
curben 5b9d9494e6 fix: date and time display
* Add starting year to copyright
  * Remove unneeded creation time from posts
2019-05-19 11:35:03 +09:30
curben a777e860f8 fix: remove extra curly bracket
due to incomplete d6c36abab9
2019-04-22 18:50:53 +09:30
curben d6c36abab9 refactor: switch to Fork-Awesome 2019-04-15 14:16:07 +09:30
curben 55f5f11c2f style: convert var to let/const
ES6 syntax
2019-04-10 20:18:45 +09:30
curben 43bf50dac5 refactor: switch to more modern sri-fallback
https://github.com/JackuB/subresource-integrity-fallback
2019-04-10 19:59:56 +09:30
curben d314bff200 chore: update libs 2019-04-10 14:45:02 +09:30
curben ced318927f feat: switch to night theme
fix: compatibility with Dark Reader addon
2019-04-08 11:44:22 +09:30