Skip to content

Commit b89d365

Browse files
committed
wip
1 parent d2dbb06 commit b89d365

File tree

11 files changed

+60
-63
lines changed

11 files changed

+60
-63
lines changed

build/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const watch = require('metalsmith-watch');
1313
const when = require('metalsmith-if');
1414

1515
// custom plugins
16+
const link_index = require('./plugins/link_index');
1617
const changeExt = require('./plugins/change-ext');
1718
const markdown = require('./plugins/markdown');
18-
const partials = require('./plugins/partials');
1919
const layouts = require('./plugins/layouts');
2020
const toc = require('./plugins/toc');
2121

@@ -104,6 +104,7 @@ Metalsmith(cwd)
104104
.use(linkcheck({
105105
failMissing: false
106106
}))
107+
.use(link_index())
107108
// build the site
108109
.build((err) => {
109110
if (err) {

build/plugins/link_index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function plugin(opts) {
2+
3+
return function (files, metalsmith, done) {
4+
const links = [];
5+
6+
Object.keys(files).forEach((file) => {
7+
const data = files[file];
8+
if(data.path) {
9+
links.push(`/${data.path}`)
10+
}
11+
});
12+
13+
console.log(links);
14+
done();
15+
}
16+
}
17+
18+
module.exports = plugin;

build/plugins/partials.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

content/index_en.ejs

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,40 @@
22
layout: landing.ejs
33
---
44

5-
<div class="bg-blue-dark">
6-
<div class="container mx-auto p-8">
7-
Index
5+
<div class="bg-blue-light">
6+
<div class="container mx-auto px-4 py-8">
7+
8+
<div class="w-1/2 my-8">
9+
<h1 class="text-5xl leading-tight text-white">Truly native apps using Vue.js and NativeScript</h1>
10+
11+
<p class="w-4/5 leading-loose text-white mt-4">
12+
Want to release that app you've been dreaming about
13+
without the hassle of learning new languages?
14+
15+
NativeScript-Vue is the right choice for you!
16+
</p>
17+
18+
<a href="#" class="px-8 py-4 inline-block bg-green text-white font-bold text-lg no-underline mt-8">
19+
Get Started
20+
</a>
21+
</div>
22+
823
</div>
924
</div>
1025

11-
<div class="container mx-auto p-8">
12-
<div class="flex -mx-8">
13-
<div class="w-1/2 px-8 bg-grey-light">
14-
<h4>Docs</h4>
15-
<%- include('_partials/links', { posts: collections.blog }) %>
26+
<div class="container mx-auto py-8 ">
27+
<div class="flex -mx-4">
28+
<div class="w-1/2 px-4">
29+
<div class="bg-grey-lighter p-4">
30+
<h4>Docs</h4>
31+
<%- include('_partials/links', { posts: collections.blog }) %>
32+
</div>
1633
</div>
17-
<div class="w-1/2 px-8 bg-grey-light">
18-
<h4>Posts</h4>
19-
<%- include('_partials/links', { posts: collections.docs }) %>
34+
<div class="w-1/2 px-4">
35+
<div class="bg-grey-lighter p-4">
36+
<h4>Posts</h4>
37+
<%- include('_partials/links', { posts: collections.docs }) %>
38+
</div>
2039
</div>
2140
</div>
2241
</div>

layouts/_partials/header.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div class="inline text-blue-lightest mr-4 py-4 relative group">
4242
Community
4343

44-
<div class="pl-4 mt-3 md:pl-0 md:hidden group-hover:block hover:block md:absolute md:bg-white md:border md:shadow md:rounded md:pin-r">
44+
<div class="pl-4 mt-3 md:pl-0 md:hidden group-hover:block hover:block md:absolute md:bg-white md:shadow md:rounded md:pin-r overflow-hidden">
4545
<div class="flex flex-col">
4646
<a href="#" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">GitHub</a>
4747
<a href="#" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">Slack</a>
@@ -52,10 +52,10 @@
5252
<svg class="w-4 h-4 fill-current -mb-px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M20,10c0,-5.532 -4.488,-10 -10,-10c-5.509,0 -10,4.465 -10,10c0,5.522 4.477,10 10,10c5.52,0 10,-4.475 10,-10Zm-1.678,2.581l-4.01,0c0.277,-1.73 0.266,-3.497 0.002,-5.162l4.008,0c0.517,1.67 0.517,3.492 0,5.162Zm-8.322,6.064c-1.239,-1.118 -2.183,-2.803 -2.72,-4.774l5.44,0c-0.537,1.971 -1.481,3.656 -2.72,4.774Zm-3.006,-6.064c-0.29,-1.669 -0.297,-3.449 0.001,-5.162l6.01,0c0.298,1.712 0.291,3.492 0.001,5.162l-6.012,0Zm3.006,-11.225c1.353,1.221 2.24,3.022 2.718,4.773l-5.436,0c0.48,-1.76 1.37,-3.556 2.718,-4.773Zm7.804,4.773l-3.75,0c-0.441,-1.78 -1.184,-3.375 -2.173,-4.635c2.588,0.569 4.762,2.295 5.923,4.635Zm-9.685,-4.635c-0.989,1.26 -1.732,2.855 -2.173,4.635l-3.75,0c1.161,-2.34 3.335,-4.066 5.923,-4.635Zm-6.441,5.925l4.008,0c-0.264,1.665 -0.275,3.432 0.002,5.162l-4.01,0c-0.517,-1.67 -0.517,-3.492 0,-5.162Zm0.518,6.452l3.755,0c0.443,1.781 1.188,3.38 2.17,4.636c-2.602,-0.572 -4.77,-2.308 -5.925,-4.636Zm9.683,4.636c0.982,-1.256 1.727,-2.855 2.17,-4.636l3.755,0c-1.157,2.332 -3.327,4.065 -5.925,4.636Z" style="fill-rule:nonzero;"/></svg>
5353
<span class="md:hidden">Language</span>
5454

55-
<div class="pl-4 mt-3 md:pl-0 md:hidden group-hover:block hover:block md:absolute md:bg-white md:border md:shadow md:rounded md:pin-r">
55+
<div class="pl-4 mt-3 md:pl-0 md:hidden group-hover:block hover:block md:absolute md:bg-white md:shadow md:rounded md:pin-r overflow-hidden">
5656
<div class="flex flex-col">
57-
<a href="#" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2" @click.prevent="switchLang('en')">en</a>
58-
<a href="#" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2" @click.prevent="switchLang('hu')">hu</a>
57+
<a href="/" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">en</a>
58+
<a href="/hu" class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">hu</a>
5959
</div>
6060
</div>
6161
</div>

layouts/_partials/links.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<ul>
1+
<ul class="list-reset">
22
<% posts.forEach((post) => { %>
33
<li>
4-
<a href="/<%= post.path %>"><%= post.title %></a>
4+
<a class="no-underline text-green hover:underline" href="/<%= post.path %>"><%= post.title %></a>
55
</li>
66
<% }) %>
77
</ul>

layouts/default.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title><%= sitename %></title>
9+
<link rel="stylesheet" href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<link rel="stylesheet" href="/styles.css">
1011
</head>
1112
<body>

layouts/landing.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title><%= sitename %></title>
9+
<link rel="stylesheet" href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<link rel="stylesheet" href="/styles.css">
1011
</head>
1112
<body>

layouts/no_sidebar.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title><%= sitename %></title>
9+
<link rel="stylesheet" href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<link rel="stylesheet" href="/styles.css">
1011
</head>
1112
<body>

src/main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ document.addEventListener('DOMContentLoaded', () => {
1818
window.removeEventListener('resize', this._resizeListener)
1919
},
2020
methods: {
21-
switchLang(new_lang) {
22-
window.location.href = window.location.href + '/' + new_lang === 'en' ? '' : new_lang
23-
}
2421
}
2522
});
2623
});

static/main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ document.addEventListener('DOMContentLoaded', function () {
2222
window.removeEventListener('resize', this._resizeListener);
2323
},
2424

25-
methods: {
26-
switchLang: function switchLang(new_lang) {
27-
window.location.href = window.location.href + '/' + new_lang === 'en' ? '' : new_lang;
28-
}
29-
}
25+
methods: {}
3026
});
3127
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy