formatting for articles
This commit is contained in:
parent
0a0485173b
commit
e68abd92a1
|
@ -202,10 +202,35 @@ header {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 85%; /* Adjusted width to accommodate the article list */
|
width: 85%; /* Adjusted width to accommodate the article list */
|
||||||
padding-left: 20%;
|
padding-left: 45%;
|
||||||
padding-right: 20%; /* Add some padding for spacing */
|
padding-right: 20%; /* Add some padding for spacing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#article-container h1 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#article-container h3 {
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 20%;
|
||||||
|
margin-top: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#article-container h6 {
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 20%;
|
||||||
|
margin-top: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#article-container p {
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 20%;
|
||||||
|
margin-top: 8%;
|
||||||
|
}
|
||||||
|
|
||||||
/* Responsive styles for smaller screens */
|
/* Responsive styles for smaller screens */
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
body {
|
body {
|
||||||
|
|
|
@ -51,7 +51,7 @@ const articles = [
|
||||||
|
|
||||||
function extractTitleAndSubtitle(markdownContent) {
|
function extractTitleAndSubtitle(markdownContent) {
|
||||||
const lines = markdownContent.split('\n');
|
const lines = markdownContent.split('\n');
|
||||||
const title = lines[0] ? lines[0].replace(/^#*\s*/, '').trim() : 'Untitled';
|
const title = lines[0] ? lines[0].replace(/^#+\s*/, '').trim() : 'Untitled';
|
||||||
const subtitle = lines[3] ? lines[3].trim() : '';
|
const subtitle = lines[3] ? lines[3].trim() : '';
|
||||||
return { title, subtitle };
|
return { title, subtitle };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Discord
|
# Discord
|
||||||
20th December 2023
|
###### 20th December 2023 - Zoey
|
||||||
|
<br>
|
||||||
Here's the reason I hate Discord.
|
### Here's the reason I hate Discord.
|
||||||
|
<br>
|
||||||
lorem ipsum butts and cakes, you are now my favourite person who bakes
|
lorem ipsum butts and cakes, you are now my favourite person who bakes
|
||||||
this is still the same paragraph
|
this is still the same paragraph
|
||||||
yeah
|
yeah
|
||||||
|
<br>
|
||||||
butts
|
butts
|
|
@ -1,4 +0,0 @@
|
||||||
# Wayland
|
|
||||||
21th December 2023
|
|
||||||
|
|
||||||
Electron is awful and here's why.
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Electron
|
# Electron
|
||||||
21th December 2023
|
###### 21th December 2023 - Zoey
|
||||||
|
<br>
|
||||||
Electron is awful and here's why.
|
### Electron is awful and here's why.
|
|
@ -1,4 +1,4 @@
|
||||||
# Wayland
|
# Wayland
|
||||||
*22th December 2023*
|
######22th December 2023
|
||||||
|
<br>
|
||||||
Insane defaults.
|
### Insane defaults.
|
Loading…
Reference in a new issue