mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
Reset
This commit is contained in:
parent
6efac65d3a
commit
1b61d78414
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 100,
|
||||||
|
"quoteProps": "as-needed",
|
||||||
|
"trailingComma": "all",
|
||||||
|
"tabWidth": 2,
|
||||||
|
"semi": false
|
||||||
|
}
|
||||||
@ -1,93 +0,0 @@
|
|||||||
# Citizen Code of Conduct
|
|
||||||
|
|
||||||
## 1. Purpose
|
|
||||||
|
|
||||||
A primary goal of the Quartz community is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
|
|
||||||
|
|
||||||
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
|
|
||||||
|
|
||||||
We invite all those who participate in the Quartz community to help us create safe and positive experiences for everyone.
|
|
||||||
|
|
||||||
## 2. Open [Source/Culture/Tech] Citizenship
|
|
||||||
|
|
||||||
A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
|
|
||||||
|
|
||||||
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
|
|
||||||
|
|
||||||
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
|
|
||||||
|
|
||||||
## 3. Expected Behavior
|
|
||||||
|
|
||||||
The following behaviors are expected and requested of all community members:
|
|
||||||
|
|
||||||
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
|
|
||||||
* Exercise consideration and respect in your speech and actions.
|
|
||||||
* Attempt collaboration before conflict.
|
|
||||||
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
|
|
||||||
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
|
|
||||||
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
|
|
||||||
|
|
||||||
## 4. Unacceptable Behavior
|
|
||||||
|
|
||||||
The following behaviors are considered harassment and are unacceptable within our community:
|
|
||||||
|
|
||||||
* Violence, threats of violence or violent language directed against another person.
|
|
||||||
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
|
|
||||||
* Posting or displaying sexually explicit or violent material.
|
|
||||||
* Posting or threatening to post other people's personally identifying information ("doxing").
|
|
||||||
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
|
|
||||||
* Inappropriate photography or recording.
|
|
||||||
* Inappropriate physical contact. You should have someone's consent before touching them.
|
|
||||||
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
|
|
||||||
* Deliberate intimidation, stalking or following (online or in person).
|
|
||||||
* Advocating for, or encouraging, any of the above behavior.
|
|
||||||
* Sustained disruption of community events, including talks and presentations.
|
|
||||||
|
|
||||||
## 5. Weapons Policy
|
|
||||||
|
|
||||||
No weapons will be allowed at Quartz community events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter.
|
|
||||||
|
|
||||||
## 6. Consequences of Unacceptable Behavior
|
|
||||||
|
|
||||||
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
|
|
||||||
|
|
||||||
Anyone asked to stop unacceptable behavior is expected to comply immediately.
|
|
||||||
|
|
||||||
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
|
|
||||||
|
|
||||||
## 7. Reporting Guidelines
|
|
||||||
|
|
||||||
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. j.zhao2k19@gmail.com.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
|
|
||||||
|
|
||||||
## 8. Addressing Grievances
|
|
||||||
|
|
||||||
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify @jackyzha0 with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
|
|
||||||
|
|
||||||
|
|
||||||
## 9. Scope
|
|
||||||
|
|
||||||
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.
|
|
||||||
|
|
||||||
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
|
|
||||||
|
|
||||||
## 10. Contact info
|
|
||||||
|
|
||||||
j.zhao2k19@gmail.com
|
|
||||||
|
|
||||||
## 11. License and attribution
|
|
||||||
|
|
||||||
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
|
||||||
|
|
||||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
|
||||||
|
|
||||||
_Revision 2.3. Posted 6 March 2017._
|
|
||||||
|
|
||||||
_Revision 2.2. Posted 4 February 2016._
|
|
||||||
|
|
||||||
_Revision 2.1. Posted 23 June 2014._
|
|
||||||
|
|
||||||
_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._
|
|
||||||
21
LICENSE.txt
21
LICENSE.txt
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 jackyzha0
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
18
Makefile
18
Makefile
@ -1,18 +0,0 @@
|
|||||||
.DEFAULT_GOAL := serve
|
|
||||||
|
|
||||||
help: ## Show all Makefile targets
|
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
||||||
|
|
||||||
update: ## Update Quartz to the latest version on Github
|
|
||||||
@git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git)
|
|
||||||
git fetch upstream
|
|
||||||
git log --oneline --decorate --graph ..upstream/hugo
|
|
||||||
git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
|
|
||||||
|
|
||||||
update-force: ## Forcefully pull all changes and don't ask to patch
|
|
||||||
@git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git)
|
|
||||||
git fetch upstream
|
|
||||||
git checkout upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
|
|
||||||
|
|
||||||
serve: ## Serve Quartz locally
|
|
||||||
hugo-obsidian -input=content -output=assets/indices -index -root=. && hugo server --enableGitInfo
|
|
||||||
17
README.md
17
README.md
@ -1,17 +0,0 @@
|
|||||||
# Quartz
|
|
||||||
|
|
||||||
Host your second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening) for free. Quartz features
|
|
||||||
|
|
||||||
1. Extremely fast full-text search by pressing `Ctrl` + `k`
|
|
||||||
2. Customizable and hackable design based on Hugo
|
|
||||||
3. Automatically generated backlinks, link previews, and local graph
|
|
||||||
4. Built-in CJK + Latex Support
|
|
||||||
5. Support for both Markdown Links and Wikilinks
|
|
||||||
|
|
||||||
> “[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming
|
|
||||||
|
|
||||||
🔗 Get Started: https://quartz.jzhao.xyz/
|
|
||||||
|
|
||||||
*Quartz Example Screenshot*
|
|
||||||
|
|
||||||
[Join the Discord Community](https://discord.gg/cRFFHYye7t)
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'
|
|
||||||
const currentTheme = localStorage.getItem('theme') ?? userPref
|
|
||||||
|
|
||||||
if (currentTheme) {
|
|
||||||
document.documentElement.setAttribute('saved-theme', currentTheme);
|
|
||||||
}
|
|
||||||
|
|
||||||
const switchTheme = (e) => {
|
|
||||||
if (e.target.checked) {
|
|
||||||
document.documentElement.setAttribute('saved-theme', 'dark')
|
|
||||||
localStorage.setItem('theme', 'dark')
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.documentElement.setAttribute('saved-theme', 'light')
|
|
||||||
localStorage.setItem('theme', 'light')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window) {
|
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
|
||||||
// Darkmode toggle
|
|
||||||
const toggleSwitch = document.querySelector('#darkmode-toggle')
|
|
||||||
|
|
||||||
// listen for toggle
|
|
||||||
toggleSwitch.addEventListener('change', switchTheme, false)
|
|
||||||
|
|
||||||
if (currentTheme === 'dark') {
|
|
||||||
toggleSwitch.checked = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,219 +0,0 @@
|
|||||||
async function drawGraph(url, baseUrl, pathColors, depth, enableDrag, enableLegend, enableZoom) {
|
|
||||||
const { index, links, content } = await fetchData
|
|
||||||
const curPage = url.replace(baseUrl, "")
|
|
||||||
|
|
||||||
const parseIdsFromLinks = (links) => [...(new Set(links.flatMap(link => ([link.source, link.target]))))]
|
|
||||||
|
|
||||||
const neighbours = new Set()
|
|
||||||
const wl = [curPage || "/", "__SENTINEL"]
|
|
||||||
if (depth >= 0) {
|
|
||||||
while (depth >= 0 && wl.length > 0) {
|
|
||||||
// compute neighbours
|
|
||||||
const cur = wl.shift()
|
|
||||||
if (cur === "__SENTINEL") {
|
|
||||||
depth--
|
|
||||||
wl.push("__SENTINEL")
|
|
||||||
} else {
|
|
||||||
neighbours.add(cur)
|
|
||||||
const outgoing = index.links[cur] || []
|
|
||||||
const incoming = index.backlinks[cur] || []
|
|
||||||
wl.push(...outgoing.map(l => l.target), ...incoming.map(l => l.source))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
parseIdsFromLinks(links).forEach(id => neighbours.add(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = {
|
|
||||||
nodes: [...neighbours].map(id => ({ id })),
|
|
||||||
links: links.filter(l => neighbours.has(l.source) && neighbours.has(l.target)),
|
|
||||||
}
|
|
||||||
|
|
||||||
const color = (d) => {
|
|
||||||
if (d.id === curPage || (d.id === "/" && curPage === "")) {
|
|
||||||
return "var(--g-node-active)"
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const pathColor of pathColors) {
|
|
||||||
const path = Object.keys(pathColor)[0]
|
|
||||||
const colour = pathColor[path]
|
|
||||||
if (d.id.startsWith(path)) {
|
|
||||||
return colour
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "var(--g-node)"
|
|
||||||
}
|
|
||||||
|
|
||||||
const drag = simulation => {
|
|
||||||
function dragstarted(event, d) {
|
|
||||||
if (!event.active) simulation.alphaTarget(1).restart();
|
|
||||||
d.fx = d.x;
|
|
||||||
d.fy = d.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
function dragged(event, d) {
|
|
||||||
d.fx = event.x;
|
|
||||||
d.fy = event.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
function dragended(event, d) {
|
|
||||||
if (!event.active) simulation.alphaTarget(0);
|
|
||||||
d.fx = null;
|
|
||||||
d.fy = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const noop = () => { }
|
|
||||||
return d3.drag()
|
|
||||||
.on("start", enableDrag ? dragstarted : noop)
|
|
||||||
.on("drag", enableDrag ? dragged : noop)
|
|
||||||
.on("end", enableDrag ? dragended : noop);
|
|
||||||
}
|
|
||||||
|
|
||||||
const height = 450
|
|
||||||
const width = document.getElementById("graph-container").offsetWidth
|
|
||||||
|
|
||||||
const simulation = d3.forceSimulation(data.nodes)
|
|
||||||
.force("charge", d3.forceManyBody().strength(-2000))
|
|
||||||
.force("link", d3.forceLink(data.links).id(d => d.id))
|
|
||||||
.force("center", d3.forceCenter());
|
|
||||||
|
|
||||||
const svg = d3.select('#graph-container')
|
|
||||||
.append('svg')
|
|
||||||
.attr('width', width)
|
|
||||||
.attr('height', height)
|
|
||||||
.attr("viewBox", [-width / 2, -height / 2, width, height]);
|
|
||||||
|
|
||||||
if (enableLegend) {
|
|
||||||
const legend = [
|
|
||||||
{ "Aktualna strona": "var(--g-node-active)" },
|
|
||||||
{ "Notatka": "var(--g-node)" },
|
|
||||||
...pathColors
|
|
||||||
]
|
|
||||||
legend.forEach((legendEntry, i) => {
|
|
||||||
const key = Object.keys(legendEntry)[0]
|
|
||||||
const colour = legendEntry[key]
|
|
||||||
svg.append("circle").attr("cx", -width / 2 + 20).attr("cy", height / 2 - 30 * (i + 1)).attr("r", 6).style("fill", colour)
|
|
||||||
svg.append("text").attr("x", -width / 2 + 40).attr("y", height / 2 - 30 * (i + 1)).text(key).style("font-size", "15px").attr("alignment-baseline", "middle")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw links between nodes
|
|
||||||
const link = svg.append("g")
|
|
||||||
.selectAll("line")
|
|
||||||
.data(data.links)
|
|
||||||
.join("line")
|
|
||||||
.attr("class", "link")
|
|
||||||
.attr("stroke", "var(--g-link)")
|
|
||||||
.attr("stroke-width", 2)
|
|
||||||
.attr("data-source", d => d.source.id)
|
|
||||||
.attr("data-target", d => d.target.id)
|
|
||||||
|
|
||||||
// svg groups
|
|
||||||
const graphNode = svg.append("g")
|
|
||||||
.selectAll("g")
|
|
||||||
.data(data.nodes)
|
|
||||||
.enter().append("g")
|
|
||||||
|
|
||||||
// draw individual nodes
|
|
||||||
const node = graphNode.append("circle")
|
|
||||||
.attr("class", "node")
|
|
||||||
.attr("id", (d) => d.id)
|
|
||||||
.attr("r", (d) => {
|
|
||||||
const numOut = index.links[d.id]?.length || 0
|
|
||||||
const numIn = index.backlinks[d.id]?.length || 0
|
|
||||||
return 3 + (numOut + numIn) / 4
|
|
||||||
})
|
|
||||||
.attr("fill", color)
|
|
||||||
.style("cursor", "pointer")
|
|
||||||
.on("click", (_, d) => {
|
|
||||||
window.location.href = baseUrl + '/' + decodeURI(d.id).replace(/\s+/g, '-')
|
|
||||||
})
|
|
||||||
.on("mouseover", function(_, d) {
|
|
||||||
d3.selectAll(".node")
|
|
||||||
.transition()
|
|
||||||
.duration(100)
|
|
||||||
.attr("fill", "var(--g-node-inactive)")
|
|
||||||
|
|
||||||
const neighbours = parseIdsFromLinks([...(index.links[d.id] || []), ...(index.backlinks[d.id] || [])])
|
|
||||||
const neighbourNodes = d3.selectAll(".node").filter(d => neighbours.includes(d.id))
|
|
||||||
const currentId = d.id
|
|
||||||
const linkNodes = d3.selectAll(".link").filter(d => d.source.id === currentId || d.target.id === currentId)
|
|
||||||
|
|
||||||
// highlight neighbour nodes
|
|
||||||
neighbourNodes
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.attr("fill", color)
|
|
||||||
|
|
||||||
// highlight links
|
|
||||||
linkNodes
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.attr("stroke", "var(--g-link-active)")
|
|
||||||
|
|
||||||
// show text for self
|
|
||||||
d3.select(this.parentNode)
|
|
||||||
.select("text")
|
|
||||||
.raise()
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.style("opacity", 1)
|
|
||||||
}).on("mouseleave", function(_, d) {
|
|
||||||
d3.selectAll(".node")
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.attr("fill", color)
|
|
||||||
|
|
||||||
const currentId = d.id
|
|
||||||
const linkNodes = d3.selectAll(".link").filter(d => d.source.id === currentId || d.target.id === currentId)
|
|
||||||
|
|
||||||
linkNodes
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.attr("stroke", "var(--g-link)")
|
|
||||||
|
|
||||||
d3.select(this.parentNode)
|
|
||||||
.select("text")
|
|
||||||
.transition()
|
|
||||||
.duration(200)
|
|
||||||
.style("opacity", 0)
|
|
||||||
})
|
|
||||||
.call(drag(simulation));
|
|
||||||
|
|
||||||
// draw labels
|
|
||||||
const labels = graphNode.append("text")
|
|
||||||
.attr("dx", 12)
|
|
||||||
.attr("dy", ".35em")
|
|
||||||
.text((d) => content[d.id]?.title || d.id.replace("-", " "))
|
|
||||||
.style("opacity", 1)
|
|
||||||
.style("pointer-events", "none")
|
|
||||||
.call(drag(simulation));
|
|
||||||
|
|
||||||
// set panning
|
|
||||||
|
|
||||||
if (enableZoom) {
|
|
||||||
svg.call(d3.zoom()
|
|
||||||
.extent([[5, 5], [width, height]])
|
|
||||||
.on("zoom", ({ transform }) => {
|
|
||||||
link.attr("transform", transform);
|
|
||||||
node.attr("transform", transform);
|
|
||||||
labels.attr("transform", transform);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
// progress the simulation
|
|
||||||
simulation.on("tick", () => {
|
|
||||||
link
|
|
||||||
.attr("x1", d => d.source.x)
|
|
||||||
.attr("y1", d => d.source.y)
|
|
||||||
.attr("x2", d => d.target.x)
|
|
||||||
.attr("y2", d => d.target.y)
|
|
||||||
node
|
|
||||||
.attr("cx", d => d.x)
|
|
||||||
.attr("cy", d => d.y)
|
|
||||||
labels
|
|
||||||
.attr("x", d => d.x)
|
|
||||||
.attr("y", d => d.y)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
function htmlToElement(html) {
|
|
||||||
const template = document.createElement('template')
|
|
||||||
html = html.trim()
|
|
||||||
template.innerHTML = html
|
|
||||||
return template.content.firstChild
|
|
||||||
}
|
|
||||||
|
|
||||||
function initPopover(baseURL) {
|
|
||||||
const basePath = baseURL.replace(window.location.origin, "")
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
fetchData.then(({ content }) => {
|
|
||||||
const links = [...document.getElementsByClassName("internal-link")]
|
|
||||||
links
|
|
||||||
.filter(li => li.dataset.src)
|
|
||||||
.forEach(li => {
|
|
||||||
const linkDest = content[li.dataset.src.replace(basePath, "")]
|
|
||||||
if (linkDest) {
|
|
||||||
const popoverElement = `<div class="popover">
|
|
||||||
<h3>${linkDest.title}</h3>
|
|
||||||
<p>${removeMarkdown(linkDest.content).split(" ", 20).join(" ")}...</p>
|
|
||||||
<p class="meta">${new Date(linkDest.lastmodified).toLocaleDateString()}</p>
|
|
||||||
</div>`
|
|
||||||
const el = htmlToElement(popoverElement)
|
|
||||||
li.appendChild(el)
|
|
||||||
li.addEventListener("mouseover", () => {
|
|
||||||
el.classList.add("visible")
|
|
||||||
})
|
|
||||||
li.addEventListener("mouseout", () => {
|
|
||||||
el.classList.remove("visible")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,239 +0,0 @@
|
|||||||
// code from https://github.com/danestves/markdown-to-text
|
|
||||||
const removeMarkdown = (
|
|
||||||
markdown,
|
|
||||||
options = {
|
|
||||||
listUnicodeChar: false,
|
|
||||||
stripListLeaders: true,
|
|
||||||
gfm: true,
|
|
||||||
useImgAltText: false,
|
|
||||||
preserveLinks: false,
|
|
||||||
}
|
|
||||||
) => {
|
|
||||||
let output = markdown || "";
|
|
||||||
output = output.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm, "");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (options.stripListLeaders) {
|
|
||||||
if (options.listUnicodeChar)
|
|
||||||
output = output.replace(
|
|
||||||
/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,
|
|
||||||
options.listUnicodeChar + " $1"
|
|
||||||
);
|
|
||||||
else output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1");
|
|
||||||
}
|
|
||||||
if (options.gfm) {
|
|
||||||
output = output
|
|
||||||
.replace(/\n={2,}/g, "\n")
|
|
||||||
.replace(/~{3}.*\n/g, "")
|
|
||||||
.replace(/~~/g, "")
|
|
||||||
.replace(/`{3}.*\n/g, "");
|
|
||||||
}
|
|
||||||
if (options.preserveLinks) {
|
|
||||||
output = output.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g, "$1 ($2)")
|
|
||||||
}
|
|
||||||
output = output
|
|
||||||
.replace(/<[^>]*>/g, "")
|
|
||||||
.replace(/^[=\-]{2,}\s*$/g, "")
|
|
||||||
.replace(/\[\^.+?\](\: .*?$)?/g, "")
|
|
||||||
.replace(/\s{0,2}\[.*?\]: .*?$/g, "")
|
|
||||||
.replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? "$1" : "")
|
|
||||||
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, "$1")
|
|
||||||
.replace(/^\s{0,3}>\s?/g, "")
|
|
||||||
.replace(/(^|\n)\s{0,3}>\s?/g, "\n\n")
|
|
||||||
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "")
|
|
||||||
.replace(
|
|
||||||
/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,
|
|
||||||
"$1$2$3"
|
|
||||||
)
|
|
||||||
.replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2")
|
|
||||||
.replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2")
|
|
||||||
.replace(/(`{3,})(.*?)\1/gm, "$2")
|
|
||||||
.replace(/`(.+?)`/g, "$1")
|
|
||||||
.replace(/\n{2,}/g, "\n\n");
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
return markdown;
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
};
|
|
||||||
// -----
|
|
||||||
|
|
||||||
(async function() {
|
|
||||||
const encoder = str => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])+/)
|
|
||||||
const contentIndex = new FlexSearch.Document({
|
|
||||||
cache: true,
|
|
||||||
charset: "latin:extra",
|
|
||||||
optimize: true,
|
|
||||||
index: [{
|
|
||||||
field: "content",
|
|
||||||
tokenize: "reverse",
|
|
||||||
encode: encoder,
|
|
||||||
}, {
|
|
||||||
field: "title",
|
|
||||||
tokenize: "forward",
|
|
||||||
encode: encoder,
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
|
|
||||||
const { content } = await fetchData
|
|
||||||
for (const [key, value] of Object.entries(content)) {
|
|
||||||
contentIndex.add({
|
|
||||||
id: key,
|
|
||||||
title: value.title,
|
|
||||||
content: removeMarkdown(value.content),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const highlight = (content, term) => {
|
|
||||||
const highlightWindow = 20
|
|
||||||
const tokenizedTerm = term.split(/\s+/).filter(t => t !== "")
|
|
||||||
const splitText = content.split(/\s+/).filter(t => t !== "")
|
|
||||||
const includesCheck = (token) => tokenizedTerm.some(term => token.toLowerCase().startsWith(term.toLowerCase()))
|
|
||||||
|
|
||||||
const occurrencesIndices = splitText
|
|
||||||
.map(includesCheck)
|
|
||||||
|
|
||||||
// calculate best index
|
|
||||||
let bestSum = 0
|
|
||||||
let bestIndex = 0
|
|
||||||
for (let i = 0; i < Math.max(occurrencesIndices.length - highlightWindow, 0); i++) {
|
|
||||||
const window = occurrencesIndices.slice(i, i + highlightWindow)
|
|
||||||
const windowSum = window.reduce((total, cur) => total + cur, 0)
|
|
||||||
if (windowSum >= bestSum) {
|
|
||||||
bestSum = windowSum
|
|
||||||
bestIndex = i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const startIndex = Math.max(bestIndex - highlightWindow, 0)
|
|
||||||
const endIndex = Math.min(startIndex + 2 * highlightWindow, splitText.length)
|
|
||||||
const mappedText = splitText
|
|
||||||
.slice(startIndex, endIndex)
|
|
||||||
.map(token => {
|
|
||||||
if (includesCheck(token)) {
|
|
||||||
return `<span class="search-highlight">${token}</span>`
|
|
||||||
}
|
|
||||||
return token
|
|
||||||
})
|
|
||||||
.join(" ")
|
|
||||||
.replaceAll('</span> <span class="search-highlight">', " ")
|
|
||||||
return `${startIndex === 0 ? "" : "..."}${mappedText}${endIndex === splitText.length ? "" : "..."}`
|
|
||||||
}
|
|
||||||
|
|
||||||
const resultToHTML = ({ url, title, content, term }) => {
|
|
||||||
const text = removeMarkdown(content)
|
|
||||||
const resultTitle = highlight(title, term)
|
|
||||||
const resultText = highlight(text, term)
|
|
||||||
return `<button class="result-card" id="${url}">
|
|
||||||
<h3>${resultTitle}</h3>
|
|
||||||
<p>${resultText}</p>
|
|
||||||
</button>`
|
|
||||||
}
|
|
||||||
|
|
||||||
const redir = (id, term) => {
|
|
||||||
window.location.href = BASE_URL + `${id}#:~:text=${encodeURIComponent(term)}`
|
|
||||||
}
|
|
||||||
|
|
||||||
const formatForDisplay = id => ({
|
|
||||||
id,
|
|
||||||
url: id,
|
|
||||||
title: content[id].title,
|
|
||||||
content: content[id].content
|
|
||||||
})
|
|
||||||
|
|
||||||
const source = document.getElementById('search-bar')
|
|
||||||
const results = document.getElementById("results-container")
|
|
||||||
let term
|
|
||||||
source.addEventListener("keyup", (e) => {
|
|
||||||
if (e.key === "Enter") {
|
|
||||||
const anchor = document.getElementsByClassName("result-card")[0]
|
|
||||||
redir(anchor.id, term)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
source.addEventListener('input', (e) => {
|
|
||||||
term = e.target.value
|
|
||||||
const searchResults = contentIndex.search(term, [
|
|
||||||
{
|
|
||||||
field: "content",
|
|
||||||
limit: 10,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "title",
|
|
||||||
limit: 5,
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const getByField = field => {
|
|
||||||
const results = searchResults.filter(x => x.field === field)
|
|
||||||
if (results.length === 0) {
|
|
||||||
return []
|
|
||||||
} else {
|
|
||||||
return [...results[0].result]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const allIds = new Set([...getByField('title'), ...getByField('content')])
|
|
||||||
const finalResults = [...allIds].map(formatForDisplay)
|
|
||||||
|
|
||||||
// display
|
|
||||||
if (finalResults.length === 0) {
|
|
||||||
results.innerHTML = `<button class="result-card">
|
|
||||||
<h3>No results.</h3>
|
|
||||||
<p>Try another search term?</p>
|
|
||||||
</button>`
|
|
||||||
} else {
|
|
||||||
results.innerHTML = finalResults
|
|
||||||
.map(result => resultToHTML({
|
|
||||||
...result,
|
|
||||||
term,
|
|
||||||
}))
|
|
||||||
.join("\n")
|
|
||||||
const anchors = document.getElementsByClassName("result-card");
|
|
||||||
[...anchors].forEach(anchor => {
|
|
||||||
anchor.onclick = () => redir(anchor.id, term)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
const searchContainer = document.getElementById("search-container")
|
|
||||||
|
|
||||||
function openSearch() {
|
|
||||||
if (searchContainer.style.display === "none" || searchContainer.style.display === "") {
|
|
||||||
source.value = ""
|
|
||||||
results.innerHTML = ""
|
|
||||||
searchContainer.style.display = "block"
|
|
||||||
source.focus()
|
|
||||||
} else {
|
|
||||||
searchContainer.style.display = "none"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeSearch() {
|
|
||||||
searchContainer.style.display = "none"
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('keydown', (event) => {
|
|
||||||
if (event.key === "/" && (event.ctrlKey || event.metaKey)) {
|
|
||||||
event.preventDefault()
|
|
||||||
openSearch()
|
|
||||||
}
|
|
||||||
if (event.key === "Escape") {
|
|
||||||
event.preventDefault()
|
|
||||||
closeSearch()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const searchButton = document.getElementById("search-icon")
|
|
||||||
searchButton.addEventListener('click', (evt) => {
|
|
||||||
openSearch()
|
|
||||||
})
|
|
||||||
searchButton.addEventListener('keydown', (evt) => {
|
|
||||||
openSearch()
|
|
||||||
})
|
|
||||||
searchContainer.addEventListener('click', (evt) => {
|
|
||||||
closeSearch()
|
|
||||||
})
|
|
||||||
document.getElementById("search-space").addEventListener('click', (evt) => {
|
|
||||||
evt.stopPropagation()
|
|
||||||
})
|
|
||||||
})()
|
|
||||||
|
|
||||||
@ -1,575 +0,0 @@
|
|||||||
:root {
|
|
||||||
--lt-colours-light: var(--light) !important;
|
|
||||||
--lt-colours-lightgray: var(--lightgray) !important;
|
|
||||||
--lt-colours-dark: var(--secondary) !important;
|
|
||||||
--lt-colours-secondary: var(--tertiary) !important;
|
|
||||||
--lt-colours-gray: var(--outlinegray) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
img[alt="overment"] { width: 200px; display: block; margin-inline: auto; }
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, ol, ul, thead {
|
|
||||||
font-family: Inter;
|
|
||||||
color: var(--dark);
|
|
||||||
font-weight: revert;
|
|
||||||
margin: revert;
|
|
||||||
padding: revert;
|
|
||||||
}
|
|
||||||
|
|
||||||
p, ul, text {
|
|
||||||
color: var(--gray);
|
|
||||||
fill: var(--gray);
|
|
||||||
font-weight: revert;
|
|
||||||
margin: revert;
|
|
||||||
padding: revert;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainTOC {
|
|
||||||
background: var(--lightgray);
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 0.75em 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainTOC details summary {
|
|
||||||
cursor: zoom-in;
|
|
||||||
font-family: Inter;
|
|
||||||
color: var(--dark);
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainTOC details[open] summary {
|
|
||||||
cursor: zoom-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#TableOfContents > ol {
|
|
||||||
counter-reset: section;
|
|
||||||
margin-left: 0em;
|
|
||||||
padding-left: 1.5em;
|
|
||||||
& > li {
|
|
||||||
counter-increment: section;
|
|
||||||
& > ol {
|
|
||||||
counter-reset: subsection;
|
|
||||||
& > li {
|
|
||||||
counter-increment: subsection;
|
|
||||||
&::marker {
|
|
||||||
content: counter(section) "." counter(subsection) " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > li::marker {
|
|
||||||
content: counter(section) " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
& > li::marker, & > li > ol > li::marker {
|
|
||||||
font-family: Source Sans Pro;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p>img+em {
|
|
||||||
display: block;
|
|
||||||
transform: translateY(-1em);
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
line-height: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
p, tbody, li {
|
|
||||||
font-family: Source Sans Pro;
|
|
||||||
color: var(--gray);
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin-left: 0em;
|
|
||||||
border-left: 3px solid var(--secondary);
|
|
||||||
padding-left: 1em;
|
|
||||||
transition: border-color 0.2s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border-color: var(--tertiary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
padding: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
td, th {
|
|
||||||
padding: 0.1em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footnotes p {
|
|
||||||
margin: 0.5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
display: flex;
|
|
||||||
margin-top: 2em;
|
|
||||||
gap: 1.5em;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > li {
|
|
||||||
text-align: center;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
& a {
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
& a[href$="#"] {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.section {
|
|
||||||
& h3 > a {
|
|
||||||
font-weight: 700;
|
|
||||||
font-family: Inter;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
& p {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
& > .meta {
|
|
||||||
margin: 1.5em 0 1em 0;
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .tags {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
& .meta {
|
|
||||||
& > h1 {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
& > p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > li {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
& > li > a {
|
|
||||||
border-radius: 8px;
|
|
||||||
border: var(--outlinegray) 1px solid;
|
|
||||||
padding: 0.2em 0.5em;
|
|
||||||
&::before {
|
|
||||||
content: "#";
|
|
||||||
margin-right: 0.3em;
|
|
||||||
color: var(--outlinegray);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& a {
|
|
||||||
font-family: Source Sans Pro;
|
|
||||||
font-weight: 600;
|
|
||||||
|
|
||||||
&.internal-link {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: transparentize(#8f9fa9, 0.85);
|
|
||||||
padding: 0 0.1em;
|
|
||||||
margin: auto -0.1em;
|
|
||||||
border-radius: 3px;
|
|
||||||
|
|
||||||
&.broken {
|
|
||||||
opacity: 0.5;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& p {
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.backlinks a {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup > a {
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0 0.1em 0 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
font-family: Inter, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 700;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
color: var(--secondary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--tertiary) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
font-family: 'Fira Code';
|
|
||||||
padding: 0.75em;
|
|
||||||
border-radius: 3px;
|
|
||||||
overflow-x: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: 'Fira Code';
|
|
||||||
font-size: 0.85em;
|
|
||||||
padding: 0.15em 0.3em;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: var(--lightgray);
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
|
|
||||||
&:lang(ar) {
|
|
||||||
& p, & h1, & h2, & h3, article {
|
|
||||||
direction: rtl;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
height: 100vh;
|
|
||||||
width: 100vw;
|
|
||||||
//overflow-x: hidden;
|
|
||||||
max-width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: var(--light);
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeIn {
|
|
||||||
0% {opacity:0;}
|
|
||||||
100% {opacity:1;}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
margin-top: 4em;
|
|
||||||
text-align: center;
|
|
||||||
& ul {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
width: 25%;
|
|
||||||
margin: 4em auto;
|
|
||||||
height: 2px;
|
|
||||||
border-radius: 1px;
|
|
||||||
border-width: 0;
|
|
||||||
color: var(--dark);
|
|
||||||
background-color: var(--dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.singlePage {
|
|
||||||
padding: 4em 30vw;
|
|
||||||
|
|
||||||
@media all and (max-width: 1200px) {
|
|
||||||
padding: 25px 5vw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-end {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 2em;
|
|
||||||
|
|
||||||
@media all and (max-width: 780px) {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > * {
|
|
||||||
flex: 1 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .backlinks-container {
|
|
||||||
& > ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
& > li {
|
|
||||||
margin: 0.5em 0;
|
|
||||||
padding: 0.25em 1em;
|
|
||||||
border: var(--outlinegray) 1px solid;
|
|
||||||
border-radius: 5px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& #graph-container {
|
|
||||||
border: var(--outlinegray) 1px solid;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.centered {
|
|
||||||
margin-top: 30vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
article > h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
& > h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > nav {
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .spacer {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > svg {
|
|
||||||
cursor: pointer;
|
|
||||||
width: 18px;
|
|
||||||
min-width: 18px;
|
|
||||||
margin: 0 1em;
|
|
||||||
|
|
||||||
&:hover .search-path {
|
|
||||||
stroke: var(--tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-path {
|
|
||||||
stroke: var(--gray);
|
|
||||||
stroke-width: 2px;
|
|
||||||
transition: stroke 0.5s ease;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#search-container {
|
|
||||||
position: fixed;
|
|
||||||
z-index: 9999;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100vw;
|
|
||||||
height: 100%;
|
|
||||||
overflow: scroll;
|
|
||||||
display: none;
|
|
||||||
backdrop-filter: blur(4px);
|
|
||||||
-webkit-backdrop-filter: blur(4px);
|
|
||||||
|
|
||||||
& > div {
|
|
||||||
width: 50%;
|
|
||||||
margin-top: 15vh;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
|
|
||||||
@media all and (max-width: 1200px) {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > * {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: var(--light);
|
|
||||||
box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);
|
|
||||||
margin-bottom: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > input {
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0.5em 1em;
|
|
||||||
font-family: Inter, sans-serif;
|
|
||||||
color: var(--dark);
|
|
||||||
font-size: 1.1em;
|
|
||||||
border: 1px solid var(--outlinegray);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > #results-container {
|
|
||||||
& > .result-card {
|
|
||||||
padding: 1em;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.2s ease;
|
|
||||||
border: 1px solid var(--outlinegray);
|
|
||||||
border-bottom: none;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
// normalize button props
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: 100%;
|
|
||||||
line-height: 1.15;
|
|
||||||
margin: 0;
|
|
||||||
overflow: visible;
|
|
||||||
text-transform: none;
|
|
||||||
text-align: left;
|
|
||||||
background: var(--light);
|
|
||||||
outline: none;
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
background: rgba(180, 180, 180, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:first-of-type {
|
|
||||||
border-top-left-radius: 5px;
|
|
||||||
border-top-right-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-of-type {
|
|
||||||
border-bottom-left-radius: 5px;
|
|
||||||
border-bottom-right-radius: 5px;
|
|
||||||
border-bottom: 1px solid var(--outlinegray);
|
|
||||||
}
|
|
||||||
|
|
||||||
& > h3, & > p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
& .search-highlight {
|
|
||||||
background-color: #afbfc966;
|
|
||||||
padding: 0.05em 0.2em;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
& > li {
|
|
||||||
border: 1px solid var(--outlinegray);
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 0 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
|
|
||||||
& h3 {
|
|
||||||
opacity: 1;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
& .meta {
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes dropin {
|
|
||||||
0% {
|
|
||||||
display: none;
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
1% {
|
|
||||||
display: inline-block;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translate(-50%, 40%);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
transform: translate(-50%, 20%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.popover {
|
|
||||||
z-index: 999;
|
|
||||||
position: absolute;
|
|
||||||
width: 20em;
|
|
||||||
display: none;
|
|
||||||
background-color: var(--light);
|
|
||||||
padding: 1em;
|
|
||||||
border: 1px solid var(--outlinegray);
|
|
||||||
border-radius: 5px;
|
|
||||||
transform: translate(-50%, 40%);
|
|
||||||
pointer-events: none;
|
|
||||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
||||||
user-select: none;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
box-shadow: 6px 6px 36px 0px rgba(0,0,0,0.25);
|
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.visible {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
transform: translate(-50%, 20%);
|
|
||||||
display: inline-block;
|
|
||||||
animation: dropin 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > h3 {
|
|
||||||
font-size: 1rem;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .meta {
|
|
||||||
margin-top: 0.25em;
|
|
||||||
opacity: 0.5;
|
|
||||||
font-family: "JetBrains Mono", monospace;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > p {
|
|
||||||
margin: 0;
|
|
||||||
font-weight: 400;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#contact_buttons ul {
|
|
||||||
list-style-type: none;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
li a {
|
|
||||||
padding: 0 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,270 +0,0 @@
|
|||||||
// Add your own CSS here!
|
|
||||||
:root {
|
|
||||||
--light: #1e1e21 !important;
|
|
||||||
--dark: #fbfffe !important;
|
|
||||||
--secondary: #6b879a !important;
|
|
||||||
--visited: #4a575e !important;
|
|
||||||
--tertiary: #84a59d !important;
|
|
||||||
--primary: #f58382 !important;
|
|
||||||
--gray: #d4d4d4 !important;
|
|
||||||
--lightgray: #292633 !important;
|
|
||||||
--outlinegray: #343434 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
[saved-theme="dark"] {
|
|
||||||
--light: #faf8f8;
|
|
||||||
--dark: #141021;
|
|
||||||
--secondary: #284b63;
|
|
||||||
--tertiary: #84a59d;
|
|
||||||
--visited: #afbfc9;
|
|
||||||
--primary: #f28482;
|
|
||||||
--gray: #4e4e4e;
|
|
||||||
--lightgray: #f0f0f0;
|
|
||||||
--outlinegray: #dadada;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--text-accent: rgb(238, 27, 231);
|
|
||||||
--background-primary-alt: #000;
|
|
||||||
}
|
|
||||||
.theme-dark {
|
|
||||||
--text-accent: rgb(238, 27, 231);
|
|
||||||
--background-primary-alt: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-size: 24px;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body, body.theme-dark {
|
|
||||||
color: #fff;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-size: .75rem;
|
|
||||||
background: #111;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1em;
|
|
||||||
font-smoothing: antialiased;
|
|
||||||
text-size-adjust: 100%;
|
|
||||||
-ms-text-size-adjust: 100%;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#page-title a { display: flex; align-items: center; color: #fff; font-size: .75rem; }
|
|
||||||
#page-title img { margin-right: 15px; }
|
|
||||||
|
|
||||||
.mainTOC { background: #222; }
|
|
||||||
|
|
||||||
article a {
|
|
||||||
color: rgb(238, 27, 231); background: none;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #ee1be7 !important; text-decoration: underline !important;
|
|
||||||
}
|
|
||||||
article a.internal-link { background: none; }
|
|
||||||
|
|
||||||
article h2 {
|
|
||||||
margin-top: 2rem; font-size: 1.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
p, article, article p, article li, article a, .page-end>.backlinks-container>ul>li {
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
line-height: 29px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
#TableOfContents>ol>li::marker {
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
header { justify-content: space-between; }
|
|
||||||
header>.spacer { display: none; }
|
|
||||||
|
|
||||||
.mainTOC {
|
|
||||||
margin: 1rem 0; cursor: pointer;
|
|
||||||
}
|
|
||||||
.mainTOC details summary, .mainTOC details[open] summary {
|
|
||||||
color: #888; cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, ol a, ul a, thead a {
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
font-weight: revert;
|
|
||||||
margin: revert;
|
|
||||||
padding: revert;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.theme-dark h1,
|
|
||||||
body.theme-dark h2,
|
|
||||||
body.theme-dark h3,
|
|
||||||
body.theme-dark h4,
|
|
||||||
body.theme-dark h5,
|
|
||||||
body.theme-dark h6,
|
|
||||||
body.theme-dark .page-header {
|
|
||||||
font-family: 'Playfair Display', serif;
|
|
||||||
margin-top: 45px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-header {
|
|
||||||
font-size: 2.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-preview-view h1 {
|
|
||||||
font-size: 32px;
|
|
||||||
font-family: 'Playfair Display', sans-serif;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-preview-view {
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 26px;
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-preview-view .internal-link.is-unresolved {
|
|
||||||
opacity: .75;
|
|
||||||
}
|
|
||||||
.published-container.is-readable-line-width .site-body {
|
|
||||||
justify-content: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-body-left-column-site-name {
|
|
||||||
padding-left: 60px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-body-left-column {
|
|
||||||
flex: 0 0 330px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.published-container.is-readable-line-width .site-body-center-column {
|
|
||||||
flex: 0 1 940px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-body-left-column-site-name:before {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
background: url(https://overment.com/images/logo-icon.svg);
|
|
||||||
background-size: cover;
|
|
||||||
position: absolute;
|
|
||||||
left: 20px;
|
|
||||||
top: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-navigation .site-body-left-column {
|
|
||||||
background: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
img[alt="overment"] { width: 200px; margin: 0 auto; display: block; }
|
|
||||||
img[alt="avatar"] { width: 150px; display: block; }
|
|
||||||
.logo { width: 50px; margin: 0; }
|
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
.site-body-left-column-site-name:before {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
body.theme-dark {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, {
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-preview-view {
|
|
||||||
font-size: 1.3rem;
|
|
||||||
line-height: 1.7rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.newsletter-btn {
|
|
||||||
background: #232323;
|
|
||||||
color: #ff40ff;
|
|
||||||
font-weight: bold;
|
|
||||||
border-radius: 5px;
|
|
||||||
width: 115px;
|
|
||||||
height: 50px;
|
|
||||||
position: fixed;
|
|
||||||
right: 20px;
|
|
||||||
bottom: 20px;
|
|
||||||
border: 1px solid #ff40ff;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: .2s all ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newsletter-btn:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.tree,
|
|
||||||
.tree ol {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tree ol {
|
|
||||||
padding-left: 1em;
|
|
||||||
padding-top: 5px;
|
|
||||||
}
|
|
||||||
.tree summary {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.tree a{
|
|
||||||
font-weight:unset;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.active{
|
|
||||||
color: #ff40ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.menu {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
background: #000;
|
|
||||||
padding: 25px 35px 0 0;
|
|
||||||
min-width: 250px;
|
|
||||||
max-width: 250px;
|
|
||||||
margin-right: 40px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu details {
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.singlePage {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.singlePage img {
|
|
||||||
max-width: 500px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
.darkmode {
|
|
||||||
float: right;
|
|
||||||
padding: 1em;
|
|
||||||
min-width: 30px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
@media all and (max-width: 450px) {
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .toggle {
|
|
||||||
display: none;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
& svg {
|
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
top: calc(50% - 10px);
|
|
||||||
margin: 0 7px;
|
|
||||||
fill: var(--gray);
|
|
||||||
transition: opacity 0.1s ease;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle:checked ~ label {
|
|
||||||
& > #dayIcon {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
& > #nightIcon {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle:not(:checked) ~ label {
|
|
||||||
& > #dayIcon {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
& > #nightIcon {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
/* Background */ .chroma { color: #f8f8f2; background-color: #282a36; overflow: hidden }
|
|
||||||
/* Other */ .chroma .x { }
|
|
||||||
/* Error */ .chroma .err { }
|
|
||||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
|
||||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
|
||||||
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
|
|
||||||
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
|
||||||
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
|
||||||
/* Keyword */ .chroma .k { color: #ff79c6 }
|
|
||||||
/* KeywordConstant */ .chroma .kc { color: #ff79c6 }
|
|
||||||
/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic }
|
|
||||||
/* KeywordNamespace */ .chroma .kn { color: #ff79c6 }
|
|
||||||
/* KeywordPseudo */ .chroma .kp { color: #ff79c6 }
|
|
||||||
/* KeywordReserved */ .chroma .kr { color: #ff79c6 }
|
|
||||||
/* KeywordType */ .chroma .kt { color: #8be9fd }
|
|
||||||
/* Name */ .chroma .n { }
|
|
||||||
/* NameAttribute */ .chroma .na { color: #50fa7b }
|
|
||||||
/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameBuiltinPseudo */ .chroma .bp { }
|
|
||||||
/* NameClass */ .chroma .nc { color: #50fa7b }
|
|
||||||
/* NameConstant */ .chroma .no { }
|
|
||||||
/* NameDecorator */ .chroma .nd { }
|
|
||||||
/* NameEntity */ .chroma .ni { }
|
|
||||||
/* NameException */ .chroma .ne { }
|
|
||||||
/* NameFunction */ .chroma .nf { color: #50fa7b }
|
|
||||||
/* NameFunctionMagic */ .chroma .fm { }
|
|
||||||
/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameNamespace */ .chroma .nn { }
|
|
||||||
/* NameOther */ .chroma .nx { }
|
|
||||||
/* NameProperty */ .chroma .py { }
|
|
||||||
/* NameTag */ .chroma .nt { color: #ff79c6 }
|
|
||||||
/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameVariableMagic */ .chroma .vm { }
|
|
||||||
/* Literal */ .chroma .l { }
|
|
||||||
/* LiteralDate */ .chroma .ld { }
|
|
||||||
/* LiteralString */ .chroma .s { color: #f1fa8c }
|
|
||||||
/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c }
|
|
||||||
/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c }
|
|
||||||
/* LiteralStringChar */ .chroma .sc { color: #f1fa8c }
|
|
||||||
/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c }
|
|
||||||
/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c }
|
|
||||||
/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c }
|
|
||||||
/* LiteralStringEscape */ .chroma .se { color: #f1fa8c }
|
|
||||||
/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c }
|
|
||||||
/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c }
|
|
||||||
/* LiteralStringOther */ .chroma .sx { color: #f1fa8c }
|
|
||||||
/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c }
|
|
||||||
/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c }
|
|
||||||
/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c }
|
|
||||||
/* LiteralNumber */ .chroma .m { color: #bd93f9 }
|
|
||||||
/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 }
|
|
||||||
/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 }
|
|
||||||
/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 }
|
|
||||||
/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 }
|
|
||||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 }
|
|
||||||
/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 }
|
|
||||||
/* Operator */ .chroma .o { color: #ff79c6 }
|
|
||||||
/* OperatorWord */ .chroma .ow { color: #ff79c6 }
|
|
||||||
/* Punctuation */ .chroma .p { }
|
|
||||||
/* Comment */ .chroma .c { color: #6272a4 }
|
|
||||||
/* CommentHashbang */ .chroma .ch { color: #6272a4 }
|
|
||||||
/* CommentMultiline */ .chroma .cm { color: #6272a4 }
|
|
||||||
/* CommentSingle */ .chroma .c1 { color: #6272a4 }
|
|
||||||
/* CommentSpecial */ .chroma .cs { color: #6272a4 }
|
|
||||||
/* CommentPreproc */ .chroma .cp { color: #ff79c6 }
|
|
||||||
/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 }
|
|
||||||
/* Generic */ .chroma .g { }
|
|
||||||
/* GenericDeleted */ .chroma .gd { color: #8b080b }
|
|
||||||
/* GenericEmph */ .chroma .ge { text-decoration: underline }
|
|
||||||
/* GenericError */ .chroma .gr { }
|
|
||||||
/* GenericHeading */ .chroma .gh { font-weight: bold }
|
|
||||||
/* GenericInserted */ .chroma .gi { font-weight: bold }
|
|
||||||
/* GenericOutput */ .chroma .go { color: #44475a }
|
|
||||||
/* GenericPrompt */ .chroma .gp { }
|
|
||||||
/* GenericStrong */ .chroma .gs { }
|
|
||||||
/* GenericSubheading */ .chroma .gu { font-weight: bold }
|
|
||||||
/* GenericTraceback */ .chroma .gt { }
|
|
||||||
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
|
||||||
/* TextWhitespace */ .chroma .w { }
|
|
||||||
|
|
||||||
.lntd:first-of-type > .chroma {
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chroma code {
|
|
||||||
font-family: 'Fira Code' !important;
|
|
||||||
font-size: 0.85em;
|
|
||||||
line-height: 1em;
|
|
||||||
background: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chroma {
|
|
||||||
border-radius: 3px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
Binary file not shown.
33
config.toml
33
config.toml
@ -1,33 +0,0 @@
|
|||||||
baseURL = "https://brain.overment.com/"
|
|
||||||
languageCode = "en-us"
|
|
||||||
googleAnalytics = ""
|
|
||||||
pygmentsUseClasses = true
|
|
||||||
relativeURLs = false
|
|
||||||
disablePathToLower = true
|
|
||||||
ignoreFiles = [
|
|
||||||
"/content/templates/*",
|
|
||||||
"/content/private/*",
|
|
||||||
]
|
|
||||||
summaryLength = 20
|
|
||||||
paginate = 10
|
|
||||||
enableGitInfo = true
|
|
||||||
pluralizelisttitles = false
|
|
||||||
|
|
||||||
[markup]
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe= true
|
|
||||||
[markup.tableOfContents]
|
|
||||||
endLevel = 3
|
|
||||||
ordered = true
|
|
||||||
startLevel = 2
|
|
||||||
[markup.highlight]
|
|
||||||
anchorLineNos = false
|
|
||||||
codeFences = true
|
|
||||||
guessSyntax = true
|
|
||||||
hl_Lines = ""
|
|
||||||
lineAnchors = ""
|
|
||||||
lineNoStart = 1
|
|
||||||
lineNos = true
|
|
||||||
lineNumbersInTable = true
|
|
||||||
style = "dracula"
|
|
||||||
tabWidth = 4
|
|
||||||
40
content/notes/CJK + Latex Support (测试).md
Normal file
40
content/notes/CJK + Latex Support (测试).md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
title: "CJK + Latex Support (测试)"
|
||||||
|
---
|
||||||
|
|
||||||
|
## Chinese, Japanese, Korean Support
|
||||||
|
几乎在我们意识到之前,我们已经离开了地面。
|
||||||
|
|
||||||
|
우리가 그것을 알기도 전에 우리는 땅을 떠났습니다.
|
||||||
|
|
||||||
|
私たちがそれを知るほぼ前に、私たちは地面を離れていました。
|
||||||
|
|
||||||
|
## Latex
|
||||||
|
|
||||||
|
Block math works with two dollar signs `$$...$$`
|
||||||
|
|
||||||
|
$$f(x) = \int_{-\infty}^\infty
|
||||||
|
f\hat(\xi),e^{2 \pi i \xi x}
|
||||||
|
\,d\xi$$
|
||||||
|
|
||||||
|
Inline math also works with single dollar signs `$...$`. For example, Euler's identity but inline: $e^{i\pi} = -1$
|
||||||
|
|
||||||
|
Aligned equations work quite well:
|
||||||
|
|
||||||
|
$$
|
||||||
|
\begin{aligned}
|
||||||
|
a &= b + c \\ &= e + f \\
|
||||||
|
\end{aligned}
|
||||||
|
$$
|
||||||
|
|
||||||
|
And matrices
|
||||||
|
|
||||||
|
$$
|
||||||
|
\begin{bmatrix}
|
||||||
|
1 & 2 & 3 \\
|
||||||
|
a & b & c
|
||||||
|
\end{bmatrix}
|
||||||
|
$$
|
||||||
|
|
||||||
|
## RTL
|
||||||
|
More information on configuring RTL languages like Arabic in the [config](notes/config.md) page.
|
||||||
63
content/notes/callouts.md
Normal file
63
content/notes/callouts.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
title: "Callouts"
|
||||||
|
---
|
||||||
|
|
||||||
|
## Callout support
|
||||||
|
|
||||||
|
Quartz supports the same Admonition-callout syntax as Obsidian.
|
||||||
|
|
||||||
|
This includes
|
||||||
|
- 12 Distinct callout types (each with several aliases)
|
||||||
|
- Collapsable callouts
|
||||||
|
|
||||||
|
See [documentation on supported types and syntax here](https://help.obsidian.md/How+to/Use+callouts#Types).
|
||||||
|
|
||||||
|
## Showcase
|
||||||
|
|
||||||
|
> [!EXAMPLE] Examples
|
||||||
|
>
|
||||||
|
> Aliases: example
|
||||||
|
|
||||||
|
> [!note] Notes
|
||||||
|
>
|
||||||
|
> Aliases: note
|
||||||
|
|
||||||
|
> [!abstract] Summaries
|
||||||
|
>
|
||||||
|
> Aliases: abstract, summary, tldr
|
||||||
|
|
||||||
|
> [!info] Info
|
||||||
|
>
|
||||||
|
> Aliases: info, todo
|
||||||
|
|
||||||
|
> [!tip] Hint
|
||||||
|
>
|
||||||
|
> Aliases: tip, hint, important
|
||||||
|
|
||||||
|
> [!success] Success
|
||||||
|
>
|
||||||
|
> Aliases: success, check, done
|
||||||
|
|
||||||
|
> [!question] Question
|
||||||
|
>
|
||||||
|
> Aliases: question, help, faq
|
||||||
|
|
||||||
|
> [!warning] Warning
|
||||||
|
>
|
||||||
|
> Aliases: warning, caution, attention
|
||||||
|
|
||||||
|
> [!failure] Failure
|
||||||
|
>
|
||||||
|
> Aliases: failure, fail, missing
|
||||||
|
|
||||||
|
> [!danger] Error
|
||||||
|
>
|
||||||
|
> Aliases: danger, error
|
||||||
|
|
||||||
|
> [!bug] Bug
|
||||||
|
>
|
||||||
|
> Aliases: bug
|
||||||
|
|
||||||
|
> [!quote] Quote
|
||||||
|
>
|
||||||
|
> Aliases: quote, cite
|
||||||
223
content/notes/config.md
Normal file
223
content/notes/config.md
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
---
|
||||||
|
title: "Configuration"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
Quartz is designed to be extremely configurable. You can find the bulk of the configuration scattered throughout the repository depending on how in-depth you'd like to get.
|
||||||
|
|
||||||
|
The majority of configuration can be found under `data/config.yaml`. An annotated example configuration is shown below.
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml"}
|
||||||
|
# The name to display in the footer
|
||||||
|
name: Jacky Zhao
|
||||||
|
|
||||||
|
# whether to globally show the table of contents on each page
|
||||||
|
# this can be turned off on a per-page basis by adding this to the
|
||||||
|
# front-matter of that note
|
||||||
|
enableToc: true
|
||||||
|
|
||||||
|
# whether to by-default open or close the table of contents on each page
|
||||||
|
openToc: false
|
||||||
|
|
||||||
|
# whether to display on-hover link preview cards
|
||||||
|
enableLinkPreview: true
|
||||||
|
|
||||||
|
# whether to render titles for code blocks
|
||||||
|
enableCodeBlockTitle: true
|
||||||
|
|
||||||
|
# whether to render copy buttons for code blocks
|
||||||
|
enableCodeBlockCopy: true
|
||||||
|
|
||||||
|
# whether to render callouts
|
||||||
|
enableCallouts: true
|
||||||
|
|
||||||
|
# whether to try to process Latex
|
||||||
|
enableLatex: true
|
||||||
|
|
||||||
|
# whether to enable single-page-app style rendering
|
||||||
|
# this prevents flashes of unstyled content and improves
|
||||||
|
# smoothness of Quartz. More info in issue #109 on GitHub
|
||||||
|
enableSPA: true
|
||||||
|
|
||||||
|
# whether to render a footer
|
||||||
|
enableFooter: true
|
||||||
|
|
||||||
|
# whether backlinks of pages should show the context in which
|
||||||
|
# they were mentioned
|
||||||
|
enableContextualBacklinks: true
|
||||||
|
|
||||||
|
# whether to show a section of recent notes on the home page
|
||||||
|
enableRecentNotes: false
|
||||||
|
|
||||||
|
# whether to display an 'edit' button next to the last edited field
|
||||||
|
# that links to github
|
||||||
|
enableGitHubEdit: true
|
||||||
|
GitHubLink: https://github.com/jackyzha0/quartz/tree/hugo/content
|
||||||
|
|
||||||
|
# whether to use Operand to power semantic search
|
||||||
|
# IMPORTANT: replace this API key with your own if you plan on using
|
||||||
|
# Operand search!
|
||||||
|
enableSemanticSearch: false
|
||||||
|
operandApiKey: "REPLACE-WITH-YOUR-OPERAND-API-KEY"
|
||||||
|
|
||||||
|
# page description used for SEO
|
||||||
|
description:
|
||||||
|
Host your second brain and digital garden for free. Quartz features extremely fast full-text search,
|
||||||
|
Wikilink support, backlinks, local graph, tags, and link previews.
|
||||||
|
|
||||||
|
# title of the home page (also for SEO)
|
||||||
|
page_title:
|
||||||
|
"🪴 Quartz 3.3"
|
||||||
|
|
||||||
|
# links to show in the footer
|
||||||
|
links:
|
||||||
|
- link_name: Twitter
|
||||||
|
link: https://twitter.com/_jzhao
|
||||||
|
- link_name: Github
|
||||||
|
link: https://github.com/jackyzha0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Block Titles
|
||||||
|
To add code block titles with Quartz:
|
||||||
|
|
||||||
|
1. Ensure that code block titles are enabled in Quartz's configuration:
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml", linenos=false}
|
||||||
|
enableCodeBlockTitle: true
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Add the `title` attribute to the desired [code block
|
||||||
|
fence](https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences):
|
||||||
|
|
||||||
|
```markdown {linenos=false}
|
||||||
|
```yaml {title="data/config.yaml"}
|
||||||
|
enableCodeBlockTitle: true # example from step 1
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note** that if `{title=<my-title>}` is included, and code block titles are not
|
||||||
|
enabled, no errors will occur, and the title attribute will be ignored.
|
||||||
|
|
||||||
|
### HTML Favicons
|
||||||
|
If you would like to customize the favicons of your Quartz-based website, you
|
||||||
|
can add them to the `data/config.yaml` file. The **default** without any set
|
||||||
|
`favicon` key is:
|
||||||
|
|
||||||
|
```html {title="layouts/partials/head.html", linenostart=15}
|
||||||
|
<link rel="shortcut icon" href="icon.png" type="image/png">
|
||||||
|
```
|
||||||
|
|
||||||
|
The default can be overridden by defining a value to the `favicon` key in your
|
||||||
|
`data/config.yaml` file. For example, here is a `List[Dictionary]` example format, which is
|
||||||
|
equivalent to the default:
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml", linenos=false}
|
||||||
|
favicon:
|
||||||
|
- { rel: "shortcut icon", href: "icon.png", type: "image/png" }
|
||||||
|
# - { ... } # Repeat for each additional favicon you want to add
|
||||||
|
```
|
||||||
|
|
||||||
|
In this format, the keys are identical to their HTML representations.
|
||||||
|
|
||||||
|
If you plan to add multiple favicons generated by a website (see list below), it
|
||||||
|
may be easier to define it as HTML. Here is an example which appends the
|
||||||
|
**Apple touch icon** to Quartz's default favicon:
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml", linenos=false}
|
||||||
|
favicon: |
|
||||||
|
<link rel="shortcut icon" href="icon.png" type="image/png">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
|
```
|
||||||
|
|
||||||
|
This second favicon will now be used as a web page icon when someone adds your
|
||||||
|
webpage to the home screen of their Apple device. If you are interested in more
|
||||||
|
information about the current and past standards of favicons, you can read
|
||||||
|
[this article](https://www.emergeinteractive.com/insights/detail/the-essentials-of-favicons/).
|
||||||
|
|
||||||
|
**Note** that all generated favicon paths, defined by the `href`
|
||||||
|
attribute, are relative to the `static/` directory.
|
||||||
|
|
||||||
|
### Graph View
|
||||||
|
To customize the Interactive Graph view, you can poke around `data/graphConfig.yaml`.
|
||||||
|
|
||||||
|
```yaml {title="data/graphConfig.yaml"}
|
||||||
|
# if true, a Global Graph will be shown on home page with full width, no backlink.
|
||||||
|
# A different set of Local Graphs will be shown on sub pages.
|
||||||
|
# if false, Local Graph will be default on every page as usual
|
||||||
|
enableGlobalGraph: false
|
||||||
|
|
||||||
|
### Local Graph ###
|
||||||
|
localGraph:
|
||||||
|
# whether automatically generate a legend
|
||||||
|
enableLegend: false
|
||||||
|
|
||||||
|
# whether to allow dragging nodes in the graph
|
||||||
|
enableDrag: true
|
||||||
|
|
||||||
|
# whether to allow zooming and panning the graph
|
||||||
|
enableZoom: true
|
||||||
|
|
||||||
|
# how many neighbours of the current node to show (-1 is all nodes)
|
||||||
|
depth: 1
|
||||||
|
|
||||||
|
# initial zoom factor of the graph
|
||||||
|
scale: 1.2
|
||||||
|
|
||||||
|
# how strongly nodes should repel each other
|
||||||
|
repelForce: 2
|
||||||
|
|
||||||
|
# how strongly should nodes be attracted to the center of gravity
|
||||||
|
centerForce: 1
|
||||||
|
|
||||||
|
# what the default link length should be
|
||||||
|
linkDistance: 1
|
||||||
|
|
||||||
|
# how big the node labels should be
|
||||||
|
fontSize: 0.6
|
||||||
|
|
||||||
|
# scale at which to start fading the labes on nodes
|
||||||
|
opacityScale: 3
|
||||||
|
|
||||||
|
### Global Graph ###
|
||||||
|
globalGraph:
|
||||||
|
# same settings as above
|
||||||
|
|
||||||
|
### For all graphs ###
|
||||||
|
# colour specific nodes path off of their path
|
||||||
|
paths:
|
||||||
|
- /moc: "#4388cc"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Styling
|
||||||
|
Want to go even more in-depth? You can add custom CSS styling and change existing colours through editing `assets/styles/custom.scss`. If you'd like to target specific parts of the site, you can add ids and classes to the HTML partials in `/layouts/partials`.
|
||||||
|
|
||||||
|
### Partials
|
||||||
|
Partials are what dictate what gets rendered to the page. Want to change how pages are styled and structured? You can edit the appropriate layout in `/layouts`.
|
||||||
|
|
||||||
|
For example, the structure of the home page can be edited through `/layouts/index.html`. To customize the footer, you can edit `/layouts/partials/footer.html`
|
||||||
|
|
||||||
|
More info about partials on [Hugo's website.](https://gohugo.io/templates/partials/)
|
||||||
|
|
||||||
|
Still having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
||||||
|
|
||||||
|
## Language Support
|
||||||
|
[CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md) comes out of the box with Quartz.
|
||||||
|
|
||||||
|
Want to support languages that read from right-to-left (like Arabic)? Hugo (and by proxy, Quartz) supports this natively.
|
||||||
|
|
||||||
|
Follow the steps [Hugo provides here](https://gohugo.io/content-management/multilingual/#configure-languages) and modify your `config.toml`
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
defaultContentLanguage = 'ar'
|
||||||
|
[languages]
|
||||||
|
[languages.ar]
|
||||||
|
languagedirection = 'rtl'
|
||||||
|
title = 'مدونتي'
|
||||||
|
weight = 1
|
||||||
|
```
|
||||||
66
content/notes/editing.md
Normal file
66
content/notes/editing.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
title: "Editing Content in Quartz"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: -4
|
||||||
|
---
|
||||||
|
|
||||||
|
## Editing
|
||||||
|
Quartz runs on top of [Hugo](https://gohugo.io/) so all notes are written in [Markdown](https://www.markdownguide.org/getting-started/).
|
||||||
|
|
||||||
|
### Folder Structure
|
||||||
|
Here's a rough overview of what's what.
|
||||||
|
|
||||||
|
**All content in your garden can found in the `/content` folder.** To make edits, you can open any of the files and make changes directly and save it. You can organize content into any folder you'd like.
|
||||||
|
|
||||||
|
**To edit the main home page, open `/content/_index.md`.**
|
||||||
|
|
||||||
|
To create a link between notes in your garden, just create a normal link using Markdown pointing to the document in question. Please note that **all links should be relative to the root `/content` path**.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
For example, I want to link this current document to `notes/config.md`.
|
||||||
|
[A link to the config page](notes/config.md)
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, you can put local images anywhere in the `/content` folder.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
Example image (source is in content/notes/images/example.png)
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use wikilinks if that is what you are more comfortable with!
|
||||||
|
|
||||||
|
### Front Matter
|
||||||
|
Hugo is picky when it comes to metadata for files. Make sure that your title is double-quoted and that you have a title defined at the top of your file like so. You can also add tags here as well.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
title: "Example Title"
|
||||||
|
tags:
|
||||||
|
- example-tag
|
||||||
|
---
|
||||||
|
|
||||||
|
Rest of your content here...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Obsidian
|
||||||
|
I recommend using [Obsidian](http://obsidian.md/) as a way to edit and grow your digital garden. It comes with a really nice editor and graphical interface to preview all of your local files.
|
||||||
|
|
||||||
|
This step is **highly recommended**.
|
||||||
|
|
||||||
|
> 🔗 Step 3: [How to setup your Obsidian Vault to work with Quartz](notes/obsidian.md)
|
||||||
|
|
||||||
|
## Previewing Changes
|
||||||
|
This step is purely optional and mostly for those who want to see the published version of their digital garden locally before opening it up to the internet. This is *highly recommended* but not required.
|
||||||
|
|
||||||
|
> 👀 Step 4: [Preview Quartz Changes](notes/preview%20changes.md)
|
||||||
|
|
||||||
|
For those who like to live life more on the edge, viewing the garden through Obsidian gets you pretty close to the real thing.
|
||||||
|
|
||||||
|
## Publishing Changes
|
||||||
|
Now that you know the basics of managing your digital garden using Quartz, you can publish it to the internet!
|
||||||
|
|
||||||
|
> 🌍 Step 5: [Hosting Quartz online!](notes/hosting.md)
|
||||||
|
|
||||||
|
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
||||||
92
content/notes/hosting.md
Normal file
92
content/notes/hosting.md
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
---
|
||||||
|
title: "Deploying Quartz to the Web"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: -1
|
||||||
|
aliases:
|
||||||
|
- hosting
|
||||||
|
---
|
||||||
|
|
||||||
|
## Hosting on GitHub Pages
|
||||||
|
Quartz is designed to be effortless to deploy. If you forked and cloned Quartz directly from the repository, everything should already be good to go! Follow the steps below.
|
||||||
|
|
||||||
|
### Enable GitHub Actions
|
||||||
|
By default, GitHub disables workflows from running automatically on Forked Repostories. Head to the 'Actions' tab of your forked repository and Enable Workflows to setup deploying your Quartz site!
|
||||||
|
|
||||||
|
*Enable GitHub Actions*
|
||||||
|
|
||||||
|
### Enable GitHub Pages
|
||||||
|
|
||||||
|
Head to the 'Settings' tab of your forked repository and go to the 'Pages' tab.
|
||||||
|
|
||||||
|
1. (IMPORTANT) Set the source to deploy from `master` (and not `hugo`) using `/ (root)`
|
||||||
|
2. Set a custom domain here if you have one!
|
||||||
|
|
||||||
|
*Enable GitHub Pages*
|
||||||
|
|
||||||
|
### Pushing Changes
|
||||||
|
To see your changes on the internet, we need to push it them to GitHub. Quartz is a `git` repository so updating it is the same workflow as you would follow as if it were just a regular software project.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# Navigate to Quartz folder
|
||||||
|
cd <path-to-quartz>
|
||||||
|
|
||||||
|
# Commit all changes
|
||||||
|
git add .
|
||||||
|
git commit -m "message describing changes"
|
||||||
|
|
||||||
|
# Push to GitHub to update site
|
||||||
|
git push origin hugo
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: we specifically push to the `hugo` branch here. Our GitHub action automatically runs everytime a push to is detected to that branch and then updates the `master` branch for redeployment.
|
||||||
|
|
||||||
|
### Setting up the Site
|
||||||
|
Now let's get this site up and running. Never hosted a site before? No problem. Have a fancy custom domain you already own or want to subdomain your Quartz? That's easy too.
|
||||||
|
|
||||||
|
Here, we take advantage of GitHub's free page hosting to deploy our site. Change `baseURL` in `/config.toml`.
|
||||||
|
|
||||||
|
Make sure that your `baseURL` has a trailing `/`!
|
||||||
|
|
||||||
|
[Reference `config.toml` here](https://github.com/jackyzha0/quartz/blob/hugo/config.toml)
|
||||||
|
|
||||||
|
```toml
|
||||||
|
baseURL = "https://<YOUR-DOMAIN>/"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using this under a subdomain (e.g. `<YOUR-GITHUB-USERNAME>.github.io/quartz`), include the trailing `/`. **You need to do this especially if you are using GitHub!**
|
||||||
|
|
||||||
|
```toml
|
||||||
|
baseURL = "https://<YOUR-GITHUB-USERNAME>.github.io/quartz/"
|
||||||
|
```
|
||||||
|
|
||||||
|
Change `cname` in `/.github/workflows/deploy.yaml`. Again, if you don't have a custom domain to use, you can use `<YOUR-USERNAME>.github.io`.
|
||||||
|
|
||||||
|
Please note that the `cname` field should *not* have any path `e.g. end with /quartz` or have a trailing `/`.
|
||||||
|
|
||||||
|
[Reference `deploy.yaml` here](https://github.com/jackyzha0/quartz/blob/hugo/.github/workflows/deploy.yaml)
|
||||||
|
|
||||||
|
```yaml {title=".github/workflows/deploy.yaml"}
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }} # this can stay as is, GitHub fills this in for us!
|
||||||
|
publish_dir: ./public
|
||||||
|
publish_branch: master
|
||||||
|
cname: <YOUR-DOMAIN>
|
||||||
|
```
|
||||||
|
|
||||||
|
Have a custom domain? [Learn how to set it up with Quartz ](notes/custom%20Domain.md).
|
||||||
|
|
||||||
|
### Ignoring Files
|
||||||
|
Only want to publish a subset of all of your notes? Don't worry, Quartz makes this a simple two-step process.
|
||||||
|
|
||||||
|
❌ [Excluding pages from being published](notes/ignore%20notes.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Now that your Quartz is live, let's figure out how to make Quartz really *yours*!
|
||||||
|
|
||||||
|
> Step 6: 🎨 [Customizing Quartz](notes/config.md)
|
||||||
|
|
||||||
|
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
||||||
32
content/notes/obsidian.md
Normal file
32
content/notes/obsidian.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
title: "Obsidian Vault Integration"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: -3
|
||||||
|
---
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
Obsidian is the preferred way to use Quartz. You can either create a new Obsidian Vault or link one that your already have.
|
||||||
|
|
||||||
|
### New Vault
|
||||||
|
If you don't have an existing Vault, [download Obsidian](https://obsidian.md/) and create a new Vault in the `/content` folder that you created and cloned during the [setup](notes/setup.md) step.
|
||||||
|
|
||||||
|
### Linking an existing Vault
|
||||||
|
The easiest way to use an existing Vault is to copy all of your files (directory and hierarchies intact) into the `/content` folder.
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
Great, now that you have your Obsidian linked to your Quartz, let's fix some settings so that they play well.
|
||||||
|
|
||||||
|
1. Under Options > Files and Links, set the New link format to always use Absolute Path in Vault.
|
||||||
|
2. Go to Settings > Files & Links > Turn "on" automatically update internal links.
|
||||||
|
|
||||||
|
*Obsidian Settings*
|
||||||
|
|
||||||
|
## Templates
|
||||||
|
Inserting front matter everytime you want to create a new Note gets annoying really quickly. Luckily, Obsidian supports templates which makes inserting new content really easily.
|
||||||
|
|
||||||
|
**If you decide to overwrite the `/content` folder completely, don't remove the `/content/templates` folder!**
|
||||||
|
|
||||||
|
Head over to Options > Core Plugins and enable the Templates plugin. Then go to Options > Hotkeys and set a hotkey for 'Insert Template' (I recommend `[cmd]+T`). That way, when you create a new note, you can just press the hotkey for a new template and be ready to go!
|
||||||
|
|
||||||
|
> 👀 Step 4: [Preview Quartz Changes](notes/preview%20changes.md)
|
||||||
37
content/notes/preview changes.md
Normal file
37
content/notes/preview changes.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
title: "Preview Changes"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: -2
|
||||||
|
---
|
||||||
|
|
||||||
|
If you'd like to preview what your Quartz site looks like before deploying it to the internet, here's exactly how to do that!
|
||||||
|
|
||||||
|
Note that both of these steps need to be completed.
|
||||||
|
|
||||||
|
## Install `hugo-obsidian`
|
||||||
|
This step will generate the list of backlinks for Hugo to parse. Ensure you have [Go](https://golang.org/doc/install) (>= 1.16) installed.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install and link `hugo-obsidian` locally
|
||||||
|
go install github.com/jackyzha0/hugo-obsidian@latest
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are running into an error saying that `command not found: hugo-obsidian`, make sure you set your `GOPATH` correctly! This will allow your terminal to correctly recognize hugo-obsidian as an executable.
|
||||||
|
|
||||||
|
Afterwards, start the Hugo server as shown above and your local backlinks and interactive graph should be populated!
|
||||||
|
|
||||||
|
## Installing Hugo
|
||||||
|
Hugo is the static site generator that powers Quartz. [Install Hugo with "extended" Sass/SCSS version](https://gohugo.io/getting-started/installing/) first. Then,
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Navigate to your local Quartz folder
|
||||||
|
cd <location-of-your-local-quartz>
|
||||||
|
|
||||||
|
# Start local server
|
||||||
|
make serve
|
||||||
|
|
||||||
|
# View your site in a browser at http://localhost:1313/
|
||||||
|
```
|
||||||
|
|
||||||
|
> 🌍 Step 5: [Hosting Quartz online!](notes/hosting.md)
|
||||||
50
content/notes/search.md
Normal file
50
content/notes/search.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
title: "Search"
|
||||||
|
---
|
||||||
|
|
||||||
|
Quartz supports two modes of searching through content.
|
||||||
|
|
||||||
|
## Full-text
|
||||||
|
Full-text search is the default in Quartz. It produces results that *exactly* match the search query. This is easier to setup but usually produces lower quality matches.
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml"}
|
||||||
|
# the default option
|
||||||
|
enableSemanticSearch: false
|
||||||
|
```
|
||||||
|
|
||||||
|
## Natural Language
|
||||||
|
Natural language search is powered by [Operand](https://operand.ai/). It understands language like a person does and finds results that best match user intent. In this sense, it is closer to how Google Search works.
|
||||||
|
|
||||||
|
Natural language search tends to produce higher quality results than full-text search.
|
||||||
|
|
||||||
|
Here's how to set it up.
|
||||||
|
|
||||||
|
1. Create an Operand Account on [their website](https://operand.ai/).
|
||||||
|
2. Go to Dashboard > Settings > Integrations.
|
||||||
|
3. Follow the steps to setup the GitHub integration. Operand needs access to GitHub in order to index your digital garden properly!
|
||||||
|
4. Head over to Dashboard > Objects and press `(Cmd + K)` to open the omnibar and select 'Create Collection'.
|
||||||
|
1. Set the 'Collection Label' to something that will help you remember it.
|
||||||
|
2. You can leave the 'Parent Collection' field empty.
|
||||||
|
5. Click into your newly made Collection.
|
||||||
|
1. Press the 'share' button that looks like three dots connected by lines.
|
||||||
|
2. Set the 'Interface Type' to `object-search` and click 'Create'.
|
||||||
|
3. This will bring you to a new page with a search bar. Ignore this for now.
|
||||||
|
6. Go back to Dashboard > Settings > API Keys and find your Quartz-specific Operand API key under 'Other keys'.
|
||||||
|
1. Copy the key (which looks something like `0e733a7f-9b9c-48c6-9691-b54fa1c8b910`).
|
||||||
|
2. Open `data/config.yaml`. Set `enableSemanticSearch` to `true` and `operandApiKey` to your copied key.
|
||||||
|
|
||||||
|
```yaml {title="data/config.yaml"}
|
||||||
|
# the default option
|
||||||
|
enableSemanticSearch: true
|
||||||
|
operandApiKey: "0e733a7f-9b9c-48c6-9691-b54fa1c8b910"
|
||||||
|
```
|
||||||
|
7. Make a commit and push your changes to GitHub. See the [[notes/hosting|hosting]] page if you haven't done this already.
|
||||||
|
1. This step is *required* for Operand to be able to properly index your content.
|
||||||
|
2. Head over to Dashboard > Objects and select the collection that you made earlier
|
||||||
|
8. Press `(Cmd + K)` to open the omnibar again and select 'Create GitHub Repo'
|
||||||
|
1. Set the 'Repository Label' to `Quartz`
|
||||||
|
2. Set the 'Repository Owner' to your GitHub username
|
||||||
|
3. Set the 'Repository Ref' to `master`
|
||||||
|
4. Set the 'Repository Name' to the name of your repository (usually just `quartz` if you forked the repository without changing the name)
|
||||||
|
5. Leave 'Root Path' and 'Root URL' empty
|
||||||
|
9. Wait for your repository to index and enjoy natural language search in Quartz! Operand refreshes the index every 2h so all you need to do is just push to GitHub to update the contents in the search.
|
||||||
32
content/notes/setup.md
Normal file
32
content/notes/setup.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
title: "Setup"
|
||||||
|
tags:
|
||||||
|
- setup
|
||||||
|
weight: -5
|
||||||
|
---
|
||||||
|
|
||||||
|
## Making your own Quartz
|
||||||
|
Setting up Quartz requires a basic understanding of `git`. If you are unfamiliar, [this resource](https://resources.nwplus.io/2-beginner/how-to-git-github.html) is a great place to start!
|
||||||
|
|
||||||
|
### Forking
|
||||||
|
> A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
|
||||||
|
|
||||||
|
Navigate to the GitHub repository for the Quartz project:
|
||||||
|
|
||||||
|
📁 [Quartz Repository](https://github.com/jackyzha0/quartz)
|
||||||
|
|
||||||
|
Then, Fork the repository into your own GitHub account. If you don't have an account, you can make on for free [here](https://github.com/join). More details about forking a repo can be found on [GitHub's documentation](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
||||||
|
|
||||||
|
### Cloning
|
||||||
|
After you've made a fork of the repository, you need to download the files locally onto your machine. Ensure you have `git`, then type the following command replacing `YOUR-USERNAME` with your GitHub username.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/YOUR-USERNAME/quartz
|
||||||
|
```
|
||||||
|
|
||||||
|
## Editing
|
||||||
|
Great! Now you have everything you need to start editing and growing your digital garden. If you're ready to start writing content already, check out the recommended flow for editing notes in Quartz.
|
||||||
|
|
||||||
|
> ✏️ Step 2: [Editing Notes in Quartz](notes/editing.md)
|
||||||
|
|
||||||
|
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
|
||||||
22
content/notes/showcase.md
Normal file
22
content/notes/showcase.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
title: "Showcase"
|
||||||
|
---
|
||||||
|
|
||||||
|
Want to see what Quartz can do? Here are some cool community gardens :)
|
||||||
|
|
||||||
|
- [Quartz Documentation (this site!)](https://quartz.jzhao.xyz/)
|
||||||
|
- [Jacky Zhao's Garden](https://jzhao.xyz/)
|
||||||
|
- [Scaling Synthesis - A hypertext research notebook](https://scalingsynthesis.com/)
|
||||||
|
- [AWAGMI Intern Notes](https://notes.awagmi.xyz/)
|
||||||
|
- [Shihyu's PKM](https://shihyuho.github.io/pkm/)
|
||||||
|
- [Chloe's Garden](https://garden.chloeabrasada.online/)
|
||||||
|
- [SlRvb's Site](https://slrvb.github.io/Site/)
|
||||||
|
- [Course notes for Information Technology Advanced Theory](https://a2itnotes.github.io/quartz/)
|
||||||
|
- [Brandon Boswell's Garden](https://brandonkboswell.com)
|
||||||
|
- [Siyang's Courtyard](https://siyangsun.github.io/courtyard/)
|
||||||
|
- [Data Dictionary 🧠](https://glossary.airbyte.com/)
|
||||||
|
- [sspaeti.com's Second Brain](https://brain.sspaeti.com/)
|
||||||
|
- [oldwinterの数字花园](https://garden.oldwinter.top/)
|
||||||
|
- [SethMB Work](https://sethmb.xyz/)
|
||||||
|
|
||||||
|
If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/hugo/content/notes/showcase.md)!
|
||||||
34
content/notes/updating.md
Normal file
34
content/notes/updating.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "Updating"
|
||||||
|
aliases:
|
||||||
|
- update
|
||||||
|
---
|
||||||
|
|
||||||
|
Haven't updated Quartz in a while and want all the cool new optimizations? On Unix/Mac systems you can run the following command for a one-line update! This command will show you a log summary of all commits since you last updated, press `q` to acknowledge this. Then, it will show you each change in turn and press `y` to accept the patch or `n` to reject it. Usually you should press `y` for most of these unless it conflicts with existing changes you've made!
|
||||||
|
|
||||||
|
```shell
|
||||||
|
make update
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, if you don't want the interactive parts and just want to force update your local garden (this assumed that you are okay with some of your personalizations been overriden!)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
make update-force
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, manually checkout the changes yourself.
|
||||||
|
|
||||||
|
> [!warning] Warning!
|
||||||
|
>
|
||||||
|
> If you customized the files in `data/`, or anything inside `layouts/`, your customization may be overwritten!
|
||||||
|
> Make sure you have a copy of these changes if you don't want to lose them.
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# add Quartz as a remote host
|
||||||
|
git remote add upstream git@github.com:jackyzha0/quartz.git
|
||||||
|
|
||||||
|
# index and fetch changes
|
||||||
|
git fetch upstream
|
||||||
|
git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
|
||||||
|
```
|
||||||
@ -1,14 +0,0 @@
|
|||||||
name: Adam Gospodarczyk
|
|
||||||
enableToc: false
|
|
||||||
aopenToc: false
|
|
||||||
enableLinkPreview: false
|
|
||||||
enableLatex: false
|
|
||||||
description:
|
|
||||||
This is where I share everything I know with you. I created it primarily for myself, so that I can easily return to all the material posted here. At the same time, I thought you might find it all equally valuable to you.
|
|
||||||
page_title:
|
|
||||||
"brain.overment.com"
|
|
||||||
links:
|
|
||||||
- link_name: Twitter
|
|
||||||
link: https://twitter.com/_overment
|
|
||||||
- link_name: Github
|
|
||||||
link: https://github.com/iceener
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
enableLegend: false
|
|
||||||
enableDrag: true
|
|
||||||
enableZoom: true
|
|
||||||
depth: -1 # set to -1 to show full graph
|
|
||||||
paths:
|
|
||||||
- /moc: "#4388cc"
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="singlePage">
|
|
||||||
<div class="centered">
|
|
||||||
<h1>404.</h1>
|
|
||||||
<h3>Hey! You look a little lost. This page doesn't exist (or may be private).</h3>
|
|
||||||
<a href="{{ .Site.BaseURL }}">↳ Let's get you home.</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
{{$src := .Destination | safeURL }}
|
|
||||||
{{$external := strings.HasPrefix $src "http" }}
|
|
||||||
{{- if $external -}}
|
|
||||||
<img src="{{ $src }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
|
|
||||||
{{- else -}}
|
|
||||||
{{$fixedUrl := (cond (hasPrefix $src "/") $src (print "/" $src)) | urlize}}
|
|
||||||
<img src="{{ $fixedUrl }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
|
|
||||||
{{- end -}}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
|
||||||
{{$dashedurl := replace $trimmed "%20" "-" }}
|
|
||||||
{{$external := strings.HasPrefix $dashedurl "http" }}
|
|
||||||
{{- if $external -}}
|
|
||||||
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
|
||||||
{{- else -}}
|
|
||||||
{{$spacedurl := replace $trimmed "%20" " " }}
|
|
||||||
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
|
|
||||||
{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}}
|
|
||||||
{{$rooted := default $spacedurl (strings.TrimRight "/" (.Page.GetPage $spacedurl).RelPermalink) }}
|
|
||||||
<a
|
|
||||||
{{if not $nonexistent}}href="{{$rooted}}"{{end}}
|
|
||||||
rel="noopener" class="internal-link{{if $nonexistent}} broken{{end}}"
|
|
||||||
data-src="{{$rooted}}">{{- .Text | safeHTML -}}
|
|
||||||
</a>
|
|
||||||
{{- end -}}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
{{ block "head" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{ block "main" . }}
|
|
||||||
{{ end }}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{partial "search.html" .}}
|
|
||||||
<div class="singlePage">
|
|
||||||
<!-- Begin actual content -->
|
|
||||||
<header>
|
|
||||||
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
|
|
||||||
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
|
|
||||||
<div class="spacer"></div>
|
|
||||||
</header>
|
|
||||||
<article>
|
|
||||||
<h1>All {{.Title}}</h1>
|
|
||||||
{{partial "page-list.html" .Paginator.Pages.ByLastmod.Reverse }}
|
|
||||||
{{ template "_internal/pagination.html" .}}
|
|
||||||
</article>
|
|
||||||
{{partial "contact.html" .}}
|
|
||||||
</div>
|
|
||||||
{{partial "popover.html" .}}
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ .Lang }}">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{partial "search.html" .}}
|
|
||||||
|
|
||||||
<aside class="menu">
|
|
||||||
<div class="menu-toc">
|
|
||||||
<ol class="tree">
|
|
||||||
{{partial "menu-hugo.html" .}}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
<div class="singlePage">
|
|
||||||
<!-- Begin actual content -->
|
|
||||||
<header>
|
|
||||||
<h1 id="page-title"><a href="{{ .Site.BaseURL }}"><img class="logo" src="https://overment.com/images/logo-icon.svg" alt="logo" /> {{ .Site.Data.config.page_title }}</a></h1>
|
|
||||||
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
|
|
||||||
<div class="spacer"></div>
|
|
||||||
</header>
|
|
||||||
<article>
|
|
||||||
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
|
|
||||||
<p class="meta">
|
|
||||||
Last update: {{if ne .Date .Lastmod}} {{ .Lastmod.Format "02/01/2006" }}{{else}} nieznana {{end}}
|
|
||||||
</p>
|
|
||||||
<ul class="tags">
|
|
||||||
{{ range (.GetTerms "tags") }}
|
|
||||||
<li><a href="{{ .Permalink }}">{{ .LinkTitle | humanize }}</a></li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{partial "toc.html" .}}
|
|
||||||
{{partial "textprocessing.html" . }}
|
|
||||||
</article>
|
|
||||||
{{partial "footer.html" .}}
|
|
||||||
{{partial "popover.html" .}}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{partial "search.html" .}}
|
|
||||||
<div class="singlePage">
|
|
||||||
<!-- Begin actual content -->
|
|
||||||
<header>
|
|
||||||
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
|
|
||||||
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
|
|
||||||
<div class="spacer"></div>
|
|
||||||
</header>
|
|
||||||
<article>
|
|
||||||
<h1>All {{.Title}}</h1>
|
|
||||||
<div class="tags">
|
|
||||||
{{ range .Site.Taxonomies.tags.ByCount }}
|
|
||||||
<div class="meta">
|
|
||||||
<h1><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h1>
|
|
||||||
<p><b>{{ .Count }}</b> notes with this tag {{if gt .Count 2}}(showing first 2 results){{end}}</p>
|
|
||||||
</div>
|
|
||||||
{{ with ($.Site.GetPage (printf "/tags/%s" .Page.Title)) }}
|
|
||||||
{{partial "page-list.html" (first 2 .Pages.ByLastmod.Reverse)}}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
{{partial "contact.html" .}}
|
|
||||||
</div>
|
|
||||||
{{partial "popover.html" .}}
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{{partial "search.html" .}}
|
|
||||||
<div class="singlePage">
|
|
||||||
<!-- Begin actual content -->
|
|
||||||
<header>
|
|
||||||
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
|
|
||||||
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
|
|
||||||
<div class="spacer"></div>
|
|
||||||
</header>
|
|
||||||
<article>
|
|
||||||
<h1>Tag: {{.Title | humanize}}</h1>
|
|
||||||
{{partial "page-list.html" .Paginator.Pages}}
|
|
||||||
{{ template "_internal/pagination.html" . }}
|
|
||||||
</article>
|
|
||||||
{{partial "contact.html" .}}
|
|
||||||
</div>
|
|
||||||
{{partial "popover.html" .}}
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ .Lang }}">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
<body>
|
|
||||||
{{ partial "search.html" .}}
|
|
||||||
<aside class="menu">
|
|
||||||
<div class="menu-toc">
|
|
||||||
<ol class="tree">
|
|
||||||
{{partial "menu-hugo.html" .}}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
<div class="singlePage">
|
|
||||||
<!-- Begin actual content -->
|
|
||||||
<header>
|
|
||||||
<h1>{{if .Title}}{{ .Title }}{{else}}Untitled{{end}}</h1>
|
|
||||||
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
|
|
||||||
<div class="spacer"></div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
{{partial "toc.html" .}}
|
|
||||||
{{partial "textprocessing.html" . }}
|
|
||||||
</article>
|
|
||||||
{{partial "footer.html" .}}
|
|
||||||
{{partial "popover.html" .}}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<h3>Powiązania</h3>
|
|
||||||
<ul class="backlinks">
|
|
||||||
{{$url := urls.Parse .Site.BaseURL }}
|
|
||||||
{{$host := strings.TrimRight "/" $url.Path }}
|
|
||||||
{{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink)}}
|
|
||||||
{{$linkIndex := getJSON "/assets/indices/linkIndex.json"}}
|
|
||||||
{{$inbound := index $linkIndex.index.backlinks $curPage}}
|
|
||||||
{{$contentTable := getJSON "/assets/indices/contentIndex.json"}}
|
|
||||||
{{if $inbound}}
|
|
||||||
{{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
|
|
||||||
{{- range $cleanedInbound | uniq -}}
|
|
||||||
{{$l := printf "%s%s" $host .}}
|
|
||||||
{{with (index $contentTable .)}}
|
|
||||||
<li>
|
|
||||||
<a href="{{$l}}">{{index (index . "title")}}</a>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{- end -}}
|
|
||||||
{{else}}
|
|
||||||
<li>
|
|
||||||
Brak powiązań
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<!-- Contact Info -->
|
|
||||||
<div id="contact_buttons">
|
|
||||||
<footer>
|
|
||||||
<p>Made by {{ $.Site.Data.config.name }} using <a href="https://github.com/jackyzha0/quartz">Quartz</a>, © {{ dateFormat "2006" now }}</p>
|
|
||||||
<ul>
|
|
||||||
{{ if not .IsHome }}
|
|
||||||
<li><a href="/">Home</a></li>
|
|
||||||
{{end}}
|
|
||||||
{{- range $.Site.Data.config.links -}}
|
|
||||||
<li><a href="{{.link}}">{{.link_name}}</a></li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<div class='darkmode'>
|
|
||||||
<input class='toggle' id='darkmode-toggle' type='checkbox' tabindex="-1">
|
|
||||||
<label id="toggle-label-light" for='darkmode-toggle' tabindex="-1">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="dayIcon" x="0px" y="0px" viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
||||||
<title>Light Mode</title>
|
|
||||||
<path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z" />
|
|
||||||
</svg>
|
|
||||||
</label>
|
|
||||||
<label id="toggle-label-dark" for='darkmode-toggle' tabindex="-1">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="nightIcon" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background='new 0 0 100 100'" xml:space="preserve">
|
|
||||||
<title>Dark Mode</title>
|
|
||||||
<path d="M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z" />
|
|
||||||
</svg>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
<hr/>
|
|
||||||
{{partial "graph.html" .}}
|
|
||||||
<div class="page-end">
|
|
||||||
<!-- <div class="backlinks-container">-->
|
|
||||||
<!-- {{partial "backlinks.html" .}}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script defer>
|
|
||||||
(() => {
|
|
||||||
// remove [[ ]] from links
|
|
||||||
const links = document.querySelectorAll('.singlePage article a');
|
|
||||||
links.forEach(link => {
|
|
||||||
const content = link.textContent;
|
|
||||||
const parts = content.split('/');
|
|
||||||
const newContent = parts[parts.length - 1];
|
|
||||||
if (newContent.indexOf(']]') > -1) {
|
|
||||||
link.textContent = newContent.slice(0, -2);
|
|
||||||
} else {
|
|
||||||
link.textContent = newContent;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function reverseChildren(parent) {
|
|
||||||
for (var i = 1; i < parent.childNodes.length; i++){
|
|
||||||
parent.insertBefore(parent.childNodes[i], parent.firstChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
reverseChildren(document.querySelector('.tree > ol'))
|
|
||||||
})()
|
|
||||||
</script>
|
|
||||||
{{partial "contact.html" .}}
|
|
||||||
<button class="newsletter-btn" data-tally-open="nrjOON" data-tally-emoji-text="💜" data-tally-emoji-animation="heart-beat">Dołącz do newslettera</button>
|
|
||||||
{{partial "newsletter.html" .}}
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/d3@6.7.0/dist/d3.min.js" integrity="sha256-+7jaYCp29O1JusNWHaYtgUn6EhuP0VaFuswhNV06MyI=" crossorigin="anonymous"></script>
|
|
||||||
<h3>Graph</h3>
|
|
||||||
<div id="graph-container"></div>
|
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
--g-node: var(--secondary);
|
|
||||||
--g-node-active: var(--primary);
|
|
||||||
--g-node-inactive: var(--visited);
|
|
||||||
--g-link: var(--outlinegray);
|
|
||||||
--g-link-active: #5a7282;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{{ $js := resources.Get "js/graph.js" | resources.Fingerprint "md5" }}
|
|
||||||
<script src="{{ $js.Permalink }}"></script>
|
|
||||||
<script>
|
|
||||||
drawGraph(
|
|
||||||
{{strings.TrimRight "/" .Page.Permalink}},
|
|
||||||
{{strings.TrimRight "/" .Site.BaseURL}},
|
|
||||||
{{$.Site.Data.graphConfig.paths}},
|
|
||||||
{{$.Site.Data.graphConfig.depth}},
|
|
||||||
{{$.Site.Data.graphConfig.enableDrag}},
|
|
||||||
{{$.Site.Data.graphConfig.enableLegend}},
|
|
||||||
{{$.Site.Data.graphConfig.enableZoom}}
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<head>
|
|
||||||
<!-- Meta tags -->
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="description" content="{{if .IsHome}}{{$.Site.Data.config.description}}{{else}}{{.Summary}}{{end}}">
|
|
||||||
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ $.Site.Data.config.page_title }}{{ end }} - brain.overment.com</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="shortcut icon" type="image/png" href="https://overment.com/icon.png" />
|
|
||||||
<meta property="og:title" content="Everything I know">
|
|
||||||
<meta property="og:site_name" content="brain.overment.com">
|
|
||||||
<meta property="og:url" content="https://brain.overment.com">
|
|
||||||
<meta property="og:description" content="This is where I share everything I know with you. I created it primarily for myself, so that I can easily return to all the material posted here. At the same time, I thought you might find it all equally valuable to you.">
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
<meta property="og:image" content="https://space.overment.com/brain-en-3UyMg/brain-en.png">
|
|
||||||
|
|
||||||
<!-- CSS Stylesheets and Fonts -->
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,900;1,900&family=Poppins:ital,wght@0,300;0,500;0,700;1,300;1,500;1,700&display=swap" rel="stylesheet">
|
|
||||||
{{$sass := resources.Match "styles/[!_]*.scss" }}
|
|
||||||
{{$css := slice }}
|
|
||||||
{{range $sass}}
|
|
||||||
{{$scss := . | resources.ToCSS (dict "outputStyle" "compressed") }}
|
|
||||||
{{$css = $css | append $scss}}
|
|
||||||
{{end}}
|
|
||||||
{{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }}
|
|
||||||
<link href="{{$finalCss.Permalink}}" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- {{ $darkMode := resources.Get "js/darkmode.js" | resources.Fingerprint "md5" | resources.Minify }}-->
|
|
||||||
<!-- <script src="{{$darkMode.Permalink}}"></script>-->
|
|
||||||
{{partial "katex.html" .}}
|
|
||||||
|
|
||||||
<!-- Preload page vars -->
|
|
||||||
{{$linkIndex := resources.Get "indices/linkIndex.json" | resources.Fingerprint "md5" | resources.Minify | }}
|
|
||||||
{{$contentIndex := resources.Get "indices/contentIndex.json" | resources.Fingerprint "md5" | resources.Minify }}
|
|
||||||
|
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-99920491-1"></script>
|
|
||||||
<script>
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag(){dataLayer.push(arguments);}
|
|
||||||
gtag('js', new Date());
|
|
||||||
|
|
||||||
gtag('config', 'UA-99920491-1');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const BASE_URL = {{.Site.BaseURL}}
|
|
||||||
const fetchData = Promise.all([
|
|
||||||
fetch("{{ $linkIndex.Permalink }}")
|
|
||||||
.then(data => data.json())
|
|
||||||
.then(data => ({
|
|
||||||
index: data.index,
|
|
||||||
links: data.links,
|
|
||||||
})),
|
|
||||||
fetch("{{ $contentIndex.Permalink }}")
|
|
||||||
.then(data => data.json()),
|
|
||||||
])
|
|
||||||
.then(([{index, links}, content]) => {
|
|
||||||
return {
|
|
||||||
index,
|
|
||||||
links,
|
|
||||||
content,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
{{if $.Site.Data.config.enableLatex}}
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script>
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script>
|
|
||||||
<script>
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
|
||||||
renderMathInElement(document.body, {
|
|
||||||
delimiters: [
|
|
||||||
{left: '$$', right: '$$', display: true},
|
|
||||||
{left: '$', right: '$', display: false},
|
|
||||||
],
|
|
||||||
throwOnError : false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{end}}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
<!--
|
|
||||||
based on
|
|
||||||
https://github.com/alex-shpak/hugo-book/blob/master/layouts/partials/docs/menu-filetree.html
|
|
||||||
This is template for hugo menus, accepts MenuEntity as context
|
|
||||||
https://gohugo.io/variables/menus/
|
|
||||||
-->
|
|
||||||
{{ $bookSection := default "/" .Site.Params.BookSection }}
|
|
||||||
{{ if eq $bookSection "*" }}
|
|
||||||
{{ $bookSection = "/" }}{{/* Backward compatibility */}}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.GetPage $bookSection }}
|
|
||||||
{{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
|
|
||||||
<ol>
|
|
||||||
{{ range (where .Section.Pages "Params.bookhidden" "ne" true ) }}
|
|
||||||
{{ if .IsSection }}
|
|
||||||
<details open>
|
|
||||||
<summary>
|
|
||||||
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
|
|
||||||
</summary>
|
|
||||||
{{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage) }}
|
|
||||||
</details>
|
|
||||||
{{ else if and .IsPage .Content }}
|
|
||||||
<li>
|
|
||||||
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</ol>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ define "book-page-link" }}{{/* (dict "Page" "CurrentPage" .CurrentPage) */}}
|
|
||||||
{{ $current := eq .CurrentPage .Page }}
|
|
||||||
{{ $ancestor := .Page.IsAncestor .CurrentPage }}
|
|
||||||
|
|
||||||
{{ if .Page.Params.bookCollapseSection }}
|
|
||||||
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
|
||||||
<label for="section-{{ md5 .Page }}" class="flex justify-between">
|
|
||||||
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
|
|
||||||
{{- partial "docs/title" .Page -}}
|
|
||||||
</a>
|
|
||||||
</label>
|
|
||||||
{{ else if .Page.Content }}
|
|
||||||
|
|
||||||
<a href="{{ .Page.Permalink }}" class="{{ if $current }}active{{ end }}">
|
|
||||||
{{- partial "title" .Page -}}
|
|
||||||
</a>
|
|
||||||
{{ else }}
|
|
||||||
<span>{{- partial "title" .Page -}}</span>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<script async src="https://tally.so/widgets/embed.js"></script>
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<ul class="section-ul">
|
|
||||||
{{- range . -}}
|
|
||||||
<li class="section-li">
|
|
||||||
<div class="section">
|
|
||||||
<div class="desc">
|
|
||||||
<h3><a href="{{ .Permalink }}">{{- .Title -}}</a></h3>
|
|
||||||
<p>{{- .Summary -}}{{if .Truncated}}...{{end}}</p>
|
|
||||||
</div>
|
|
||||||
<p class="meta">
|
|
||||||
{{ .ReadingTime }} minute read. Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
{{if $.Site.Data.config.enableLinkPreview}}
|
|
||||||
{{ $js := resources.Get "js/popover.js" | resources.Fingerprint "md5" | resources.Minify }}
|
|
||||||
<script src="{{ $js.Permalink }}"></script>
|
|
||||||
<script>
|
|
||||||
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
|
|
||||||
</script>
|
|
||||||
{{end}}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<div id="search-container">
|
|
||||||
<div id="search-space">
|
|
||||||
<input autocomplete="off" id="search-bar" name="search" type="text" aria-label="Search" placeholder="Co chcesz wiedzieć?">
|
|
||||||
<div id="results-container">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/flexsearch@0.7.21/dist/flexsearch.bundle.js" integrity="sha256-i3A0NZGkhsKjVMzFxv3ksk0DZh3aXqu0l49Bbh0MdjE=" crossorigin="anonymous" defer></script>
|
|
||||||
{{ $js := resources.Get "js/search.js" | resources.Fingerprint "md5" | resources.Minify }}
|
|
||||||
<script defer src="{{ $js.Permalink }}"></script>
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
{{ $content := .Content }}
|
|
||||||
{{ $raw := .RawContent }}
|
|
||||||
{{ $page := .Page }}
|
|
||||||
|
|
||||||
{{/* Escape slashes for Latex to fix line breaks */}}
|
|
||||||
{{$latex := findRE "\\$\\$([^\\$]+)\\$\\$" $content}}
|
|
||||||
{{range $latex}}
|
|
||||||
{{$fixed := replaceRE "\\\\(?: +|\\n)" "\\\\" .}}
|
|
||||||
{{$content = replace $content . $fixed}}
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{/* Wikilinks */}}
|
|
||||||
{{$wikilinks := $content | findRE "!?\\[\\[\\S[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\S\\]\\]" }}
|
|
||||||
{{$codefences := $raw | findRE "\\x60[^\\x60\\n]+\\x60"}}
|
|
||||||
{{$codeblocks := $raw | findRE "\\x60{3}[^\\x60]+\\x60{3}"}}
|
|
||||||
{{$code := union $codefences $codeblocks}}
|
|
||||||
{{range $wikilinks}}
|
|
||||||
{{$cur := .}}
|
|
||||||
{{$incode := false}}
|
|
||||||
{{range $code}}
|
|
||||||
{{if (in . $cur)}}
|
|
||||||
{{$incode = true}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if not $incode}}
|
|
||||||
{{if (hasPrefix . "!")}}
|
|
||||||
{{$inner := . | strings.TrimPrefix "![[" | strings.TrimSuffix "]]" }}
|
|
||||||
{{$split := split $inner "|"}}
|
|
||||||
{{$path := index $split 0 | relURL}}
|
|
||||||
{{$reference := split $path "#"}}
|
|
||||||
{{$title := index $reference 0}}
|
|
||||||
{{$display := default $title (index $split 1)}}
|
|
||||||
{{$img := printf "<img src=\"%s\" title=\"%s\">" $path $display}}
|
|
||||||
{{$content = replace $content . $img}}
|
|
||||||
{{else}}
|
|
||||||
{{$inner := . | strings.TrimPrefix "[[" | strings.TrimSuffix "]]" }}
|
|
||||||
{{$split := split $inner "|"}}
|
|
||||||
{{$path := index $split 0}}
|
|
||||||
{{$reference := split $path "#"}}
|
|
||||||
{{$title := index $reference 0}}
|
|
||||||
{{$block := default "" (index $reference 1)}}
|
|
||||||
{{$block = strings.TrimRight "/" (cond (eq $block "") $block (printf "#%s" $block))}}
|
|
||||||
{{$href := strings.TrimRight "/" ($page.GetPage $title).RelPermalink}}
|
|
||||||
{{$display := default $title (index $split 1)}}
|
|
||||||
{{if not $href}}
|
|
||||||
{{$link := printf "<a class=\"internal-link broken\">%s</a>" $display}}
|
|
||||||
{{$content = replace $content . $link}}
|
|
||||||
{{else}}
|
|
||||||
{{$fullhref := printf "%s%s" $href $block }}
|
|
||||||
{{$link := printf "<a href=\"%s\" rel=\"noopener\" class=\"internal-link\" data-src=\"%s\">%s</a>" $fullhref $href $display}}
|
|
||||||
{{$content = replace $content . $link}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{ $content | safeHTML }}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
Partial to generate page name from Title or File name.
|
|
||||||
Accepts Page as context
|
|
||||||
-->
|
|
||||||
{{ $title := "" }}
|
|
||||||
|
|
||||||
{{ if .Title }}
|
|
||||||
{{ $title = .Title }}
|
|
||||||
{{ else if and .IsSection .File }}
|
|
||||||
{{ $title = path.Base .File.Dir | humanize | title }}
|
|
||||||
{{ else if and .IsPage .File }}
|
|
||||||
{{ $title = .File.BaseFileName | humanize | title }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $title }}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false) (gt .WordCount 150)) }}
|
|
||||||
<aside class="mainTOC">
|
|
||||||
<details >
|
|
||||||
<summary> Zawartość tej strony</summary>
|
|
||||||
{{ .TableOfContents }}
|
|
||||||
</details>
|
|
||||||
</aside>
|
|
||||||
{{end}}
|
|
||||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
BIN
static/icon.png
BIN
static/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue
Block a user