Updated template and content

This commit is contained in:
Bashy 2025-11-10 21:04:56 +01:00
parent 142a478a6a
commit 9dd5ca83c5
33 changed files with 415 additions and 222 deletions

View file

@ -1,2 +0,0 @@
_config.yml

View file

@ -0,0 +1,42 @@
name: OpenAlt
version: 0.1
copy_year: 2025
# Site configuration
banner: images/assets/OpenAlt_RO_White.svg
favicon: images/assets/OpenAltRomania.svg
fontawesome: https://kit.fontawesome.com/bae8420862.js # Use your own kit here
primary_color: '#ce1126 !important'
tag_border: false # Add border to tags
#Footer
hexo: true # Display "Powered by Hexo" in footer
copyright: true # Display copyright
# Enable or disable social links (add more / remove as needed)
social:
- url: http://discord.openalt.ro
icon: fab fa-discord
enable: true
- url: https://mastodon.social/@OpenAltRo
icon: fab fa-mastodon
enable: true
- url: https://www.linkedin.com/company/openaltro/
icon: fab fa-linkedin
enable: true
- url: https://matrix.to/#/#OpenAltRO:matrix.org
icon: fab fa-hashtag
enable: true
# Topbar menu configuration (add more / remove as needed)
topbar_menu:
- enable: true
name: Blog
url: /archives/index.html
- enable: true
name: About Us
url: /p/AboutUs/AboutUs.html
- enable: true
name: OpenAlt
url: https://openalt.org

View file

@ -1,25 +1,28 @@
<div class="narrow_view">
<div class="post">
<div class="post-header">
<h1 class="article"><%= page.title || "Untitled" %></h1>
<% if(page.photos && page.photos.length) { %>
<div class="cover">
<img class="gallery" src="<%- config.root %><%- page.photos[0] %>" alt="<%- page.title || "Untitled" %>">
<div class="post-page post">
<% if(page.photos && page.photos.length) { %>
<div class="post-cover">
<img class="gallery" src="<%- config.root %><%- page.photos[0] %>" alt="<%- page.title || "Untitled" %>">
</div>
<% } %>
<div class="post-text-wrapper">
<div class="post-text">
<div class="post-header">
<h1 class="article"><%= page.title || "Untitled" %></h1>
<span class="smoll"><%- include('date', { date: page.date.toISOString() }) %> by <%= page.author %></span>
<p><%= page.description %></p>
</div>
<div class="post-content">
<%- page.content %>
</div>
<div class="post-footer">
<div class="tags smoll">
<% if (page.tags) { %>
<% page.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.name) %>">#<%= tag.name %></a>
<% }); %>
<% } else {console.log(page)} %>
</div>
<% } %>
<p><%= page.description %></p>
<a href='<%= url_for(page.path) %>' class="page-date"><%- include('date', { date: page.date.toISOString() }) %></a>
</div>
<div class="post-content">
<%- page.content %>
</div>
<div class="post-footer">
<div class="tags smoll">
<% if (page.tags) { %>
<% page.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.name) %>">#<%= tag.name %></a>
<% }); %>
<% } else {console.log(page)} %>
</div>
</div>
</div>

View file

@ -1,11 +1,9 @@
<div class="date smoll">
<%
const posted = new Date(date);
const now = new Date();
const year = 365 * 24 * 60 * 60 * 1000;
const format = (now - posted) < year ?
{ day: 'numeric', month: 'long', hour: 'numeric', minute: 'numeric', hour12: true } :
{ day: 'numeric', month: 'long', year: 'numeric', hour: 'numeric', minute: 'numeric', hour12: true };
%>
<%= posted.toLocaleString('en-US', format ) %>
</div>
<%
const posted = new Date(date);
const now = new Date();
const year = 365 * 24 * 60 * 60 * 1000;
const format = (now - posted) < year ?
{ day: 'numeric', month: 'long', hour: 'numeric', minute: 'numeric', hour12: true } :
{ day: 'numeric', month: 'long', year: 'numeric', hour: 'numeric', minute: 'numeric', hour12: true };
%>
<%= posted.toLocaleString('en-US', format ) %>

View file

@ -1,6 +1,9 @@
<div class="narrow_view">
<% page.posts.forEach(function(post) { %>
<%- include('post_feed', { post: post }) %>
<%- include('post_feed',
{ post: post,
source: "feed"
}) %>
<% }); %>
<div class="pagination">

View file

