Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
ADD: update with template and add favicon;
Browse files Browse the repository at this point in the history
  • Loading branch information
denistsoi committed May 22, 2020
1 parent 1831dbb commit 77546de
Show file tree
Hide file tree
Showing 35 changed files with 8,175 additions and 70 deletions.
151 changes: 101 additions & 50 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,108 @@
const container = require("markdown-it-container");

function createContainer(type, defaultTitle) {
return [
container,
type,
{
render(tokens, idx) {
const token = tokens[idx];
const info = token.info
.trim()
.slice(type.length)
.trim();
const title = info || defaultTitle;
if (token.nesting === 1) {
return `<div class="${type} custom-block text-sm md:text-base"><p class="custom-block-title">${title}</p>\n`;
} else {
return `</div>\n`;
}
}
}
];
return [
container,
type,
{
render(tokens, idx) {
const token = tokens[idx];
const info = token.info
.trim()
.slice(type.length)
.trim();
const title = info || defaultTitle;
if (token.nesting === 1) {
return `<div class="${type} custom-block text-sm md:text-base"><p class="custom-block-title">${title}</p>\n`;
} else {
return `</div>\n`;
}
},
},
];
}

module.exports = {
base: "/",
title: "Denis Tsoi",
description: "Code to eat 🍞",
postcss: {
plugins: [
require("tailwindcss")("./tailwind.config.js"),
require("autoprefixer")
]
},
themeConfig: {
nav: [{ text: "cv", link: "/cv/" }, { text: "refugeek", link: "/rg/" }]
},
markdown: {
// options for markdown-it-anchor
anchor: { permalink: false },
// options for markdown-it-toc
toc: { includeLevel: [1, 2] },
extendMarkdown: md => {
// use more markdown-it plugins!
md.use(...createContainer("tip", "TIP")).use(
...createContainer("job", "")
);
}
},
configureWebpack: {
resolve: {
alias: {
"@assets": "theme/assets/"
}
}
}
base: "/",
title: "Denis Tsoi",
description: "Code to eat 🍞",
head: [
[
"link",
{
rel: "apple-touch-icon",
sizes: "180x180",
href: "/assets/favicons/apple-touch-icon.png",
},
],
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/assets/favicons/favicon-32x32.png",
},
],
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/assets/favicons/favicon-16x16.png",
},
],
["link", { rel: "manifest", href: "/assets/favicons/site.webmanifest" }],
[
"link",
{
rel: "mask-icon",
href: "/assets/favicons/safari-pinned-tab.svg",
color: "#3a0839",
},
],
["link", { rel: "shortcut icon", href: "/assets/favicons/favicon.ico" }],
["meta", { name: "msapplication-TileColor", content: "#3a0839" }],
[
"meta",
{
name: "msapplication-config",
content: "/assets/favicons/browserconfig.xml",
},
],
["meta", { name: "theme-color", content: "#ffffff" }],
],
postcss: {
plugins: [
require("tailwindcss")("./tailwind.config.js"),
require("autoprefixer"),
],
},
themeConfig: {
nav: [
{ text: "cv", link: "/cv/" },
{ text: "refugeek", link: "/rg/" },
{ text: "templates", link: "/templates/" },
],
},
markdown: {
// options for markdown-it-anchor
anchor: { permalink: false },
// options for markdown-it-toc
toc: { includeLevel: [1, 2] },
extendMarkdown: (md) => {
// use more markdown-it plugins!
md.use(...createContainer("tip", "TIP")).use(
...createContainer("job", "")
);
},
},
configureWebpack: {
resolve: {
alias: {
"@assets": "theme/assets/",
},
},
},
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/apple-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/apple-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/apple-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/apple-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/.vuepress/public/assets/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
Binary file added docs/.vuepress/public/assets/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/favicon.ico
Binary file not shown.
41 changes: 41 additions & 0 deletions docs/.vuepress/public/assets/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}
Binary file added docs/.vuepress/public/assets/ms-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/ms-icon-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/ms-icon-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/ms-icon-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@

<script>
import coreheader from "./core/header";
import detail from "./layouts/detail";
import home from "./layouts/home";
import Detail from "./layouts/Detail";
import Home from "./layouts/Home";
import Template from "./layouts/Template";
export default {
components: {
coreheader,
detail,
home
Detail,
Home,
Template
},
computed: {
layout() {
return this.$page.frontmatter.layout || "home";
return this.$page.frontmatter.layout || "Home";
}
}
};
Expand Down
24 changes: 24 additions & 0 deletions docs/.vuepress/theme/layouts/Template.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div>
<coreheader :showLinks="true" />
<div class="w-full md:w-4/5 text-gray m-auto p-4 md:p-8 max-w-2xl">
<Content />
</div>
<corefooter />
</div>
</template>

<script>
import coreheader from "../core/header";
import corefooter from "../core/footer";
export default {
components: {
coreheader,
corefooter
}
};
</script>

<style lang="stylus">
@import '../styles/theme.styl';
</style>
29 changes: 16 additions & 13 deletions docs/.vuepress/theme/layouts/home.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<template>
<div class="w-full md:w-4/5 text-gray m-auto p-4 md:p-8 max-w-2xl">
<Content class="text-sm md:text-base" />

<div class="my-4">
<Content slot-key="links" />
</div>

<div class="my-4">
<span>Social</span>
<Content slot-key="socials" />
<div>
<div class="w-full md:w-4/5 text-gray m-auto p-4 md:p-8 max-w-2xl">
<Content class="text-sm md:text-base" />

<div class="my-4">
<Content slot-key="links" />
</div>
<div class="my-4">
<span>Social</span>
<Content slot-key="socials" />
</div>
<Content slot-key="image" />
</div>

<Content slot-key="image" />
<corefooter />
</div>
</template>

<script>
export default {};
export default {
name: "Home"
};
</script>

<style lang="stylus">
Expand Down
4 changes: 3 additions & 1 deletion docs/cv/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "cv"
layout: "detail"
layout: "Detail"
---

::: tip Summary
Expand Down Expand Up @@ -108,6 +108,8 @@ Various

## Education

###

### 04/2013 - 08/2013

::: job
Expand Down
2 changes: 1 addition & 1 deletion docs/rg/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "refugeek"
layout: "detail"
layout: "Detail"
---

# Contents
Expand Down
5 changes: 5 additions & 0 deletions docs/template/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "template"
layout: "Template"
---

Loading

0 comments on commit 77546de

Please sign in to comment.