mirror of
https://github.com/kognise/water.css.git
synced 2025-08-09 06:37:05 +02:00
Update cdn urls
This commit is contained in:
@@ -40,7 +40,7 @@ Just stick this in your `<head>`:
|
||||
|
||||
### 🌙 Dark Theme:
|
||||
|
||||
`<link rel="stylesheet" href=https://cdn.jsdelivr.net/npm/water.css@2/dist/dark.min.css">`
|
||||
`<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/dist/dark.min.css">`
|
||||
|
||||
### ☀ Light Theme:
|
||||
|
||||
@@ -81,7 +81,7 @@ Because of this, you can simply add your own stylesheet to the page and set your
|
||||
This short example will use Water.css, but color all links red:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/kognise/water.css/dist/dark.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/water.css@2/dist/dark.min.css" />
|
||||
<style>
|
||||
:root {
|
||||
--links: red;
|
||||
|
@@ -29,7 +29,7 @@ const supportsCssVars = typeof CSS !== 'undefined' && CSS.supports('color', 'var
|
||||
/** The base URI from where the docs page loads the CSS files. */
|
||||
const DEV_BASE = './water.css/'
|
||||
/** The base URI from where instructions show to load the CSS files. */
|
||||
const CDN_BASE = 'https://cdn.jsdelivr.net/gh/kognise/water.css/dist/'
|
||||
const CDN_BASE = 'https://cdn.jsdelivr.net/npm/water.css@2/dist/'
|
||||
|
||||
/** An object mapping the (minified + gzipped) fileSize in KB to a fileName. */
|
||||
const FILE_SIZES = {
|
||||
@@ -87,7 +87,7 @@ const externalElements = {
|
||||
externalElements._stylesheet.removeEventListener('load', externalElements._removeStartupStylesheet)
|
||||
},
|
||||
_updateProductHunt: (/** @type {Theme} */ theme) => {
|
||||
externalElements._productHunt.src = this._productHunt.src.replace(/dark|light/, theme)
|
||||
externalElements._productHunt.src = externalElements._productHunt.src.replace(/dark|light/, theme)
|
||||
},
|
||||
_updateStylesheet: (/** @type {FileName} */ fileName) => {
|
||||
externalElements._stylesheet.href = DEV_BASE + fileName
|
||||
|
@@ -164,7 +164,7 @@ const browserReload = (done) => {
|
||||
}
|
||||
|
||||
const startDevServer = () => {
|
||||
browserSync.init({ server: { baseDir: './dist' }, startPath: 'docs/index.html' })
|
||||
browserSync.init({ server: { baseDir: './dist/docs' } })
|
||||
|
||||
gulp.watch(paths.styles.watch, gulp.series(style, browserReload))
|
||||
gulp.watch(paths.docs.src, gulp.series(docs, browserReload))
|
||||
|
Reference in New Issue
Block a user