Skip to content

Commit

Permalink
Deploy donghao1393/ilikemac to donghao1393/ilikemac:gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Dec 13, 2024
0 parents commit bf6eb9f
Show file tree
Hide file tree
Showing 92 changed files with 536 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html><html class="dark light"><head><meta charset=UTF-8><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="width=device-width,initial-scale=1.0" name=viewport><title>
I like Mac
</title><meta content="I like Mac" property=og:title><link href=/icon/favicon.png rel=icon type=image/png><link href=https://ilikemac.com/fonts.css rel=stylesheet><script async data-goatcounter=https://ilikemac.goatcounter.com/count src=https://ilikemac.com/js/count.js></script><noscript><img src="https://ilikemac.goatcounter.com//count?p=/&t=I like Mac"></noscript><script>MathJax={tex:{inlineMath:[['$','$'],['\\(','\\)']]}}</script><script async id=MathJax-script src=https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js></script><link title="I like Mac" href=https://ilikemac.com/atom.xml rel=alternate type=application/atom+xml><link href=https://ilikemac.com/theme/light.css rel=stylesheet><link media="(prefers-color-scheme: dark)" href=https://ilikemac.com/theme/dark.css rel=stylesheet><link href=https://ilikemac.com/main.css media=screen rel=stylesheet><link href=https://ilikemac.com/override.css rel=stylesheet><link href=https://ilikemac.com/something_else.css rel=stylesheet><body><div class=content><header><div class=main><a href=https://ilikemac.com>I like Mac</a><div class=socials></div></div><nav><a href=https://ilikemac.com/posts style=margin-left:.7em>/posts</a><a href=https://ilikemac.com/about style=margin-left:.7em>/about</a></nav></header><main class=centered-header><div class=page-header>404<span class=primary-color style=font-size:1.6em>.</span></div><span>Page not found :(</span></main><div class=giscus></div><script async crossorigin data-category=Announcements data-category-id=DIC_kwDOLTrUGc4Cdf02 data-emit-metadata=0 data-input-position=bottom data-lang=en data-mapping=pathname data-reactions-enabled=1 data-repo=donghao1393/ilikemac data-repo-id=R_kgDOLTrUGQ data-strict=0 data-theme=https://ilikemac.com/giscus_light.css src=https://giscus.app/client.js></script></div>
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ilikemac.com
4 changes: 4 additions & 0 deletions about/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!doctype html><html class="dark light"><head><meta charset=UTF-8><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="width=device-width,initial-scale=1.0" name=viewport><title>
About

