Commit 5996ffe9 authored by Yashu Mittal's avatar Yashu Mittal 👍🏻

Prettify the files

parent 9aab60b0
<template>
<nav class="site-nav">
<div class="site-nav-left">
<div v-if="logo">
<a v-if="Admin.site.logo" class="site-nav-logo" :href="Admin.site.url">
<img :src="Admin.site.logo" :alt="Admin.site.title" />
</a>
<a v-else class="site-nav-logo" :href="Admin.site.url">{{ Admin.site.title }}</a>
</div>
<Navigation v-if="Admin.site.navigation"/>
</div>
<div class="site-nav-right">
<div class="social-links">
<a v-if="Admin.social_media.patreon" class="social-link social-link-p" :href="'https://www.patreon.com/' + Admin.social_media.patreon" title="Become My Patreon" target="_blank" rel="noopener">
<Patreon/>
</a>
<a v-if="Admin.social_media.facebook" class="social-link social-link-fb" :href="'https://facebook.com/' + Admin.social_media.facebook" title="Facebook" target="_blank" rel="noopener">
<Facebook/>
</a>
<a v-if="Admin.social_media.twitter" class="social-link social-link-tw" :href="'https://twitter.com/' + Admin.social_media.twitter" title="Twitter" target="_blank" rel="noopener">
<Twitter/>
</a>
</div>
<a v-if="Admin.site.subscribers" class="subscribe-button" href="#subscribe">Subscribe</a>
<a v-else class="rss-button" href="/feed.xml" title="RSS" target="_blank" rel="noopener">
<RSS/>
</a>
<nav class="site-nav">
<div class="site-nav-left">
<div v-if="logo">
<a v-if="Admin.site.logo" class="site-nav-logo" :href="Admin.site.url">
<img :src="Admin.site.logo" :alt="Admin.site.title">
</a>
<a v-else class="site-nav-logo" :href="Admin.site.url">{{ Admin.site.title }}</a>
</div>
<Navigation v-if="Admin.site.navigation"/>
</div>
<div class="site-nav-right">
<div class="social-links">
<a
v-if="Admin.social_media.patreon"
class="social-link social-link-p"
:href="'https://www.patreon.com/' + Admin.social_media.patreon"
title="Become My Patreon"
target="_blank"
rel="noopener"
>
<Patreon/>
</a>
<a
v-if="Admin.social_media.facebook"
class="social-link social-link-fb"
:href="'https://facebook.com/' + Admin.social_media.facebook"
title="Facebook"
target="_blank"
rel="noopener"
>
<Facebook/>
</a>
<a
v-if="Admin.social_media.twitter"
class="social-link social-link-tw"
:href="'https://twitter.com/' + Admin.social_media.twitter"
title="Twitter"
target="_blank"
rel="noopener"
>
<Twitter/>
</a>
</div>
<a v-if="Admin.site.subscribers" class="subscribe-button" href="#subscribe">Subscribe</a>
<a v-else class="rss-button" href="/feed.xml" title="RSS" target="_blank" rel="noopener">
<RSS/>
</a>
</div>
</nav>
</nav>
</template>
<script>
import Admin from '../../data/admin.yml';
import Navigation from './Navigation'
import Admin from "../../data/admin.yml";
import Navigation from "./Navigation";
// Icons
import Facebook from './icons/Facebook'
import Twitter from './icons/Twitter'
import Patreon from './icons/Patreon'
import RSS from './icons/RSS'
// Icons
import Facebook from "./icons/Facebook";
import Twitter from "./icons/Twitter";
import Patreon from "./icons/Patreon";
import RSS from "./icons/RSS";
export default {
props: {
logo: {
type: Boolean,
default: false
}
},
components: {
Navigation, Patreon, Facebook, Twitter, RSS
},
computed: {
Admin() {
return Admin
}
}
}
export default {
props: {
logo: {
type: Boolean,
default: false
}
},
components: {
Navigation,
Patreon,
Facebook,
Twitter,
RSS
},
computed: {
Admin() {
return Admin;
}
}
};
</script>
<style lang="sass">
......
<template>
<Layout>
<header class="site-header outer">
<div class="inner">
<Navbar :logo=true />
<Navbar :logo="true"/>
</div>
</header>
<!-- <FloatingHeader/> -->
<main id="site-main" class="site-main outer">
<div class="inner">
<article :class=postClass>
<article :class="postClass">
<header class="post-full-header">
<section class="post-full-meta">
<!-- FIXME Date format -->
<time class="post-full-meta-date" :datetime="$page.post.date">{{$page.post.date}}</time>
<span class="date-divider">/</span>
<a :href="'/tag/' + $page.post.tags.title">{{ $page.post.tags.title.replace('-', ' ') }}</a>
<a
:href="'/tag/' + $page.post.tags.title"
>{{ $page.post.tags.title.replace('-', ' ') }}</a>
</section>
<h1 class="post-full-title">{{ $page.post.title }}</h1>
</header>
......@@ -27,27 +28,24 @@
</figure>
<section class="post-full-content">
<div class="post-content" v-html="$page.post.content">
</div>
<div class="post-content" v-html="$page.post.content"></div>
</section>
<!-- Email subscribe form at the bottom of the page -->
<section v-if="Admin.site.subscribers" class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{ Admin.site.title }}</h3>
<p>Get the latest posts delivered right to your inbox</p>
<subscribeForm placeholder="[email protected]" />
<subscribeForm placeholder="[email protected]"/>
</section>
<bylineMultiple :author="$page.post.author" v-if="$page.post.author.length > 1"/>
<bylineSingle :author="$page.post.author" v-else />
<bylineSingle :author="$page.post.author" v-else/>
<!-- NOTE Comment section -->
<!-- <section class="post-full-comments">
If you want to embed comments, this is a good place to do it!
</section> -->
</section>-->
</article>
</div>
</main>
......@@ -56,40 +54,46 @@
</template>
<script>
import Admin from '../../data/admin.yml';
import Navbar from '../components/Navbar';
import subscribeForm from '../components/subscribeForm';
import bylineMultiple from '../components/bylineMultiple';
import bylineSingle from '../components/bylineSingle';
import PreviousNext from '../components/PreviousNext';
import Admin from "../../data/admin.yml";
import Navbar from "../components/Navbar";
import FloatingHeader from "../components/FloatingHeader";
import subscribeForm from "../components/subscribeForm";
import bylineMultiple from "../components/bylineMultiple";
import bylineSingle from "../components/bylineSingle";
import PreviousNext from "../components/PreviousNext";
export default {
metaInfo() {
return {
title: this.$page.post.title,
bodyAttrs: {
class: `post-template tag-${this.$page.post.tags.title}`
}
export default {
metaInfo() {
return {
title: this.$page.post.title,
bodyAttrs: {
class: `post-template tag-${this.$page.post.tags.title}`
}
};
},
components: {
Navbar,
FloatingHeader,
subscribeForm,
bylineMultiple,
bylineSingle,
PreviousNext
},
computed: {
Admin() {
return Admin;
},
components: {
Navbar, subscribeForm, bylineMultiple, bylineSingle, PreviousNext
},
computed: {
Admin() {
return Admin
},
postClass() {
let classes = ['post-full', 'post'];
if (!this.$page.post.image) {
classes.push('no-image')
}
const postTagClass = 'tag-' + this.$page.post.tags.title;
classes.push(postTagClass);
return classes
postClass() {
let classes = ["post-full", "post"];
if (!this.$page.post.image) {
classes.push("no-image");
}
const postTagClass = "tag-" + this.$page.post.tags.title;
classes.push(postTagClass);
return classes;
}
}
};
</script>
// Fixme the date format (format: "D MMMM YYYY")
<page-query>
......@@ -100,6 +104,17 @@
date
tags {
title
belongsTo {
edges {
node {
... on Post {
id
title
path
}
}
}
}
}
image
author {
......
......@@ -59,6 +59,7 @@ export default {
}
};
</script>
<page-query>
query Tags ($id: String!) {
tag (id: $id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment