mirror of
https://github.com/Superredstone/patrickcanal.it.git
synced 2026-03-07 20:18:08 +01:00
First commit
This commit is contained in:
330
public/index.html
Normal file
330
public/index.html
Normal file
@@ -0,0 +1,330 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="home" lang="en-us"><head>
|
||||
<meta name="generator" content="Hugo 0.143.1"><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
|
||||
<meta name="robots" content="noai, noimageai">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=7" />
|
||||
|
||||
<link
|
||||
rel="icon"
|
||||
href='/favicon.png'
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href='/favicon.ico'
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
href='/apple-touch-icon.png'
|
||||
/>
|
||||
|
||||
<link
|
||||
rel="icon"
|
||||
href='logo.svg'
|
||||
type="image/svg+xml"
|
||||
/>
|
||||
|
||||
<title>
|
||||
|
||||
Patrick Canal
|
||||
</title>
|
||||
|
||||
|
||||
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet" />
|
||||
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
<link type="text/css" rel="stylesheet" href=http://localhost:1313/css/styles.abbd6311bb4b6ca58f8e7398140529245ae0f6428b759fcd830742eee2619eabb900ba9914a9affb82aa9a16a9b9ea727bb315315a976a0db0e7513a5f12c504.css integrity="sha512-q71jEbtLbKWPjnOYFAUpJFrg9kKLdZ/NgwdC7uJhnqu5ALqZFKmv+4Kqmhapuepye7MVMVqXag2w51E6XxLFBA==" />
|
||||
<meta name="author" content="Patrick Canal" />
|
||||
|
||||
|
||||
|
||||
<meta property="og:site_name"
|
||||
content='Patrick Canal' />
|
||||
|
||||
<meta property="og:title"
|
||||
content='Patrick Canal' />
|
||||
|
||||
<meta property="og:type" content="blog" />
|
||||
<meta property="og:image"
|
||||
content='http://localhost:1313/img/icon.svg' />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:domain"
|
||||
content='localhost:1313'
|
||||
/>
|
||||
<meta property="twitter:url" content="http://localhost:1313/" />
|
||||
|
||||
|
||||
<meta name="twitter:title"
|
||||
content='Patrick Canal' />
|
||||
|
||||
<meta name="twitter:image"
|
||||
content='http://localhost:1313/img/icon.svg' />
|
||||
|
||||
<link rel="manifest" href="/manifest/index.json" />
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
<div id="baseContainer"><header class="jumbotronContainer">
|
||||
<div class="titleAndSearchContainer">
|
||||
<div id="titleContainer">
|
||||
|
||||
<a class="unstyledLink" href="/">
|
||||
<img src='logo.svg' alt='Logo'/>
|
||||
</a>
|
||||
|
||||
<div class="rightOfLogo">
|
||||
<div class="titleAndHamburger">
|
||||
<h1>
|
||||
<a class="unstyledLink" href="/">Patrick Canal</a>
|
||||
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
<div id="wide_nav"><nav>
|
||||
|
||||
<ul id="main-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
|
||||
<li><a href="/posts/">Posts</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/tags/">Tags</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<input id="searchbar" type="text" placeholder='Search' />
|
||||
<span class="nerdlink" onclick="newSearch();"></span>
|
||||
</div>
|
||||
<script>
|
||||
function newSearch() {
|
||||
let term = searchbar.value.trim();
|
||||
if (!term) return;
|
||||
location.href = `/search/?q=${term}`;
|
||||
}
|
||||
searchbar.onkeyup = (ev) => {if (ev.keyCode == 13) newSearch()};
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<div id="links">
|
||||
<a
|
||||
|
||||
rel="noreferrer"
|
||||
|
||||
target="_blank"
|
||||
class="nerdlink"
|
||||
href="/index.xml">
|
||||
|
||||
|
||||

|
||||
|
||||
<span>
|
||||
RSS
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
<a
|
||||
|
||||
rel="noreferrer"
|
||||
|
||||
target="_blank"
|
||||
class="nerdlink"
|
||||
href="https://github.com/Superredstone">
|
||||
|
||||
|
||||

