mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
10 lines
326 B
JavaScript
10 lines
326 B
JavaScript
import plusCircle from './+circle.svg'
|
|
import underscoreCircle from './_circle.svg'
|
|
function setData(classname, file) {
|
|
const el = document.body.querySelector(classname)
|
|
el.style.backgroundImage = `url(${file})`
|
|
el.textContent = file
|
|
}
|
|
setData('.plus-circle', plusCircle)
|
|
setData('.underscore-circle', underscoreCircle)
|