Skip to content

Commit 40ffe36

Browse files
committed
feat: update jekyll docs and picture-gps
1 parent 0add135 commit 40ffe36

File tree

5 files changed

+60
-84
lines changed

5 files changed

+60
-84
lines changed

Gemfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 71 deletions
This file was deleted.

_posts/2015-02-11-create-githubpages.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,39 @@
5353

5454
1.rubyinstaller安装的时候需要选择默认配置,除了安装位置(默认是直接C盘建立一个根目录,改成program files好些)
5555

56-
2.第二步就是那个黑色弹窗,选择3,要等很久才能安装完,各种秘钥,成功会会说:https://jekyllrb.com/docs/installation/windows/
56+
2.第二步就是那个黑色弹窗,选择3,要等很久才能安装完,各种秘钥,到这个界面就差不多了:
57+
58+
==> 正在更新可信数据库...
59+
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
60+
gpg: 深度:0 有效性: 1 已签名: 5 信任度:0-,0q,0n,0m,0f,1u
61+
gpg: 深度:1 有效性: 5 已签名: 7 信任度:0-,0q,0n,5m,0f,0u
62+
gpg: 深度:2 有效性: 4 已签名: 2 信任度:4-,0q,0n,0m,0f,0u
63+
gpg: 下次信任度数据库检查将于 2023-09-12 进行
64+
gpg: 拉取‘alexey.pawlow@gmail.com’通过 WKD 时出现错误: Connection timed out
65+
gpg: error reading key: Connection timed out
66+
gpg: 正在更新 1 把密钥,从 hkps://keyserver.ubuntu.com
67+
gpg: 密钥 F40D263ECA25678A:“Alexey Pavlov (Alexpux) <alexey.pawlow@gmail.com>” 未改变
68+
gpg: 处理的总数:1
69+
gpg: 未改变:1
70+
71+
然后就可以不管这个窗口,开新窗口进入下一步。
72+
73+
3.第三步要打开新窗口执行gem install jekyll bundler,也是非常漫长,十多分钟,完成了就是这样:
74+
75+
A new release of RubyGems is available: 3.4.10 → 3.4.14!
76+
Run `gem update --system 3.4.14` to update your installation.
77+
78+
79+
C:\Users\LMJ>jekyll -v
80+
jekyll 4.3.1
81+
5782

58-
3.第三步要打开新窗口执行gem install jekyll bundler,也是非常漫长,十多分钟
5983

6084

6185
最后进入git项目的根目录,运行`jekyll serve` ,然后访问http://127.0.0.1:4000/便能看到效果了
6286

87+
> Gemfile 和Gemfile.lock可能导致版本问题报错,如果报错可以删了这两个文件再试。
88+
6389
本地测试好以后,把代码提交到github,github会自动生成静态网站。注意jekyll生成的_site文件夹不需要提交,这个是本地的静态网站文件夹
6490

6591
> jekyll还有更多高级的用法,可以参考官方网站的[源代码](https://github.com/jekyll/jekyll/tree/master/site),里面包含了翻页,页面变量,页面数据等用法

_posts/2021-11-17-picture-gps.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
display: flex;
4343
}
4444

45+
.buttons{
46+
padding: 10px;
47+
}
48+
.buttons button{
49+
display: block;
50+
margin: 10px 0;
51+
}
52+
4553
.otherMsg{
4654
padding-left: 10px;
4755
}
@@ -82,6 +90,10 @@
8290
</div>
8391
<div id="makeAndModel" style="height: 30px; "></div>
8492
<footer>
93+
<div class="buttons">
94+
<button id="btnAmapTile">高德瓦片</button>
95+
<button id="btnGoogleTile">谷歌瓦片</button>
96+
</div>
8597
<div class="detail" id="picDetail"></div>
8698
<div class="otherMsg"></div>
8799
</footer>

resource/2021/1117_gps.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var pageControl = {
1616
init: function () {
1717
const mapContainer = $("#mapCtn");
1818
const fullBtn = $(".fullscreen");
19+
const btnAmapTile = $("#btnAmapTile");
20+
const btnGoogleTile = $("#btnGoogleTile");
1921

2022
fullBtn.addEventListener("click", () => {
2123
if (document.fullscreenElement) {
@@ -34,6 +36,7 @@ var pageControl = {
3436
"http://mt2.google.com/vt/lyrs=y&hl=zh-CN&gl=cn&x=[x]&y=[y]&z=[z]&s=Galil",
3537
zIndex: 3,
3638
});
39+
this.googleLayer=googleLayer;
3740

3841
const amapSatelliteLayer = new AMap.TileLayer.Satellite();
3942
const amapRoadNetLayer = new AMap.TileLayer.RoadNet();
@@ -42,13 +45,13 @@ var pageControl = {
4245
resizeEnable: true,
4346
zoom: 15,
4447
center: [116.397428, 39.90923],
45-
layers: [amapSatelliteLayer, amapRoadNetLayer],
48+
4649
});
4750

4851
const testGoogleImage = new Image();
4952
testGoogleImage.src = `//mt2.google.com/vt/lyrs=y&hl=zh-CN&gl=cn&x=17294&y=15469&z=15&s=Galil?t=${+Math.random()}`;
5053
testGoogleImage.onload = () => {
51-
map.setLayers([googleLayer]);
54+
map.add([googleLayer]);
5255
};
5356
/* var marker = new AMap.Marker({
5457
position: new AMap.LngLat(116.397428, 39.90923), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
@@ -83,6 +86,13 @@ var pageControl = {
8386
//this.changeMapTo('baidu');
8487
//点击地图显示坐标
8588
map.on("click", this.onMapClick);
89+
90+
btnAmapTile.addEventListener("click", () => {
91+
this.setAMapTile();
92+
});
93+
btnGoogleTile.addEventListener("click", () => {
94+
this.setGoogleTile();
95+
});
8696
},
8797
generateMarker: function (pictureDetail, imgSrc) {
8898
const { lon, lat } = this.getPointByPictureDetail(pictureDetail);
@@ -321,6 +331,14 @@ var pageControl = {
321331
`;
322332
//alert('您在[ '+e.lnglat.getLng()+','+e.lnglat.getLat()+' ]的位置点击了地图!');
323333
},
334+
//设置高德瓦片
335+
setAMapTile() {
336+
this.map.remove(this.googleLayer);
337+
},
338+
//设置谷歌瓦片
339+
setGoogleTile() {
340+
this.map.add(this.googleLayer);
341+
},
324342
};
325343
function initializegooglemap() {
326344
pageControl.init();

0 commit comments

Comments
 (0)