-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding make file and fixing image urls
- Loading branch information
Showing
22 changed files
with
447 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
BUILD = build | ||
OUTPUT_FILENAME = book | ||
METADATA = metadata.yml | ||
CHAPTERS = chapters/**/*.md | ||
TOC = --toc --toc-depth=2 | ||
IMAGES_FOLDER = images | ||
COVER_IMAGE = images/cover.png | ||
LATEX_CLASS = report | ||
MATH_FORMULAS = --webtex | ||
CSS_FILE = style.css | ||
CSS_ARG = --css=$(CSS_FILE) | ||
ARGS = $(TOC) $(MATH_FORMULAS) $(CSS_ARG) | ||
|
||
all: book | ||
|
||
book: epub html pdf | ||
|
||
clean: | ||
rm -r $(BUILD) | ||
|
||
epub: $(BUILD)/epub/$(OUTPUT_FILENAME).epub | ||
|
||
html: $(BUILD)/html/$(OUTPUT_FILENAME).html | ||
|
||
pdf: $(BUILD)/pdf/$(OUTPUT_FILENAME).pdf | ||
|
||
$(BUILD)/epub/$(OUTPUT_FILENAME).epub: $(METADATA) $(CHAPTERS) | ||
mkdir -p $(BUILD)/epub | ||
pandoc $(ARGS) --epub-metadata=$(METADATA) --epub-cover-image=$(COVER_IMAGE) -o $@ $^ | ||
|
||
$(BUILD)/html/$(OUTPUT_FILENAME).html: $(CHAPTERS) | ||
mkdir -p $(BUILD)/html | ||
pandoc $(ARGS) --standalone --to=html5 -o $@ $^ | ||
cp -R $(IMAGES_FOLDER)/ $(BUILD)/html/$(IMAGES_FOLDER)/ | ||
cp $(CSS_FILE) $(BUILD)/html/$(CSS_FILE) | ||
|
||
$(BUILD)/pdf/$(OUTPUT_FILENAME).pdf: $(METADATA) $(CHAPTERS) | ||
mkdir -p $(BUILD)/pdf | ||
pandoc $(ARGS) -V documentclass=$(LATEX_CLASS) -o $@ $^ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
|
||
过渡都是平滑的状态变化,而动画是一种描述多个步骤的方法。 | ||
|
||
![Transitions: A to B](/images/ab-min.gif) | ||
![Transitions: A to B](images/ab-min.gif) | ||
|
||
![Animations: A to B to C](/images/abc.png) | ||
![Animations: A to B to C](images/abc.png) | ||
|
||
动画更适用于浏览器中相对复杂的移动场景。上面的例子中有三种场景(A,B,C)。转换只会从A到C,而动画允许我们指定步骤B是什么样子的,并确保动画遵循所有三个步骤。 | ||
|
||
|
@@ -24,19 +24,19 @@ | |
|
||
我们在 Codepen 上看到的“Save”按钮世纪上是一个关于动画的很好例子。 | ||
|
||
![Save Button on CodePen](/images/save_button-min.gif) | ||
![Save Button on CodePen](images/save_button-min.gif) | ||
|
||
它能很好的让人们注意到这个按钮。 | ||
|
||
该效果是由一系列的`关键帧`组成,这些关键帧告诉浏览器从左到右摇动按钮。我们将在之后更深入地研究关键帧。 | ||
|
||
另一个示例是来自 Twitter 的 app 构建平台,用于 [Fabric](https://get.fabric.io/) 的登录页面。CSS 动画在这里被很好地使用,有助于传达 Fabric 的模块化概念,同时还确立了信誉: | ||
|
||
![Fabric hero image animation](/images/fabric-min.gif) | ||
![Fabric hero image animation](images/fabric-min.gif) | ||
|
||
最后,是我去年在一个会议预告网站上做的一个例子,这是一个 CSS Mac Plus,用来在网上 [theWeb.is teaser](http://theweb.is/) 展示欢迎信息。 | ||
|
||
![Mac Plus created using CSS](/images/macplus-min.gif) | ||
![Mac Plus created using CSS](images/macplus-min.gif) | ||
|
||
CSS Mac Plus 可以在 [CodePen](https://codepen.io/donovanh/full/HGqjp/) 上面看到,[这里](https://cssanimation.rocks/macplus/)是关于如何实现的指导。 | ||
|
||
|
@@ -46,7 +46,7 @@ CSS Mac Plus 可以在 [CodePen](https://codepen.io/donovanh/full/HGqjp/) 上面 | |
|
||
动画更加复杂,它允许您创建具有任意关键帧的动画序列。它们会自动触发,并且可以循环。 | ||
|
||
![Transition vs Animation](/images/transitions-animations-min.gif) | ||
![Transition vs Animation](images/transitions-animations-min.gif) | ||
|
||
我们很快将花一些时间来学习动画属性。同时,也要注意网上动画的有趣用法,如果你找到一个好的,[请告诉我](mailto:[email protected])! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.