|
||||
|
||||
<span>
|
||||
Github
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</header>
|
||||
<div id="contentContainer">
|
||||
<div id="content">
|
||||
<main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="postlist " id="postlist">
|
||||
<article class="card postlistitem">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="http://localhost:1313/posts/building-my-website-in-hugo/">Building my website in Hugo</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title='Date'> </span>
|
||||
2025-04-07
|
||||
|
||||
|
||||
|
||||
|
|
||||
<span title='Tags'> </span>
|
||||
|
||||
<a href="/tags/hosting">#hosting</a>
|
||||
|
||||
<a href="/tags/website">#website</a>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<div class="articlePreview">
|
||||
<p>
|
||||
|
||||
<p>I always wanted a website/blog to write articles about what I like, so today I decided to make one!</p>
|
||||
<p>After buying a domain and setting up the server I had just to decide what to write the website with.</p>
|
||||
<h2 id="hugo">Hugo</h2>
|
||||
<p><img src="https://gohugo.io/images/hugo-logo-wide.svg" alt="hugo-logo"></p>
|
||||
<p>As a tech stack I wanted something simple and easy to mantain,
|
||||
<a href="https://gohugo.io/">Hugo</a> makes everything so easy and painless that it is too good to be true.</p>
|
||||
<p>Just install it and then write in the terminal</p>
|
||||
|
||||
</p>
|
||||
<p><a href="http://localhost:1313/posts/building-my-website-in-hugo/">Continue reading </a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
||||
|
||||
</div>
|
||||
<div id="getNextBtnContainer"></div><script>
|
||||
const tagsStr = 'Tags'
|
||||
|
||||
function renderTags(tags) {
|
||||
if (tags.length <= 0) return '';
|
||||
let res = `| <span title=''> </span>`;
|
||||
for (let tag of tags) {
|
||||
|
||||
res += `<a href="/tags/${tag}/">#${tag}</a> `;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function renderImage(image, link, alt) {
|
||||
if (!image) return '';
|
||||
return `<a href="${link}"><img src="${image}" alt="${alt}" /></a>`;
|
||||
}
|
||||
function renderSingleArticle(article) {
|
||||
|
||||
const tags = renderTags(article.tags)
|
||||
|
||||
|
||||
|
||||
const img = ''
|
||||
|
||||
|
||||
|
||||
const continueReadingStr = 'Continue reading'
|
||||
const summ = `<div class="articlePreview">
|
||||
<p>${article.summary}</p>
|
||||
<p><a href="${article.link}">${continueReadingStr} </a></p>
|
||||
</div>`
|
||||
|
||||
|
||||
const dateStr = 'Date'
|
||||
|
||||
return `
|
||||
<article class="card postlistitem">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="${article.link}">${article.title}</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title='${dateStr}'> </span>
|
||||
${article.date}
|
||||
${tags}
|
||||
</p>
|
||||
${img}
|
||||
${summ}
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
||||
`;
|
||||
}
|
||||
function renderArticles(articles) {
|
||||
let rendered = articles.map(a => renderSingleArticle(a)).join('\n');
|
||||
document.getElementById('postlist').innerHTML += rendered;
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var nextPage = '/index.json';
|
||||
function getNext(first=false) {
|
||||
if (!nextPage) return;
|
||||
fetch(nextPage).then(res => res.json())
|
||||
.then(res => {
|
||||
nextPage = res['next'];
|
||||
if (first) {
|
||||
document.getElementById('getNextBtnContainer').innerHTML += `
|
||||
<div class="loadMoreButton ">
|
||||
<a style="cursor: pointer" onclick="getNext();">
|
||||
Load more articles
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
if (!nextPage) document.getElementById('getNextBtnContainer').innerHTML = '';
|
||||
renderArticles(res['articles']);
|
||||
});
|
||||
}
|
||||
getNext(true);
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
|
||||
</noscript>
|
||||
|
||||
|
||||
|
||||
</main><footer>
|
||||
<hr />
|
||||
|
||||
<p><small>
|
||||
2025 © Patrick Canal
|
||||
</small></p>
|
||||
<p><small>
|
||||
<a href='https://gitlab.com/gabmus/hugo-ficurinia'>Ficurinia theme</a> for <a href='https://gohugo.io'>Hugo</a> by <a href='https://gabmus.org'>Gabriele Musco</a>. Licensed under <a href='https://www.gnu.org/licenses/agpl-3.0.html'>GNU AGPLv3</a>.
|
||||
</small></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user