Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb89d365

Browse files
committed
wip
1 parentd2dbb06 commitb89d365

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
constwhen=require('metalsmith-if');
1414

1515
// custom plugins
16+
constlink_index=require('./plugins/link_index');
1617
constchangeExt=require('./plugins/change-ext');
1718
constmarkdown=require('./plugins/markdown');
18-
constpartials=require('./plugins/partials');
1919
constlayouts=require('./plugins/layouts');
2020
consttoc=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+
functionplugin(opts){
2+
3+
returnfunction(files,metalsmith,done){
4+
constlinks=[];
5+
6+
Object.keys(files).forEach((file)=>{
7+
constdata=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-
<divclass="bg-blue-dark">
6-
<divclass="container mx-auto p-8">
7-
Index
5+
<divclass="bg-blue-light">
6+
<divclass="container mx-auto px-4 py-8">
7+
8+
<divclass="w-1/2 my-8">
9+
<h1class="text-5xl leading-tight text-white">Truly native apps using Vue.js and NativeScript</h1>
10+
11+
<pclass="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+
<ahref="#"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-
<divclass="container mx-auto p-8">
12-
<divclass="flex -mx-8">
13-
<divclass="w-1/2 px-8 bg-grey-light">
14-
<h4>Docs</h4>
15-
<%-include('_partials/links', { posts:collections.blog })%>
26+
<divclass="container mx-auto py-8">
27+
<divclass="flex -mx-4">
28+
<divclass="w-1/2 px-4">
29+
<divclass="bg-grey-lighter p-4">
30+
<h4>Docs</h4>
31+
<%-include('_partials/links', { posts:collections.blog })%>
32+
</div>
1633
</div>
17-
<divclass="w-1/2 px-8 bg-grey-light">
18-
<h4>Posts</h4>
19-
<%-include('_partials/links', { posts:collections.docs })%>
34+
<divclass="w-1/2 px-4">
35+
<divclass="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
<divclass="inline text-blue-lightest mr-4 py-4 relative group">
4242
Community
4343

44-
<divclass="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+
<divclass="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
<divclass="flex flex-col">
4646
<ahref="#"class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">GitHub</a>
4747
<ahref="#"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
<spanclass="md:hidden">Language</span>
5454

55-
<divclass="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+
<divclass="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
<divclass="flex flex-col">
57-
<ahref="#"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-
<ahref="#"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+
<ahref="/"class="no-underline text-blue-lightest md:text-blue-dark hover:bg-green hover:text-white px-4 py-2">en</a>
58+
<ahref="/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+
<ulclass="list-reset">
22
<%posts.forEach((post)=> {%>
33
<li>
4-
<a href="/<%= post.path %>"><%=post.title%></a>
4+
<aclass="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
<metahttp-equiv="X-UA-Compatible"content="ie=edge">
88
<title><%= sitename%></title>
9+
<linkrel="stylesheet"href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<linkrel="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
<metahttp-equiv="X-UA-Compatible"content="ie=edge">
88
<title><%= sitename%></title>
9+
<linkrel="stylesheet"href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<linkrel="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
<metahttp-equiv="X-UA-Compatible"content="ie=edge">
88
<title><%= sitename%></title>
9+
<linkrel="stylesheet"href="https://unpkg.com/github-markdown-css@2.9.0/github-markdown.css">
910
<linkrel="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
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp