Skip to content

Commit

Permalink
Added some new features
Browse files Browse the repository at this point in the history
* #0: Package scripts dont need prefixes

* #0: Update all linting concerns

* #0: Reorganize deps and plugins, add plugin-theme-data

* #0: Make search configurable

* #0: Prep for contributors page

* #0: Improve sponsor list computed props and performance

* #0: Bounce out sponsor list into right bar slot for better transition experience

* #0: Alternative PageMeta components

* #0: Alternative PageMeta components part 2

* #0: Add in docs tests

* #0: Add in docs tests part 2

* #0: Align deps so they are more consistent with @vuepress/theme-default

* #0: Align deps so they are more consistent with @vuepress/theme-default part 2

* Begin process of markdown-it custom links

* More wins on the JS file and lint fixes

* Add in logix to remove external links stuffs if baseUrl matches

* #0: allow contributorPage to be external link

* #0: Move link plugin defaults to better place

* #0: Reorganize code and dial in basic contrib page

* #0: First pass on contributors page

* #0: Remove repo internally in favor of sourceRepo

* #0: Add options to set baseURL to lando navbar

* #0: Improved debug output

Co-authored-by: John Ouellet <[email protected]>
  • Loading branch information
pirog and John Ouellet authored Nov 17, 2021
1 parent 244cd33 commit 59bebfc
Show file tree
Hide file tree
Showing 44 changed files with 1,809 additions and 965 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.temp
.cache
dist
_site
33 changes: 33 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Tests

on:
pull_request:

jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
node-version:
- '14'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile

# Run tests
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test
- name: Test build
run: yarn build
32 changes: 2 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ bower_components
# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
Expand All @@ -53,12 +50,6 @@ typings/
# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

Expand All @@ -75,33 +66,14 @@ typings/
# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
_site

docs/.vuepress/.temp/
docs/.vuepress/.cache/
docs/.vuepress/.cache/
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github
docs
examples
guides
test
70 changes: 35 additions & 35 deletions lib/components/CarbonAds.vue → components/CarbonAds.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<script>
import { h } from 'vue';
import {h} from 'vue';
export default {
render() {
return h('div', {class: 'carbon-ads'});
},
mounted() {
this.load();
},
watch: {
'$route'(to, from) {
if (
Expand All @@ -22,6 +16,9 @@ export default {
}
},
},
mounted() {
this.load();
},
methods: {
load() {
const s = document.createElement('script');
Expand All @@ -30,41 +27,44 @@ export default {
this.$el.appendChild(s);
},
},
render() {
return h('div', {class: 'carbon-ads'});
},
};
</script>

<style lang="scss">
@import '../styles/main.scss';
.sidebar {
.carbon-ads {
a {
display: block;
}
}
.carbon-ads {
a {
display: block;
}
}
}
.carbon-ads {
min-height: 102px;
padding: 1.5rem 1.5rem 0;
margin-bottom: -0.5rem;
font-size: 0.75rem;
a {
color: #444;
font-weight: normal;
display: inline;
}
.carbon-img {
float: left;
margin-right: 1rem;
border: 1px solid var(--c-border);
img {
display: block;
}
}
.carbon-poweredby {
color: #999;
display: block;
margin-top: 0.5em;
}
min-height: 102px;
padding: 1.5rem 1.5rem 0;
margin-bottom: -0.5rem;
font-size: 0.75rem;
a {
color: #444;
font-weight: normal;
display: inline;
}
.carbon-img {
float: left;
margin-right: 1rem;
border: 1px solid var(--c-border);
img {
display: block;
}
}
.carbon-poweredby {
color: #999;
display: block;
margin-top: 0.5em;
}
}
.dark {
a.carbon-text {
Expand All @@ -75,6 +75,6 @@ export default {
.carbon-ads .carbon-img img {
width: 100px;
height: 77px;
}
}
}
</style>
70 changes: 70 additions & 0 deletions components/Contributor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<div class="contributor-block">
<div class="contributor-block-pic">
<img
:src="props.img"
:alt="props.name"
>
</div>
<div class="contributor-block-name">
<a
:href="props.link"
target="_blank"
rel="noopener noreferrer"
>
<h2>{{ props.name }}<OutboundLink /></h2>
</a>
<div class="contributor-block-score">
{{ props.score }}
</div>
</div>
</div>
</template>

<script setup>
const props = defineProps({
name: {
type: String,
required: true,
},
img: {
type: String,
required: true,
},
link: {
type: String,
required: true,
},
score: {
type: String,
required: true,
},
});
</script>

<style lang="scss" scoped>
@import '../styles/main.scss';
.contributor-block {
width: 150px;
padding: 15px 0;
text-align: center;
h2 {
font-size: .80rem;
border: 0;
padding: 0;
margin: 0;
}
.contributor-block-score {
font-size: small;
font-weight: 400;
color: var(--c-text-quote);
}
.contributor-block-pic {
padding: 10px 0;
img {
width: 110px;
border-radius: 50% !important;
}
}
}
</style>
25 changes: 25 additions & 0 deletions components/CustomPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<main class="page">
<slot name="top" />

<div class="theme-default-content">
<Content />
</div>

<CustomPageMeta />

<PageNav />

<slot name="bottom" />
</main>
</template>

<script setup>
// Get parent page nav
import PageNav from '@vuepress/theme-default/lib/client/components/PageNav.vue';
// Use our custom page meta component
import CustomPageMeta from './CustomPageMeta.vue';
</script>

<style lang="scss">
</style>
Loading

0 comments on commit 59bebfc

Please sign in to comment.