New blog and updated css
This commit is contained in:
parent
501ceacdf2
commit
99f3abbed2
@ -1,4 +1,5 @@
|
||||
let blogs = [["I didn't like Wordpress","So... Yeah, I didn't like wordpress very much, it's pretty clunky and I don't have much control over the webpage, and it's kinda not that fun to use, I'm glad I tried it out though because I kind of know how to use it know I suppose, I might copy over the wordpress back over to this so I can use it myself for fun I suppose."],
|
||||
["Test post2", "Testicy Test"],
|
||||
["Test post", "Testy test!"]]
|
||||
let blogs = [["Late December Update Before Christmas","Hey guys, so I have been trying out Nextcloud since I did the last blog and I really like it, it's very good, the calendar especially, I think I definately prefer it to Proton Drive and Calendar because it's way better intergreated in to apps and stuff, there's also apps for it on the Ubuntu Touch store, which lacks Proton apps, the notes are also great as is the RSS reader that I can sync. Secondly, I have also began watching Attack on Titan again as my freind has been going on about it, I'm readig the Manga but it is so slow, so I'll probably keep watching the Animé which I like. Christmas is in a few days and we break up tommorow which is pretty exiting and I'll see some family, I think I'm getting the <a href='https://www.raspberrypi.com/products/raspberry-pi-5/'>Raspberry Pi 5</a> which is cool. Finally, I got the <a href='https://store.steampowered.com/app/582160/Assassins_Creed_Origins/'>Assassins Creed Origins game</a> which I already had on PS4 but now I have on Steam because it was on sale, but I can't get it to work so I'll have to figure that out over the weekend, anyway, that is probably it for today.<br/>Fly You High - DeaDvey<br/><img src='https://searx.be/image_proxy?url=https%3A%2F%2Fi.pinimg.com%2F236x%2Fc5%2F7f%2Fe1%2Fc57fe1d506c6a3aa53bd953199b7ea9f.jpg&h=60634c3b8432ca80d66386441593891a87a58ae6ec4810c40a64a665b0e677fc' height='200' alt='An image of Assassins Creed Origins' /><img src='https://upload.wikimedia.org/wikipedia/commons/9/98/23551-Raspberry-Pi-5-8G-feature.jpg' height='200' alt='An image of a Raspberry Pi 5'/>","21/12/2023"],
|
||||
["I didn't like Wordpress","So... Yeah, I didn't like wordpress very much, it's pretty clunky and I don't have much control over the webpage, and it's kinda not that fun to use, I'm glad I tried it out though because I kind of know how to use it know I suppose, I might copy over the wordpress back over to this so I can use it myself for fun I suppose.","11/12/2023"],
|
||||
["Test post2", "Testicy Test","10/12/2023"],
|
||||
["Test post", "Testy test!","10/12/2023"]]
|
||||
|
||||
|
@ -18,8 +18,9 @@ let newPageHTML = `
|
||||
</head>
|
||||
<body>
|
||||
<div class="header main">
|
||||
<img class="header-image" /><br/><a href="../index.html">Home page</a> <a href="/blog/index.html">Blogs</a> <a href="/videos/index.html">Videos</a><hr/>
|
||||
<img class="header-image" /><br/><a href="../index.html">Home page</a> <a href="/blog/index.html">Blogs</a> <a href="/videos/index.html">Videos</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="main">
|
||||
${divText}
|
||||
<div id="links">
|
||||
@ -47,7 +48,7 @@ document.body.innerHTML = newPageHTML //apply the template
|
||||
// ADD THE LINKS
|
||||
///////////////////////////
|
||||
|
||||
function loadContent(page, content, header) {
|
||||
function loadContent(page, content, header, date) {
|
||||
console.log(page)
|
||||
let blogText = content
|
||||
console.log(blogText)
|
||||
@ -62,9 +63,11 @@ function loadContent(page, content, header) {
|
||||
</head>
|
||||
<body>
|
||||
<div class="header main">
|
||||
<img class="header-image" /><br/><a href="../index.html">Home page</a> <a href="/blog/index.html">Blogs</a> <a href="/videos/index.html">Videos</a><hr/>
|
||||
<img class="header-image" /><br/><a href="../index.html">Home page</a> <a href="/blog/index.html">Blogs</a> <a href="/videos/index.html">Videos</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="main">
|
||||
<h3 class="blog-date">${date}</h3>
|
||||
<h1 class="blog-title">${header}</h1>
|
||||
<p class="blog-content">${content}</p>
|
||||
<div id="links">
|
||||
@ -106,6 +109,7 @@ function escapeQuotes(value) {
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(blogs)
|
||||
let linksDiv = document.getElementById("links")
|
||||
|
||||
let linksText
|
||||
@ -115,7 +119,7 @@ let length = blogs.length
|
||||
for (let page = 0; page < length; page++) {
|
||||
console.log(length)
|
||||
|
||||
linksText += (`<li><a href='#' onclick='loadContent(${page}, "${escapeQuotes(blogs[page][1])}", "${escapeQuotes(blogs[page][0])}")'>${escapeQuotes(blogs[page][0])}</a></li>`)
|
||||
linksText += (`<li><a href='#' onclick='loadContent(${page}, "${escapeQuotes(blogs[page][1])}", "${escapeQuotes(blogs[page][0])}", "${escapeQuotes(blogs[page][2])}")'>${escapeQuotes(blogs[page][0])}</a> ${escapeQuotes(blogs[page][2])}</li>`)
|
||||
}
|
||||
|
||||
linksText = linksText.slice(9) //Remove the "undefined" at the start of the string
|
||||
|
14
index.css
14
index.css
@ -4,9 +4,15 @@
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@media screen and (min-width: 480px) {
|
||||
.main {
|
||||
width: 500px;
|
||||
}
|
||||
}
|
||||
|
||||
.header-image {
|
||||
content: url("header-image.png");
|
||||
width: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
@ -38,12 +44,12 @@ a:active {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.blog-content {
|
||||
/*.blog-content {
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-right: auto;
|
||||
width: 500px;
|
||||
}
|
||||
}*/
|
||||
|
||||
.footer {
|
||||
display: block;
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div id="main">
|
||||
<h1>Bonjour</h1>
|
||||
Welcome to my personal website! I hope you have a good time<br/>
|
||||
Feel free to click the links above for more content!<br/>
|
||||
Also, see below for links to my other situations<br/>
|
||||
<h1>Hey!</h1>
|
||||
<p>Welcome to my personal website! I hope you have a good time.
|
||||
Feel free to click the links above for more content!
|
||||
Also, see below for links to my other stuff.</p>
|
||||
</div>
|
||||
|
||||
<script src="template.js">
|
||||
|
@ -14,8 +14,9 @@ let newPageHTML = `
|
||||
</head>
|
||||
<body>
|
||||
<div class="header main">
|
||||
<img class="header-image" /><br/><a href="http://deadvey.com">Home page</a> <a href="blog/index.html">Blogs</a> <a href="videos/index.html">Videos</a><hr/>
|
||||
<img class="header-image" /><br/><a href="http://deadvey.com">Home page</a> <a href="blog/index.html">Blogs</a> <a href="videos/index.html">Videos</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="main">
|
||||
${divText}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user