Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion bootstrap-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 5 additions & 20 deletions build/build-svgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ const yaml = require('js-yaml')
const iconsDir = path.join(__dirname, '../icons/')

const svgAttributes = {
class: '',
xmlns: 'http://www.w3.org/2000/svg',
width: '16',
height: '16',
fill: 'currentColor',
xmlns: 'http://www.w3.org/2000/svg'
class: '',
viewBox: '0 0 16 16'
}

const getSvgoConfig = async () => {
Expand Down Expand Up @@ -50,24 +53,6 @@ const processFile = (file, config) => new Promise((resolve, reject) => {
$(svg).attr(attr, val)
}

const dimensions = $(svg).attr('viewBox').split(' ')
const svgWidth = dimensions[2] / 16
const svgHeight = dimensions[3] / 16

$(svg).attr('width', `${svgWidth}em`)
$(svg).attr('height', `${svgHeight}em`)

// Todo: Pass argument to script to flip between ems and pixels.
// Until then, leaving code here—font-family generation requires
// use of pixels.

// const svgWidth = dimensions[2]
// const svgHeight = dimensions[3]

// $(svg).attr('width', `${svgWidth}`)
// $(svg).attr('height', `${svgHeight}`)


$(svg).attr('class', `bi bi-${path.basename(file, '.svg')}`)

fs.writeFile(file, $(svg).toString(), 'utf8')
Expand Down
2 changes: 1 addition & 1 deletion icons/alarm-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-end.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-middle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-start.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/align-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/app-indicator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/archive-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/archive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-90deg-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-90deg-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-90deg-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-90deg-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-bar-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-bar-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-bar-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-bar-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-clockwise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-counterclockwise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-circle-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-circle.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-left-circle-fill.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-left-circle.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-left-square-fill.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-left-square.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-left.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-right-circle-fill.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-right-circle.svg
2 changes: 1 addition & 1 deletion icons/arrow-down-right-square-fill.svg
Loading