Skip to content

Commit

Permalink
work on posts
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed May 3, 2024
1 parent 2329946 commit fcb73a2
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 5 deletions.
117 changes: 117 additions & 0 deletions docs/_includes/css-markdown.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<style>
.markdown-content h1 {
font-size: 2.235;
letter-spacing: -1px;
line-height: 1.15;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content h2 {
font-size: 1.75;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content h3 {
font-size: 1.375;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content h4 {
font-size: 1.25;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content h5 {
font-size: 1.125;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content h6 {
font-size: 1.0625;
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content ul {
margin-top: 15px;
margin-bottom: 15px;
}
.markdown-content ul {
margin-left: 15px;
}
.markdown-content p {
margin-bottom: 15px;
}
.highlight { /* Modified (when using RGB) Highlight of the Jekyll Minima Theme: all credits goes there https://github.com/jekyll/minima/blob/main/_sass/minima/skins/auto.scss#L134-L139 */
.c { color: rgb(150, 150, 150); font-style: italic } /* Comment */
.err { color: #ff2b36; } /* Error */
.k { color: rgb(243, 105, 255) } /* Keyword */
.cm { color: rgb(150, 150, 150); font-style: italic } /* Comment.Multiline */
.cp { color: rgb(150, 150, 150) } /* Comment.Preproc */
.c1 { color: rgb(150, 150, 150); font-style: italic } /* Comment.Single */
.cs { color: rgb(150, 150, 150); font-style: italic } /* Comment.Special */
.gd { color: #000; background-color: #fdd } /* Generic.Deleted */
.gd .x { color: #000; background-color: #faa } /* Generic.Deleted.Specific */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #f07178 } /* Generic.Error */
.gh { color: #999 } /* Generic.Heading */
.gi { color: #000; background-color: #dfd } /* Generic.Inserted */
.gi .x { color: #000; background-color: #afa } /* Generic.Inserted.Specific */
.go { color: #888 } /* Generic.Output */
.gp { color: #555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaa } /* Generic.Subheading */
.gt { color: #f07178 } /* Generic.Traceback */
.kn { color: rgb(243, 105, 255) } /* Keyword.Import */
.kd { color: rgb(243, 105, 255) } /* Keyword.Declaration */
.kp { color: rgb(243, 105, 255) } /* Keyword.Pseudo */
.kr { color: rgb(243, 105, 255) } /* Keyword.Reserved */
.kt { color: rgb(243, 105, 255) } /* Keyword.Type */
.kc { color: rgb(243, 105, 255) } /* Keyword.Boolean */
.m { color: rgb(66, 214, 153) } /* Literal.Number */
.s { color: rgb(66, 214, 153) } /* Literal.String */
.n { color: rgb(228, 136, 17) }
.na { color: rgb(78, 175, 255) } /* Name.Attribute */
.nb { color: #EEFFFF } /* Name.Builtin */
.nc { color: rgb(255, 216, 145) } /* Name.Class */
.nd { color: rgb(255, 216, 145) } /* Name.Annotation */
.no { color: rgb(228, 136, 17) } /* Name.Constant */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #900 } /* Name.Exception */
.nf { color: rgb(78, 175, 255) } /* Name.Function */
.nn { color: rgb(243, 105, 255) } /* Name.Namespace */
.nt { color: #FFCB6B } /* Name.Tag */
.nv { color: #EEFFFF } /* Name.Variable */
.nl { color: rgb(52, 116, 255) } /* Name.JSONKey */
.ow { font-weight: bold } /* Operator.Word */
.w { color: #EEFFFF } /* Text.Whitespace */
.mf { color: rgb(66, 214, 153) } /* Literal.Number.Float */
.mh { color: rgb(66, 214, 153) } /* Literal.Number.Hex */
.mi { color: rgb(66, 214, 153) } /* Literal.Number.Integer */
.mo { color: rgb(66, 214, 153) } /* Literal.Number.Oct */
.sb { color: rgb(66, 214, 153) } /* Literal.String.Backtick */
.sc { color:rgb(66, 214, 153) } /* Literal.String.Char */
.sd { color: rgb(66, 214, 153) } /* Literal.String.Doc */
.s2 { color:rgb(66, 214, 153) } /* Literal.String.Double */
.se { color: rgb(66, 214, 153) } /* Literal.String.Escape */
.sh { color: rgb(66, 214, 153) } /* Literal.String.Heredoc */
.si { color: rgb(66, 214, 153) } /* Literal.String.Interpol */
.sx { color: rgb(66, 214, 153) } /* Literal.String.Other */
.sr { color: rgb(66, 214, 153) } /* Literal.String.Regex */
.s1 { color: rgb(66, 214, 153) } /* Literal.String.Single */
.ss { color: rgb(66, 214, 153) } /* Literal.String.Symbol */
.bp { color: #999 } /* Name.Builtin.Pseudo */
.vc { color: #FFCB6B } /* Name.Variable.Class */
.vg { color: #EEFFFF } /* Name.Variable.Global */
.vi { color: #EEFFFF } /* Name.Variable.Instance */
.py { color: rgb(243, 105, 255) } /* Name.Variable.TOML */
.il { color: #F78C6C } /* Literal.Number.Integer.Long */
}
@media screen and (min-width: 800px) {
.markdown-content h2 {
font-size: 2.0;
}
.markdown-content h3 {
font-size: 1.625;
}
}
</style>
9 changes: 8 additions & 1 deletion docs/_includes/css-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
}
h1 {
--bulma-weight-extrabold: 1em;
color: rgb(254, 252, 255);
}
.navbar {
--bulma-navbar-item-img-max-height: 3.5rem;
Expand All @@ -25,7 +26,7 @@
overflow-x: auto;
gap: 1em;
}
.box {
.post-box {
background-color: rgb(0, 2, 17);
}
.content {
Expand All @@ -41,4 +42,10 @@
position: absolute;
bottom: 0;
}
.big-post-box {
background-color: rgb(40, 19, 66);
}
.before-tag {
gap: 10em;
}
</style>
1 change: 1 addition & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
{%- endif -%}
{%- include custom-head.html -%}
{%- include css-properties.html -%}
{%- include css-markdown.html -%}
</head>
6 changes: 3 additions & 3 deletions docs/_layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ <h1 class="title posts-group">Recent Posts</h1>
<div class="posts">
{%- for post in posts -%}
{%- assign post_author = site.data.authors[post.author] -%}
<div class="box">
<div class="box post-box">
<article class="media">
<div class="media-left">
<figure class="image is-64x64">
<img class="is-rounded" src="{{ post_author.picture }}" alt="Post Image">
<img class="is-rounded" src="{{ post_author.picture }}" alt="Author Picture">
</figure>
</div>
<div class="media-content">
<div class="content">
<p class="post-content">
<p>
<strong>
<a href="{{ post.id }}">{{ post.title }}</a>
</strong>
Expand Down
39 changes: 39 additions & 0 deletions docs/_layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: base
---

<section class="section">
<div class="box big-post-box">
<h1 class="title before-tag">
{{ page.title }}
<p>
{%- for tag in page.tags -%}
{%- assign current_tag = site.data.tags[tag] -%}
<span class="tag {{ current_tag.type }}">#{{ tag }}</span>
{%- endfor -%}
</p>
</h1>
<div class="markdown-content">
{{ content }}
</div>
<nav class="level">
<div class="level-left">
<div class="level-item">
<figure class="image is-32x32">
{%- for author in page.author -%}
{%- assign post_author = site.data.authors[author] -%}
{%- assign author_name = page.author -%}
<img class="is-rounded" src="{{ post_author.picture }}" alt="Post Image">
{%- endfor -%}
</figure>
</div>
<div class="level-item">
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<h3>
<a href="https://x.com/{{ post_author.x }}">{{ author_name }}</a> • Written on {{ page.date | date: date_format }}
</h3>
</div>
</div>
</div>
</div>
</section>
2 changes: 1 addition & 1 deletion docs/_posts/2024-04-30-blog-introduction.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hey y'all our dear users! This the first post of this new blog!
The reason behind it is that I wanted to give to the MModding Organization a proper website (at least better than the old one) and to add it a blog in order to write better information for our users.

Discord isn't bad at all, otherwise we wouldn't have a dedicated server to our team content in it, but it still has some limitations:
- We can't write very long messages. Pretty annoying when we want to write big messages.
- We can't write very long messages. Pretty annoying when we need to write them like that.
- We can controll the website user-interface, contrary to Discord's one.
- We can classify our posts with tags, allowing you to understand what are the main ideas of them.
- We can use attachments in a better way, spreading them into the post instead of just having all of them at the bottom of the message.
Expand Down
28 changes: 28 additions & 0 deletions docs/_posts/2024-05-03-domain-and-post-rendering.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: post
title: "Domain and Post Rendering"
date: 2024-05-03 01:03:49 +0100
author: Mega
description: Post talking about the application of the <code>mmodding.com</code> domain over our website and the updated render of our posts.
tags:
- decisive
- update
---

Hey dear members! Here I am with the news!

Yesterday, **I carefully applied the `mmodding.com` domain to our website** (that we did't own before sadly, yeah) meaning that we have now beautiful links for our socials!
- [mmodding.com/youtube](https://mmodding.com/youtube) redirects to our YouTube channel
- [mmodding.com/discord](https://mmodding.com/discord) redirects to our Discord server
- [mmodding.com/x](https://mmodding.com/x) redirects to our X/Twitter profile
- [mmodding.com/github](https://mmodding.com/github) redirects to our GitHub organization

I may also add Modrinth and Curseforge link? Not sure about that. If I do it it should probably be separated from the other ones in the navbar at least.

Second thing: **I now updated the posts render!** It's not perfect yet, it will probably have other improvements in the future, but currently it is sufficent for us.
- The markdown now renders better than before.
- Some work on the codeblock css to prepare a color highlighting syntax for the future docs.

Future goals:
- Add an about page.
- Create the docs base, a base that would be enough for people to start contributing to it!

0 comments on commit fcb73a2

Please sign in to comment.