├── .gitattributes ├── .gitignore ├── CSS Basic ├── CSS │ ├── chapter1 │ │ └── chapter1.html │ ├── chapter10 │ │ ├── Style.css │ │ └── chapter10-Pseudo.html │ ├── chapter11 │ │ ├── Style.css │ │ ├── chapter11-Pseudo.html │ │ └── smile.gif │ ├── chapter2 │ │ ├── chapter2-introduction.html │ │ └── myStyle2.css │ ├── chapter3 │ │ ├── Style.css │ │ ├── chapter3-background.html │ │ ├── giphy.gif │ │ └── penguin.jpg │ ├── chapter4 │ │ ├── Style.css │ │ └── chapter4-text.html │ ├── chapter5 │ │ ├── Style.css │ │ └── chapter5-Links.html │ ├── chapter6 │ │ ├── Style.css │ │ └── chapter6-Box-Model.html │ ├── chapter7 │ │ ├── Style.css │ │ └── chapter7-Visibility.html │ ├── chapter8 │ │ ├── Style.css │ │ └── chapter8-Positioning.html │ └── chapter9 │ │ ├── Style.css │ │ └── chapter9-Combinators.html └── CSS3 │ ├── chapter12 │ ├── Style.css │ ├── chapter12-css3.html │ ├── img_flwr.gif │ └── paper.gif │ ├── chapter13 │ ├── Style.css │ ├── chapter13-Rounded Corners.html │ └── paper.gif │ └── chapter14 │ ├── Style.css │ ├── border.png │ └── chapter14-Border Images.html ├── HTML Advanced ├── Chapter1 │ ├── Chapter1.html │ ├── css │ │ └── bootstrap.min.css │ └── js │ │ ├── bootstrap.min.js │ │ └── jquery.js └── Chapter2 │ ├── Chapter2.html │ ├── css │ └── bootstrap.min.css │ └── js │ ├── bootstrap.min.js │ └── jquery.js ├── HTML Basic ├── HTML │ ├── Chapter1.html │ ├── Chapter1_1.html │ ├── Chapter1_2.html │ ├── Chapter1_3.html │ ├── Chapter1_4.html │ ├── Chapter1_5.html │ └── Chapter1_6.html ├── HTML5 │ ├── 1.png │ ├── HTML5for_Canvas.html │ ├── HTML5for_drag_and_drop.html │ └── HTML5for_video.html ├── index │ ├── css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ ├── index.html │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js ├── index2 │ ├── assets │ │ ├── css │ │ │ ├── docs.css │ │ │ ├── docs.min.css │ │ │ └── pygments-manni.css │ │ ├── ico │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ └── favicon.ico │ │ ├── img │ │ │ ├── components.png │ │ │ ├── devices.png │ │ │ └── sass-less.png │ │ └── js │ │ │ ├── application.js │ │ │ ├── customize.min.js │ │ │ ├── customizer.js │ │ │ ├── docs.min.js │ │ │ ├── ie8-responsive-file-warning.js │ │ │ ├── raw-files.min.js │ │ │ └── vendor │ │ │ ├── blob.js │ │ │ ├── filesaver.js │ │ │ ├── holder.js │ │ │ ├── jszip.min.js │ │ │ ├── less.min.js │ │ │ └── uglify.min.js │ ├── index2.html │ ├── index2.rar │ ├── index2 │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── docs.css │ │ │ │ ├── docs.min.css │ │ │ │ └── pygments-manni.css │ │ │ ├── ico │ │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ │ └── favicon.ico │ │ │ ├── img │ │ │ │ ├── components.png │ │ │ │ ├── devices.png │ │ │ │ └── sass-less.png │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── customize.min.js │ │ │ │ ├── customizer.js │ │ │ │ ├── docs.min.js │ │ │ │ ├── ie8-responsive-file-warning.js │ │ │ │ ├── raw-files.min.js │ │ │ │ └── vendor │ │ │ │ ├── blob.js │ │ │ │ ├── filesaver.js │ │ │ │ ├── holder.js │ │ │ │ ├── jszip.min.js │ │ │ │ ├── less.min.js │ │ │ │ └── uglify.min.js │ │ ├── index2.html │ │ └── sticky-footer-navbar.css │ └── sticky-footer-navbar.css ├── index3 │ ├── about.html │ ├── assets │ │ ├── css │ │ │ ├── docs.css │ │ │ ├── docs.min.css │ │ │ └── pygments-manni.css │ │ ├── ico │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ └── favicon.ico │ │ ├── img │ │ │ ├── components.png │ │ │ ├── devices.png │ │ │ └── sass-less.png │ │ └── js │ │ │ ├── application.js │ │ │ ├── customize.min.js │ │ │ ├── customizer.js │ │ │ ├── docs.min.js │ │ │ ├── ie8-responsive-file-warning.js │ │ │ ├── raw-files.min.js │ │ │ └── vendor │ │ │ ├── blob.js │ │ │ ├── filesaver.js │ │ │ ├── holder.js │ │ │ ├── jszip.min.js │ │ │ ├── less.min.js │ │ │ └── uglify.min.js │ ├── index3.html │ ├── index3.rar │ └── sticky-footer-navbar.css └── index4 │ ├── assets │ ├── css │ │ ├── docs.css │ │ ├── docs.min.css │ │ └── pygments-manni.css │ ├── ico │ │ ├── apple-touch-icon-144-precomposed.png │ │ └── favicon.ico │ ├── img │ │ ├── components.png │ │ ├── devices.png │ │ └── sass-less.png │ └── js │ │ ├── application.js │ │ ├── customize.min.js │ │ ├── customizer.js │ │ ├── docs.min.js │ │ ├── ie8-responsive-file-warning.js │ │ ├── raw-files.min.js │ │ └── vendor │ │ ├── blob.js │ │ ├── filesaver.js │ │ ├── holder.js │ │ ├── jszip.min.js │ │ ├── less.min.js │ │ └── uglify.min.js │ ├── carousel.css │ ├── image │ ├── 140_first.png │ ├── 140_second.png │ ├── 140_third.png │ ├── 500_first.png │ ├── 500_second.png │ ├── 500_third.png │ ├── 900_first.png │ └── first.png │ ├── index4.html │ └── index4.rar └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter1/chapter1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 23 | 24 | 25 | 26 |

CSS Example

27 |

paragraph

28 |

Book

29 |

Tag