@ -1,22 +1,23 @@
<section id="feed_preview">
<div class="feed_preview">
<% counter = 3 %>
<% page.posts.forEach(function(post) { %>
<% if (counter != 0) { %>
<% isEvent = false %>
<% post.tags.data.forEach(function(tag) { %>
<% if (tag.name == "Events") { %>
<% isEvent = true %>
<% } %>
<% }); %>
<div class="feed_preview">
<% counter = 3 %>
<% page.posts.forEach(function(post) { %>
<% if (counter != 0) { %>
<% isEvent = false %>
<% post.tags.data.forEach(function(tag) { %>
<% if (tag.name == "Events") { %>
<% isEvent = true %>
<% if (isEvent == false) { %>
<%- include('./../post_feed',
{ post: post,
source: "index"
}) %>
<% counter = counter - 1 %>
<% } %>
<% }); %>
<% if (isEvent == false) { %>
<%- include('./../post_feed', { post: post }) %>
<% counter = counter - 1 %>
<% } %>
<% } %>
<% }); %>
</div>
<% }); %>
</div>
</section>

View file

@ -1,13 +1,11 @@
<section class="event">
<% counter = false %>
<% counter = 2 %>
<% page.posts.forEach(function(post) { %>
<% post.tags.data.forEach(function(tag) { %>
<% if ( (tag.name == "Events") && (counter == false) ) { %>
<%- include('./../post_event', { post: post }) %>
<% counter = true %>
<% if ( (tag.name == "Events") && (counter != 0) ) { %>
<%- include('./../post_feed', { post: post, source: "index", event: counter }) %>
<% counter = counter - 1 %>
<% } %>
<% }); %>
<% }); %>
</section>

View file

@ -1,9 +0,0 @@
<div class="event-wrapper">
<img src="/images/assets/OpenAltRomania.svg" alt="<%= post.title || "Untitled" %>" style="max-height: 250px" width="300px" />
<a href='<%= url_for(post.path) %>'><h1><%= post.title || "Untitled" %></h1></a>
<div class="post-content">
<%- post.content %>
</div>
</div>

View file

@ -1,20 +1,70 @@
<%
isEvent = false
post.tags.data.forEach(function(tag) {
if ( (tag.name == "Events") && (!isEvent) ) {
isEvent = true
}
});
%>
<!-- This is the template for the post. It is used to display the posts in the feeds. -->
<div class="post post-feed">
<% if(post.photos && post.photos.length) { %>
<div class="cover">
<a href='<%= url_for(post.path) %>'>
<img class="gallery" src="<%- config.root %>thumbnails/<%- post.photos[0].replace(/^images\//, '') %>" alt="<%- post.title || 'Untitled' %>">
</a>
</div>
<% } %>
<div class="post-header">
<a href='<%= url_for(post.path) %>'><h2><%= post.title || "Untitled" %></h2>
<%- include('date', { date: post.date.toISOString() }) %></a>
<p class="post_description"><%= post.description %></p>
<div class="tags smoll">
<% post.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.slug || tag.name.replace(/\s+/g, '-')) %>">#<%= tag.name %></a>
<% }); %>
<% if(isEvent && (source == "index") && (event == 2) ) { %>
<div class="event-wrapper">
<img src="/images/assets/OpenAltRomania.svg" alt="<%= post.title || "Untitled" %>" style="max-height: 250px" width="300px" />
<a href='<%= url_for(post.path) %>'><h1><%= post.title || "Untitled" %></h1></a>
<h2 class="event-spacer">
<%- post.event.date %> at <%- post.event.time %>
</h2>
<h3 class="event-spacer">
<a href='<%- post.event.place.link %>'><i class="fa fa-map-marker-alt"></i> <%- post.event.place.name %></a>
</h3>
<div class="post-content">
<%- post.content %>
</div>
</div>
</div>
<% } else { %>
<div class="post">
<% if(post.photos && post.photos.length) { %>
<% classTag = "post-with-image" %>
<% } else { %>
<% classTag = "post-without-image" %>
<% } %>
<% if(source == "index") { %>
<div class="post-home">
<% } else if (isEvent) { %>
<div class="post-event">
<% } else { %>
<div class="post-feed">
<% } %>
<div class="<%= classTag %>">
<% if(post.photos && post.photos.length) { %>
<div class="post-cover">
<a href='<%= url_for(post.path) %>'>
<img class="gallery" src="<%- config.root %><%- post.photos[0] %>" alt="<%- post.title || 'Untitled' %>">
</a>
</div>
<% } %>
<div class="post-blerp">
<a href='<%= url_for(post.path) %>'><h2><%= post.title || "Untitled" %></h2>
<div class="date smoll">
<%- include('date', { date: post.date.toISOString() }) %></a>
</div>
<p class="post_description"><%= post.description %></p>
<a href='<%= url_for(post.path) %>'><p>Read More...</p></a>
<div class="tags smoll">
<% post.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.slug || tag.name.replace(/\s+/g, '-')) %>">#<%= tag.name %></a>
<% }); %>
</div>
</div>
</div>
</div>
</div>
<% } %>

