|
9 | 9 | <link rel="icon" href=favicon.png type="image/png"> |
10 | 10 | <link rel="stylesheet" href="lib/codemirror/style.css"> |
11 | 11 | <link rel="stylesheet" href="style.css?3e7f4fb5e44596523a3cc50355b529cd"> |
12 | | - <link rel="preconnect" href="https://cdnjs.cloudflare.com"> |
13 | 12 | <link rel="preconnect" href="https://fonts.gstatic.com"> |
14 | 13 | <link href="https://fonts.googleapis.com/css2?family=PT+Mono&display=swap" rel="stylesheet"> |
15 | 14 | <script>(window.customElements && document.head.attachShadow) || (document.querySelector('html').className += ' oldie')</script> |
16 | | - <script src="https://cdn.jsdelivr.net/npm/[email protected].3/css-doodle.js"></script> |
| 15 | + <script type="module">import 'https://esm.sh/[email protected].5'</script> |
17 | 16 | </head> |
18 | 17 | <body> |
19 | 18 |
|
|
23 | 22 | <h1> |
24 | 23 | <span class="title"> |
25 | 24 | < <em>css-doodle</em> /> |
26 | | - <a class=" version" href=" https://cdn.jsdelivr.net/npm/[email protected]/css-doodle.js" >v0.40.3 </a> |
| 25 | + <a class=" version" href=" https://cdn.jsdelivr.net/npm/[email protected]/css-doodle.min.js" >v0.40.5 </a> |
| 26 | + </span> |
27 | 27 | </span> |
28 | 28 | </h1> |
29 | 29 | <p>A web component for drawing patterns with CSS</p> |
|
87 | 87 | <section class="gettting-started wrap"> |
88 | 88 | <h2><a name="getting-started"></a>Getting Started</h2> |
89 | 89 | <p> |
90 | | - Download the <a href="https://cdn.jsdelivr.net/npm/css-doodle@0.40.3/css-doodle.js">latest version</a> or include it directly from a CDN: |
| 90 | + Download the <a href="https://cdn.jsdelivr.net/npm/css-doodle@latest/css-doodle.min.js">latest version</a> or include it directly from a CDN: |
91 | 91 | </p> |
92 | 92 | <p class="first-code-sample"> |
93 | 93 | <textarea code> |
94 | | - <script src=" https://cdn.jsdelivr.net/npm/[email protected]/css-doodle.js" ></script> |
95 | | - |
96 | | - <css-doodle> |
97 | | - /* put your code here */ |
98 | | - </css-doodle> |
| 94 | + <script src="https://cdn.jsdelivr.net/npm/css-doodle@latest/css-doodle.min.js"></script> |
99 | 95 | </textarea> |
100 | 96 | </p> |
101 | | - <p>You can also install it from <a href="http://npmjs.org/package/css-doodle">npm</a> and import the module in JavaScript: |
| 97 | + <p>You can also use ES Modules in modern browsers:</p> |
| 98 | + <p> |
| 99 | + <textarea code> |
| 100 | + <script type="module"> |
| 101 | + import 'https://esm.sh/css-doodle@latest' |
| 102 | + </script> |
| 103 | + </textarea> |
| 104 | + </p> |
| 105 | + |
| 106 | + <p>If you're using a build tool, you can install it via <a href="http://npmjs.org/package/css-doodle">npm</a> and import it in JavaScript:</p> |
| 107 | + |
102 | 108 | <p> |
103 | 109 | <textarea code> |
104 | 110 | npm install css-doodle |
105 | 111 |
|
106 | | - /* import it */ |
107 | | - import 'css-doodle'; |
| 112 | + /* index.js */ |
| 113 | + import 'css-doodle' |
108 | 114 | </textarea> |
109 | 115 | </p> |
| 116 | + |
| 117 | + <p>Start creating!</p> |
| 118 | + |
| 119 | + <p> |
| 120 | + <textarea code> |
| 121 | + <css-doodle> |
| 122 | + /* put your code here */ |
| 123 | + </css-doodle> |
| 124 | + </textarea> |
| 125 | + </p> |
| 126 | + |
110 | 127 | </section> |
111 | 128 |
|
112 | 129 | <!-- usage --> |
|
0 commit comments