formatting and semantics
This commit is contained in:
parent
e4443eca9f
commit
6e8a81051e
|
@ -12,8 +12,7 @@
|
|||
href="{{ author.gpg }}" rel="pgpkey authn">GPG</a>{% endif %}</p>
|
||||
<p class="date">
|
||||
Published the
|
||||
|
||||
{% include dates.html %}
|
||||
<time datetime="{{ page.date }}">{% include dates.html %}</time>
|
||||
</p>
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -4,7 +4,53 @@ layout: default
|
|||
{% if page.category == 'releases' %}
|
||||
|
||||
{% include header.html %}
|
||||
<script type="text/javascript">
|
||||
|
||||
function generateRandomPosts()
|
||||
{
|
||||
$.getJSON("/posts.json", function(data) {
|
||||
console.log("[posts.json loaded for random posts]");
|
||||
|
||||
var postsCount = data.length;
|
||||
var posts = data;
|
||||
|
||||
var randomIndexUsed = [];
|
||||
var counter = 0;
|
||||
var numberOfPosts = 1;
|
||||
|
||||
var divRandomPosts = $("#random_posts");
|
||||
|
||||
while (counter < numberOfPosts)
|
||||
{
|
||||
var randomIndex = Math.floor(Math.random() * postsCount);
|
||||
|
||||
if (randomIndexUsed.indexOf(randomIndex) == "-1")
|
||||
{
|
||||
var postHREF = posts[randomIndex].href;
|
||||
var postTitle = posts[randomIndex].title;
|
||||
|
||||
if (counter == (numberOfPosts - 1))
|
||||
{
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
|
||||
randomIndexUsed.push(randomIndex);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
generateRandomPosts();
|
||||
});
|
||||
|
||||
</script>
|
||||
<section id="play">
|
||||
<div class="album-player">
|
||||
|
||||
|
@ -111,7 +157,9 @@ layout: default
|
|||
</div>
|
||||
{% endif %}
|
||||
<p class="right" id="npTitle" style="font-weight: bold;"></p>
|
||||
<p class="left" id="npAction">Paused...</p>
|
||||
|
||||
<p id="npTitle" style="font-weight: bold;"></p>
|
||||
<div id="random_posts" style="margin-right: 40px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -11,40 +11,28 @@ layout: default
|
|||
{% endfor %}
|
||||
<script type="text/javascript">
|
||||
|
||||
function generateRandomPosts()
|
||||
{
|
||||
function generateRandomPosts() {
|
||||
$.getJSON("/posts.json", function (data) {
|
||||
console.log("[posts.json loaded for random posts]");
|
||||
|
||||
var postsCount = data.length;
|
||||
var posts = data;
|
||||
|
||||
var randomIndexUsed = [];
|
||||
var counter = 0;
|
||||
var numberOfPosts = 1;
|
||||
|
||||
var divRandomPosts = $("#random_posts");
|
||||
|
||||
while (counter < numberOfPosts)
|
||||
{
|
||||
while (counter < numberOfPosts) {
|
||||
var randomIndex = Math.floor(Math.random() * postsCount);
|
||||
|
||||
if (randomIndexUsed.indexOf(randomIndex) == "-1")
|
||||
{
|
||||
if (randomIndexUsed.indexOf(randomIndex) == "-1") {
|
||||
var postHREF = posts[randomIndex].href;
|
||||
var postTitle = posts[randomIndex].title;
|
||||
|
||||
if (counter == (numberOfPosts - 1))
|
||||
{
|
||||
if (counter == (numberOfPosts - 1)) {
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
|
||||
randomIndexUsed.push(randomIndex);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ apps:
|
|||
icon: 📺
|
||||
external: true
|
||||
- name: Read
|
||||
link: '/log/#read'
|
||||
link: '/log/'
|
||||
icon: 📰
|
||||
external: false
|
||||
- name: Support
|
||||
|
|
29
log.html
29
log.html
|
@ -11,17 +11,26 @@ image: /images/pages/4-darkweb-instrumental-.jpeg
|
|||
</section>
|
||||
{% for post in site.posts %}
|
||||
{% if post.category == 'ramblings' %}
|
||||
<section class="news" style="margin:0;">
|
||||
|
||||
<div style="background-image:url({{ relBase }}{{ post.image }}"></div>
|
||||
<div class="description">
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p><strong>{% include forloop-dates.html %}</strong></p>
|
||||
<p>{{ post.description }}</p>
|
||||
<p><a href="{{ relBase }}{{ post.url }}#read" class="button">👀 Read post</a></p>
|
||||
<section id="read" class="front-section">
|
||||
<div style="background-image:url({{ post.image }})">
|
||||
<p class="editor-link">
|
||||
<a href="cloudcannon:collections/_posts/{{ post.path }}" rel="nofollow" class="btn">
|
||||
<strong>✎</strong> Edit Post
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="container">
|
||||
<div class="">
|
||||
<h3>{{ post.title }}</h3>
|
||||
<p><strong><time datetime="{{ post.date }}">{% include forloop-dates.html %}</time></strong></p>
|
||||
<p>{{ post.description }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p><a class="button" href="{{ relBase }}{{ post.url }}#read">📰 Read Highlight</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
Loading…
Reference in a new issue