View file

@ -1,6 +1,9 @@
<div class="narrow_view">
<% site.posts.sort('-date').forEach(function(post) { %>
<%- include('_partial/post_feed', { post: post }) %>
<%- include('_partial/post_feed',
{ post: post,
source: "archive"
}) %>
<% }); %>
<div class="pagination">

View file

@ -1,5 +1,9 @@
<%- include("_partial/index/main_event", { item: site.posts.sort('-date') }) %>
<%- include("_partial/index/main_event", {
item: site.posts.sort('-date')
}) %>
<%- include("_partial/index/feed_preview", { item: site.posts.sort('-date') }) %>
<%- include("_partial/index/feed_preview", {
item: site.posts.sort('-date')
}) %>
<%- include("_partial/index/partners") %>

View file

@ -30,61 +30,65 @@
</style>
</head>
<body>
<header class="topbar">
<nav>
<!-- Avatar -->
<a href="/">
<div class="topbar-header">
<img src="<%= url_for(theme.banner) %>" alt="<%= config.author %>">
</div>
</a>
<div class="body">
<header class="topbar">
<nav>
<!-- Avatar -->
<a href="/">
<div class="topbar-header">
<img src="<%= url_for(theme.banner) %>" alt="<%= config.author %>">
</div>
</a>
<!-- Topbar Menu -->
<% theme.topbar_menu.forEach(function(menu) { %>
<% if (menu.enable) { %>
<a href="<%= menu.url %>">
<%= menu.name %>
</a>
<% } %>
<% }); %>
<span class="social">
<% theme.social.forEach(function(social) { %>
<% if (social.enable) { %>
<span class="social-icon">
<a href="<%= social.url %>" target="_blank">
<% if (theme.fontawesome) { %>
<i class="<%= social.icon %>"></i>
<% } else { %>
<img src='<%= url_for(theme.avatar) %>'></img>
<% } %>
</a>
</span>
<!-- Topbar Menu -->
<% theme.topbar_menu.forEach(function(menu) { %>
<% if (menu.enable) { %>
<a href="<%= menu.url %>">
<%= menu.name %>
</a>
<% } %>
<% }); %>
</span>
</nav>
</header>
<main>
<!-- BODY -->
<div class="content">
<%- body %>
</div>
<span class="social">
<% theme.social.forEach(function(social) { %>
<% if (social.enable) { %>
<span class="social-icon">
<a href="<%= social.url %>" target="_blank">
<% if (theme.fontawesome) { %>
<i class="<%= social.icon %>"></i>
<% } else { %>
<img src='<%= url_for(theme.avatar) %>'></img>
<% } %>
</a>
</span>
<% } %>
<% }); %>
</span>
<!-- Footer -->
<div class="footer smoll">
<% if (theme.hexo) { %>
<div class="hexo footer">
Powered by Hexo, theme <a href="https://openalt.ro" target="_blank">OpenAlt</a><br>
</div>
<% } %>
<% if (theme.copyright) { %>
<div class="copy footer">
&copy; <%= theme.copy_year %> <%= config.author %>
</div>
<% } %>
</div>
</main>
</nav>
</header>
<main>
<!-- BODY -->
<div class="content">
<%- body %>
</div>
</main>
<!-- Footer -->
<footer>
<div class="footer smoll">
<% if (theme.hexo) { %>
<div class="hexo footer">
Powered by Hexo, theme <a href="https://openalt.ro" target="_blank">OpenAlt</a><br>
</div>
<% } %>
<% if (theme.copyright) { %>
<div class="copy footer">
&copy; <%= theme.copy_year %> <%= config.author %>
</div>
<% } %>
</div>
</footer>
</div>
</body>
</html>

View file

@ -5,6 +5,12 @@ body {
background-color: #0D1117;
}
.body {
display: flex;
flex-direction: column;
min-height: 99vh;
}
h1, h2, h3, h4 {
padding: 0;
margin: 0;
@ -36,13 +42,13 @@ h4 {
a {
text-decoration: none;
color: #0D1117;
color: #31486b;
}
/* Definition of small fonted text, example: footer */
.smoll {
font-size: 12px !important;
line-height: 12px;
line-height: 14px;
}
/* Topbar header section */
@ -61,6 +67,7 @@ a {
/* Topbar menu section */
nav {
width: 80%;
background-color: #0D1117 !important;
list-style: none;
display: flex;
margin: 0 auto;
@ -74,18 +81,7 @@ nav a {
color: #dcdcdf;
}
/* Footer */
.footer {
color: #dcdcdf !important;
text-align: center;
margin-top: 5px;
}
.footer a {
color: #dcdcdf !important;
}
/* Footer - Social */
/* Topbar - Social */
.social {
justify-content: center;
margin: 0.5em 0 0 auto;
@ -116,19 +112,46 @@ nav a {
main {
width: 80%;
margin: 30px auto 0 auto;
flex: 1;
}
.narrow_view{
width: 70%;
margin: 0 auto;
/* Homepage settings */
.post-home img {
border-radius: 5px 5px 0 0;
}
.post {
padding: 1em;
background-color: #dcdcdf;
border-radius: 10px;
box-sizing: border-box;
margin-bottom: 16px;
.post-home .post-blerp {
border-radius: 0 0 5px 5px;
}
.post-feed .post-with-image {
display: flex;
flex-wrap: wrap;
align-items: stretch;
gap: 0;
}
.post-feed .post-with-image img {
border-radius: 5px 0 0 5px;
height: 100%;
object-fit: cover;
}
.post-feed .post-with-image .post-cover {
width: 35% !important;
display: flex;
}
.post-feed .post-with-image .post-blerp {
border-radius: 0 5px 5px 0;
width: 65% !important;
display: flex;
flex-direction: column;
}
.post-feed .post-without-image .post-blerp,
.post-event .post-without-image .post-blerp {
border-radius: 5px;
}
/* Images */
@ -136,21 +159,23 @@ img {
max-width: 100%;
height: auto;
display: block;
border-radius: 10px;
opacity: 1;
transition: all 1s;
}
img:hover {
opacity: 0.95;
}
/* Post */
.post-header {
.post-blerp {
padding: 1em;
background-color: #becadd;
box-sizing: border-box;
line-height: 100%;
color:#0D1117;
}
.post {
margin-bottom: 20px;
}
.date {
color: #0D1117;
font-style: italic;
@ -163,6 +188,27 @@ iframe {
}
/* Post - Top section */
.post-page{
width: 75%;
margin: 0 auto;
}
.post-page img{
border-radius: 5px;
}
.post-page .post-text-wrapper{
border-radius: 5px;
background-color: #becadd;
margin-top: 10px;
}
.post-page .post-text{
width: 75%;
margin: 0 auto;
padding: 40px 0;
}
.article {
font-size: 35px !important;
line-height: 40px !important;
@ -207,18 +253,28 @@ section {
/* Events */
.event-wrapper {
text-align: center;
margin: 75px auto 100px auto;
margin: 0 auto;
min-height: calc(100vh - 63px);
}
.event-spacer{
margin: 10px 0;
}
.event .event-wrapper h1,
.event .event-wrapper h2,
.event .event-wrapper h3,
.event .event-wrapper h4,
.event .event-wrapper a ,
.event .event-wrapper p {
color: #dcdcdf;
padding-bottom: 5px;
}
.event .event-wrapper a {
color: #fcd116;
padding-bottom: 5px;
}
.event-wrapper h1{
font-size: 35px;
line-height: 40px;
@ -227,11 +283,12 @@ section {
.event-wrapper img{
vertical-align: middle;
margin:0 auto 25px auto;
margin:50px auto;
min-width: 400px;
min-height: 400px;
}
/* Feed Preview */
.feed_preview {
display: flex;
flex-wrap: wrap;
@ -244,22 +301,34 @@ section {
/* Partners */
.partners {
display: flex;
flex-wrap: wrap;
gap: 1rem;
gap: 3rem;
list-style: none;
padding: 0;
margin: 0 auto;
}
.partners li {
width: 300px;
width: 200px;
text-align: center;
margin: auto;
}
.partners img {
width: 300px;
}
margin: 25px auto;
width: 200px;
}
/* Footer */
.footer {
color: #dcdcdf !important;
text-align: center;
margin-top: 5px;
}
.footer a {
color: #dcdcdf !important;
}