30 | 31 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter10/Style.css: -------------------------------------------------------------------------------- 1 | a.highlight:hover { 2 | color: #ff0000; 3 | } 4 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter10/chapter10-Pseudo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pseudo-classes 6 | 7 | 8 | 9 | 10 | 11 |

偽類選擇器(Pseudo-classes)

12 |

CSS Syntax

13 |

CSS Tutorial

14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter11/Style.css: -------------------------------------------------------------------------------- 1 | p.k1::first-line { 2 | color: #ff0000; 3 | font-variant: small-caps; 4 | } 5 | p.k2::first-letter { 6 | color: #ff0000; 7 | font-size: xx-large; 8 | } 9 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter11/chapter11-Pseudo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pseudo-classes 6 | 7 | 8 | 9 | 10 | 11 |

You can use the ::first-line pseudo-element to add a special effect to the first line of a text. Some more text. And even more, and more, and more, and more, and more, and more, and more, and more, and more, and more, and more, and more.

12 | 13 |

You can use the ::first-letter pseudo-element to add a special effect to the first character of a text!

14 | 15 | 16 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter11/smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS/chapter11/smile.gif -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter2/chapter2-introduction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 |

CSS Example

13 |

CSS2 Example

14 |

CSS3 Example

15 | 16 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter2/myStyle2.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: #FFFFFF; 3 | } 4 | h1{ 5 | color: orange; 6 | text-align:center; 7 | } 8 | p,h2{ 9 | font-family: "Times New Roman"; font-size: 30px; color: red; 10 | } 11 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter3/Style.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*body{ 4 | background-image: url("giphy.gif"); 5 | background-image: url("penguin.jpg"); 6 | } 7 | */ 8 | 9 | body{ 10 | background-color: #b0c4de; 11 | } 12 | 13 | 14 | h1{ 15 | background-color: #6495ed; 16 | } 17 | p{ 18 | background-color: #e0ffff; 19 | } 20 | div{ 21 | background-color: #b0c4de 22 | } -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter3/chapter3-background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 |

CSS background-color example!

13 |
14 | This is a text inside a div element. 15 |

This paragraph has its own background color. 16 | We are still in the div element.

17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter3/giphy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS/chapter3/giphy.gif -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter3/penguin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS/chapter3/penguin.jpg -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter4/Style.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align:center; 3 | font-size: 50px; 4 | } 5 | p.date{ 6 | text-align:right; 7 | font-size: 20px; 8 | } 9 | p.main{ 10 | text-indent: 10px; 11 | /*字距*/ 12 | text-align:justify; 13 | } 14 | p.uppercase { 15 | text-transform: uppercase; 16 | } 17 | 18 | p.lowercase { 19 | text-transform: lowercase; 20 | } 21 | 22 | p.capitalize { 23 | text-transform: capitalize; 24 | } 25 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter4/chapter4-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 |

CSS text-align Example

13 |

May, 2009

14 |

In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 15 | 'just remember that all the people in this world haven't had the advantages that you've had.'

16 |

17 | 18 | Note: Resize the browser window to see how the value "justify" works.

19 | 20 |
21 | 22 |

In my younger and more vulnerable years my father gave me some advice that

23 | 24 |

I've been turning over in my mind ever since.

25 | 26 |

'Whenever you feel like criticizing anyone,'

27 | 28 |

he told me

29 |

, 'just remember that all the people in this world haven't had the advantages that you've had.'

30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter5/Style.css: -------------------------------------------------------------------------------- 1 | /* visited link */ 2 | body{ 3 | background-color: #6C6C6C; 4 | } 5 | div{ 6 | font-size: 100px; 7 | } 8 | /* unvisited link */ 9 | a:link { 10 | text-decoration: none; 11 | color: #FF0000; 12 | } 13 | /* visited link */ 14 | a:visited { 15 | text-decoration: none; 16 | color: #00FF00; 17 | } 18 | /* mouse over link */ 19 | a:hover { 20 | text-decoration: underline; 21 | color: #0000FF; 22 | } 23 | /* selected link */ 24 | a:active { 25 | text-decoration: underline; 26 | color: #0000FF; 27 | } 28 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter5/chapter5-Links.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Links 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Google
13 | 14 | 15 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter6/Style.css: -------------------------------------------------------------------------------- 1 | div { 2 | background-color: lightgrey; 3 | width: 300px; 4 | /*留白 or 填料(padding)*/ 5 | padding: 25px; 6 | /*邊框(border)*/ 7 | border: 20px solid blue; 8 | border-width: 30px; 9 | /*邊界(margin)*/ 10 | margin: 25px; 11 | } -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter6/chapter6-Box-Model.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Box Model 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Box Model Example

13 |
14 |
The company, DeCode Genetics, based in Reykjavík, says it has collected full DNA sequences on 10,000 individuals. And because people on the island are closely related, DeCode says it can now also extrapolate to accurately guess the DNA makeup of nearly all other 320,000 citizens of that country, including those who never participated in its studies.
15 | 16 | 17 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter7/Style.css: -------------------------------------------------------------------------------- 1 | h1.hidden { 2 | /*visibility: hidden;*/ 3 | /*display: none;*/ 4 | } 5 | li { 6 | display: inline; 7 | } 8 | span { 9 | display: block; 10 | } -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter7/chapter7-Visibility.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Display and Visibility 6 | 7 | 8 | 9 | 10 | 11 | 12 |

CSS Example

13 |

CSS Example

14 |

CSS2 Example

15 |
16 |

Display a list of links as a horizontal menu:

17 | 22 |
23 | A display property with a value of "block" results in a line break between the two elements. 24 | 25 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter8/Style.css: -------------------------------------------------------------------------------- 1 | /*當使用者將網頁往下拉時,元素的位置不會改變。*/ 2 | p.pos_fixed { 3 | position: fixed; 4 | top: 20px; 5 | right: 250px; 6 | color: red; 7 | font-size: 50px; 8 | } 9 | /*元素被放的地方將會與預設的地方有所不同。*/ 10 | h2.pos_left { 11 | position: relative; 12 | left: -250px; 13 | } 14 | 15 | h2.pos_right { 16 | position: relative; 17 | left: 220px; 18 | } 19 | /*這代表元素會被放在預設的地方。*/ 20 | h2.pos_kk { 21 | position: static; 22 | } 23 | /*相對定位*/ 24 | div.pos_relative { 25 | position: relative; 26 | background-color:#DBF5F3; 27 | left:0px; 28 | top: 10px; 29 | width:90px; 30 | height:90px; 31 | 32 | } 33 | /*絕對定位*/ 34 | div.pos_absolute { 35 | position: absolute; 36 | background-color:#76D7D0; 37 | left: 0px; 38 | /*top: 10px;*/ 39 | width:90px; 40 | height:90px; 41 | 42 | } 43 | 44 | div.kk{ 45 | background-color:#FF0084; 46 | border-top-style: dotted; 47 | border-right-style: solid; 48 | border-bottom-style: dotted; 49 | border-left-style: solid; 50 | width:500px; 51 | height:500px; 52 | } 53 | 54 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter8/chapter8-Positioning.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Positioning 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Note: IE7 and IE8 supports the fixed value only if a !DOCTYPE is specified.

14 |

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

15 | 16 |

我固定住了.

17 | 18 |
19 |

Relative Positioning

20 | 21 |

我會往左邊我會往左邊我會往左邊我會往左邊我會往左邊我會往左邊

22 |

我會往右邊

23 |

This heading is moved right according to its normal position

24 | 25 |
26 | 27 |
28 | relative 我是相對定位 29 |
30 | 31 |
32 | absolute 我是絕對定位 33 |
34 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter9/Style.css: -------------------------------------------------------------------------------- 1 | /*後代選擇器(Descendant Selector)*/ 2 | div.descendant p { 3 | background-color: yellow; 4 | } 5 | /*子選擇器(Child Selector)*/ 6 | div.child > p { 7 | background-color: yellow; 8 | } 9 | /*同層相鄰選擇器(Adjacent sibling combinator)*/ 10 | 11 | div.adjacent + p { 12 | background-color: yellow; 13 | } 14 | 15 | /*同層全體選擇器(General sibling combinator)*/ 16 | div.general ~ p { 17 | background-color: yellow; 18 | } -------------------------------------------------------------------------------- /CSS Basic/CSS/chapter9/chapter9-Combinators.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Combinators 6 | 7 | 8 | 9 | 10 | 11 | 12 |

後代選擇器(Descendant Selector)

13 |
14 |

Paragraph 1 in the div.

15 |

Paragraph 2 in the div.

16 |

Paragraph 3 in the div.

17 |
18 |

Paragraph 4. Not in a div.

19 |

Paragraph 5. Not in a div.

20 | 21 |
22 |

子選擇器(Child Selector)

23 | 24 |
25 |

Paragraph 1 in the div.

26 |

Paragraph 2 in the div.

27 |

Paragraph 3 in the div.

28 | 29 |
30 |

Paragraph 4. Not in a div.

31 |

Paragraph 5. Not in a div.

32 | 33 |
34 | 35 |

同層相鄰選擇器(Adjacent sibling combinator)

36 | 37 |
38 |

Paragraph 1 in the div.

39 |

Paragraph 2 in the div.

40 |
41 |

Paragraph 3. Not in a div.

42 |

Paragraph 4. Not in a div.

43 | 44 |
45 |

同層全體選擇器(General sibling combinator)

46 |
47 |

Paragraph 1 in the div.

48 |

Paragraph 2 in the div.

49 |
50 | 51 |

Paragraph 3. Not in a div.

52 |

Paragraph 4. Not in a div.

53 | 54 | 55 | -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter12/Style.css: -------------------------------------------------------------------------------- 1 | /* 2 | #example1 { 3 | background-image: url(img_flwr.gif), url(paper.gif); 4 | background-position: right bottom, left top; 5 | background-repeat: no-repeat, repeat; 6 | padding: 15px; 7 | } 8 | */ 9 | 10 | div{ 11 | background-image: url(img_flwr.gif), url(paper.gif); 12 | background-position: right bottom, left top; 13 | background-repeat: no-repeat, repeat; 14 | padding: 50px; 15 | } -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter12/chapter12-css3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Pseudo-classes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

Lorem Ipsum Dolor

15 |

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

16 |

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter12/img_flwr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS3/chapter12/img_flwr.gif -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter12/paper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS3/chapter12/paper.gif -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter13/Style.css: -------------------------------------------------------------------------------- 1 | #rcorners122 { 2 | border-radius: 25px; 3 | background: #8AC007; 4 | padding: 20px; 5 | width: 200px; 6 | height: 150px; 7 | } 8 | 9 | #rcorners2 { 10 | border-radius: 25px; 11 | border: 2px solid #8AC007; 12 | padding: 20px; 13 | width: 200px; 14 | height: 150px; 15 | } 16 | 17 | #rcorners3 { 18 | border-radius: 25px; 19 | background: url(paper.gif); 20 | background-position: left top; 21 | background-repeat: repeat; 22 | padding: 20px; 23 | width: 200px; 24 | height: 150px; 25 | } -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter13/chapter13-Rounded Corners.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Rounded Corners 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Rounded Corners

13 |

Rounded corners for an element with a specified background color:

14 |

Rounded corners!

15 |

Rounded corners for an element with a border:

16 |

Rounded corners!

17 |

Rounded corners for an element with a background image:

18 |

Rounded corners!

19 | 20 | 21 | -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter13/paper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS3/chapter13/paper.gif -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter14/Style.css: -------------------------------------------------------------------------------- 1 | #borderimg { 2 | border: 10px solid transparent; 3 | padding: 15px; 4 | -webkit-border-image: url(border.png) 30 round; /* Safari 3.1-5 */ 5 | -o-border-image: url(border.png) 30 round; /* Opera 11-12.1 */ 6 | border-image: url(border.png) 30 round; 7 | } -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter14/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/CSS Basic/CSS3/chapter14/border.png -------------------------------------------------------------------------------- /CSS Basic/CSS3/chapter14/chapter14-Border Images.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Border Images 6 | 7 | 8 | 9 | 10 | 11 | 12 |

The border-image property specifies an image to be used as the border around an element:

13 |

Here, the middle sections of the image are repeated to create the border.

14 | 15 |

Here is the original image:

16 |

Note: Internet Explorer 10, and earlier versions, do not support the border-image property.

17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /HTML Advanced/Chapter1/Chapter1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Title Page 8 | bs3-cdn 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 |

Hello World

21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /HTML Advanced/Chapter2/Chapter2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Title Page 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 |

Forms

21 | 22 |
23 | Form title 24 | 25 |
26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1.html: -------------------------------------------------------------------------------- 1 | HTML Examples 2 | 3 | 4 | 5 | 6 | 7 | 8 |

This is a Heading.

9 |

This is a paragraph.

10 | 11 | -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_1.html: -------------------------------------------------------------------------------- 1 | Yahoo 2 | W3Schools.com 3 | 4 | chapter1 -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

About W3Schools

9 |

10 | W3Schools is a web developer's site. 11 | It provides tutorials and references covering 12 | many aspects of web programming, 13 | including HTML, CSS, JavaScript, XML, SQL, PHP, ASP, etc. 14 |

15 | 16 |
17 | 18 |

19 | If you move the mouse over the paragraph above, 20 | the title will display as a tooltip. 21 |

22 | 23 | 24 | -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

9 | This is a heading 10 |

11 |

12 | This is a heading 13 |

14 | 15 | 16 | -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

This is a heading.

9 |

This is a
paragraph.

10 | 11 | 12 | -------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
123
456
-------------------------------------------------------------------------------- /HTML Basic/HTML/Chapter1_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 50 | 51 |
52 |

London

53 |

54 | London is the capital city of England. It is the most populous city in the United Kingdom, 55 | with a metropolitan area of over 13 million inhabitants. 56 |

57 |

58 | Standing on the River Thames, London has been a major settlement for two millennia, 59 | its history going back to its founding by the Romans, who named it Londinium. 60 |

61 |
62 | 63 | 66 | 67 | -------------------------------------------------------------------------------- /HTML Basic/HTML5/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/HTML5/1.png -------------------------------------------------------------------------------- /HTML Basic/HTML5/HTML5for_Canvas.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HTML5 for Canvas 6 | 7 | 8 | 9 |

HTML5可透過Canvas繪製圖形

10 |
11 | 12 | 13 | Your browser does not support the canvas element. 14 | 15 | 16 | 29 | 30 |

Canvas畫布顏色設定

31 |
32 | 33 | 34 | 35 | 41 |
42 |
  • HTML5 for Canvas 43 |
  • HTML5 for SVG 44 |
  • HTML5 for SVG and Canvas 45 | 46 | 47 | -------------------------------------------------------------------------------- /HTML Basic/HTML5/HTML5for_drag_and_drop.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 34 | 35 | HTML5 for drag and drop 36 | 37 | 38 | 39 | 40 |

    拖放是HTML5標準的一部份,任一元件都可以拖放

    41 |
    42 | 43 |

    请把圖片拖放到矩型中

    44 | 45 | 46 |
    47 | 48 | 49 | 50 |
    51 | 52 | 53 |
    54 | 55 |
    56 |
    57 | 58 | 59 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /HTML Basic/HTML5/HTML5for_video.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HTML5 for video 6 | 7 | 8 | 9 |

    Big Buck Bunny

    10 |

    大雄兔(Big Buck Bunny)是Blender基金會第2部開放版權、創用CC的動畫電影,代號Peach。片長10分鐘,Big Buck Bunny全部使用開放原始碼軟體製作(如 Blender、Linux),渲染的計算機集群使用昇陽電腦公司的Sun Grid亦是開放原始碼的(如:OpenSolaris、Sun Grid Engine等),[1] [2] 製作技術和素材徹底公開。不同於上一個專案Elephants Dream,本篇全程無語音。本片完成之後,其素材適用在blender官方的遊戲專案Yo Frankie!之中,反派Frankie這次成為主角。

    11 |
    12 | 15 |
    16 |

    測試播放與暫停

    17 | 18 | 19 | 20 | 21 | 22 | 23 |
    24 | 28 | 29 | 30 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /HTML Basic/index/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /HTML Basic/index/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /HTML Basic/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap 101 Template 5 | 6 | 7 | 8 | 9 | 10 |

    Hello, world!

    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /HTML Basic/index2/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/assets/ico/favicon.ico -------------------------------------------------------------------------------- /HTML Basic/index2/assets/img/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/assets/img/components.png -------------------------------------------------------------------------------- /HTML Basic/index2/assets/img/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/assets/img/devices.png -------------------------------------------------------------------------------- /HTML Basic/index2/assets/img/sass-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/assets/img/sass-less.png -------------------------------------------------------------------------------- /HTML Basic/index2/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * JavaScript for Bootstrap's docs (http://getbootstrap.com) 7 | * Copyright 2011-2014 Twitter, Inc. 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function () { 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement('style') 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | '@-ms-viewport{width:auto!important}' 25 | ) 26 | ) 27 | document.querySelector('head').appendChild(msViewportStyle) 28 | } 29 | 30 | 31 | var $window = $(window) 32 | var $body = $(document.body) 33 | 34 | var navHeight = $('.navbar').outerHeight(true) + 10 35 | 36 | $body.scrollspy({ 37 | target: '.bs-docs-sidebar', 38 | // offset: navHeight 39 | }) 40 | 41 | $window.on('load', function () { 42 | $body.scrollspy('refresh') 43 | }) 44 | 45 | $('.bs-docs-container [href=#]').click(function (e) { 46 | e.preventDefault() 47 | }) 48 | 49 | // back to top 50 | setTimeout(function () { 51 | var $sideBar = $('.bs-docs-sidebar') 52 | 53 | $sideBar.affix({ 54 | offset: { 55 | top: function () { 56 | var offsetTop = $sideBar.offset().top 57 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 58 | var navOuterHeight = $('.bs-docs-nav').height() 59 | 60 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 61 | }, 62 | bottom: function () { 63 | return (this.bottom = $('.bs-docs-footer').outerHeight(true)) 64 | } 65 | } 66 | }) 67 | }, 100) 68 | 69 | setTimeout(function () { 70 | $('.bs-top').affix() 71 | }, 100) 72 | 73 | // tooltip demo 74 | $('.tooltip-demo').tooltip({ 75 | selector: '[data-toggle=tooltip]', 76 | container: 'body' 77 | }) 78 | 79 | $('.tooltip-test').tooltip() 80 | $('.popover-test').popover() 81 | 82 | $('.bs-docs-navbar').tooltip({ 83 | selector: 'a[data-toggle=tooltip]', 84 | container: '.bs-docs-navbar .nav' 85 | }) 86 | 87 | // popover demo 88 | $('[data-toggle=popover]').popover() 89 | 90 | // button state demo 91 | $('#loading-example-btn') 92 | .click(function () { 93 | var btn = $(this) 94 | btn.button('loading') 95 | setTimeout(function () { 96 | btn.button('reset') 97 | }, 3000) 98 | }) 99 | }) 100 | 101 | }(jQuery) 102 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/js/customizer.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Customizer (http://getbootstrap.com/customize/) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * 5 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 6 | * details, see http://creativecommons.org/licenses/by/3.0/. 7 | */ 8 | 9 | window.onload = function () { // wait for load in a dumb way because B-0 10 | var cw = '/*!\n' + 11 | ' * Bootstrap v3.1.1 (http://getbootstrap.com)\n' + 12 | ' * Copyright 2011-2014 Twitter, Inc.\n' + 13 | ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' + 14 | ' */\n\n' 15 | 16 | function showError(msg, err) { 17 | $('
    ' + 18 | '
    ' + 19 | '×' + 20 | '

    ' + msg + '

    ' + 21 | (err.extract ? '
    ' + err.extract.join('\n') + '
    ' : '') + 22 | '
    ' + 23 | '
    ').appendTo('body').alert() 24 | throw err 25 | } 26 | 27 | function showCallout(msg, showUpTop) { 28 | var callout = $('
    ' + 29 | '

    Attention!

    ' + 30 | '

    ' + msg + '

    ' + 31 | '
    ') 32 | 33 | if (showUpTop) { 34 | callout.appendTo('.bs-docs-container') 35 | } else { 36 | callout.insertAfter('.bs-customize-download') 37 | } 38 | } 39 | 40 | function getQueryParam(key) { 41 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&') // escape RegEx meta chars 42 | var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)')) 43 | return match && decodeURIComponent(match[1].replace(/\+/g, ' ')) 44 | } 45 | 46 | function createGist(configJson) { 47 | var data = { 48 | 'description': 'Bootstrap Customizer Config', 49 | 'public': true, 50 | 'files': { 51 | 'config.json': { 52 | 'content': configJson 53 | } 54 | } 55 | } 56 | $.ajax({ 57 | url: 'https://api.github.com/gists', 58 | type: 'POST', 59 | dataType: 'json', 60 | data: JSON.stringify(data) 61 | }) 62 | .success(function (result) { 63 | var origin = window.location.protocol + '//' + window.location.host 64 | history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id) 65 | }) 66 | .error(function (err) { 67 | showError('Ruh roh! Could not save gist file, configuration not saved.', err) 68 | }) 69 | } 70 | 71 | function getCustomizerData() { 72 | var vars = {} 73 | 74 | $('#less-variables-section input') 75 | .each(function () { 76 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 77 | }) 78 | 79 | var data = { 80 | vars: vars, 81 | css: $('#less-section input:checked') .map(function () { return this.value }).toArray(), 82 | js: $('#plugin-section input:checked').map(function () { return this.value }).toArray() 83 | } 84 | 85 | if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return 86 | 87 | return data 88 | } 89 | 90 | function parseUrl() { 91 | var id = getQueryParam('id') 92 | 93 | if (!id) return 94 | 95 | $.ajax({ 96 | url: 'https://api.github.com/gists/' + id, 97 | type: 'GET', 98 | dataType: 'json' 99 | }) 100 | .success(function (result) { 101 | var data = JSON.parse(result.files['config.json'].content) 102 | if (data.js) { 103 | $('#plugin-section input').each(function () { 104 | $(this).prop('checked', ~$.inArray(this.value, data.js)) 105 | }) 106 | } 107 | if (data.css) { 108 | $('#less-section input').each(function () { 109 | $(this).prop('checked', ~$.inArray(this.value, data.css)) 110 | }) 111 | } 112 | if (data.vars) { 113 | for (var i in data.vars) { 114 | $('input[data-var="' + i + '"]').val(data.vars[i]) 115 | } 116 | } 117 | }) 118 | .error(function (err) { 119 | showError('Error fetching bootstrap config file', err) 120 | }) 121 | } 122 | 123 | function generateZip(css, js, fonts, config, complete) { 124 | if (!css && !js) return showError('Ruh roh! No Bootstrap files selected.', new Error('no Bootstrap')) 125 | 126 | var zip = new JSZip() 127 | 128 | if (css) { 129 | var cssFolder = zip.folder('css') 130 | for (var fileName in css) { 131 | cssFolder.file(fileName, css[fileName]) 132 | } 133 | } 134 | 135 | if (js) { 136 | var jsFolder = zip.folder('js') 137 | for (var jsFileName in js) { 138 | jsFolder.file(jsFileName, js[jsFileName]) 139 | } 140 | } 141 | 142 | if (fonts) { 143 | var fontsFolder = zip.folder('fonts') 144 | for (var fontsFileName in fonts) { 145 | fontsFolder.file(fontsFileName, fonts[fontsFileName], {base64: true}) 146 | } 147 | } 148 | 149 | if (config) { 150 | zip.file('config.json', config) 151 | } 152 | 153 | var content = zip.generate({ type: 'blob' }) 154 | 155 | complete(content) 156 | } 157 | 158 | function generateCustomCSS(vars) { 159 | var result = '' 160 | 161 | for (var key in vars) { 162 | result += key + ': ' + vars[key] + ';\n' 163 | } 164 | 165 | return result + '\n\n' 166 | } 167 | 168 | function generateFonts() { 169 | var glyphicons = $('#less-section [value="glyphicons.less"]:checked') 170 | if (glyphicons.length) { 171 | return __fonts 172 | } 173 | } 174 | 175 | // Returns an Array of @import'd filenames in the order 176 | // in which they appear in the file. 177 | function includedLessFilenames(lessFilename) { 178 | var IMPORT_REGEX = /^@import \"(.*?)\";$/ 179 | var lessLines = __less[lessFilename].split('\n') 180 | 181 | for (var i = 0, imports = []; i < lessLines.length; i++) { 182 | var match = IMPORT_REGEX.exec(lessLines[i]) 183 | if (match) imports.push(match[1]) 184 | } 185 | 186 | return imports 187 | } 188 | 189 | function generateLESS(lessFilename, lessFileIncludes, vars) { 190 | var lessSource = __less[lessFilename] 191 | 192 | $.each(includedLessFilenames(lessFilename), function(index, filename) { 193 | var fileInclude = lessFileIncludes[filename] 194 | 195 | // Files not explicitly unchecked are compiled into the final stylesheet. 196 | // Core stylesheets like 'normalize.less' are not included in the form 197 | // since disabling them would wreck everything, and so their 'fileInclude' 198 | // will be 'undefined'. 199 | if (fileInclude || (fileInclude == null)) lessSource += __less[filename] 200 | 201 | // Custom variables are added after Bootstrap variables so the custom 202 | // ones take precedence. 203 | if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars) 204 | }) 205 | 206 | lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports 207 | return lessSource 208 | } 209 | 210 | function compileLESS(lessSource, baseFilename, intoResult) { 211 | var parser = new less.Parser({ 212 | paths: ['variables.less', 'mixins.less'], 213 | optimization: 0, 214 | filename: baseFilename + '.css' 215 | }).parse(lessSource, function (err, tree) { 216 | if (err) { 217 | return showError('Ruh roh! Could not parse less files.', err) 218 | } 219 | intoResult[baseFilename + '.css'] = cw + tree.toCSS() 220 | intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true }) 221 | }) 222 | } 223 | 224 | function generateCSS() { 225 | var oneChecked = false 226 | var lessFileIncludes = {} 227 | $('#less-section input').each(function() { 228 | var $this = $(this) 229 | var checked = $this.is(':checked') 230 | lessFileIncludes[$this.val()] = checked 231 | 232 | oneChecked = oneChecked || checked 233 | }) 234 | 235 | if (!oneChecked) return false 236 | 237 | var result = {} 238 | var vars = {} 239 | 240 | $('#less-variables-section input') 241 | .each(function () { 242 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 243 | }) 244 | 245 | var bsLessSource = generateLESS('bootstrap.less', lessFileIncludes, vars) 246 | var themeLessSource = generateLESS('theme.less', lessFileIncludes, vars) 247 | 248 | try { 249 | compileLESS(bsLessSource, 'bootstrap', result) 250 | compileLESS(themeLessSource, 'bootstrap-theme', result) 251 | } catch (err) { 252 | return showError('Ruh roh! Could not parse less files.', err) 253 | } 254 | 255 | return result 256 | } 257 | 258 | function generateJavascript() { 259 | var $checked = $('#plugin-section input:checked') 260 | if (!$checked.length) return false 261 | 262 | var js = $checked 263 | .map(function () { return __js[this.value] }) 264 | .toArray() 265 | .join('\n') 266 | 267 | return { 268 | 'bootstrap.js': js, 269 | 'bootstrap.min.js': cw + uglify(js) 270 | } 271 | } 272 | 273 | var inputsComponent = $('#less-section input') 274 | var inputsPlugin = $('#plugin-section input') 275 | var inputsVariables = $('#less-variables-section input') 276 | 277 | $('#less-section .toggle').on('click', function (e) { 278 | e.preventDefault() 279 | inputsComponent.prop('checked', !inputsComponent.is(':checked')) 280 | }) 281 | 282 | $('#plugin-section .toggle').on('click', function (e) { 283 | e.preventDefault() 284 | inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) 285 | }) 286 | 287 | $('#less-variables-section .toggle').on('click', function (e) { 288 | e.preventDefault() 289 | inputsVariables.val('') 290 | }) 291 | 292 | $('[data-dependencies]').on('click', function () { 293 | if (!$(this).is(':checked')) return 294 | var dependencies = this.getAttribute('data-dependencies') 295 | if (!dependencies) return 296 | dependencies = dependencies.split(',') 297 | for (var i = 0; i < dependencies.length; i++) { 298 | var dependency = $('[value="' + dependencies[i] + '"]') 299 | dependency && dependency.prop('checked', true) 300 | } 301 | }) 302 | 303 | $('[data-dependents]').on('click', function () { 304 | if ($(this).is(':checked')) return 305 | var dependents = this.getAttribute('data-dependents') 306 | if (!dependents) return 307 | dependents = dependents.split(',') 308 | for (var i = 0; i < dependents.length; i++) { 309 | var dependent = $('[value="' + dependents[i] + '"]') 310 | dependent && dependent.prop('checked', false) 311 | } 312 | }) 313 | 314 | var $compileBtn = $('#btn-compile') 315 | var $downloadBtn = $('#btn-download') 316 | 317 | $compileBtn.on('click', function (e) { 318 | var configData = getCustomizerData() 319 | var configJson = JSON.stringify(configData, null, 2) 320 | 321 | e.preventDefault() 322 | 323 | $compileBtn.attr('disabled', 'disabled') 324 | 325 | generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) { 326 | $compileBtn.removeAttr('disabled') 327 | saveAs(blob, 'bootstrap.zip') 328 | createGist(configJson) 329 | }) 330 | }) 331 | 332 | // browser support alerts 333 | if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) { 334 | showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support' + 335 | 'for HTML5 blobs. Because of this your file will be downloaded with the name "untitled".' + 336 | 'However, if you check your downloads folder, just rename this "untitled" file' + 337 | 'to "bootstrap.zip" and you should be good to go!') 338 | } else if (!window.URL && !window.webkitURL) { 339 | $('.bs-docs-section, .bs-docs-sidebar').css('display', 'none') 340 | 341 | showCallout('Looks like your current browser doesn\'t support the Bootstrap Customizer. Please take a second' + 342 | 'to upgrade to a more modern browser.', true) 343 | } 344 | 345 | parseUrl() 346 | } 347 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/js/vendor/blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2013-12-27 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/eboyjr 7 | * License: X11/MIT 8 | * See LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined") 18 | if ((typeof Blob === "function" || typeof Blob === "object") && typeof webkitURL !== "undefined") self.URL = webkitURL; 19 | else var Blob = (function (view) { 20 | "use strict"; 21 | 22 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) { 23 | var 24 | get_class = function(object) { 25 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 26 | } 27 | , FakeBlobBuilder = function BlobBuilder() { 28 | this.data = []; 29 | } 30 | , FakeBlob = function Blob(data, type, encoding) { 31 | this.data = data; 32 | this.size = data.length; 33 | this.type = type; 34 | this.encoding = encoding; 35 | } 36 | , FBB_proto = FakeBlobBuilder.prototype 37 | , FB_proto = FakeBlob.prototype 38 | , FileReaderSync = view.FileReaderSync 39 | , FileException = function(type) { 40 | this.code = this[this.name = type]; 41 | } 42 | , file_ex_codes = ( 43 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 44 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 45 | ).split(" ") 46 | , file_ex_code = file_ex_codes.length 47 | , real_URL = view.URL || view.webkitURL || view 48 | , real_create_object_URL = real_URL.createObjectURL 49 | , real_revoke_object_URL = real_URL.revokeObjectURL 50 | , URL = real_URL 51 | , btoa = view.btoa 52 | , atob = view.atob 53 | 54 | , ArrayBuffer = view.ArrayBuffer 55 | , Uint8Array = view.Uint8Array 56 | ; 57 | FakeBlob.fake = FB_proto.fake = true; 58 | while (file_ex_code--) { 59 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 60 | } 61 | if (!real_URL.createObjectURL) { 62 | URL = view.URL = {}; 63 | } 64 | URL.createObjectURL = function(blob) { 65 | var 66 | type = blob.type 67 | , data_URI_header 68 | ; 69 | if (type === null) { 70 | type = "application/octet-stream"; 71 | } 72 | if (blob instanceof FakeBlob) { 73 | data_URI_header = "data:" + type; 74 | if (blob.encoding === "base64") { 75 | return data_URI_header + ";base64," + blob.data; 76 | } else if (blob.encoding === "URI") { 77 | return data_URI_header + "," + decodeURIComponent(blob.data); 78 | } if (btoa) { 79 | return data_URI_header + ";base64," + btoa(blob.data); 80 | } else { 81 | return data_URI_header + "," + encodeURIComponent(blob.data); 82 | } 83 | } else if (real_create_object_URL) { 84 | return real_create_object_URL.call(real_URL, blob); 85 | } 86 | }; 87 | URL.revokeObjectURL = function(object_URL) { 88 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 89 | real_revoke_object_URL.call(real_URL, object_URL); 90 | } 91 | }; 92 | FBB_proto.append = function(data/*, endings*/) { 93 | var bb = this.data; 94 | // decode data to a binary string 95 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 96 | var 97 | str = "" 98 | , buf = new Uint8Array(data) 99 | , i = 0 100 | , buf_len = buf.length 101 | ; 102 | for (; i < buf_len; i++) { 103 | str += String.fromCharCode(buf[i]); 104 | } 105 | bb.push(str); 106 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 107 | if (FileReaderSync) { 108 | var fr = new FileReaderSync; 109 | bb.push(fr.readAsBinaryString(data)); 110 | } else { 111 | // async FileReader won't work as BlobBuilder is sync 112 | throw new FileException("NOT_READABLE_ERR"); 113 | } 114 | } else if (data instanceof FakeBlob) { 115 | if (data.encoding === "base64" && atob) { 116 | bb.push(atob(data.data)); 117 | } else if (data.encoding === "URI") { 118 | bb.push(decodeURIComponent(data.data)); 119 | } else if (data.encoding === "raw") { 120 | bb.push(data.data); 121 | } 122 | } else { 123 | if (typeof data !== "string") { 124 | data += ""; // convert unsupported types to strings 125 | } 126 | // decode UTF-16 to binary string 127 | bb.push(unescape(encodeURIComponent(data))); 128 | } 129 | }; 130 | FBB_proto.getBlob = function(type) { 131 | if (!arguments.length) { 132 | type = null; 133 | } 134 | return new FakeBlob(this.data.join(""), type, "raw"); 135 | }; 136 | FBB_proto.toString = function() { 137 | return "[object BlobBuilder]"; 138 | }; 139 | FB_proto.slice = function(start, end, type) { 140 | var args = arguments.length; 141 | if (args < 3) { 142 | type = null; 143 | } 144 | return new FakeBlob( 145 | this.data.slice(start, args > 1 ? end : this.data.length) 146 | , type 147 | , this.encoding 148 | ); 149 | }; 150 | FB_proto.toString = function() { 151 | return "[object Blob]"; 152 | }; 153 | return FakeBlobBuilder; 154 | }(view)); 155 | 156 | return function Blob(blobParts, options) { 157 | var type = options ? (options.type || "") : ""; 158 | var builder = new BlobBuilder(); 159 | if (blobParts) { 160 | for (var i = 0, len = blobParts.length; i < len; i++) { 161 | builder.append(blobParts[i]); 162 | } 163 | } 164 | return builder.getBlob(type); 165 | }; 166 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 167 | -------------------------------------------------------------------------------- /HTML Basic/index2/assets/js/vendor/filesaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 2014-01-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * License: X11/MIT 7 | * See LICENSE.md 8 | */ 9 | 10 | /*global self */ 11 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 12 | plusplus: true */ 13 | 14 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 15 | 16 | var saveAs = saveAs 17 | // IE 10+ (native saveAs) 18 | || (navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 19 | // Everyone else 20 | || (function(view) { 21 | "use strict"; 22 | // IE <10 is explicitly unsupported 23 | if (/MSIE [1-9]\./.test(navigator.userAgent)) { 24 | return; 25 | } 26 | var 27 | doc = view.document 28 | // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet 29 | , get_URL = function() { 30 | return view.URL || view.webkitURL || view; 31 | } 32 | , URL = view.URL || view.webkitURL || view 33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 34 | , can_use_save_link = !view.externalHost && "download" in save_link 35 | , click = function(node) { 36 | var event = doc.createEvent("MouseEvents"); 37 | event.initMouseEvent( 38 | "click", true, false, view, 0, 0, 0, 0, 0 39 | , false, false, false, false, 0, null 40 | ); 41 | node.dispatchEvent(event); 42 | } 43 | , webkit_req_fs = view.webkitRequestFileSystem 44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 45 | , throw_outside = function (ex) { 46 | (view.setImmediate || view.setTimeout)(function() { 47 | throw ex; 48 | }, 0); 49 | } 50 | , force_saveable_type = "application/octet-stream" 51 | , fs_min_size = 0 52 | , deletion_queue = [] 53 | , process_deletion_queue = function() { 54 | var i = deletion_queue.length; 55 | while (i--) { 56 | var file = deletion_queue[i]; 57 | if (typeof file === "string") { // file is an object URL 58 | URL.revokeObjectURL(file); 59 | } else { // file is a File 60 | file.remove(); 61 | } 62 | } 63 | deletion_queue.length = 0; // clear queue 64 | } 65 | , dispatch = function(filesaver, event_types, event) { 66 | event_types = [].concat(event_types); 67 | var i = event_types.length; 68 | while (i--) { 69 | var listener = filesaver["on" + event_types[i]]; 70 | if (typeof listener === "function") { 71 | try { 72 | listener.call(filesaver, event || filesaver); 73 | } catch (ex) { 74 | throw_outside(ex); 75 | } 76 | } 77 | } 78 | } 79 | , FileSaver = function(blob, name) { 80 | // First try a.download, then web filesystem, then object URLs 81 | var 82 | filesaver = this 83 | , type = blob.type 84 | , blob_changed = false 85 | , object_url 86 | , target_view 87 | , get_object_url = function() { 88 | var object_url = get_URL().createObjectURL(blob); 89 | deletion_queue.push(object_url); 90 | return object_url; 91 | } 92 | , dispatch_all = function() { 93 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 94 | } 95 | // on any filesys errors revert to saving with object URLs 96 | , fs_error = function() { 97 | // don't create more object URLs than needed 98 | if (blob_changed || !object_url) { 99 | object_url = get_object_url(blob); 100 | } 101 | if (target_view) { 102 | target_view.location.href = object_url; 103 | } else { 104 | window.open(object_url, "_blank"); 105 | } 106 | filesaver.readyState = filesaver.DONE; 107 | dispatch_all(); 108 | } 109 | , abortable = function(func) { 110 | return function() { 111 | if (filesaver.readyState !== filesaver.DONE) { 112 | return func.apply(this, arguments); 113 | } 114 | }; 115 | } 116 | , create_if_not_found = {create: true, exclusive: false} 117 | , slice 118 | ; 119 | filesaver.readyState = filesaver.INIT; 120 | if (!name) { 121 | name = "download"; 122 | } 123 | if (can_use_save_link) { 124 | object_url = get_object_url(blob); 125 | // FF for Android has a nasty garbage collection mechanism 126 | // that turns all objects that are not pure javascript into 'deadObject' 127 | // this means `doc` and `save_link` are unusable and need to be recreated 128 | // `view` is usable though: 129 | doc = view.document; 130 | save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); 131 | save_link.href = object_url; 132 | save_link.download = name; 133 | var event = doc.createEvent("MouseEvents"); 134 | event.initMouseEvent( 135 | "click", true, false, view, 0, 0, 0, 0, 0 136 | , false, false, false, false, 0, null 137 | ); 138 | save_link.dispatchEvent(event); 139 | filesaver.readyState = filesaver.DONE; 140 | dispatch_all(); 141 | return; 142 | } 143 | // Object and web filesystem URLs have a problem saving in Google Chrome when 144 | // viewed in a tab, so I force save with application/octet-stream 145 | // http://code.google.com/p/chromium/issues/detail?id=91158 146 | if (view.chrome && type && type !== force_saveable_type) { 147 | slice = blob.slice || blob.webkitSlice; 148 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 149 | blob_changed = true; 150 | } 151 | // Since I can't be sure that the guessed media type will trigger a download 152 | // in WebKit, I append .download to the filename. 153 | // https://bugs.webkit.org/show_bug.cgi?id=65440 154 | if (webkit_req_fs && name !== "download") { 155 | name += ".download"; 156 | } 157 | if (type === force_saveable_type || webkit_req_fs) { 158 | target_view = view; 159 | } 160 | if (!req_fs) { 161 | fs_error(); 162 | return; 163 | } 164 | fs_min_size += blob.size; 165 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 166 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 167 | var save = function() { 168 | dir.getFile(name, create_if_not_found, abortable(function(file) { 169 | file.createWriter(abortable(function(writer) { 170 | writer.onwriteend = function(event) { 171 | target_view.location.href = file.toURL(); 172 | deletion_queue.push(file); 173 | filesaver.readyState = filesaver.DONE; 174 | dispatch(filesaver, "writeend", event); 175 | }; 176 | writer.onerror = function() { 177 | var error = writer.error; 178 | if (error.code !== error.ABORT_ERR) { 179 | fs_error(); 180 | } 181 | }; 182 | "writestart progress write abort".split(" ").forEach(function(event) { 183 | writer["on" + event] = filesaver["on" + event]; 184 | }); 185 | writer.write(blob); 186 | filesaver.abort = function() { 187 | writer.abort(); 188 | filesaver.readyState = filesaver.DONE; 189 | }; 190 | filesaver.readyState = filesaver.WRITING; 191 | }), fs_error); 192 | }), fs_error); 193 | }; 194 | dir.getFile(name, {create: false}, abortable(function(file) { 195 | // delete file if it already exists 196 | file.remove(); 197 | save(); 198 | }), abortable(function(ex) { 199 | if (ex.code === ex.NOT_FOUND_ERR) { 200 | save(); 201 | } else { 202 | fs_error(); 203 | } 204 | })); 205 | }), fs_error); 206 | }), fs_error); 207 | } 208 | , FS_proto = FileSaver.prototype 209 | , saveAs = function(blob, name) { 210 | return new FileSaver(blob, name); 211 | } 212 | ; 213 | FS_proto.abort = function() { 214 | var filesaver = this; 215 | filesaver.readyState = filesaver.DONE; 216 | dispatch(filesaver, "abort"); 217 | }; 218 | FS_proto.readyState = FS_proto.INIT = 0; 219 | FS_proto.WRITING = 1; 220 | FS_proto.DONE = 2; 221 | 222 | FS_proto.error = 223 | FS_proto.onwritestart = 224 | FS_proto.onprogress = 225 | FS_proto.onwrite = 226 | FS_proto.onabort = 227 | FS_proto.onerror = 228 | FS_proto.onwriteend = 229 | null; 230 | 231 | view.addEventListener("unload", process_deletion_queue, false); 232 | return saveAs; 233 | }( 234 | typeof self !== "undefined" && self 235 | || typeof window !== "undefined" && window 236 | || this.content 237 | )); 238 | // `self` is undefined in Firefox for Android content script context 239 | // while `this` is nsIContentFrameMessageManager 240 | // with an attribute `content` that corresponds to the window 241 | 242 | if (typeof module !== "undefined") module.exports = saveAs; 243 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 第一個響應式設計網頁 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 |
    66 | 69 |

    哈囉!

    70 |
    71 | 72 | 77 | 78 | 79 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2.rar -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2/assets/ico/favicon.ico -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/img/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2/assets/img/components.png -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/img/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2/assets/img/devices.png -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/img/sass-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index2/index2/assets/img/sass-less.png -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * JavaScript for Bootstrap's docs (http://getbootstrap.com) 7 | * Copyright 2011-2014 Twitter, Inc. 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function () { 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement('style') 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | '@-ms-viewport{width:auto!important}' 25 | ) 26 | ) 27 | document.querySelector('head').appendChild(msViewportStyle) 28 | } 29 | 30 | 31 | var $window = $(window) 32 | var $body = $(document.body) 33 | 34 | var navHeight = $('.navbar').outerHeight(true) + 10 35 | 36 | $body.scrollspy({ 37 | target: '.bs-docs-sidebar', 38 | // offset: navHeight 39 | }) 40 | 41 | $window.on('load', function () { 42 | $body.scrollspy('refresh') 43 | }) 44 | 45 | $('.bs-docs-container [href=#]').click(function (e) { 46 | e.preventDefault() 47 | }) 48 | 49 | // back to top 50 | setTimeout(function () { 51 | var $sideBar = $('.bs-docs-sidebar') 52 | 53 | $sideBar.affix({ 54 | offset: { 55 | top: function () { 56 | var offsetTop = $sideBar.offset().top 57 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 58 | var navOuterHeight = $('.bs-docs-nav').height() 59 | 60 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 61 | }, 62 | bottom: function () { 63 | return (this.bottom = $('.bs-docs-footer').outerHeight(true)) 64 | } 65 | } 66 | }) 67 | }, 100) 68 | 69 | setTimeout(function () { 70 | $('.bs-top').affix() 71 | }, 100) 72 | 73 | // tooltip demo 74 | $('.tooltip-demo').tooltip({ 75 | selector: '[data-toggle=tooltip]', 76 | container: 'body' 77 | }) 78 | 79 | $('.tooltip-test').tooltip() 80 | $('.popover-test').popover() 81 | 82 | $('.bs-docs-navbar').tooltip({ 83 | selector: 'a[data-toggle=tooltip]', 84 | container: '.bs-docs-navbar .nav' 85 | }) 86 | 87 | // popover demo 88 | $('[data-toggle=popover]').popover() 89 | 90 | // button state demo 91 | $('#loading-example-btn') 92 | .click(function () { 93 | var btn = $(this) 94 | btn.button('loading') 95 | setTimeout(function () { 96 | btn.button('reset') 97 | }, 3000) 98 | }) 99 | }) 100 | 101 | }(jQuery) 102 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/js/customizer.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Customizer (http://getbootstrap.com/customize/) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * 5 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 6 | * details, see http://creativecommons.org/licenses/by/3.0/. 7 | */ 8 | 9 | window.onload = function () { // wait for load in a dumb way because B-0 10 | var cw = '/*!\n' + 11 | ' * Bootstrap v3.1.1 (http://getbootstrap.com)\n' + 12 | ' * Copyright 2011-2014 Twitter, Inc.\n' + 13 | ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' + 14 | ' */\n\n' 15 | 16 | function showError(msg, err) { 17 | $('
    ' + 18 | '
    ' + 19 | '×' + 20 | '

    ' + msg + '

    ' + 21 | (err.extract ? '
    ' + err.extract.join('\n') + '
    ' : '') + 22 | '
    ' + 23 | '
    ').appendTo('body').alert() 24 | throw err 25 | } 26 | 27 | function showCallout(msg, showUpTop) { 28 | var callout = $('
    ' + 29 | '

    Attention!

    ' + 30 | '

    ' + msg + '

    ' + 31 | '
    ') 32 | 33 | if (showUpTop) { 34 | callout.appendTo('.bs-docs-container') 35 | } else { 36 | callout.insertAfter('.bs-customize-download') 37 | } 38 | } 39 | 40 | function getQueryParam(key) { 41 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&') // escape RegEx meta chars 42 | var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)')) 43 | return match && decodeURIComponent(match[1].replace(/\+/g, ' ')) 44 | } 45 | 46 | function createGist(configJson) { 47 | var data = { 48 | 'description': 'Bootstrap Customizer Config', 49 | 'public': true, 50 | 'files': { 51 | 'config.json': { 52 | 'content': configJson 53 | } 54 | } 55 | } 56 | $.ajax({ 57 | url: 'https://api.github.com/gists', 58 | type: 'POST', 59 | dataType: 'json', 60 | data: JSON.stringify(data) 61 | }) 62 | .success(function (result) { 63 | var origin = window.location.protocol + '//' + window.location.host 64 | history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id) 65 | }) 66 | .error(function (err) { 67 | showError('Ruh roh! Could not save gist file, configuration not saved.', err) 68 | }) 69 | } 70 | 71 | function getCustomizerData() { 72 | var vars = {} 73 | 74 | $('#less-variables-section input') 75 | .each(function () { 76 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 77 | }) 78 | 79 | var data = { 80 | vars: vars, 81 | css: $('#less-section input:checked') .map(function () { return this.value }).toArray(), 82 | js: $('#plugin-section input:checked').map(function () { return this.value }).toArray() 83 | } 84 | 85 | if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return 86 | 87 | return data 88 | } 89 | 90 | function parseUrl() { 91 | var id = getQueryParam('id') 92 | 93 | if (!id) return 94 | 95 | $.ajax({ 96 | url: 'https://api.github.com/gists/' + id, 97 | type: 'GET', 98 | dataType: 'json' 99 | }) 100 | .success(function (result) { 101 | var data = JSON.parse(result.files['config.json'].content) 102 | if (data.js) { 103 | $('#plugin-section input').each(function () { 104 | $(this).prop('checked', ~$.inArray(this.value, data.js)) 105 | }) 106 | } 107 | if (data.css) { 108 | $('#less-section input').each(function () { 109 | $(this).prop('checked', ~$.inArray(this.value, data.css)) 110 | }) 111 | } 112 | if (data.vars) { 113 | for (var i in data.vars) { 114 | $('input[data-var="' + i + '"]').val(data.vars[i]) 115 | } 116 | } 117 | }) 118 | .error(function (err) { 119 | showError('Error fetching bootstrap config file', err) 120 | }) 121 | } 122 | 123 | function generateZip(css, js, fonts, config, complete) { 124 | if (!css && !js) return showError('Ruh roh! No Bootstrap files selected.', new Error('no Bootstrap')) 125 | 126 | var zip = new JSZip() 127 | 128 | if (css) { 129 | var cssFolder = zip.folder('css') 130 | for (var fileName in css) { 131 | cssFolder.file(fileName, css[fileName]) 132 | } 133 | } 134 | 135 | if (js) { 136 | var jsFolder = zip.folder('js') 137 | for (var jsFileName in js) { 138 | jsFolder.file(jsFileName, js[jsFileName]) 139 | } 140 | } 141 | 142 | if (fonts) { 143 | var fontsFolder = zip.folder('fonts') 144 | for (var fontsFileName in fonts) { 145 | fontsFolder.file(fontsFileName, fonts[fontsFileName], {base64: true}) 146 | } 147 | } 148 | 149 | if (config) { 150 | zip.file('config.json', config) 151 | } 152 | 153 | var content = zip.generate({ type: 'blob' }) 154 | 155 | complete(content) 156 | } 157 | 158 | function generateCustomCSS(vars) { 159 | var result = '' 160 | 161 | for (var key in vars) { 162 | result += key + ': ' + vars[key] + ';\n' 163 | } 164 | 165 | return result + '\n\n' 166 | } 167 | 168 | function generateFonts() { 169 | var glyphicons = $('#less-section [value="glyphicons.less"]:checked') 170 | if (glyphicons.length) { 171 | return __fonts 172 | } 173 | } 174 | 175 | // Returns an Array of @import'd filenames in the order 176 | // in which they appear in the file. 177 | function includedLessFilenames(lessFilename) { 178 | var IMPORT_REGEX = /^@import \"(.*?)\";$/ 179 | var lessLines = __less[lessFilename].split('\n') 180 | 181 | for (var i = 0, imports = []; i < lessLines.length; i++) { 182 | var match = IMPORT_REGEX.exec(lessLines[i]) 183 | if (match) imports.push(match[1]) 184 | } 185 | 186 | return imports 187 | } 188 | 189 | function generateLESS(lessFilename, lessFileIncludes, vars) { 190 | var lessSource = __less[lessFilename] 191 | 192 | $.each(includedLessFilenames(lessFilename), function(index, filename) { 193 | var fileInclude = lessFileIncludes[filename] 194 | 195 | // Files not explicitly unchecked are compiled into the final stylesheet. 196 | // Core stylesheets like 'normalize.less' are not included in the form 197 | // since disabling them would wreck everything, and so their 'fileInclude' 198 | // will be 'undefined'. 199 | if (fileInclude || (fileInclude == null)) lessSource += __less[filename] 200 | 201 | // Custom variables are added after Bootstrap variables so the custom 202 | // ones take precedence. 203 | if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars) 204 | }) 205 | 206 | lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports 207 | return lessSource 208 | } 209 | 210 | function compileLESS(lessSource, baseFilename, intoResult) { 211 | var parser = new less.Parser({ 212 | paths: ['variables.less', 'mixins.less'], 213 | optimization: 0, 214 | filename: baseFilename + '.css' 215 | }).parse(lessSource, function (err, tree) { 216 | if (err) { 217 | return showError('Ruh roh! Could not parse less files.', err) 218 | } 219 | intoResult[baseFilename + '.css'] = cw + tree.toCSS() 220 | intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true }) 221 | }) 222 | } 223 | 224 | function generateCSS() { 225 | var oneChecked = false 226 | var lessFileIncludes = {} 227 | $('#less-section input').each(function() { 228 | var $this = $(this) 229 | var checked = $this.is(':checked') 230 | lessFileIncludes[$this.val()] = checked 231 | 232 | oneChecked = oneChecked || checked 233 | }) 234 | 235 | if (!oneChecked) return false 236 | 237 | var result = {} 238 | var vars = {} 239 | 240 | $('#less-variables-section input') 241 | .each(function () { 242 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 243 | }) 244 | 245 | var bsLessSource = generateLESS('bootstrap.less', lessFileIncludes, vars) 246 | var themeLessSource = generateLESS('theme.less', lessFileIncludes, vars) 247 | 248 | try { 249 | compileLESS(bsLessSource, 'bootstrap', result) 250 | compileLESS(themeLessSource, 'bootstrap-theme', result) 251 | } catch (err) { 252 | return showError('Ruh roh! Could not parse less files.', err) 253 | } 254 | 255 | return result 256 | } 257 | 258 | function generateJavascript() { 259 | var $checked = $('#plugin-section input:checked') 260 | if (!$checked.length) return false 261 | 262 | var js = $checked 263 | .map(function () { return __js[this.value] }) 264 | .toArray() 265 | .join('\n') 266 | 267 | return { 268 | 'bootstrap.js': js, 269 | 'bootstrap.min.js': cw + uglify(js) 270 | } 271 | } 272 | 273 | var inputsComponent = $('#less-section input') 274 | var inputsPlugin = $('#plugin-section input') 275 | var inputsVariables = $('#less-variables-section input') 276 | 277 | $('#less-section .toggle').on('click', function (e) { 278 | e.preventDefault() 279 | inputsComponent.prop('checked', !inputsComponent.is(':checked')) 280 | }) 281 | 282 | $('#plugin-section .toggle').on('click', function (e) { 283 | e.preventDefault() 284 | inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) 285 | }) 286 | 287 | $('#less-variables-section .toggle').on('click', function (e) { 288 | e.preventDefault() 289 | inputsVariables.val('') 290 | }) 291 | 292 | $('[data-dependencies]').on('click', function () { 293 | if (!$(this).is(':checked')) return 294 | var dependencies = this.getAttribute('data-dependencies') 295 | if (!dependencies) return 296 | dependencies = dependencies.split(',') 297 | for (var i = 0; i < dependencies.length; i++) { 298 | var dependency = $('[value="' + dependencies[i] + '"]') 299 | dependency && dependency.prop('checked', true) 300 | } 301 | }) 302 | 303 | $('[data-dependents]').on('click', function () { 304 | if ($(this).is(':checked')) return 305 | var dependents = this.getAttribute('data-dependents') 306 | if (!dependents) return 307 | dependents = dependents.split(',') 308 | for (var i = 0; i < dependents.length; i++) { 309 | var dependent = $('[value="' + dependents[i] + '"]') 310 | dependent && dependent.prop('checked', false) 311 | } 312 | }) 313 | 314 | var $compileBtn = $('#btn-compile') 315 | var $downloadBtn = $('#btn-download') 316 | 317 | $compileBtn.on('click', function (e) { 318 | var configData = getCustomizerData() 319 | var configJson = JSON.stringify(configData, null, 2) 320 | 321 | e.preventDefault() 322 | 323 | $compileBtn.attr('disabled', 'disabled') 324 | 325 | generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) { 326 | $compileBtn.removeAttr('disabled') 327 | saveAs(blob, 'bootstrap.zip') 328 | createGist(configJson) 329 | }) 330 | }) 331 | 332 | // browser support alerts 333 | if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) { 334 | showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support' + 335 | 'for HTML5 blobs. Because of this your file will be downloaded with the name "untitled".' + 336 | 'However, if you check your downloads folder, just rename this "untitled" file' + 337 | 'to "bootstrap.zip" and you should be good to go!') 338 | } else if (!window.URL && !window.webkitURL) { 339 | $('.bs-docs-section, .bs-docs-sidebar').css('display', 'none') 340 | 341 | showCallout('Looks like your current browser doesn\'t support the Bootstrap Customizer. Please take a second' + 342 | 'to upgrade to a more modern browser.', true) 343 | } 344 | 345 | parseUrl() 346 | } 347 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/js/vendor/blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2013-12-27 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/eboyjr 7 | * License: X11/MIT 8 | * See LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined") 18 | if ((typeof Blob === "function" || typeof Blob === "object") && typeof webkitURL !== "undefined") self.URL = webkitURL; 19 | else var Blob = (function (view) { 20 | "use strict"; 21 | 22 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) { 23 | var 24 | get_class = function(object) { 25 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 26 | } 27 | , FakeBlobBuilder = function BlobBuilder() { 28 | this.data = []; 29 | } 30 | , FakeBlob = function Blob(data, type, encoding) { 31 | this.data = data; 32 | this.size = data.length; 33 | this.type = type; 34 | this.encoding = encoding; 35 | } 36 | , FBB_proto = FakeBlobBuilder.prototype 37 | , FB_proto = FakeBlob.prototype 38 | , FileReaderSync = view.FileReaderSync 39 | , FileException = function(type) { 40 | this.code = this[this.name = type]; 41 | } 42 | , file_ex_codes = ( 43 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 44 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 45 | ).split(" ") 46 | , file_ex_code = file_ex_codes.length 47 | , real_URL = view.URL || view.webkitURL || view 48 | , real_create_object_URL = real_URL.createObjectURL 49 | , real_revoke_object_URL = real_URL.revokeObjectURL 50 | , URL = real_URL 51 | , btoa = view.btoa 52 | , atob = view.atob 53 | 54 | , ArrayBuffer = view.ArrayBuffer 55 | , Uint8Array = view.Uint8Array 56 | ; 57 | FakeBlob.fake = FB_proto.fake = true; 58 | while (file_ex_code--) { 59 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 60 | } 61 | if (!real_URL.createObjectURL) { 62 | URL = view.URL = {}; 63 | } 64 | URL.createObjectURL = function(blob) { 65 | var 66 | type = blob.type 67 | , data_URI_header 68 | ; 69 | if (type === null) { 70 | type = "application/octet-stream"; 71 | } 72 | if (blob instanceof FakeBlob) { 73 | data_URI_header = "data:" + type; 74 | if (blob.encoding === "base64") { 75 | return data_URI_header + ";base64," + blob.data; 76 | } else if (blob.encoding === "URI") { 77 | return data_URI_header + "," + decodeURIComponent(blob.data); 78 | } if (btoa) { 79 | return data_URI_header + ";base64," + btoa(blob.data); 80 | } else { 81 | return data_URI_header + "," + encodeURIComponent(blob.data); 82 | } 83 | } else if (real_create_object_URL) { 84 | return real_create_object_URL.call(real_URL, blob); 85 | } 86 | }; 87 | URL.revokeObjectURL = function(object_URL) { 88 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 89 | real_revoke_object_URL.call(real_URL, object_URL); 90 | } 91 | }; 92 | FBB_proto.append = function(data/*, endings*/) { 93 | var bb = this.data; 94 | // decode data to a binary string 95 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 96 | var 97 | str = "" 98 | , buf = new Uint8Array(data) 99 | , i = 0 100 | , buf_len = buf.length 101 | ; 102 | for (; i < buf_len; i++) { 103 | str += String.fromCharCode(buf[i]); 104 | } 105 | bb.push(str); 106 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 107 | if (FileReaderSync) { 108 | var fr = new FileReaderSync; 109 | bb.push(fr.readAsBinaryString(data)); 110 | } else { 111 | // async FileReader won't work as BlobBuilder is sync 112 | throw new FileException("NOT_READABLE_ERR"); 113 | } 114 | } else if (data instanceof FakeBlob) { 115 | if (data.encoding === "base64" && atob) { 116 | bb.push(atob(data.data)); 117 | } else if (data.encoding === "URI") { 118 | bb.push(decodeURIComponent(data.data)); 119 | } else if (data.encoding === "raw") { 120 | bb.push(data.data); 121 | } 122 | } else { 123 | if (typeof data !== "string") { 124 | data += ""; // convert unsupported types to strings 125 | } 126 | // decode UTF-16 to binary string 127 | bb.push(unescape(encodeURIComponent(data))); 128 | } 129 | }; 130 | FBB_proto.getBlob = function(type) { 131 | if (!arguments.length) { 132 | type = null; 133 | } 134 | return new FakeBlob(this.data.join(""), type, "raw"); 135 | }; 136 | FBB_proto.toString = function() { 137 | return "[object BlobBuilder]"; 138 | }; 139 | FB_proto.slice = function(start, end, type) { 140 | var args = arguments.length; 141 | if (args < 3) { 142 | type = null; 143 | } 144 | return new FakeBlob( 145 | this.data.slice(start, args > 1 ? end : this.data.length) 146 | , type 147 | , this.encoding 148 | ); 149 | }; 150 | FB_proto.toString = function() { 151 | return "[object Blob]"; 152 | }; 153 | return FakeBlobBuilder; 154 | }(view)); 155 | 156 | return function Blob(blobParts, options) { 157 | var type = options ? (options.type || "") : ""; 158 | var builder = new BlobBuilder(); 159 | if (blobParts) { 160 | for (var i = 0, len = blobParts.length; i < len; i++) { 161 | builder.append(blobParts[i]); 162 | } 163 | } 164 | return builder.getBlob(type); 165 | }; 166 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 167 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/assets/js/vendor/filesaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 2014-01-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * License: X11/MIT 7 | * See LICENSE.md 8 | */ 9 | 10 | /*global self */ 11 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 12 | plusplus: true */ 13 | 14 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 15 | 16 | var saveAs = saveAs 17 | // IE 10+ (native saveAs) 18 | || (navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 19 | // Everyone else 20 | || (function(view) { 21 | "use strict"; 22 | // IE <10 is explicitly unsupported 23 | if (/MSIE [1-9]\./.test(navigator.userAgent)) { 24 | return; 25 | } 26 | var 27 | doc = view.document 28 | // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet 29 | , get_URL = function() { 30 | return view.URL || view.webkitURL || view; 31 | } 32 | , URL = view.URL || view.webkitURL || view 33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 34 | , can_use_save_link = !view.externalHost && "download" in save_link 35 | , click = function(node) { 36 | var event = doc.createEvent("MouseEvents"); 37 | event.initMouseEvent( 38 | "click", true, false, view, 0, 0, 0, 0, 0 39 | , false, false, false, false, 0, null 40 | ); 41 | node.dispatchEvent(event); 42 | } 43 | , webkit_req_fs = view.webkitRequestFileSystem 44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 45 | , throw_outside = function (ex) { 46 | (view.setImmediate || view.setTimeout)(function() { 47 | throw ex; 48 | }, 0); 49 | } 50 | , force_saveable_type = "application/octet-stream" 51 | , fs_min_size = 0 52 | , deletion_queue = [] 53 | , process_deletion_queue = function() { 54 | var i = deletion_queue.length; 55 | while (i--) { 56 | var file = deletion_queue[i]; 57 | if (typeof file === "string") { // file is an object URL 58 | URL.revokeObjectURL(file); 59 | } else { // file is a File 60 | file.remove(); 61 | } 62 | } 63 | deletion_queue.length = 0; // clear queue 64 | } 65 | , dispatch = function(filesaver, event_types, event) { 66 | event_types = [].concat(event_types); 67 | var i = event_types.length; 68 | while (i--) { 69 | var listener = filesaver["on" + event_types[i]]; 70 | if (typeof listener === "function") { 71 | try { 72 | listener.call(filesaver, event || filesaver); 73 | } catch (ex) { 74 | throw_outside(ex); 75 | } 76 | } 77 | } 78 | } 79 | , FileSaver = function(blob, name) { 80 | // First try a.download, then web filesystem, then object URLs 81 | var 82 | filesaver = this 83 | , type = blob.type 84 | , blob_changed = false 85 | , object_url 86 | , target_view 87 | , get_object_url = function() { 88 | var object_url = get_URL().createObjectURL(blob); 89 | deletion_queue.push(object_url); 90 | return object_url; 91 | } 92 | , dispatch_all = function() { 93 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 94 | } 95 | // on any filesys errors revert to saving with object URLs 96 | , fs_error = function() { 97 | // don't create more object URLs than needed 98 | if (blob_changed || !object_url) { 99 | object_url = get_object_url(blob); 100 | } 101 | if (target_view) { 102 | target_view.location.href = object_url; 103 | } else { 104 | window.open(object_url, "_blank"); 105 | } 106 | filesaver.readyState = filesaver.DONE; 107 | dispatch_all(); 108 | } 109 | , abortable = function(func) { 110 | return function() { 111 | if (filesaver.readyState !== filesaver.DONE) { 112 | return func.apply(this, arguments); 113 | } 114 | }; 115 | } 116 | , create_if_not_found = {create: true, exclusive: false} 117 | , slice 118 | ; 119 | filesaver.readyState = filesaver.INIT; 120 | if (!name) { 121 | name = "download"; 122 | } 123 | if (can_use_save_link) { 124 | object_url = get_object_url(blob); 125 | // FF for Android has a nasty garbage collection mechanism 126 | // that turns all objects that are not pure javascript into 'deadObject' 127 | // this means `doc` and `save_link` are unusable and need to be recreated 128 | // `view` is usable though: 129 | doc = view.document; 130 | save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); 131 | save_link.href = object_url; 132 | save_link.download = name; 133 | var event = doc.createEvent("MouseEvents"); 134 | event.initMouseEvent( 135 | "click", true, false, view, 0, 0, 0, 0, 0 136 | , false, false, false, false, 0, null 137 | ); 138 | save_link.dispatchEvent(event); 139 | filesaver.readyState = filesaver.DONE; 140 | dispatch_all(); 141 | return; 142 | } 143 | // Object and web filesystem URLs have a problem saving in Google Chrome when 144 | // viewed in a tab, so I force save with application/octet-stream 145 | // http://code.google.com/p/chromium/issues/detail?id=91158 146 | if (view.chrome && type && type !== force_saveable_type) { 147 | slice = blob.slice || blob.webkitSlice; 148 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 149 | blob_changed = true; 150 | } 151 | // Since I can't be sure that the guessed media type will trigger a download 152 | // in WebKit, I append .download to the filename. 153 | // https://bugs.webkit.org/show_bug.cgi?id=65440 154 | if (webkit_req_fs && name !== "download") { 155 | name += ".download"; 156 | } 157 | if (type === force_saveable_type || webkit_req_fs) { 158 | target_view = view; 159 | } 160 | if (!req_fs) { 161 | fs_error(); 162 | return; 163 | } 164 | fs_min_size += blob.size; 165 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 166 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 167 | var save = function() { 168 | dir.getFile(name, create_if_not_found, abortable(function(file) { 169 | file.createWriter(abortable(function(writer) { 170 | writer.onwriteend = function(event) { 171 | target_view.location.href = file.toURL(); 172 | deletion_queue.push(file); 173 | filesaver.readyState = filesaver.DONE; 174 | dispatch(filesaver, "writeend", event); 175 | }; 176 | writer.onerror = function() { 177 | var error = writer.error; 178 | if (error.code !== error.ABORT_ERR) { 179 | fs_error(); 180 | } 181 | }; 182 | "writestart progress write abort".split(" ").forEach(function(event) { 183 | writer["on" + event] = filesaver["on" + event]; 184 | }); 185 | writer.write(blob); 186 | filesaver.abort = function() { 187 | writer.abort(); 188 | filesaver.readyState = filesaver.DONE; 189 | }; 190 | filesaver.readyState = filesaver.WRITING; 191 | }), fs_error); 192 | }), fs_error); 193 | }; 194 | dir.getFile(name, {create: false}, abortable(function(file) { 195 | // delete file if it already exists 196 | file.remove(); 197 | save(); 198 | }), abortable(function(ex) { 199 | if (ex.code === ex.NOT_FOUND_ERR) { 200 | save(); 201 | } else { 202 | fs_error(); 203 | } 204 | })); 205 | }), fs_error); 206 | }), fs_error); 207 | } 208 | , FS_proto = FileSaver.prototype 209 | , saveAs = function(blob, name) { 210 | return new FileSaver(blob, name); 211 | } 212 | ; 213 | FS_proto.abort = function() { 214 | var filesaver = this; 215 | filesaver.readyState = filesaver.DONE; 216 | dispatch(filesaver, "abort"); 217 | }; 218 | FS_proto.readyState = FS_proto.INIT = 0; 219 | FS_proto.WRITING = 1; 220 | FS_proto.DONE = 2; 221 | 222 | FS_proto.error = 223 | FS_proto.onwritestart = 224 | FS_proto.onprogress = 225 | FS_proto.onwrite = 226 | FS_proto.onabort = 227 | FS_proto.onerror = 228 | FS_proto.onwriteend = 229 | null; 230 | 231 | view.addEventListener("unload", process_deletion_queue, false); 232 | return saveAs; 233 | }( 234 | typeof self !== "undefined" && self 235 | || typeof window !== "undefined" && window 236 | || this.content 237 | )); 238 | // `self` is undefined in Firefox for Android content script context 239 | // while `this` is nsIContentFrameMessageManager 240 | // with an attribute `content` that corresponds to the window 241 | 242 | if (typeof module !== "undefined") module.exports = saveAs; 243 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 第一個響應式設計網頁 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 |
    66 | 69 |

    哈囉!

    70 |
    71 | 72 | 77 | 78 | 79 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /HTML Basic/index2/index2/sticky-footer-navbar.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | /* Margin bottom by footer height */ 9 | margin-bottom: 60px; 10 | } 11 | #footer { 12 | position: absolute; 13 | bottom: 0; 14 | width: 100%; 15 | /* Set the fixed height of the footer here */ 16 | height: 60px; 17 | background-color: #f5f5f5; 18 | } 19 | 20 | 21 | /* Custom page CSS 22 | -------------------------------------------------- */ 23 | /* Not required for template or sticky footer method. */ 24 | 25 | body > .container { 26 | padding: 60px 15px 0; 27 | } 28 | .container .text-muted { 29 | margin: 20px 0; 30 | } 31 | 32 | #footer > .container { 33 | padding-right: 15px; 34 | padding-left: 15px; 35 | } 36 | 37 | code { 38 | font-size: 80%; 39 | } 40 | -------------------------------------------------------------------------------- /HTML Basic/index2/sticky-footer-navbar.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | /* Margin bottom by footer height */ 9 | margin-bottom: 60px; 10 | } 11 | #footer { 12 | position: absolute; 13 | bottom: 0; 14 | width: 100%; 15 | /* Set the fixed height of the footer here */ 16 | height: 60px; 17 | background-color: #f5f5f5; 18 | } 19 | 20 | 21 | /* Custom page CSS 22 | -------------------------------------------------- */ 23 | /* Not required for template or sticky footer method. */ 24 | 25 | body > .container { 26 | padding: 60px 15px 0; 27 | } 28 | .container .text-muted { 29 | margin: 20px 0; 30 | } 31 | 32 | #footer > .container { 33 | padding-right: 15px; 34 | padding-left: 15px; 35 | } 36 | 37 | code { 38 | font-size: 80%; 39 | } 40 | -------------------------------------------------------------------------------- /HTML Basic/index3/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 介紹台灣科大 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 |
    66 | 69 | 70 |
    71 |

    國立台灣工業技術學院成立於民國六十三年八月一日,為我國第一所技術職業教育高等學府。建校之目的,在因應我國經濟與工業迅速發展之需求,以培養高級工程技術及管理人才為目標,同時建立完整之技術職業教育體系。本校校地約48公頃,校本部位於臺北市基隆路四段四十三號,現有大學部學生5,600位,研究生4,900位,專任教師420位。 72 | 本校自民國八十六年改名為國立台灣科技大學,目前設有工程、電資、管理、設計、人文社會、精誠榮譽及智彗財產學等七個學院,分別有機械工程、材料科學與工程、營建工程、化學工程、電子工程、電機工程、資訊工程、工業管理、企業管理、資訊管理、建築、工商業設計、應用外語及全校不分系等系及自動化及控制研究所、光電工程研究所、管理研究所、財務金融研究所、科技管理研究所、數位學習與教育研究所、應用科技研究所、醫學工程研究所、專利研究所及色彩與照明科技研究所等獨立研究所,此外尚有人文社會學科負責人文、社會、法律、音樂、環保類等課程之教學,以及師資培育中心專以培養學生未來擔任中等學校工、商、管理、設計等科之合格教師,合計共有二十四個獨立系所、師資培育中心及人文社會學科等教學單位,招收博士班、碩士班及大學部學生。 73 | 本校大學部設有四年制、二年制及二年制進修部等三種學制;凡高職、高中畢業生,皆可以報考本校大學部四年制,而二專、三專及五專等專科學校以上之畢業生,可以報考本校化學工程系、企業管理系及應用外語系大學部二年制。應用外語系設有二年制進修部學制,利用夜間及暑假期間上課。凡在本校大學部修畢應修學分且成績及格者皆授予學士學位。 74 | 本校自民國六十八年起開始招收碩士班研究生,凡國內、外大學或獨立學院相關學系畢業,具有學士學位,或符合同等學力所規定資格者,都可以報考本校碩士班。此外,針對長期在社會就業且具碩士班報考資格人士,本校部分系所也設有碩士在職專班,提供回流教育管道。凡修畢各所規定學分,完成碩士論文並經考試及格者授予碩士學位。 75 | 本校自七十一年起開始招收博士班研究生,招生對象為國內、外大學或獨立學院獲得碩士學位、或符合同等學力所規定資格者皆可以報考。自九十年起部分系所也開始招收博士在職專班研究生。凡修畢各所規定學分,完成博士論文並經考試及格者授予博士學位。 76 | 本校至今各系所畢業校友逾六萬人,工作地點遍佈全國各地。畢業校友中,除部分出國繼續深造外,大多數都能立即投身於國家建設行列中,貢獻所長。由於實作經驗豐富,理論基礎完備,工作態度認真,畢業校友皆深受服務單位的肯定。

    77 |
    78 | 79 | 84 | 85 | 86 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /HTML Basic/index3/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/assets/ico/favicon.ico -------------------------------------------------------------------------------- /HTML Basic/index3/assets/img/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/assets/img/components.png -------------------------------------------------------------------------------- /HTML Basic/index3/assets/img/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/assets/img/devices.png -------------------------------------------------------------------------------- /HTML Basic/index3/assets/img/sass-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/assets/img/sass-less.png -------------------------------------------------------------------------------- /HTML Basic/index3/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * JavaScript for Bootstrap's docs (http://getbootstrap.com) 7 | * Copyright 2011-2014 Twitter, Inc. 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function () { 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement('style') 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | '@-ms-viewport{width:auto!important}' 25 | ) 26 | ) 27 | document.querySelector('head').appendChild(msViewportStyle) 28 | } 29 | 30 | 31 | var $window = $(window) 32 | var $body = $(document.body) 33 | 34 | var navHeight = $('.navbar').outerHeight(true) + 10 35 | 36 | $body.scrollspy({ 37 | target: '.bs-docs-sidebar', 38 | // offset: navHeight 39 | }) 40 | 41 | $window.on('load', function () { 42 | $body.scrollspy('refresh') 43 | }) 44 | 45 | $('.bs-docs-container [href=#]').click(function (e) { 46 | e.preventDefault() 47 | }) 48 | 49 | // back to top 50 | setTimeout(function () { 51 | var $sideBar = $('.bs-docs-sidebar') 52 | 53 | $sideBar.affix({ 54 | offset: { 55 | top: function () { 56 | var offsetTop = $sideBar.offset().top 57 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 58 | var navOuterHeight = $('.bs-docs-nav').height() 59 | 60 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 61 | }, 62 | bottom: function () { 63 | return (this.bottom = $('.bs-docs-footer').outerHeight(true)) 64 | } 65 | } 66 | }) 67 | }, 100) 68 | 69 | setTimeout(function () { 70 | $('.bs-top').affix() 71 | }, 100) 72 | 73 | // tooltip demo 74 | $('.tooltip-demo').tooltip({ 75 | selector: '[data-toggle=tooltip]', 76 | container: 'body' 77 | }) 78 | 79 | $('.tooltip-test').tooltip() 80 | $('.popover-test').popover() 81 | 82 | $('.bs-docs-navbar').tooltip({ 83 | selector: 'a[data-toggle=tooltip]', 84 | container: '.bs-docs-navbar .nav' 85 | }) 86 | 87 | // popover demo 88 | $('[data-toggle=popover]').popover() 89 | 90 | // button state demo 91 | $('#loading-example-btn') 92 | .click(function () { 93 | var btn = $(this) 94 | btn.button('loading') 95 | setTimeout(function () { 96 | btn.button('reset') 97 | }, 3000) 98 | }) 99 | }) 100 | 101 | }(jQuery) 102 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/js/customizer.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Customizer (http://getbootstrap.com/customize/) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * 5 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 6 | * details, see http://creativecommons.org/licenses/by/3.0/. 7 | */ 8 | 9 | window.onload = function () { // wait for load in a dumb way because B-0 10 | var cw = '/*!\n' + 11 | ' * Bootstrap v3.1.1 (http://getbootstrap.com)\n' + 12 | ' * Copyright 2011-2014 Twitter, Inc.\n' + 13 | ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' + 14 | ' */\n\n' 15 | 16 | function showError(msg, err) { 17 | $('
    ' + 18 | '
    ' + 19 | '×' + 20 | '

    ' + msg + '

    ' + 21 | (err.extract ? '
    ' + err.extract.join('\n') + '
    ' : '') + 22 | '
    ' + 23 | '
    ').appendTo('body').alert() 24 | throw err 25 | } 26 | 27 | function showCallout(msg, showUpTop) { 28 | var callout = $('
    ' + 29 | '

    Attention!

    ' + 30 | '

    ' + msg + '

    ' + 31 | '
    ') 32 | 33 | if (showUpTop) { 34 | callout.appendTo('.bs-docs-container') 35 | } else { 36 | callout.insertAfter('.bs-customize-download') 37 | } 38 | } 39 | 40 | function getQueryParam(key) { 41 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&') // escape RegEx meta chars 42 | var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)')) 43 | return match && decodeURIComponent(match[1].replace(/\+/g, ' ')) 44 | } 45 | 46 | function createGist(configJson) { 47 | var data = { 48 | 'description': 'Bootstrap Customizer Config', 49 | 'public': true, 50 | 'files': { 51 | 'config.json': { 52 | 'content': configJson 53 | } 54 | } 55 | } 56 | $.ajax({ 57 | url: 'https://api.github.com/gists', 58 | type: 'POST', 59 | dataType: 'json', 60 | data: JSON.stringify(data) 61 | }) 62 | .success(function (result) { 63 | var origin = window.location.protocol + '//' + window.location.host 64 | history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id) 65 | }) 66 | .error(function (err) { 67 | showError('Ruh roh! Could not save gist file, configuration not saved.', err) 68 | }) 69 | } 70 | 71 | function getCustomizerData() { 72 | var vars = {} 73 | 74 | $('#less-variables-section input') 75 | .each(function () { 76 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 77 | }) 78 | 79 | var data = { 80 | vars: vars, 81 | css: $('#less-section input:checked') .map(function () { return this.value }).toArray(), 82 | js: $('#plugin-section input:checked').map(function () { return this.value }).toArray() 83 | } 84 | 85 | if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return 86 | 87 | return data 88 | } 89 | 90 | function parseUrl() { 91 | var id = getQueryParam('id') 92 | 93 | if (!id) return 94 | 95 | $.ajax({ 96 | url: 'https://api.github.com/gists/' + id, 97 | type: 'GET', 98 | dataType: 'json' 99 | }) 100 | .success(function (result) { 101 | var data = JSON.parse(result.files['config.json'].content) 102 | if (data.js) { 103 | $('#plugin-section input').each(function () { 104 | $(this).prop('checked', ~$.inArray(this.value, data.js)) 105 | }) 106 | } 107 | if (data.css) { 108 | $('#less-section input').each(function () { 109 | $(this).prop('checked', ~$.inArray(this.value, data.css)) 110 | }) 111 | } 112 | if (data.vars) { 113 | for (var i in data.vars) { 114 | $('input[data-var="' + i + '"]').val(data.vars[i]) 115 | } 116 | } 117 | }) 118 | .error(function (err) { 119 | showError('Error fetching bootstrap config file', err) 120 | }) 121 | } 122 | 123 | function generateZip(css, js, fonts, config, complete) { 124 | if (!css && !js) return showError('Ruh roh! No Bootstrap files selected.', new Error('no Bootstrap')) 125 | 126 | var zip = new JSZip() 127 | 128 | if (css) { 129 | var cssFolder = zip.folder('css') 130 | for (var fileName in css) { 131 | cssFolder.file(fileName, css[fileName]) 132 | } 133 | } 134 | 135 | if (js) { 136 | var jsFolder = zip.folder('js') 137 | for (var jsFileName in js) { 138 | jsFolder.file(jsFileName, js[jsFileName]) 139 | } 140 | } 141 | 142 | if (fonts) { 143 | var fontsFolder = zip.folder('fonts') 144 | for (var fontsFileName in fonts) { 145 | fontsFolder.file(fontsFileName, fonts[fontsFileName], {base64: true}) 146 | } 147 | } 148 | 149 | if (config) { 150 | zip.file('config.json', config) 151 | } 152 | 153 | var content = zip.generate({ type: 'blob' }) 154 | 155 | complete(content) 156 | } 157 | 158 | function generateCustomCSS(vars) { 159 | var result = '' 160 | 161 | for (var key in vars) { 162 | result += key + ': ' + vars[key] + ';\n' 163 | } 164 | 165 | return result + '\n\n' 166 | } 167 | 168 | function generateFonts() { 169 | var glyphicons = $('#less-section [value="glyphicons.less"]:checked') 170 | if (glyphicons.length) { 171 | return __fonts 172 | } 173 | } 174 | 175 | // Returns an Array of @import'd filenames in the order 176 | // in which they appear in the file. 177 | function includedLessFilenames(lessFilename) { 178 | var IMPORT_REGEX = /^@import \"(.*?)\";$/ 179 | var lessLines = __less[lessFilename].split('\n') 180 | 181 | for (var i = 0, imports = []; i < lessLines.length; i++) { 182 | var match = IMPORT_REGEX.exec(lessLines[i]) 183 | if (match) imports.push(match[1]) 184 | } 185 | 186 | return imports 187 | } 188 | 189 | function generateLESS(lessFilename, lessFileIncludes, vars) { 190 | var lessSource = __less[lessFilename] 191 | 192 | $.each(includedLessFilenames(lessFilename), function(index, filename) { 193 | var fileInclude = lessFileIncludes[filename] 194 | 195 | // Files not explicitly unchecked are compiled into the final stylesheet. 196 | // Core stylesheets like 'normalize.less' are not included in the form 197 | // since disabling them would wreck everything, and so their 'fileInclude' 198 | // will be 'undefined'. 199 | if (fileInclude || (fileInclude == null)) lessSource += __less[filename] 200 | 201 | // Custom variables are added after Bootstrap variables so the custom 202 | // ones take precedence. 203 | if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars) 204 | }) 205 | 206 | lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports 207 | return lessSource 208 | } 209 | 210 | function compileLESS(lessSource, baseFilename, intoResult) { 211 | var parser = new less.Parser({ 212 | paths: ['variables.less', 'mixins.less'], 213 | optimization: 0, 214 | filename: baseFilename + '.css' 215 | }).parse(lessSource, function (err, tree) { 216 | if (err) { 217 | return showError('Ruh roh! Could not parse less files.', err) 218 | } 219 | intoResult[baseFilename + '.css'] = cw + tree.toCSS() 220 | intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true }) 221 | }) 222 | } 223 | 224 | function generateCSS() { 225 | var oneChecked = false 226 | var lessFileIncludes = {} 227 | $('#less-section input').each(function() { 228 | var $this = $(this) 229 | var checked = $this.is(':checked') 230 | lessFileIncludes[$this.val()] = checked 231 | 232 | oneChecked = oneChecked || checked 233 | }) 234 | 235 | if (!oneChecked) return false 236 | 237 | var result = {} 238 | var vars = {} 239 | 240 | $('#less-variables-section input') 241 | .each(function () { 242 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 243 | }) 244 | 245 | var bsLessSource = generateLESS('bootstrap.less', lessFileIncludes, vars) 246 | var themeLessSource = generateLESS('theme.less', lessFileIncludes, vars) 247 | 248 | try { 249 | compileLESS(bsLessSource, 'bootstrap', result) 250 | compileLESS(themeLessSource, 'bootstrap-theme', result) 251 | } catch (err) { 252 | return showError('Ruh roh! Could not parse less files.', err) 253 | } 254 | 255 | return result 256 | } 257 | 258 | function generateJavascript() { 259 | var $checked = $('#plugin-section input:checked') 260 | if (!$checked.length) return false 261 | 262 | var js = $checked 263 | .map(function () { return __js[this.value] }) 264 | .toArray() 265 | .join('\n') 266 | 267 | return { 268 | 'bootstrap.js': js, 269 | 'bootstrap.min.js': cw + uglify(js) 270 | } 271 | } 272 | 273 | var inputsComponent = $('#less-section input') 274 | var inputsPlugin = $('#plugin-section input') 275 | var inputsVariables = $('#less-variables-section input') 276 | 277 | $('#less-section .toggle').on('click', function (e) { 278 | e.preventDefault() 279 | inputsComponent.prop('checked', !inputsComponent.is(':checked')) 280 | }) 281 | 282 | $('#plugin-section .toggle').on('click', function (e) { 283 | e.preventDefault() 284 | inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) 285 | }) 286 | 287 | $('#less-variables-section .toggle').on('click', function (e) { 288 | e.preventDefault() 289 | inputsVariables.val('') 290 | }) 291 | 292 | $('[data-dependencies]').on('click', function () { 293 | if (!$(this).is(':checked')) return 294 | var dependencies = this.getAttribute('data-dependencies') 295 | if (!dependencies) return 296 | dependencies = dependencies.split(',') 297 | for (var i = 0; i < dependencies.length; i++) { 298 | var dependency = $('[value="' + dependencies[i] + '"]') 299 | dependency && dependency.prop('checked', true) 300 | } 301 | }) 302 | 303 | $('[data-dependents]').on('click', function () { 304 | if ($(this).is(':checked')) return 305 | var dependents = this.getAttribute('data-dependents') 306 | if (!dependents) return 307 | dependents = dependents.split(',') 308 | for (var i = 0; i < dependents.length; i++) { 309 | var dependent = $('[value="' + dependents[i] + '"]') 310 | dependent && dependent.prop('checked', false) 311 | } 312 | }) 313 | 314 | var $compileBtn = $('#btn-compile') 315 | var $downloadBtn = $('#btn-download') 316 | 317 | $compileBtn.on('click', function (e) { 318 | var configData = getCustomizerData() 319 | var configJson = JSON.stringify(configData, null, 2) 320 | 321 | e.preventDefault() 322 | 323 | $compileBtn.attr('disabled', 'disabled') 324 | 325 | generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) { 326 | $compileBtn.removeAttr('disabled') 327 | saveAs(blob, 'bootstrap.zip') 328 | createGist(configJson) 329 | }) 330 | }) 331 | 332 | // browser support alerts 333 | if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) { 334 | showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support' + 335 | 'for HTML5 blobs. Because of this your file will be downloaded with the name "untitled".' + 336 | 'However, if you check your downloads folder, just rename this "untitled" file' + 337 | 'to "bootstrap.zip" and you should be good to go!') 338 | } else if (!window.URL && !window.webkitURL) { 339 | $('.bs-docs-section, .bs-docs-sidebar').css('display', 'none') 340 | 341 | showCallout('Looks like your current browser doesn\'t support the Bootstrap Customizer. Please take a second' + 342 | 'to upgrade to a more modern browser.', true) 343 | } 344 | 345 | parseUrl() 346 | } 347 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/js/vendor/blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2013-12-27 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/eboyjr 7 | * License: X11/MIT 8 | * See LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined") 18 | if ((typeof Blob === "function" || typeof Blob === "object") && typeof webkitURL !== "undefined") self.URL = webkitURL; 19 | else var Blob = (function (view) { 20 | "use strict"; 21 | 22 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) { 23 | var 24 | get_class = function(object) { 25 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 26 | } 27 | , FakeBlobBuilder = function BlobBuilder() { 28 | this.data = []; 29 | } 30 | , FakeBlob = function Blob(data, type, encoding) { 31 | this.data = data; 32 | this.size = data.length; 33 | this.type = type; 34 | this.encoding = encoding; 35 | } 36 | , FBB_proto = FakeBlobBuilder.prototype 37 | , FB_proto = FakeBlob.prototype 38 | , FileReaderSync = view.FileReaderSync 39 | , FileException = function(type) { 40 | this.code = this[this.name = type]; 41 | } 42 | , file_ex_codes = ( 43 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 44 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 45 | ).split(" ") 46 | , file_ex_code = file_ex_codes.length 47 | , real_URL = view.URL || view.webkitURL || view 48 | , real_create_object_URL = real_URL.createObjectURL 49 | , real_revoke_object_URL = real_URL.revokeObjectURL 50 | , URL = real_URL 51 | , btoa = view.btoa 52 | , atob = view.atob 53 | 54 | , ArrayBuffer = view.ArrayBuffer 55 | , Uint8Array = view.Uint8Array 56 | ; 57 | FakeBlob.fake = FB_proto.fake = true; 58 | while (file_ex_code--) { 59 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 60 | } 61 | if (!real_URL.createObjectURL) { 62 | URL = view.URL = {}; 63 | } 64 | URL.createObjectURL = function(blob) { 65 | var 66 | type = blob.type 67 | , data_URI_header 68 | ; 69 | if (type === null) { 70 | type = "application/octet-stream"; 71 | } 72 | if (blob instanceof FakeBlob) { 73 | data_URI_header = "data:" + type; 74 | if (blob.encoding === "base64") { 75 | return data_URI_header + ";base64," + blob.data; 76 | } else if (blob.encoding === "URI") { 77 | return data_URI_header + "," + decodeURIComponent(blob.data); 78 | } if (btoa) { 79 | return data_URI_header + ";base64," + btoa(blob.data); 80 | } else { 81 | return data_URI_header + "," + encodeURIComponent(blob.data); 82 | } 83 | } else if (real_create_object_URL) { 84 | return real_create_object_URL.call(real_URL, blob); 85 | } 86 | }; 87 | URL.revokeObjectURL = function(object_URL) { 88 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 89 | real_revoke_object_URL.call(real_URL, object_URL); 90 | } 91 | }; 92 | FBB_proto.append = function(data/*, endings*/) { 93 | var bb = this.data; 94 | // decode data to a binary string 95 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 96 | var 97 | str = "" 98 | , buf = new Uint8Array(data) 99 | , i = 0 100 | , buf_len = buf.length 101 | ; 102 | for (; i < buf_len; i++) { 103 | str += String.fromCharCode(buf[i]); 104 | } 105 | bb.push(str); 106 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 107 | if (FileReaderSync) { 108 | var fr = new FileReaderSync; 109 | bb.push(fr.readAsBinaryString(data)); 110 | } else { 111 | // async FileReader won't work as BlobBuilder is sync 112 | throw new FileException("NOT_READABLE_ERR"); 113 | } 114 | } else if (data instanceof FakeBlob) { 115 | if (data.encoding === "base64" && atob) { 116 | bb.push(atob(data.data)); 117 | } else if (data.encoding === "URI") { 118 | bb.push(decodeURIComponent(data.data)); 119 | } else if (data.encoding === "raw") { 120 | bb.push(data.data); 121 | } 122 | } else { 123 | if (typeof data !== "string") { 124 | data += ""; // convert unsupported types to strings 125 | } 126 | // decode UTF-16 to binary string 127 | bb.push(unescape(encodeURIComponent(data))); 128 | } 129 | }; 130 | FBB_proto.getBlob = function(type) { 131 | if (!arguments.length) { 132 | type = null; 133 | } 134 | return new FakeBlob(this.data.join(""), type, "raw"); 135 | }; 136 | FBB_proto.toString = function() { 137 | return "[object BlobBuilder]"; 138 | }; 139 | FB_proto.slice = function(start, end, type) { 140 | var args = arguments.length; 141 | if (args < 3) { 142 | type = null; 143 | } 144 | return new FakeBlob( 145 | this.data.slice(start, args > 1 ? end : this.data.length) 146 | , type 147 | , this.encoding 148 | ); 149 | }; 150 | FB_proto.toString = function() { 151 | return "[object Blob]"; 152 | }; 153 | return FakeBlobBuilder; 154 | }(view)); 155 | 156 | return function Blob(blobParts, options) { 157 | var type = options ? (options.type || "") : ""; 158 | var builder = new BlobBuilder(); 159 | if (blobParts) { 160 | for (var i = 0, len = blobParts.length; i < len; i++) { 161 | builder.append(blobParts[i]); 162 | } 163 | } 164 | return builder.getBlob(type); 165 | }; 166 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 167 | -------------------------------------------------------------------------------- /HTML Basic/index3/assets/js/vendor/filesaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 2014-01-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * License: X11/MIT 7 | * See LICENSE.md 8 | */ 9 | 10 | /*global self */ 11 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 12 | plusplus: true */ 13 | 14 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 15 | 16 | var saveAs = saveAs 17 | // IE 10+ (native saveAs) 18 | || (navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 19 | // Everyone else 20 | || (function(view) { 21 | "use strict"; 22 | // IE <10 is explicitly unsupported 23 | if (/MSIE [1-9]\./.test(navigator.userAgent)) { 24 | return; 25 | } 26 | var 27 | doc = view.document 28 | // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet 29 | , get_URL = function() { 30 | return view.URL || view.webkitURL || view; 31 | } 32 | , URL = view.URL || view.webkitURL || view 33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 34 | , can_use_save_link = !view.externalHost && "download" in save_link 35 | , click = function(node) { 36 | var event = doc.createEvent("MouseEvents"); 37 | event.initMouseEvent( 38 | "click", true, false, view, 0, 0, 0, 0, 0 39 | , false, false, false, false, 0, null 40 | ); 41 | node.dispatchEvent(event); 42 | } 43 | , webkit_req_fs = view.webkitRequestFileSystem 44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 45 | , throw_outside = function (ex) { 46 | (view.setImmediate || view.setTimeout)(function() { 47 | throw ex; 48 | }, 0); 49 | } 50 | , force_saveable_type = "application/octet-stream" 51 | , fs_min_size = 0 52 | , deletion_queue = [] 53 | , process_deletion_queue = function() { 54 | var i = deletion_queue.length; 55 | while (i--) { 56 | var file = deletion_queue[i]; 57 | if (typeof file === "string") { // file is an object URL 58 | URL.revokeObjectURL(file); 59 | } else { // file is a File 60 | file.remove(); 61 | } 62 | } 63 | deletion_queue.length = 0; // clear queue 64 | } 65 | , dispatch = function(filesaver, event_types, event) { 66 | event_types = [].concat(event_types); 67 | var i = event_types.length; 68 | while (i--) { 69 | var listener = filesaver["on" + event_types[i]]; 70 | if (typeof listener === "function") { 71 | try { 72 | listener.call(filesaver, event || filesaver); 73 | } catch (ex) { 74 | throw_outside(ex); 75 | } 76 | } 77 | } 78 | } 79 | , FileSaver = function(blob, name) { 80 | // First try a.download, then web filesystem, then object URLs 81 | var 82 | filesaver = this 83 | , type = blob.type 84 | , blob_changed = false 85 | , object_url 86 | , target_view 87 | , get_object_url = function() { 88 | var object_url = get_URL().createObjectURL(blob); 89 | deletion_queue.push(object_url); 90 | return object_url; 91 | } 92 | , dispatch_all = function() { 93 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 94 | } 95 | // on any filesys errors revert to saving with object URLs 96 | , fs_error = function() { 97 | // don't create more object URLs than needed 98 | if (blob_changed || !object_url) { 99 | object_url = get_object_url(blob); 100 | } 101 | if (target_view) { 102 | target_view.location.href = object_url; 103 | } else { 104 | window.open(object_url, "_blank"); 105 | } 106 | filesaver.readyState = filesaver.DONE; 107 | dispatch_all(); 108 | } 109 | , abortable = function(func) { 110 | return function() { 111 | if (filesaver.readyState !== filesaver.DONE) { 112 | return func.apply(this, arguments); 113 | } 114 | }; 115 | } 116 | , create_if_not_found = {create: true, exclusive: false} 117 | , slice 118 | ; 119 | filesaver.readyState = filesaver.INIT; 120 | if (!name) { 121 | name = "download"; 122 | } 123 | if (can_use_save_link) { 124 | object_url = get_object_url(blob); 125 | // FF for Android has a nasty garbage collection mechanism 126 | // that turns all objects that are not pure javascript into 'deadObject' 127 | // this means `doc` and `save_link` are unusable and need to be recreated 128 | // `view` is usable though: 129 | doc = view.document; 130 | save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); 131 | save_link.href = object_url; 132 | save_link.download = name; 133 | var event = doc.createEvent("MouseEvents"); 134 | event.initMouseEvent( 135 | "click", true, false, view, 0, 0, 0, 0, 0 136 | , false, false, false, false, 0, null 137 | ); 138 | save_link.dispatchEvent(event); 139 | filesaver.readyState = filesaver.DONE; 140 | dispatch_all(); 141 | return; 142 | } 143 | // Object and web filesystem URLs have a problem saving in Google Chrome when 144 | // viewed in a tab, so I force save with application/octet-stream 145 | // http://code.google.com/p/chromium/issues/detail?id=91158 146 | if (view.chrome && type && type !== force_saveable_type) { 147 | slice = blob.slice || blob.webkitSlice; 148 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 149 | blob_changed = true; 150 | } 151 | // Since I can't be sure that the guessed media type will trigger a download 152 | // in WebKit, I append .download to the filename. 153 | // https://bugs.webkit.org/show_bug.cgi?id=65440 154 | if (webkit_req_fs && name !== "download") { 155 | name += ".download"; 156 | } 157 | if (type === force_saveable_type || webkit_req_fs) { 158 | target_view = view; 159 | } 160 | if (!req_fs) { 161 | fs_error(); 162 | return; 163 | } 164 | fs_min_size += blob.size; 165 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 166 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 167 | var save = function() { 168 | dir.getFile(name, create_if_not_found, abortable(function(file) { 169 | file.createWriter(abortable(function(writer) { 170 | writer.onwriteend = function(event) { 171 | target_view.location.href = file.toURL(); 172 | deletion_queue.push(file); 173 | filesaver.readyState = filesaver.DONE; 174 | dispatch(filesaver, "writeend", event); 175 | }; 176 | writer.onerror = function() { 177 | var error = writer.error; 178 | if (error.code !== error.ABORT_ERR) { 179 | fs_error(); 180 | } 181 | }; 182 | "writestart progress write abort".split(" ").forEach(function(event) { 183 | writer["on" + event] = filesaver["on" + event]; 184 | }); 185 | writer.write(blob); 186 | filesaver.abort = function() { 187 | writer.abort(); 188 | filesaver.readyState = filesaver.DONE; 189 | }; 190 | filesaver.readyState = filesaver.WRITING; 191 | }), fs_error); 192 | }), fs_error); 193 | }; 194 | dir.getFile(name, {create: false}, abortable(function(file) { 195 | // delete file if it already exists 196 | file.remove(); 197 | save(); 198 | }), abortable(function(ex) { 199 | if (ex.code === ex.NOT_FOUND_ERR) { 200 | save(); 201 | } else { 202 | fs_error(); 203 | } 204 | })); 205 | }), fs_error); 206 | }), fs_error); 207 | } 208 | , FS_proto = FileSaver.prototype 209 | , saveAs = function(blob, name) { 210 | return new FileSaver(blob, name); 211 | } 212 | ; 213 | FS_proto.abort = function() { 214 | var filesaver = this; 215 | filesaver.readyState = filesaver.DONE; 216 | dispatch(filesaver, "abort"); 217 | }; 218 | FS_proto.readyState = FS_proto.INIT = 0; 219 | FS_proto.WRITING = 1; 220 | FS_proto.DONE = 2; 221 | 222 | FS_proto.error = 223 | FS_proto.onwritestart = 224 | FS_proto.onprogress = 225 | FS_proto.onwrite = 226 | FS_proto.onabort = 227 | FS_proto.onerror = 228 | FS_proto.onwriteend = 229 | null; 230 | 231 | view.addEventListener("unload", process_deletion_queue, false); 232 | return saveAs; 233 | }( 234 | typeof self !== "undefined" && self 235 | || typeof window !== "undefined" && window 236 | || this.content 237 | )); 238 | // `self` is undefined in Firefox for Android content script context 239 | // while `this` is nsIContentFrameMessageManager 240 | // with an attribute `content` that corresponds to the window 241 | 242 | if (typeof module !== "undefined") module.exports = saveAs; 243 | -------------------------------------------------------------------------------- /HTML Basic/index3/index3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 介紹台灣科大 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 |
    66 | 69 |

    70 |
    71 | 72 | 77 | 78 | 79 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /HTML Basic/index3/index3.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index3/index3.rar -------------------------------------------------------------------------------- /HTML Basic/index3/sticky-footer-navbar.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | /* Margin bottom by footer height */ 9 | margin-bottom: 60px; 10 | } 11 | #footer { 12 | position: absolute; 13 | bottom: 0; 14 | width: 100%; 15 | /* Set the fixed height of the footer here */ 16 | height: 60px; 17 | background-color: #f5f5f5; 18 | } 19 | 20 | 21 | /* Custom page CSS 22 | -------------------------------------------------- */ 23 | /* Not required for template or sticky footer method. */ 24 | 25 | body > .container { 26 | padding: 60px 15px 0; 27 | } 28 | .container .text-muted { 29 | margin: 20px 0; 30 | } 31 | 32 | #footer > .container { 33 | padding-right: 15px; 34 | padding-left: 15px; 35 | } 36 | 37 | code { 38 | font-size: 80%; 39 | } 40 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /HTML Basic/index4/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/assets/ico/favicon.ico -------------------------------------------------------------------------------- /HTML Basic/index4/assets/img/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/assets/img/components.png -------------------------------------------------------------------------------- /HTML Basic/index4/assets/img/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/assets/img/devices.png -------------------------------------------------------------------------------- /HTML Basic/index4/assets/img/sass-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/assets/img/sass-less.png -------------------------------------------------------------------------------- /HTML Basic/index4/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * JavaScript for Bootstrap's docs (http://getbootstrap.com) 7 | * Copyright 2011-2014 Twitter, Inc. 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function () { 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement('style') 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | '@-ms-viewport{width:auto!important}' 25 | ) 26 | ) 27 | document.querySelector('head').appendChild(msViewportStyle) 28 | } 29 | 30 | 31 | var $window = $(window) 32 | var $body = $(document.body) 33 | 34 | var navHeight = $('.navbar').outerHeight(true) + 10 35 | 36 | $body.scrollspy({ 37 | target: '.bs-docs-sidebar', 38 | // offset: navHeight 39 | }) 40 | 41 | $window.on('load', function () { 42 | $body.scrollspy('refresh') 43 | }) 44 | 45 | $('.bs-docs-container [href=#]').click(function (e) { 46 | e.preventDefault() 47 | }) 48 | 49 | // back to top 50 | setTimeout(function () { 51 | var $sideBar = $('.bs-docs-sidebar') 52 | 53 | $sideBar.affix({ 54 | offset: { 55 | top: function () { 56 | var offsetTop = $sideBar.offset().top 57 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 58 | var navOuterHeight = $('.bs-docs-nav').height() 59 | 60 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 61 | }, 62 | bottom: function () { 63 | return (this.bottom = $('.bs-docs-footer').outerHeight(true)) 64 | } 65 | } 66 | }) 67 | }, 100) 68 | 69 | setTimeout(function () { 70 | $('.bs-top').affix() 71 | }, 100) 72 | 73 | // tooltip demo 74 | $('.tooltip-demo').tooltip({ 75 | selector: '[data-toggle=tooltip]', 76 | container: 'body' 77 | }) 78 | 79 | $('.tooltip-test').tooltip() 80 | $('.popover-test').popover() 81 | 82 | $('.bs-docs-navbar').tooltip({ 83 | selector: 'a[data-toggle=tooltip]', 84 | container: '.bs-docs-navbar .nav' 85 | }) 86 | 87 | // popover demo 88 | $('[data-toggle=popover]').popover() 89 | 90 | // button state demo 91 | $('#loading-example-btn') 92 | .click(function () { 93 | var btn = $(this) 94 | btn.button('loading') 95 | setTimeout(function () { 96 | btn.button('reset') 97 | }, 3000) 98 | }) 99 | }) 100 | 101 | }(jQuery) 102 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/js/customizer.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Customizer (http://getbootstrap.com/customize/) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * 5 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 6 | * details, see http://creativecommons.org/licenses/by/3.0/. 7 | */ 8 | 9 | window.onload = function () { // wait for load in a dumb way because B-0 10 | var cw = '/*!\n' + 11 | ' * Bootstrap v3.1.1 (http://getbootstrap.com)\n' + 12 | ' * Copyright 2011-2014 Twitter, Inc.\n' + 13 | ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' + 14 | ' */\n\n' 15 | 16 | function showError(msg, err) { 17 | $('
    ' + 18 | '
    ' + 19 | '×' + 20 | '

    ' + msg + '

    ' + 21 | (err.extract ? '
    ' + err.extract.join('\n') + '
    ' : '') + 22 | '
    ' + 23 | '
    ').appendTo('body').alert() 24 | throw err 25 | } 26 | 27 | function showCallout(msg, showUpTop) { 28 | var callout = $('
    ' + 29 | '

    Attention!

    ' + 30 | '

    ' + msg + '

    ' + 31 | '
    ') 32 | 33 | if (showUpTop) { 34 | callout.appendTo('.bs-docs-container') 35 | } else { 36 | callout.insertAfter('.bs-customize-download') 37 | } 38 | } 39 | 40 | function getQueryParam(key) { 41 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&') // escape RegEx meta chars 42 | var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)')) 43 | return match && decodeURIComponent(match[1].replace(/\+/g, ' ')) 44 | } 45 | 46 | function createGist(configJson) { 47 | var data = { 48 | 'description': 'Bootstrap Customizer Config', 49 | 'public': true, 50 | 'files': { 51 | 'config.json': { 52 | 'content': configJson 53 | } 54 | } 55 | } 56 | $.ajax({ 57 | url: 'https://api.github.com/gists', 58 | type: 'POST', 59 | dataType: 'json', 60 | data: JSON.stringify(data) 61 | }) 62 | .success(function (result) { 63 | var origin = window.location.protocol + '//' + window.location.host 64 | history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id) 65 | }) 66 | .error(function (err) { 67 | showError('Ruh roh! Could not save gist file, configuration not saved.', err) 68 | }) 69 | } 70 | 71 | function getCustomizerData() { 72 | var vars = {} 73 | 74 | $('#less-variables-section input') 75 | .each(function () { 76 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 77 | }) 78 | 79 | var data = { 80 | vars: vars, 81 | css: $('#less-section input:checked') .map(function () { return this.value }).toArray(), 82 | js: $('#plugin-section input:checked').map(function () { return this.value }).toArray() 83 | } 84 | 85 | if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return 86 | 87 | return data 88 | } 89 | 90 | function parseUrl() { 91 | var id = getQueryParam('id') 92 | 93 | if (!id) return 94 | 95 | $.ajax({ 96 | url: 'https://api.github.com/gists/' + id, 97 | type: 'GET', 98 | dataType: 'json' 99 | }) 100 | .success(function (result) { 101 | var data = JSON.parse(result.files['config.json'].content) 102 | if (data.js) { 103 | $('#plugin-section input').each(function () { 104 | $(this).prop('checked', ~$.inArray(this.value, data.js)) 105 | }) 106 | } 107 | if (data.css) { 108 | $('#less-section input').each(function () { 109 | $(this).prop('checked', ~$.inArray(this.value, data.css)) 110 | }) 111 | } 112 | if (data.vars) { 113 | for (var i in data.vars) { 114 | $('input[data-var="' + i + '"]').val(data.vars[i]) 115 | } 116 | } 117 | }) 118 | .error(function (err) { 119 | showError('Error fetching bootstrap config file', err) 120 | }) 121 | } 122 | 123 | function generateZip(css, js, fonts, config, complete) { 124 | if (!css && !js) return showError('Ruh roh! No Bootstrap files selected.', new Error('no Bootstrap')) 125 | 126 | var zip = new JSZip() 127 | 128 | if (css) { 129 | var cssFolder = zip.folder('css') 130 | for (var fileName in css) { 131 | cssFolder.file(fileName, css[fileName]) 132 | } 133 | } 134 | 135 | if (js) { 136 | var jsFolder = zip.folder('js') 137 | for (var jsFileName in js) { 138 | jsFolder.file(jsFileName, js[jsFileName]) 139 | } 140 | } 141 | 142 | if (fonts) { 143 | var fontsFolder = zip.folder('fonts') 144 | for (var fontsFileName in fonts) { 145 | fontsFolder.file(fontsFileName, fonts[fontsFileName], {base64: true}) 146 | } 147 | } 148 | 149 | if (config) { 150 | zip.file('config.json', config) 151 | } 152 | 153 | var content = zip.generate({ type: 'blob' }) 154 | 155 | complete(content) 156 | } 157 | 158 | function generateCustomCSS(vars) { 159 | var result = '' 160 | 161 | for (var key in vars) { 162 | result += key + ': ' + vars[key] + ';\n' 163 | } 164 | 165 | return result + '\n\n' 166 | } 167 | 168 | function generateFonts() { 169 | var glyphicons = $('#less-section [value="glyphicons.less"]:checked') 170 | if (glyphicons.length) { 171 | return __fonts 172 | } 173 | } 174 | 175 | // Returns an Array of @import'd filenames in the order 176 | // in which they appear in the file. 177 | function includedLessFilenames(lessFilename) { 178 | var IMPORT_REGEX = /^@import \"(.*?)\";$/ 179 | var lessLines = __less[lessFilename].split('\n') 180 | 181 | for (var i = 0, imports = []; i < lessLines.length; i++) { 182 | var match = IMPORT_REGEX.exec(lessLines[i]) 183 | if (match) imports.push(match[1]) 184 | } 185 | 186 | return imports 187 | } 188 | 189 | function generateLESS(lessFilename, lessFileIncludes, vars) { 190 | var lessSource = __less[lessFilename] 191 | 192 | $.each(includedLessFilenames(lessFilename), function(index, filename) { 193 | var fileInclude = lessFileIncludes[filename] 194 | 195 | // Files not explicitly unchecked are compiled into the final stylesheet. 196 | // Core stylesheets like 'normalize.less' are not included in the form 197 | // since disabling them would wreck everything, and so their 'fileInclude' 198 | // will be 'undefined'. 199 | if (fileInclude || (fileInclude == null)) lessSource += __less[filename] 200 | 201 | // Custom variables are added after Bootstrap variables so the custom 202 | // ones take precedence. 203 | if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars) 204 | }) 205 | 206 | lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports 207 | return lessSource 208 | } 209 | 210 | function compileLESS(lessSource, baseFilename, intoResult) { 211 | var parser = new less.Parser({ 212 | paths: ['variables.less', 'mixins.less'], 213 | optimization: 0, 214 | filename: baseFilename + '.css' 215 | }).parse(lessSource, function (err, tree) { 216 | if (err) { 217 | return showError('Ruh roh! Could not parse less files.', err) 218 | } 219 | intoResult[baseFilename + '.css'] = cw + tree.toCSS() 220 | intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true }) 221 | }) 222 | } 223 | 224 | function generateCSS() { 225 | var oneChecked = false 226 | var lessFileIncludes = {} 227 | $('#less-section input').each(function() { 228 | var $this = $(this) 229 | var checked = $this.is(':checked') 230 | lessFileIncludes[$this.val()] = checked 231 | 232 | oneChecked = oneChecked || checked 233 | }) 234 | 235 | if (!oneChecked) return false 236 | 237 | var result = {} 238 | var vars = {} 239 | 240 | $('#less-variables-section input') 241 | .each(function () { 242 | $(this).val() && (vars[$(this).prev().text()] = $(this).val()) 243 | }) 244 | 245 | var bsLessSource = generateLESS('bootstrap.less', lessFileIncludes, vars) 246 | var themeLessSource = generateLESS('theme.less', lessFileIncludes, vars) 247 | 248 | try { 249 | compileLESS(bsLessSource, 'bootstrap', result) 250 | compileLESS(themeLessSource, 'bootstrap-theme', result) 251 | } catch (err) { 252 | return showError('Ruh roh! Could not parse less files.', err) 253 | } 254 | 255 | return result 256 | } 257 | 258 | function generateJavascript() { 259 | var $checked = $('#plugin-section input:checked') 260 | if (!$checked.length) return false 261 | 262 | var js = $checked 263 | .map(function () { return __js[this.value] }) 264 | .toArray() 265 | .join('\n') 266 | 267 | return { 268 | 'bootstrap.js': js, 269 | 'bootstrap.min.js': cw + uglify(js) 270 | } 271 | } 272 | 273 | var inputsComponent = $('#less-section input') 274 | var inputsPlugin = $('#plugin-section input') 275 | var inputsVariables = $('#less-variables-section input') 276 | 277 | $('#less-section .toggle').on('click', function (e) { 278 | e.preventDefault() 279 | inputsComponent.prop('checked', !inputsComponent.is(':checked')) 280 | }) 281 | 282 | $('#plugin-section .toggle').on('click', function (e) { 283 | e.preventDefault() 284 | inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) 285 | }) 286 | 287 | $('#less-variables-section .toggle').on('click', function (e) { 288 | e.preventDefault() 289 | inputsVariables.val('') 290 | }) 291 | 292 | $('[data-dependencies]').on('click', function () { 293 | if (!$(this).is(':checked')) return 294 | var dependencies = this.getAttribute('data-dependencies') 295 | if (!dependencies) return 296 | dependencies = dependencies.split(',') 297 | for (var i = 0; i < dependencies.length; i++) { 298 | var dependency = $('[value="' + dependencies[i] + '"]') 299 | dependency && dependency.prop('checked', true) 300 | } 301 | }) 302 | 303 | $('[data-dependents]').on('click', function () { 304 | if ($(this).is(':checked')) return 305 | var dependents = this.getAttribute('data-dependents') 306 | if (!dependents) return 307 | dependents = dependents.split(',') 308 | for (var i = 0; i < dependents.length; i++) { 309 | var dependent = $('[value="' + dependents[i] + '"]') 310 | dependent && dependent.prop('checked', false) 311 | } 312 | }) 313 | 314 | var $compileBtn = $('#btn-compile') 315 | var $downloadBtn = $('#btn-download') 316 | 317 | $compileBtn.on('click', function (e) { 318 | var configData = getCustomizerData() 319 | var configJson = JSON.stringify(configData, null, 2) 320 | 321 | e.preventDefault() 322 | 323 | $compileBtn.attr('disabled', 'disabled') 324 | 325 | generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) { 326 | $compileBtn.removeAttr('disabled') 327 | saveAs(blob, 'bootstrap.zip') 328 | createGist(configJson) 329 | }) 330 | }) 331 | 332 | // browser support alerts 333 | if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) { 334 | showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support' + 335 | 'for HTML5 blobs. Because of this your file will be downloaded with the name "untitled".' + 336 | 'However, if you check your downloads folder, just rename this "untitled" file' + 337 | 'to "bootstrap.zip" and you should be good to go!') 338 | } else if (!window.URL && !window.webkitURL) { 339 | $('.bs-docs-section, .bs-docs-sidebar').css('display', 'none') 340 | 341 | showCallout('Looks like your current browser doesn\'t support the Bootstrap Customizer. Please take a second' + 342 | 'to upgrade to a more modern browser.', true) 343 | } 344 | 345 | parseUrl() 346 | } 347 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/js/vendor/blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2013-12-27 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/eboyjr 7 | * License: X11/MIT 8 | * See LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined") 18 | if ((typeof Blob === "function" || typeof Blob === "object") && typeof webkitURL !== "undefined") self.URL = webkitURL; 19 | else var Blob = (function (view) { 20 | "use strict"; 21 | 22 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) { 23 | var 24 | get_class = function(object) { 25 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 26 | } 27 | , FakeBlobBuilder = function BlobBuilder() { 28 | this.data = []; 29 | } 30 | , FakeBlob = function Blob(data, type, encoding) { 31 | this.data = data; 32 | this.size = data.length; 33 | this.type = type; 34 | this.encoding = encoding; 35 | } 36 | , FBB_proto = FakeBlobBuilder.prototype 37 | , FB_proto = FakeBlob.prototype 38 | , FileReaderSync = view.FileReaderSync 39 | , FileException = function(type) { 40 | this.code = this[this.name = type]; 41 | } 42 | , file_ex_codes = ( 43 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 44 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 45 | ).split(" ") 46 | , file_ex_code = file_ex_codes.length 47 | , real_URL = view.URL || view.webkitURL || view 48 | , real_create_object_URL = real_URL.createObjectURL 49 | , real_revoke_object_URL = real_URL.revokeObjectURL 50 | , URL = real_URL 51 | , btoa = view.btoa 52 | , atob = view.atob 53 | 54 | , ArrayBuffer = view.ArrayBuffer 55 | , Uint8Array = view.Uint8Array 56 | ; 57 | FakeBlob.fake = FB_proto.fake = true; 58 | while (file_ex_code--) { 59 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 60 | } 61 | if (!real_URL.createObjectURL) { 62 | URL = view.URL = {}; 63 | } 64 | URL.createObjectURL = function(blob) { 65 | var 66 | type = blob.type 67 | , data_URI_header 68 | ; 69 | if (type === null) { 70 | type = "application/octet-stream"; 71 | } 72 | if (blob instanceof FakeBlob) { 73 | data_URI_header = "data:" + type; 74 | if (blob.encoding === "base64") { 75 | return data_URI_header + ";base64," + blob.data; 76 | } else if (blob.encoding === "URI") { 77 | return data_URI_header + "," + decodeURIComponent(blob.data); 78 | } if (btoa) { 79 | return data_URI_header + ";base64," + btoa(blob.data); 80 | } else { 81 | return data_URI_header + "," + encodeURIComponent(blob.data); 82 | } 83 | } else if (real_create_object_URL) { 84 | return real_create_object_URL.call(real_URL, blob); 85 | } 86 | }; 87 | URL.revokeObjectURL = function(object_URL) { 88 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 89 | real_revoke_object_URL.call(real_URL, object_URL); 90 | } 91 | }; 92 | FBB_proto.append = function(data/*, endings*/) { 93 | var bb = this.data; 94 | // decode data to a binary string 95 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 96 | var 97 | str = "" 98 | , buf = new Uint8Array(data) 99 | , i = 0 100 | , buf_len = buf.length 101 | ; 102 | for (; i < buf_len; i++) { 103 | str += String.fromCharCode(buf[i]); 104 | } 105 | bb.push(str); 106 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 107 | if (FileReaderSync) { 108 | var fr = new FileReaderSync; 109 | bb.push(fr.readAsBinaryString(data)); 110 | } else { 111 | // async FileReader won't work as BlobBuilder is sync 112 | throw new FileException("NOT_READABLE_ERR"); 113 | } 114 | } else if (data instanceof FakeBlob) { 115 | if (data.encoding === "base64" && atob) { 116 | bb.push(atob(data.data)); 117 | } else if (data.encoding === "URI") { 118 | bb.push(decodeURIComponent(data.data)); 119 | } else if (data.encoding === "raw") { 120 | bb.push(data.data); 121 | } 122 | } else { 123 | if (typeof data !== "string") { 124 | data += ""; // convert unsupported types to strings 125 | } 126 | // decode UTF-16 to binary string 127 | bb.push(unescape(encodeURIComponent(data))); 128 | } 129 | }; 130 | FBB_proto.getBlob = function(type) { 131 | if (!arguments.length) { 132 | type = null; 133 | } 134 | return new FakeBlob(this.data.join(""), type, "raw"); 135 | }; 136 | FBB_proto.toString = function() { 137 | return "[object BlobBuilder]"; 138 | }; 139 | FB_proto.slice = function(start, end, type) { 140 | var args = arguments.length; 141 | if (args < 3) { 142 | type = null; 143 | } 144 | return new FakeBlob( 145 | this.data.slice(start, args > 1 ? end : this.data.length) 146 | , type 147 | , this.encoding 148 | ); 149 | }; 150 | FB_proto.toString = function() { 151 | return "[object Blob]"; 152 | }; 153 | return FakeBlobBuilder; 154 | }(view)); 155 | 156 | return function Blob(blobParts, options) { 157 | var type = options ? (options.type || "") : ""; 158 | var builder = new BlobBuilder(); 159 | if (blobParts) { 160 | for (var i = 0, len = blobParts.length; i < len; i++) { 161 | builder.append(blobParts[i]); 162 | } 163 | } 164 | return builder.getBlob(type); 165 | }; 166 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 167 | -------------------------------------------------------------------------------- /HTML Basic/index4/assets/js/vendor/filesaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 2014-01-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * License: X11/MIT 7 | * See LICENSE.md 8 | */ 9 | 10 | /*global self */ 11 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 12 | plusplus: true */ 13 | 14 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 15 | 16 | var saveAs = saveAs 17 | // IE 10+ (native saveAs) 18 | || (navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 19 | // Everyone else 20 | || (function(view) { 21 | "use strict"; 22 | // IE <10 is explicitly unsupported 23 | if (/MSIE [1-9]\./.test(navigator.userAgent)) { 24 | return; 25 | } 26 | var 27 | doc = view.document 28 | // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet 29 | , get_URL = function() { 30 | return view.URL || view.webkitURL || view; 31 | } 32 | , URL = view.URL || view.webkitURL || view 33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 34 | , can_use_save_link = !view.externalHost && "download" in save_link 35 | , click = function(node) { 36 | var event = doc.createEvent("MouseEvents"); 37 | event.initMouseEvent( 38 | "click", true, false, view, 0, 0, 0, 0, 0 39 | , false, false, false, false, 0, null 40 | ); 41 | node.dispatchEvent(event); 42 | } 43 | , webkit_req_fs = view.webkitRequestFileSystem 44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 45 | , throw_outside = function (ex) { 46 | (view.setImmediate || view.setTimeout)(function() { 47 | throw ex; 48 | }, 0); 49 | } 50 | , force_saveable_type = "application/octet-stream" 51 | , fs_min_size = 0 52 | , deletion_queue = [] 53 | , process_deletion_queue = function() { 54 | var i = deletion_queue.length; 55 | while (i--) { 56 | var file = deletion_queue[i]; 57 | if (typeof file === "string") { // file is an object URL 58 | URL.revokeObjectURL(file); 59 | } else { // file is a File 60 | file.remove(); 61 | } 62 | } 63 | deletion_queue.length = 0; // clear queue 64 | } 65 | , dispatch = function(filesaver, event_types, event) { 66 | event_types = [].concat(event_types); 67 | var i = event_types.length; 68 | while (i--) { 69 | var listener = filesaver["on" + event_types[i]]; 70 | if (typeof listener === "function") { 71 | try { 72 | listener.call(filesaver, event || filesaver); 73 | } catch (ex) { 74 | throw_outside(ex); 75 | } 76 | } 77 | } 78 | } 79 | , FileSaver = function(blob, name) { 80 | // First try a.download, then web filesystem, then object URLs 81 | var 82 | filesaver = this 83 | , type = blob.type 84 | , blob_changed = false 85 | , object_url 86 | , target_view 87 | , get_object_url = function() { 88 | var object_url = get_URL().createObjectURL(blob); 89 | deletion_queue.push(object_url); 90 | return object_url; 91 | } 92 | , dispatch_all = function() { 93 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 94 | } 95 | // on any filesys errors revert to saving with object URLs 96 | , fs_error = function() { 97 | // don't create more object URLs than needed 98 | if (blob_changed || !object_url) { 99 | object_url = get_object_url(blob); 100 | } 101 | if (target_view) { 102 | target_view.location.href = object_url; 103 | } else { 104 | window.open(object_url, "_blank"); 105 | } 106 | filesaver.readyState = filesaver.DONE; 107 | dispatch_all(); 108 | } 109 | , abortable = function(func) { 110 | return function() { 111 | if (filesaver.readyState !== filesaver.DONE) { 112 | return func.apply(this, arguments); 113 | } 114 | }; 115 | } 116 | , create_if_not_found = {create: true, exclusive: false} 117 | , slice 118 | ; 119 | filesaver.readyState = filesaver.INIT; 120 | if (!name) { 121 | name = "download"; 122 | } 123 | if (can_use_save_link) { 124 | object_url = get_object_url(blob); 125 | // FF for Android has a nasty garbage collection mechanism 126 | // that turns all objects that are not pure javascript into 'deadObject' 127 | // this means `doc` and `save_link` are unusable and need to be recreated 128 | // `view` is usable though: 129 | doc = view.document; 130 | save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); 131 | save_link.href = object_url; 132 | save_link.download = name; 133 | var event = doc.createEvent("MouseEvents"); 134 | event.initMouseEvent( 135 | "click", true, false, view, 0, 0, 0, 0, 0 136 | , false, false, false, false, 0, null 137 | ); 138 | save_link.dispatchEvent(event); 139 | filesaver.readyState = filesaver.DONE; 140 | dispatch_all(); 141 | return; 142 | } 143 | // Object and web filesystem URLs have a problem saving in Google Chrome when 144 | // viewed in a tab, so I force save with application/octet-stream 145 | // http://code.google.com/p/chromium/issues/detail?id=91158 146 | if (view.chrome && type && type !== force_saveable_type) { 147 | slice = blob.slice || blob.webkitSlice; 148 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 149 | blob_changed = true; 150 | } 151 | // Since I can't be sure that the guessed media type will trigger a download 152 | // in WebKit, I append .download to the filename. 153 | // https://bugs.webkit.org/show_bug.cgi?id=65440 154 | if (webkit_req_fs && name !== "download") { 155 | name += ".download"; 156 | } 157 | if (type === force_saveable_type || webkit_req_fs) { 158 | target_view = view; 159 | } 160 | if (!req_fs) { 161 | fs_error(); 162 | return; 163 | } 164 | fs_min_size += blob.size; 165 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 166 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 167 | var save = function() { 168 | dir.getFile(name, create_if_not_found, abortable(function(file) { 169 | file.createWriter(abortable(function(writer) { 170 | writer.onwriteend = function(event) { 171 | target_view.location.href = file.toURL(); 172 | deletion_queue.push(file); 173 | filesaver.readyState = filesaver.DONE; 174 | dispatch(filesaver, "writeend", event); 175 | }; 176 | writer.onerror = function() { 177 | var error = writer.error; 178 | if (error.code !== error.ABORT_ERR) { 179 | fs_error(); 180 | } 181 | }; 182 | "writestart progress write abort".split(" ").forEach(function(event) { 183 | writer["on" + event] = filesaver["on" + event]; 184 | }); 185 | writer.write(blob); 186 | filesaver.abort = function() { 187 | writer.abort(); 188 | filesaver.readyState = filesaver.DONE; 189 | }; 190 | filesaver.readyState = filesaver.WRITING; 191 | }), fs_error); 192 | }), fs_error); 193 | }; 194 | dir.getFile(name, {create: false}, abortable(function(file) { 195 | // delete file if it already exists 196 | file.remove(); 197 | save(); 198 | }), abortable(function(ex) { 199 | if (ex.code === ex.NOT_FOUND_ERR) { 200 | save(); 201 | } else { 202 | fs_error(); 203 | } 204 | })); 205 | }), fs_error); 206 | }), fs_error); 207 | } 208 | , FS_proto = FileSaver.prototype 209 | , saveAs = function(blob, name) { 210 | return new FileSaver(blob, name); 211 | } 212 | ; 213 | FS_proto.abort = function() { 214 | var filesaver = this; 215 | filesaver.readyState = filesaver.DONE; 216 | dispatch(filesaver, "abort"); 217 | }; 218 | FS_proto.readyState = FS_proto.INIT = 0; 219 | FS_proto.WRITING = 1; 220 | FS_proto.DONE = 2; 221 | 222 | FS_proto.error = 223 | FS_proto.onwritestart = 224 | FS_proto.onprogress = 225 | FS_proto.onwrite = 226 | FS_proto.onabort = 227 | FS_proto.onerror = 228 | FS_proto.onwriteend = 229 | null; 230 | 231 | view.addEventListener("unload", process_deletion_queue, false); 232 | return saveAs; 233 | }( 234 | typeof self !== "undefined" && self 235 | || typeof window !== "undefined" && window 236 | || this.content 237 | )); 238 | // `self` is undefined in Firefox for Android content script context 239 | // while `this` is nsIContentFrameMessageManager 240 | // with an attribute `content` that corresponds to the window 241 | 242 | if (typeof module !== "undefined") module.exports = saveAs; 243 | -------------------------------------------------------------------------------- /HTML Basic/index4/carousel.css: -------------------------------------------------------------------------------- 1 | /* GLOBAL STYLES 2 | -------------------------------------------------- */ 3 | /* Padding below the footer and lighter body text */ 4 | 5 | body { 6 | padding-bottom: 40px; 7 | color: #5a5a5a; 8 | } 9 | 10 | 11 | 12 | /* CUSTOMIZE THE NAVBAR 13 | -------------------------------------------------- */ 14 | 15 | /* Special class on .container surrounding .navbar, used for positioning it into place. */ 16 | .navbar-wrapper { 17 | position: absolute; 18 | top: 0; 19 | right: 0; 20 | left: 0; 21 | z-index: 20; 22 | } 23 | 24 | /* Flip around the padding for proper display in narrow viewports */ 25 | .navbar-wrapper .container { 26 | padding-right: 0; 27 | padding-left: 0; 28 | } 29 | .navbar-wrapper .navbar { 30 | padding-right: 15px; 31 | padding-left: 15px; 32 | } 33 | 34 | 35 | /* CUSTOMIZE THE CAROUSEL 36 | -------------------------------------------------- */ 37 | 38 | /* Carousel base class */ 39 | .carousel { 40 | height: 500px; 41 | margin-bottom: 60px; 42 | } 43 | /* Since positioning the image, we need to help out the caption */ 44 | .carousel-caption { 45 | z-index: 10; 46 | } 47 | 48 | /* Declare heights because of positioning of img element */ 49 | .carousel .item { 50 | height: 500px; 51 | background-color: #777; 52 | } 53 | .carousel-inner > .item > img { 54 | position: absolute; 55 | top: 0; 56 | left: 0; 57 | min-width: 100%; 58 | height: 500px; 59 | } 60 | 61 | 62 | 63 | /* MARKETING CONTENT 64 | -------------------------------------------------- */ 65 | 66 | /* Pad the edges of the mobile views a bit */ 67 | .marketing { 68 | padding-right: 15px; 69 | padding-left: 15px; 70 | } 71 | 72 | /* Center align the text within the three columns below the carousel */ 73 | .marketing .col-lg-4 { 74 | margin-bottom: 20px; 75 | text-align: center; 76 | } 77 | .marketing h2 { 78 | font-weight: normal; 79 | } 80 | .marketing .col-lg-4 p { 81 | margin-right: 10px; 82 | margin-left: 10px; 83 | } 84 | 85 | 86 | /* Featurettes 87 | ------------------------- */ 88 | 89 | .featurette-divider { 90 | margin: 80px 0; /* Space out the Bootstrap
    more */ 91 | } 92 | 93 | /* Thin out the marketing headings */ 94 | .featurette-heading { 95 | font-weight: 300; 96 | line-height: 1; 97 | letter-spacing: -1px; 98 | } 99 | 100 | 101 | 102 | /* RESPONSIVE CSS 103 | -------------------------------------------------- */ 104 | 105 | @media (min-width: 768px) { 106 | 107 | /* Remove the edge padding needed for mobile */ 108 | .marketing { 109 | padding-right: 0; 110 | padding-left: 0; 111 | } 112 | 113 | /* Navbar positioning foo */ 114 | .navbar-wrapper { 115 | margin-top: 20px; 116 | } 117 | .navbar-wrapper .container { 118 | padding-right: 15px; 119 | padding-left: 15px; 120 | } 121 | .navbar-wrapper .navbar { 122 | padding-right: 0; 123 | padding-left: 0; 124 | } 125 | 126 | /* The navbar becomes detached from the top, so we round the corners */ 127 | .navbar-wrapper .navbar { 128 | border-radius: 4px; 129 | } 130 | 131 | /* Bump up size of carousel content */ 132 | .carousel-caption p { 133 | margin-bottom: 20px; 134 | font-size: 21px; 135 | line-height: 1.4; 136 | } 137 | 138 | .featurette-heading { 139 | font-size: 50px; 140 | } 141 | } 142 | 143 | @media (min-width: 992px) { 144 | .featurette-heading { 145 | margin-top: 120px; 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /HTML Basic/index4/image/140_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/140_first.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/140_second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/140_second.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/140_third.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/140_third.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/500_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/500_first.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/500_second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/500_second.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/500_third.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/500_third.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/900_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/900_first.png -------------------------------------------------------------------------------- /HTML Basic/index4/image/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/image/first.png -------------------------------------------------------------------------------- /HTML Basic/index4/index4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 服貿 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 65 | 66 | 67 | 69 | 113 | 114 | 115 | 116 | 118 | 119 | 120 |
    121 | 122 | 123 |
    124 |
    125 | Generic placeholder image 126 |

    江揆:服貿利大於弊 堅定推動

    127 |

    他說,儘管目前仍有部分聲音反對服貿協議的簽署與生效,但是政府應該要堅定地推動這個重要的經貿政策.....

    128 |

    繼續閱讀 »

    129 |
    130 |
    131 | Generic placeholder image 132 |

    133 |

    「拒絕服貿、捍衛民主!」前晚反黑箱服貿學生團體成功佔領國會殿堂,民眾昨開始北上立法院聲援,要求「撤警察!開空調!」一名民眾激動割腕,甚至在立法院牆壁用鮮血畫出紅心表達抗議,昨午更湧現萬人加入抗議行列,高喊:「拒絕黑箱作業、要求逐條重審。」還有女學生舉起「我沒有蹺課來上公民課」,各地聲援團體遍地開花,北中南都有學生透過網路串聯聲援。

    134 |

    繼續閱讀 »

    135 |
    136 |
    137 | Generic placeholder image 138 |

    反服貿要求與總統直接對話

    139 |

    反服貿團體今天上午9時召開記者會,要求在明天12時之前與總統馬英九直接對話,若沒有回應,將有進一步行動。 140 | 「反黑箱服貿」的抗議學生上午召開記者會,呼籲馬總統出面對話,也希望立法院長王金平到議場,看看他們的和平理性。

    141 |

    繼續閱讀 »

    142 |
    143 |
    144 | 145 | 146 | 147 | 148 |
    149 | 150 |
    151 |
    152 |

    江揆:服貿利大於弊堅定推動

    153 |

    他說,儘管目前仍有部分聲音反對服貿協議的簽署與生效,但是政府應該要堅定地推動這個重要的經貿政策.....

    154 |
    155 |
    156 | Generic placeholder image 158 |
    159 |
    160 | 161 |
    162 | 163 |
    164 |
    165 | Generic placeholder image 166 |
    167 |
    168 |

    反服貿多校串聯

    169 |

    「拒絕服貿、捍衛民主!」前晚反黑箱服貿學生團體成功佔領國會殿堂,民眾昨開始北上立法院聲援,要求「撤警察!開空調!」一名民眾激動割腕,甚至在立法院牆壁用鮮血畫出紅心表達抗議,昨午更湧現萬人加入抗議行列,高喊:「拒絕黑箱作業、要求逐條重審。」還有女學生舉起「我沒有蹺課來上公民課」,各地聲援團體遍地開花,北中南都有學生透過網路串聯聲援。

    170 |
    171 |
    172 | 173 |
    174 | 175 |
    176 |
    177 |

    反服貿要求與總統直接對話

    178 |

    反服貿團體今天上午9時召開記者會,要求在明天12時之前與總統馬英九直接對話,若沒有回應,將有進一步行動。 179 | 「反黑箱服貿」的抗議學生上午召開記者會,呼籲馬總統出面對話,也希望立法院長王金平到議場,看看他們的和平理性。

    180 |
    181 |
    182 | Generic placeholder image 183 |
    184 |
    185 | 186 |
    187 | 188 | 189 | 190 | 191 | 192 | 196 | 197 |
    198 | 199 | 200 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /HTML Basic/index4/index4.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrywu2013/Web-Application/6bb322f05f7fd235ae7ccc2f0e157fa05bb8835b/HTML Basic/index4/index4.rar -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | * W3c 3 | https://www.w3.org/TR/ 4 | * Github 5 | https://desktop.github.com/ 6 | * Git 7 | https://git-scm.com/ 8 | * Github Learning 9 | https://github.com/jerrywu2013/Bluemix/blob/master/GitHub.pdf 10 | * PHP 11 | https://github.com/rippleblue/PHP 12 | * AngularJS 13 | https://github.com/rippleblue/AngularJS 14 | * Bootstrap 15 | https://kkbruce.tw/bs3 16 | * Bootstrap Essentials (Book) 17 | http://file.allitebooks.com/20150814/Bootstrap%20Essentials.pdf 18 | * Bootstrap Live Customizer 19 | http://bootstrap-live-customizer.com/ 20 | * Bootstrap Magic 21 | https://pikock.github.io/bootstrap-magic/app/index.html 22 | * Bootstrap Build 23 | http://www.layoutit.com/build 24 | * CSS3 25 | http://animista.net/ 26 | * JS 27 | http://framerco.de/ 28 | * Python Jupyter 29 | http://jupyter.readthedocs.io/en/latest/install.html 30 | 31 | 32 | Sublime Text 3 33 | ==== 34 | * Sublime Text 3:http://www.sublimetext.com/3 35 | * How to set up Sublime Text 3 :http://sublimetext3.youtag.nl/ 36 | * Package Control:https://packagecontrol.io/installation#st3 37 | * Testing code :「html:5」+ keyboard「tab」 38 | * zen coding : http://docs.emmet.io/abbreviations/syntax/ 39 | * BootStrap 3 Snippets:http://blog.lyhdev.com/2013/10/sublime-text-snippets-bootstrap-3-html.html 40 | * Testing code「bs3-template:html5」+ keyboard「tab」 41 | * Snippet Code : https://github.com/JasonMortonNZ/bs3-sublime-plugin 42 | 43 | ==== 44 | Reference 45 | ==== 46 | 47 | * HTML5(英文)http://www.w3schools.com/html/html5_intro.asp 48 | * HTML5(中文)http://www.w3school.com.cn/html5/html_5_intro.asp 49 | * Bootstrap http://getbootstrap.com/getting-started/ 50 | * Bootstrap Tools http://www.awwwards.com/bootstrap-customization-themes-ui-patterns-and-tools.html 51 | 52 | ==== 53 | 54 | Templates for free: 55 | * http://templated.co/2 56 | * http://bootstrapzero.com/ 57 | * http://startbootstrap.com/ 58 | * http://www.freshdesignweb.com/free-bootstrap-templates.html 59 | * http://speckyboy.com/2014/05/27/free-bootstrap-3-templates/ 60 | * http://bootswatch.com/ 61 | * http://www.prepbootstrap.com/ 62 | * http://lovebootstrap.com/bootstrap-themes/free 63 | * http://www.codexcoder.com/html/40-free-html5-templates-responsive-download-2014/ 64 | * http://designscrazed.org/free-responsive-html5-css3-templates/ 65 | * http://www.zerotheme.com/ 66 | * http://w3layouts.com/free-responsive-html5-css3-website-templates/ 67 | * http://shapebootstrap.net/ 68 | * http://webdesignbeat.com/25-responsive-twitter-bootstrap-landing-page-templates/ 69 | * http://www.themefounders.com/twitter-bootstrap-wordpress-themes/ 70 | 71 | ==== 72 | 73 | Picture for free: 74 | * http://free.com.tw/15-find-free-images/ 75 | * http://www.flaticon.com/ 76 | * https://www.iconfinder.com/free_icons 77 | * https://unsplash.com/ 78 | * http://photopin.com/ 79 | * http://www.gettyimages.com/ 80 | --------------------------------------------------------------------------------