Skip to content

Commit

Permalink
add ceate-img demo
Browse files Browse the repository at this point in the history
  • Loading branch information
raoenhui committed Aug 1, 2018
1 parent 02cc591 commit 4fda2f4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
8 changes: 5 additions & 3 deletions _posts/2018-05-01-createImg.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ tags:
## 第一步 前言


实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。
code地址为[https://github.com/raoenhui/create-img/tree/master/server](https://github.com/raoenhui/create-img/tree/master/server)
demo访问地址还在部署中,尽请期待。
实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。

code地址为[https://github.com/raoenhui/create-img/tree/master/server](https://github.com/raoenhui/create-img/tree/master/server)

demo访问地址[http://47.98.138.195/img](http://47.98.138.195/img)


## 第二步 原理
Expand Down
2 changes: 1 addition & 1 deletion _site/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1>Enhui Rao</h1>

<article class="notepad-page-content">
<div>
<p>Thanks For showing intrest to check about me, i’m <strong>Enhui Rao</strong>. I cook delicias code cousins for fun. I’m a Born engineer,Tech savvy, programmer, computer lover, automobiles fan, like to play anykind of machine!, curious towards css3,html5,ruby,nodejs,reactjs,ES6.This is my personal blog. It currently has 23 posts in 14 categories which combinedly have 8516 words, which will take an average reader ( WPM) approximately <span class="time">42.58</span> minutes to read. The most recent post is <a href="https://raoenhui.github.io/wechat/2018/07/18/%E5%B0%8F%E7%A8%8B%E5%BA%8F/" title="Read more about 小程序开发中的那些坑">“小程序开发中的那些坑”</a> which was published on <time datetime="2018-07-18T21:00:00+05:30" class="post-time">18 Jul 2018</time>. The last commit was on Wednesday, 18 Jul 2018 at 04:43 PM <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time" title="Temps Universel Coordonné">UTC</a>.</p>
<p>Thanks For showing intrest to check about me, i’m <strong>Enhui Rao</strong>. I cook delicias code cousins for fun. I’m a Born engineer,Tech savvy, programmer, computer lover, automobiles fan, like to play anykind of machine!, curious towards css3,html5,ruby,nodejs,reactjs,ES6.This is my personal blog. It currently has 23 posts in 14 categories which combinedly have 8516 words, which will take an average reader ( WPM) approximately <span class="time">42.58</span> minutes to read. The most recent post is <a href="https://raoenhui.github.io/wechat/2018/07/18/%E5%B0%8F%E7%A8%8B%E5%BA%8F/" title="Read more about 小程序开发中的那些坑">“小程序开发中的那些坑”</a> which was published on <time datetime="2018-07-18T21:00:00+05:30" class="post-time">18 Jul 2018</time>. The last commit was on Wednesday, 01 Aug 2018 at 09:12 PM <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time" title="Temps Universel Coordonné">UTC</a>.</p>

<p><strong>前端妹子一枚,我平时比较繁忙(打杂、犯花痴、偷窥帅锅是正业,副业:码农、前端),所以知识点有些可能会有问题,看不过眼(强迫症的请重视我的后面一句),欢迎小伙伴们帮忙评论修改。</strong></p>

Expand Down
10 changes: 6 additions & 4 deletions _site/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="https://raoenhui.github.io/feed.xml" />
<link rel="alternate" type="text/html" href="https://raoenhui.github.io/" />
<updated>2018-07-18T16:43:18+05:30</updated>
<updated>2018-08-01T21:12:58+05:30</updated>
<id>https://raoenhui.github.io/</id>
<author>
<name>Enhui Rao</name>
Expand Down Expand Up @@ -354,9 +354,11 @@

&lt;h2 id=&quot;第一步-前言&quot;&gt;第一步 前言&lt;/h2&gt;

&lt;p&gt;实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。&lt;br /&gt;
code地址为&lt;a href=&quot;https://github.com/raoenhui/create-img/tree/master/server&quot;&gt;https://github.com/raoenhui/create-img/tree/master/server&lt;/a&gt;
demo访问地址还在部署中,尽请期待。&lt;/p&gt;
&lt;p&gt;实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。&lt;/p&gt;

&lt;p&gt;code地址为&lt;a href=&quot;https://github.com/raoenhui/create-img/tree/master/server&quot;&gt;https://github.com/raoenhui/create-img/tree/master/server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;demo访问地址&lt;a href=&quot;http://47.98.138.195/img&quot;&gt;http://47.98.138.195/img&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;第二步-原理&quot;&gt;第二步 原理&lt;/h2&gt;

Expand Down
2 changes: 1 addition & 1 deletion _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ <h3 class="notepad-post-title">
</h3>
</header>
<section class="notepad-post-excerpt">
<p>第一步 前言 实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。 code地址为https://github.com/raoenhui/create-img/tree/master/server。 demo访问地址还在部署中,尽请期待。 第二步 原理 主要用到的技术是koa、koa-router和canvas。 用koa启动一个webserver服务,用了logger中间键来方便查看记录。 const logger = require('koa-logger'); const koaBody = require('koa-body'); const Koa = require('koa'); const app = module.exports = new Koa(); // middleware app.use(logger()); app.use(koaBody()); // listen if (!module.parent) app.listen(3000); 用koa-router获取用户访问的url,url中包含大小、形状和颜色信息,并调用canvas画图片。 const router...</p>
<p>第一步 前言 实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。 code地址为https://github.com/raoenhui/create-img/tree/master/server。 demo访问地址http://47.98.138.195/img。 第二步 原理 主要用到的技术是koa、koa-router和canvas。 用koa启动一个webserver服务,用了logger中间键来方便查看记录。 const logger = require('koa-logger'); const koaBody = require('koa-body'); const Koa = require('koa'); const app = module.exports = new Koa(); // middleware app.use(logger()); app.use(koaBody()); // listen if (!module.parent) app.listen(3000); 用koa-router获取用户访问的url,url中包含大小、形状和颜色信息,并调用canvas画图片。 const router...</p>
</section>

<div class="notepad-index-post-tags">
Expand Down
8 changes: 5 additions & 3 deletions _site/nodejs/koa/2018/05/01/createImg/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ <h1>自动生成不同大小形状的图片</h1>
<article class="notepad-post-content post tag-simple">
<div><h2 id="第一步-前言">第一步 前言</h2>

<p>实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。<br />
code地址为<a href="https://github.com/raoenhui/create-img/tree/master/server">https://github.com/raoenhui/create-img/tree/master/server</a>
demo访问地址还在部署中,尽请期待。</p>
<p>实际前端工作中,当UED没有给到确定的图片时,前端需要自己模拟一个图片来实现页面占位。于是写了份自动生成不同大小形状图片的服务。</p>

<p>code地址为<a href="https://github.com/raoenhui/create-img/tree/master/server">https://github.com/raoenhui/create-img/tree/master/server</a></p>

<p>demo访问地址<a href="http://47.98.138.195/img">http://47.98.138.195/img</a></p>

<h2 id="第二步-原理">第二步 原理</h2>

Expand Down

0 comments on commit 4fda2f4

Please sign in to comment.