</title><meta content=About property=og:title><link href=/icon/favicon.png rel=icon type=image/png><link href=https://ilikemac.com/fonts.css rel=stylesheet><script async data-goatcounter=https://ilikemac.goatcounter.com/count src=https://ilikemac.com/js/count.js></script><noscript><img src="https://ilikemac.goatcounter.com//count?p=/about/&t=About"></noscript><script>MathJax={tex:{inlineMath:[['$','$'],['\\(','\\)']]}}</script><script async id=MathJax-script src=https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js></script><link title="I like Mac" href=https://ilikemac.com/atom.xml rel=alternate type=application/atom+xml><link href=https://ilikemac.com/theme/light.css rel=stylesheet><link media="(prefers-color-scheme: dark)" href=https://ilikemac.com/theme/dark.css rel=stylesheet><link href=https://ilikemac.com/main.css media=screen rel=stylesheet><link href=https://ilikemac.com/override.css rel=stylesheet><link href=https://ilikemac.com/something_else.css rel=stylesheet><body><div class=content><header><div class=main><a href=https://ilikemac.com>I like Mac</a><div class=socials></div></div><nav><a href=https://ilikemac.com/posts style=margin-left:.7em>/posts</a><a href=https://ilikemac.com/about style=margin-left:.7em>/about</a></nav></header><main><article><div class=title><div class=page-header>About<span class=primary-color style=font-size:1.6em>.</span></div><div class=meta></div></div><section class=body><p>做了这个网站,目的是为了帮助更多人了解和使用苹果电脑。<p>欢迎留言以及提问,也许你的疑问就会成为我的下一篇文章。</section></article></main><div class=giscus></div><script async crossorigin data-category=Announcements data-category-id=DIC_kwDOLTrUGc4Cdf02 data-emit-metadata=0 data-input-position=bottom data-lang=en data-mapping=pathname data-reactions-enabled=1 data-repo=donghao1393/ilikemac data-repo-id=R_kgDOLTrUGQ data-strict=0 data-theme=https://ilikemac.com/giscus_light.css src=https://giscus.app/client.js></script></div>
10 changes: 10 additions & 0 deletions elasticlunr.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions feather/moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions feather/sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions fonts.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added fonts/.gitkeep
Empty file.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Bold.ttf
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-BoldItalic.ttf
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-ExtraBold.ttf
Binary file not shown.
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-ExtraLight.ttf
Binary file not shown.
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Italic.ttf
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Medium.ttf
Binary file not shown.
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Regular.ttf
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-SemiBold.ttf
Binary file not shown.
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-Thin.ttf
Binary file not shown.
Binary file added fonts/JetbrainsMono/JetBrainsMono-ThinItalic.ttf
Binary file not shown.
Binary file added fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf
Binary file not shown.
Binary file added fonts/SpaceGrotesk/SpaceGrotesk-Light.ttf
Binary file not shown.
Binary file added fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf
Binary file not shown.
Binary file added fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf
Binary file not shown.
Binary file added fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html><html class="dark light"><head><meta charset=UTF-8><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="width=device-width,initial-scale=1.0" name=viewport><title>
I like Mac
</title><meta content="I like Mac" property=og:title><link href=/icon/favicon.png rel=icon type=image/png><link href=https://ilikemac.com/fonts.css rel=stylesheet><script async data-goatcounter=https://ilikemac.goatcounter.com/count src=https://ilikemac.com/js/count.js></script><noscript><img src="https://ilikemac.goatcounter.com//count?p=/&t=I like Mac"></noscript><script>MathJax={tex:{inlineMath:[['$','$'],['\\(','\\)']]}}</script><script async id=MathJax-script src=https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js></script><link title="I like Mac" href=https://ilikemac.com/atom.xml rel=alternate type=application/atom+xml><link href=https://ilikemac.com/theme/light.css rel=stylesheet><link media="(prefers-color-scheme: dark)" href=https://ilikemac.com/theme/dark.css rel=stylesheet><link href=https://ilikemac.com/main.css media=screen rel=stylesheet><link href=https://ilikemac.com/override.css rel=stylesheet><link href=https://ilikemac.com/something_else.css rel=stylesheet><body><div class=content><header><div class=main><a href=https://ilikemac.com>I like Mac</a><div class=socials></div></div><nav><a href=https://ilikemac.com/posts style=margin-left:.7em>/posts</a><a href=https://ilikemac.com/about style=margin-left:.7em>/about</a></nav></header><div class=page-header>Posts<span class=primary-color style=font-size:1.6em>.</span></div><main class=list><ul><section class=list-item><div class=post-header><time>2024-12-13</time><div><h1 class=title><a href=https://ilikemac.com/posts/master-macos-screenshot/>掌握 macOS 截图的各种技巧</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-12-12</time><div><h1 class=title><a href=https://ilikemac.com/posts/play-war3-on-mac/>在Mac上玩魔兽争霸3:CrossOver完整配置指南</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-12-11</time><div><h1 class=title><a href=https://ilikemac.com/posts/trying-viture-glasses/>当我发现同事们都在问我戴的是什么眼镜</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-12-10</time><div><h1 class=title><a href=https://ilikemac.com/posts/prolong-macbook-battery-life/>让MacBook电池更耐用:AlDente使用指南</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-12-07</time><div><h1 class=title><a href=https://ilikemac.com/posts/play-3d-video/>在 Mac 上用 ffplay 播放 3D 视频</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-12-06</time><div><h1 class=title><a href=https://ilikemac.com/posts/make-macbook-external-display-working/>MacBook Air的显示器之谜</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-04-05</time><div><h1 class=title><a href=https://ilikemac.com/posts/remove-abc-input/>移除默认输入法</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-04-03</time><div><h1 class=title><a href=https://ilikemac.com/posts/fix-damaged-app/>修复损坏的应用</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-02-24</time><div><h1 class=title><a href=https://ilikemac.com/posts/open-3rd-party-app/>打开第三方下载的应用</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-02-24</time><div><h1 class=title><a href=https://ilikemac.com/posts/sync-between-two-macs/>在两台Mac之间传输文件</a></h1><div class=meta><div class=description></div></div></div></div></section><section class=list-item><div class=post-header><time>2024-02-17</time><div><h1 class=title><a href=https://ilikemac.com/posts/disable-special-characters/>禁用自动弹出特殊字符</a></h1><div class=meta><div class=description></div></div></div></div></section></ul></main><div class=giscus></div><script async crossorigin data-category=Announcements data-category-id=DIC_kwDOLTrUGc4Cdf02 data-emit-metadata=0 data-input-position=bottom data-lang=en data-mapping=pathname data-reactions-enabled=1 data-repo=donghao1393/ilikemac data-repo-id=R_kgDOLTrUGQ data-strict=0 data-theme=https://ilikemac.com/giscus_light.css src=https://giscus.app/client.js></script></div>
270 changes: 270 additions & 0 deletions js/count.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
// GoatCounter: https://www.goatcounter.com
// This file (and *only* this file) is released under the ISC license:
// https://opensource.org/licenses/ISC
;(function() {
'use strict';

if (window.goatcounter && window.goatcounter.vars) // Compatibility with very old version; do not use.
window.goatcounter = window.goatcounter.vars
else
window.goatcounter = window.goatcounter || {}

// Load settings from data-goatcounter-settings.
var s = document.querySelector('script[data-goatcounter]')
if (s && s.dataset.goatcounterSettings) {
try { var set = JSON.parse(s.dataset.goatcounterSettings) }
catch (err) { console.error('invalid JSON in data-goatcounter-settings: ' + err) }
for (var k in set)
if (['no_onload', 'no_events', 'allow_local', 'allow_frame', 'path', 'title', 'referrer', 'event'].indexOf(k) > -1)
window.goatcounter[k] = set[k]
}

var enc = encodeURIComponent

// Get all data we're going to send off to the counter endpoint.
var get_data = function(vars) {
var data = {
p: (vars.path === undefined ? goatcounter.path : vars.path),
r: (vars.referrer === undefined ? goatcounter.referrer : vars.referrer),
t: (vars.title === undefined ? goatcounter.title : vars.title),
e: !!(vars.event || goatcounter.event),
s: [window.screen.width, window.screen.height, (window.devicePixelRatio || 1)],
b: is_bot(),
q: location.search,
}

var rcb, pcb, tcb // Save callbacks to apply later.
if (typeof(data.r) === 'function') rcb = data.r
if (typeof(data.t) === 'function') tcb = data.t
if (typeof(data.p) === 'function') pcb = data.p

if (is_empty(data.r)) data.r = document.referrer
if (is_empty(data.t)) data.t = document.title
if (is_empty(data.p)) data.p = get_path()

if (rcb) data.r = rcb(data.r)
if (tcb) data.t = tcb(data.t)
if (pcb) data.p = pcb(data.p)
return data
}

// Check if a value is "empty" for the purpose of get_data().
var is_empty = function(v) { return v === null || v === undefined || typeof(v) === 'function' }

// See if this looks like a bot; there is some additional filtering on the
// backend, but these properties can't be fetched from there.
var is_bot = function() {
// Headless browsers are probably a bot.
var w = window, d = document
if (w.callPhantom || w._phantom || w.phantom)
return 150
if (w.__nightmare)
return 151
if (d.__selenium_unwrapped || d.__webdriver_evaluate || d.__driver_evaluate)
return 152
if (navigator.webdriver)
return 153
return 0
}

// Object to urlencoded string, starting with a ?.
var urlencode = function(obj) {
var p = []
for (var k in obj)
if (obj[k] !== '' && obj[k] !== null && obj[k] !== undefined && obj[k] !== false)
p.push(enc(k) + '=' + enc(obj[k]))
return '?' + p.join('&')
}

// Show a warning in the console.
var warn = function(msg) {
if (console && 'warn' in console)
console.warn('goatcounter: ' + msg)
}

// Get the endpoint to send requests to.
var get_endpoint = function() {
var s = document.querySelector('script[data-goatcounter]')
if (s && s.dataset.goatcounter)
return s.dataset.goatcounter
return (goatcounter.endpoint || window.counter) // counter is for compat; don't use.
}

// Get current path.
var get_path = function() {
var loc = location,
c = document.querySelector('link[rel="canonical"][href]')
if (c) { // May be relative or point to different domain.
var a = document.createElement('a')
a.href = c.href
if (a.hostname.replace(/^www\./, '') === location.hostname.replace(/^www\./, ''))
loc = a
}
return (loc.pathname + loc.search) || '/'
}

// Run function after DOM is loaded.
var on_load = function(f) {
if (document.body === null)
document.addEventListener('DOMContentLoaded', function() { f() }, false)
else
f()
}

// Filter some requests that we (probably) don't want to count.
goatcounter.filter = function() {
if ('visibilityState' in document && document.visibilityState === 'prerender')
return 'visibilityState'
if (!goatcounter.allow_frame && location !== parent.location)
return 'frame'
if (!goatcounter.allow_local && location.hostname.match(/(localhost$|^127\.|^10\.|^172\.(1[6-9]|2[0-9]|3[0-1])\.|^192\.168\.|^0\.0\.0\.0$)/))
return 'localhost'
if (!goatcounter.allow_local && location.protocol === 'file:')
return 'localfile'
if (localStorage && localStorage.getItem('skipgc') === 't')
return 'disabled with #toggle-goatcounter'
return false
}

// Get URL to send to GoatCounter.
window.goatcounter.url = function(vars) {
var data = get_data(vars || {})
if (data.p === null) // null from user callback.
return
data.rnd = Math.random().toString(36).substr(2, 5) // Browsers don't always listen to Cache-Control.

var endpoint = get_endpoint()
if (!endpoint)
return warn('no endpoint found')

return endpoint + urlencode(data)
}

// Count a hit.
window.goatcounter.count = function(vars) {
var f = goatcounter.filter()
if (f)
return warn('not counting because of: ' + f)

var url = goatcounter.url(vars)
if (!url)
return warn('not counting because path callback returned null')

var img = document.createElement('img')
img.src = url
img.style.position = 'absolute' // Affect layout less.
img.style.bottom = '0px'
img.style.width = '1px'
img.style.height = '1px'
img.loading = 'eager'
img.setAttribute('alt', '')
img.setAttribute('aria-hidden', 'true')

var rm = function() { if (img && img.parentNode) img.parentNode.removeChild(img) }
img.addEventListener('load', rm, false)
document.body.appendChild(img)
}

// Get a query parameter.
window.goatcounter.get_query = function(name) {
var s = location.search.substr(1).split('&')
for (var i = 0; i < s.length; i++)
if (s[i].toLowerCase().indexOf(name.toLowerCase() + '=') === 0)
return s[i].substr(name.length + 1)
}

// Track click events.
window.goatcounter.bind_events = function() {
if (!document.querySelectorAll) // Just in case someone uses an ancient browser.
return

var send = function(elem) {
return function() {
goatcounter.count({
event: true,
path: (elem.dataset.goatcounterClick || elem.name || elem.id || ''),
title: (elem.dataset.goatcounterTitle || elem.title || (elem.innerHTML || '').substr(0, 200) || ''),
referrer: (elem.dataset.goatcounterReferrer || elem.dataset.goatcounterReferral || ''),
})
}
}

Array.prototype.slice.call(document.querySelectorAll("*[data-goatcounter-click]")).forEach(function(elem) {
if (elem.dataset.goatcounterBound)
return
var f = send(elem)
elem.addEventListener('click', f, false)
elem.addEventListener('auxclick', f, false) // Middle click.
elem.dataset.goatcounterBound = 'true'
})
}

// Add a "visitor counter" frame or image.
window.goatcounter.visit_count = function(opt) {
on_load(function() {
opt = opt || {}
opt.type = opt.type || 'html'
opt.append = opt.append || 'body'
opt.path = opt.path || get_path()
opt.attr = opt.attr || {width: '200', height: (opt.no_branding ? '60' : '80')}

opt.attr['src'] = get_endpoint() + 'er/' + enc(opt.path) + '.' + enc(opt.type) + '?'
if (opt.no_branding) opt.attr['src'] += '&no_branding=1'
if (opt.style) opt.attr['src'] += '&style=' + enc(opt.style)
if (opt.start) opt.attr['src'] += '&start=' + enc(opt.start)
if (opt.end) opt.attr['src'] += '&end=' + enc(opt.end)

var tag = {png: 'img', svg: 'img', html: 'iframe'}[opt.type]
if (!tag)
return warn('visit_count: unknown type: ' + opt.type)

if (opt.type === 'html') {
opt.attr['frameborder'] = '0'
opt.attr['scrolling'] = 'no'
}

var d = document.createElement(tag)
for (var k in opt.attr)
d.setAttribute(k, opt.attr[k])

var p = document.querySelector(opt.append)
if (!p)
return warn('visit_count: append not found: ' + opt.append)
p.appendChild(d)
})
}

// Make it easy to skip your own views.
if (location.hash === '#toggle-goatcounter') {
if (localStorage.getItem('skipgc') === 't') {
localStorage.removeItem('skipgc', 't')
alert('GoatCounter tracking is now ENABLED in this browser.')
}
else {
localStorage.setItem('skipgc', 't')
alert('GoatCounter tracking is now DISABLED in this browser until ' + location + ' is loaded again.')
}
}

if (!goatcounter.no_onload)
on_load(function() {
// 1. Page is visible, count request.
// 2. Page is not yet visible; wait until it switches to 'visible' and count.
// See #487
if (!('visibilityState' in document) || document.visibilityState === 'visible')
goatcounter.count()
else {
var f = function(e) {
if (document.visibilityState !== 'visible')
return
document.removeEventListener('visibilitychange', f)
goatcounter.count()
}
document.addEventListener('visibilitychange', f)
}

if (!goatcounter.no_events)
goatcounter.bind_events()
})
})();

Loading

0 comments on commit bf6eb9f

Please sign in to comment.