-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0ef57
commit 94e6012
Showing
23 changed files
with
233 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@font-face { | ||
font-family: "Inter"; | ||
src: url("./fonts/InterDisplay-Regular.woff2") format("woff2"); | ||
} | ||
@font-face { | ||
font-family: "Inter"; | ||
src: url("./fonts/InterDisplay-Bold.woff2") format("woff2"); | ||
font-weight: bold; | ||
font-style: normal; | ||
} | ||
@font-face { | ||
font-family: "Inter"; | ||
src: url("./fonts/InterDisplay-Italic.woff2") format("woff2"); | ||
font-weight: normal; | ||
font-style: italic; | ||
} | ||
@font-face { | ||
font-family: "Roboto"; | ||
src: url("./fonts/Roboto-Regular.woff") format("woff"); | ||
} | ||
@font-face { | ||
font-family: "Reforma1969"; | ||
src: url("./fonts/Reforma1969-Blanca.woff2") format("woff2"); | ||
} | ||
@font-face { | ||
font-family: "Reforma1969"; | ||
src: url("./fonts/Reforma1969-Negra.woff") format("woff2"); | ||
font-weight: bold; | ||
font-style: normal; | ||
} | ||
@font-face { | ||
font-family: "Reforma1969"; | ||
src: url("./fonts/Reforma1969-BlancaItalica.woff2") format("woff2"); | ||
font-weight: normal; | ||
font-style: italic; | ||
} | ||
@font-face { | ||
font-family: "Monoid"; | ||
src: url("./fonts/monoid-regular.woff2") format("woff2"); | ||
} | ||
@font-face { | ||
font-family: "Monoid"; | ||
src: url("./fonts/monoid-bold.woff2") format("woff2"); | ||
font-weight: bold; | ||
font-style: normal; | ||
} | ||
@font-face { | ||
font-family: "Monoid"; | ||
src: url("./fonts/monoid-italic.woff2") format("woff2"); | ||
font-weight: normal; | ||
font-style: italic; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*! | ||
* Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com | ||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) | ||
* Copyright 2024 Fonticons, Inc. | ||
*/ | ||
:root, | ||
:host { | ||
--fa-style-family-classic: "Font Awesome 6 Free"; | ||
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free"; | ||
} | ||
|
||
@font-face { | ||
font-family: "Font Awesome 6 Free Regular"; | ||
font-style: normal; | ||
font-weight: 400; | ||
font-display: block; | ||
src: | ||
url("./fa-regular-400.woff2") format("woff2"), | ||
url("./fa-regular-400.ttf") format("truetype"); | ||
} | ||
|
||
.far, | ||
.fa-regular { | ||
font-weight: 400; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*! | ||
* Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com | ||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) | ||
* Copyright 2024 Fonticons, Inc. | ||
*/ | ||
:root, | ||
:host { | ||
--fa-style-family-classic: "Font Awesome 6 Free"; | ||
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"; | ||
} | ||
|
||
@font-face { | ||
font-family: "Font Awesome 6 Free Solid"; | ||
font-style: normal; | ||
font-weight: 900; | ||
font-display: block; | ||
src: | ||
url("./fa-solid-900.woff2") format("woff2"), | ||
url("./fa-solid-900.ttf") format("truetype"); | ||
} | ||
|
||
.fas, | ||
.fa-solid { | ||
font-weight: 900; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,119 @@ | ||
function textToObject(text, hPos = 0, filepath) { | ||
const lines = text.split("\n"); | ||
let obj = {}; | ||
obj._hPos = hPos; | ||
obj._filepath = filepath; | ||
obj.lines = []; // Only used (for now) for quotes | ||
let settings = false; | ||
let projects = false; | ||
for (let i = 0; i < lines.length; i++) { | ||
const line = lines[i].trim(); | ||
// Extract the task. If it has a link, it is the main link. | ||
// Handle settings and projects inline, breaking. | ||
if (line.startsWith("# ")) { | ||
let cleaned = line.replace("# ", "").trim(); | ||
if (cleaned == "Settings") { | ||
settings = true; | ||
obj._valid = true; | ||
obj.settings = {}; | ||
continue; | ||
} | ||
if (cleaned == "Projects") { | ||
projects = true; | ||
obj._valid = true; | ||
obj.projects = []; | ||
continue; | ||
} | ||
if (cleaned == "hr") { | ||
obj.hr = true; | ||
obj._valid = true; | ||
continue; | ||
} | ||
if (cleaned.startsWith("[x]") || cleaned.startsWith("[X]")) { | ||
obj.done = true; | ||
cleaned = cleaned.slice(3); | ||
} | ||
if (cleaned.endsWith("(someday)") || cleaned.endsWith("(Someday)")) { | ||
obj.someday = true; | ||
obj.prio = -1000; | ||
cleaned = cleaned.replace(/\s+\(.omeday\)/, ""); | ||
} | ||
const linkMatch = cleaned.match(linkPlusRegex); | ||
if (linkMatch) { | ||
obj.text = linkMatch[1] + (linkMatch[3] ?? ""); | ||
obj.link = linkMatch[2]; | ||
} else { | ||
obj.text = cleaned; | ||
} | ||
const lines = text.split("\n"); | ||
let obj = {}; | ||
obj._hPos = hPos; | ||
obj._filepath = filepath; | ||
obj.lines = []; // Only used (for now) for quotes | ||
let settings = false; | ||
let projects = false; | ||
for (let i = 0; i < lines.length; i++) { | ||
const line = lines[i].trim(); | ||
// Extract the task. If it has a link, it is the main link. | ||
// Handle settings and projects inline, breaking. | ||
if (line.startsWith("# ")) { | ||
let cleaned = line.replace("# ", "").trim(); | ||
if (cleaned == "Settings") { | ||
settings = true; | ||
obj._valid = true; | ||
obj.settings = {}; | ||
continue; | ||
} | ||
if (line == "[x]" || line == "[X]") { | ||
obj.done = true; | ||
if (cleaned == "Projects") { | ||
projects = true; | ||
obj._valid = true; | ||
obj.projects = []; | ||
continue; | ||
} | ||
if (line.startsWith("> ")) { | ||
obj.lines.push(line.replace(/^> /, "")); | ||
if (cleaned == "hr") { | ||
obj.hr = true; | ||
obj._valid = true; | ||
continue; | ||
} | ||
if (line.startsWith("prio:") ) { | ||
if(!obj.someday){ | ||
obj.prio = parseInt(line.replace("prio:", "")); | ||
} | ||
continue; | ||
if (cleaned.startsWith("[x]") || cleaned.startsWith("[X]")) { | ||
obj.done = true; | ||
cleaned = cleaned.slice(3); | ||
} | ||
if (line.startsWith("color:")) { | ||
obj.color = line.replace("color:", "").trim(); | ||
continue; | ||
if (cleaned.endsWith("(someday)") || cleaned.endsWith("(Someday)")) { | ||
obj.someday = true; | ||
obj.prio = -1000; | ||
cleaned = cleaned.replace(/\s+\(.omeday\)/, ""); | ||
} | ||
if (line.startsWith("extracolor:")) { | ||
obj.extraColor = line.replace("extracolor:", "").trim(); | ||
continue; | ||
const linkMatch = cleaned.match(linkPlusRegex); | ||
if (linkMatch) { | ||
obj.text = linkMatch[1] + (linkMatch[3] ?? ""); | ||
obj.link = linkMatch[2]; | ||
} else { | ||
obj.text = cleaned; | ||
} | ||
obj._valid = true; | ||
continue; | ||
} | ||
if (line == "[x]" || line == "[X]") { | ||
obj.done = true; | ||
continue; | ||
} | ||
if (line.startsWith("> ")) { | ||
obj.lines.push(line.replace(/^> /, "")); | ||
obj._valid = true; | ||
continue; | ||
} | ||
if (line.startsWith("prio:")) { | ||
if (!obj.someday) { | ||
obj.prio = parseInt(line.replace("prio:", "")); | ||
} | ||
continue; | ||
} | ||
if (line.startsWith("color:")) { | ||
obj.color = line.replace("color:", "").trim(); | ||
continue; | ||
} | ||
if (line.startsWith("extracolor:")) { | ||
obj.extraColor = line.replace("extracolor:", "").trim(); | ||
continue; | ||
} | ||
|
||
// Get the lists of links or properties if it's a settings list | ||
if (line.startsWith("- ")) { | ||
const cleaned = line.replace("- ", "").trim(); | ||
if (settings) { | ||
const [prop, val] = cleaned.split(":"); | ||
obj.settings[prop.trim()] = val.trim(); | ||
continue; | ||
} | ||
if (projects) { | ||
const thingy = cleaned.split(","); | ||
if (thingy.length == 1) { | ||
obj.projects.push(thingy[0]); | ||
} else { | ||
obj.projects.push(thingy.map((p) => p.trim())); | ||
} | ||
continue; | ||
// Get the lists of links or properties if it's a settings list | ||
if (line.startsWith("- ")) { | ||
const cleaned = line.replace("- ", "").trim(); | ||
if (settings) { | ||
const [prop, val] = cleaned.split(":"); | ||
obj.settings[prop.trim()] = val.trim(); | ||
continue; | ||
} | ||
if (projects) { | ||
const thingy = cleaned.split(","); | ||
if (thingy.length == 1) { | ||
obj.projects.push(thingy[0]); | ||
} else { | ||
obj.projects.push(thingy.map((p) => p.trim())); | ||
} | ||
const linkMatch = cleaned.match(linkRegex); | ||
if (linkMatch) { | ||
if (obj.links) { | ||
obj.links.push([linkMatch[1], linkMatch[2]]); | ||
} else { | ||
obj.links = [[linkMatch[1], linkMatch[2]]]; | ||
} | ||
continue; | ||
continue; | ||
} | ||
const linkMatch = cleaned.match(linkRegex); | ||
if (linkMatch) { | ||
if (obj.links) { | ||
obj.links.push([linkMatch[1], linkMatch[2]]); | ||
} else { | ||
// If we are in a list, haven't matched a known property, | ||
// and match no link, we are in a log message. | ||
if (obj.msg) { | ||
obj.msg.push(cleaned); | ||
} else { | ||
obj.msg = [cleaned]; | ||
} | ||
obj.links = [[linkMatch[1], linkMatch[2]]]; | ||
} | ||
continue; | ||
} else { | ||
// If the line does not start a list and we have not processed a known command… | ||
const cleaned = line.trim(); | ||
if (cleaned) { | ||
// Could be empty, so… | ||
obj.extra = cleaned; | ||
// If we are in a list, haven't matched a known property, | ||
// and match no link, we are in a log message. | ||
if (obj.msg) { | ||
obj.msg.push(cleaned); | ||
} else { | ||
obj.msg = [cleaned]; | ||
} | ||
} | ||
} else { | ||
// If the line does not start a list and we have not processed a known command… | ||
const cleaned = line.trim(); | ||
if (cleaned) { | ||
// Could be empty, so… | ||
obj.extra = cleaned; | ||
} | ||
} | ||
return obj; | ||
} | ||
|
||
return obj; | ||
} |
Oops, something went wrong.