- A component always consists of CSS and HTML (JS is optional)
- HTML and JS of a component are located in
ComponentName.js
- Styles of a component are located in
ComponentName.scss
- Each CSS class starts with the unique component name
- The HTML of each component only uses its own prefixed classes
- Components can use other components, but never overwrite their styles
KEYMAPOPTS="us us" | |
HOSTNAMEOPTS="-n alpine" | |
INTERFACESOPTS="auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
hostname alpine | |
" | |
TIMEZONEOPTS="-z UTC" |
Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.
You use Next.js router like normally, but don't define getStaticProps
and such. Instead you do client-only fetching with swr
, react-query
, or similar methods.
You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)
upload(files) { | |
const config = { | |
onUploadProgress: function(progressEvent) { | |
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
console.log(percentCompleted) | |
} | |
} | |
let data = new FormData() | |
data.append('file', files[0]) |
(It's not a file, do this before using)
- Have D3.js v4 implement in your project first.
- npm install --save d3-sankey
npm install --save @types/d3-sankey
Hit highlighted region to generate an object of square or circular shape randomly. The object is randomly coloured, randomly positioned within svg object bounds, 20px<=(square side)<=150px, 30px<=(circle diameter)<=200px. Hit randomly generated object to dismiss it.
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice | |
stun: | |
stun.l.google.com:19302, | |
stun1.l.google.com:19302, | |
stun2.l.google.com:19302, | |
stun3.l.google.com:19302, | |
stun4.l.google.com:19302, | |
stun.ekiga.net, | |
stun.ideasip.com, |