Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/widgets/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,28 @@ export default function skillsWidget(
const toolsList: string[] = toolsString.split(',')
const softwareList: string[] = softwareString.split(',')

const rowHeightLanguages = Math.round((languageList.length - 0.1) / 7) > 1 ? Math.round((languageList.length - 0.1) / 7) : 1
const rowHeightLanguages = Math.ceil(languageList.length / 7)
const languagesTitleHeight = FIRST_ROW

const rowHeightFrameworks = Math.round((frameworkList.length - 0.1) / 7) > 1 ? Math.round((frameworkList.length - 0.1) / 7) : 1
const rowHeightFrameworks = Math.ceil(frameworkList.length / 7)
const frameworkTitleHeight = languagesTitleHeight
+ ((languageList.length > 1 || languageList[0] !== 'undefined' ? 1 : 0) * PAD)
+ ((languageList.length > 1 || languageList[0] !== 'undefined' ? rowHeightLanguages : 0) * ROW)
+ (includeNames && (languageList.length > 1 || languageList[0] !== 'undefined') ? (rowHeightFrameworks) * 25 : 0)

const rowHeightLibraries = Math.round((libraryList.length - 0.1) / 7) > 1 ? Math.round((libraryList.length - 0.1) / 7) : 1
const rowHeightLibraries = Math.ceil(libraryList.length / 7)
const libraryTitleHeight = frameworkTitleHeight
+ ((frameworkList.length > 1 || frameworkList[0] !== 'undefined' ? 1 : 0) * PAD)
+ ((frameworkList.length > 1 || frameworkList[0] !== 'undefined' ? rowHeightFrameworks : 0) * ROW)
+ (includeNames && (frameworkList.length > 1 || frameworkList[0] !== 'undefined') ? (rowHeightLibraries) * 25 : 0)

const rowHeightTools = Math.round((toolsList.length - 0.1) / 7) > 1 ? Math.round((toolsList.length - 0.1) / 7) : 1
const rowHeightTools = Math.ceil(toolsList.length / 7)
const toolsTitleHeight = libraryTitleHeight
+ ((libraryList.length > 1 || libraryList[0] !== 'undefined' ? 1 : 0) * PAD)
+ ((libraryList.length > 1 || libraryList[0] !== 'undefined' ? rowHeightLibraries : 0) * ROW)
+ (includeNames && (libraryList.length > 1 || libraryList[0] !== 'undefined') ? (rowHeightTools) * 25 : 0)

const rowHeightSoftware = Math.round((softwareList.length - 0.1) / 7) > 1 ? Math.round((softwareList.length - 0.1) / 7) : 1
const rowHeightSoftware = Math.ceil(softwareList.length / 7)
const softwareTitleHeight = toolsTitleHeight
+ ((toolsList.length > 1 || toolsList[0] !== 'undefined' ? 1 : 0) * PAD)
+ ((toolsList.length > 1 || toolsList[0] !== 'undefined' ? rowHeightTools : 0) * ROW)
Expand Down