Moved "Tour" and components to its own folder, plus fixes
This commit is contained in:
parent
cfb1b28ac6
commit
ba966c30a3
13 changed files with 139 additions and 83 deletions
|
@ -2,8 +2,8 @@ root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
24
.eslintrc.json
Normal file
24
.eslintrc.json
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es6": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:vue/strongly-recommended"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2017,
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"experimentalObjectRestSpread": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||||
|
"linebreak-style": ["error", "unix"],
|
||||||
|
"quotes": ["error", "double"],
|
||||||
|
"semi": ["error", "always"]
|
||||||
|
}
|
||||||
|
}
|
|
@ -141,6 +141,9 @@
|
||||||
case "push":
|
case "push":
|
||||||
return `https://github.com/${event.repo.name}/tree/${event.payload.ref.replace("refs/heads/", "")}`;
|
return `https://github.com/${event.repo.name}/tree/${event.payload.ref.replace("refs/heads/", "")}`;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,33 +2,32 @@
|
||||||
<div class="hook" id="hook">
|
<div class="hook" id="hook">
|
||||||
<nav class="hook__navigation" id="hook-navigation">
|
<nav class="hook__navigation" id="hook-navigation">
|
||||||
<div class="inner-wrap">
|
<div class="inner-wrap">
|
||||||
<a href="#" v-on:click.prevent="activeStep = 1" class="hook__navigation__step" v-bind:class="{active: (activeStep==1)}">
|
<a href="#" v-on:click.prevent="activeStep = 1" class="hook__navigation__step" v-bind:class="{ active: (activeStep === 1) }">
|
||||||
<span class="number">1</span>
|
<span class="number">1</span>
|
||||||
Resolve a claim
|
Resolve a claim
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" v-on:click.prevent="activeStep = 2" class="hook__navigation__step" v-bind:class="{active: (activeStep==2)}">
|
<a href="#" v-on:click.prevent="activeStep = 2" class="hook__navigation__step" v-bind:class="{ active: (activeStep === 2) }">
|
||||||
<span class="number">2</span>
|
<span class="number">2</span>
|
||||||
Publish content
|
Publish content
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" v-on:click.prevent="activeStep = 3" class="hook__navigation__step" v-bind:class="{active: (activeStep==3)}">
|
<a href="#" v-on:click.prevent="activeStep = 3" class="hook__navigation__step" v-bind:class="{ active: (activeStep === 3) }">
|
||||||
<span class="number">3</span>
|
<span class="number">3</span>
|
||||||
Support with LBC
|
Support with LBC
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<Step1 v-if="activeStep == 1"></Step1>
|
<Tour-Step1 v-if="activeStep === 1"/>
|
||||||
<Step2 v-if="activeStep == 2"></Step2>
|
<Tour-Step2 v-if="activeStep === 2"/>
|
||||||
<Step3 v-if="activeStep == 3"></Step3>
|
<Tour-Step3 v-if="activeStep === 3"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import EventBus from "../../event-bus";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import EventBus from "../event-bus";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
|
@ -39,10 +38,7 @@
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
const component = this;
|
const component = this;
|
||||||
|
EventBus.$on("HookStepUpdate", step => component.activeStep = step);
|
||||||
EventBus.$on("HookStepUpdate", step => {
|
|
||||||
component.activeStep = step;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
name: "Hook"
|
name: "Hook"
|
||||||
|
@ -50,13 +46,13 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "../../../node_modules/highlight.js/styles/monokai-sublime";
|
@import "../../../../node_modules/highlight.js/styles/monokai-sublime";
|
||||||
@import "../scss/init/colors";
|
@import "../../scss/init/colors";
|
||||||
@import "../scss/init/extends";
|
@import "../../scss/init/extends";
|
||||||
@import "../scss/init/mixins";
|
@import "../../scss/init/mixins";
|
||||||
@import "../scss/partials/animation";
|
@import "../../scss/partials/animation";
|
||||||
@import "../scss/partials/modal";
|
@import "../../scss/partials/modal";
|
||||||
@import "../scss/pages/page";
|
@import "../../scss/pages/page";
|
||||||
|
|
||||||
.hook {
|
.hook {
|
||||||
.loader {
|
.loader {
|
||||||
|
@ -391,7 +387,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
background-image: url("../media/svg/down.svg");
|
background-image: url("../../media/svg/down.svg");
|
||||||
background-position: 99% center;
|
background-position: 99% center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 1rem;
|
background-size: 1rem;
|
|
@ -71,7 +71,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import EventBus from "../event-bus";
|
import EventBus from "../../event-bus";
|
||||||
import hljs from "highlight.js";
|
import hljs from "highlight.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
|
@ -110,15 +110,15 @@
|
||||||
data () {
|
data () {
|
||||||
const images = [
|
const images = [
|
||||||
{
|
{
|
||||||
src: "./carlsagan2.jpg",
|
src: "../carlsagan2.jpg",
|
||||||
alt: "Carl Sagan"
|
alt: "Carl Sagan"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: "./doge-meme.jpg",
|
src: "../doge-meme.jpg",
|
||||||
alt: "Doge"
|
alt: "Doge"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: "lbry-green.png",
|
src: "../lbry-green.png",
|
||||||
alt: "LBRY Logo With Green Background"
|
alt: "LBRY Logo With Green Background"
|
||||||
}
|
}
|
||||||
];
|
];
|
|
@ -74,7 +74,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import EventBus from "../event-bus";
|
import EventBus from "../../event-bus";
|
||||||
import hljs from "highlight.js";
|
import hljs from "highlight.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
.page__header {
|
.page__header {
|
||||||
@include center;
|
@include center;
|
||||||
background-image: url("../media/images/background-a.jpg");
|
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
@ -43,7 +42,6 @@
|
||||||
|
|
||||||
|
|
||||||
.page__content {
|
.page__content {
|
||||||
background-image: url("../media/images/grid.png");
|
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
background-size: 32px;
|
background-size: 32px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<li class="home__feature">
|
<li class="home__feature">
|
||||||
<p class="home__feature__title"><strong>New to LBRY?</strong></p>
|
<p class="home__feature__title"><strong>New to LBRY?</strong></p>
|
||||||
<p class="home__feature__description">Learn how LBRY works in 3 easy steps</p>
|
<p class="home__feature__description">Learn how LBRY works in 3 easy steps</p>
|
||||||
<router-link class="home__feature__cta" to="tour.html">Take the Tour</router-link>
|
<router-link class="home__feature__cta" to="/tour/">Take the Tour</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="home__feature">
|
<li class="home__feature">
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<GithubFeed></GithubFeed>
|
<GithubFeed/>
|
||||||
|
|
||||||
<section class="contribute">
|
<section class="contribute">
|
||||||
<div class="inner-wrap">
|
<div class="inner-wrap">
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
<Content></Content>
|
<Content></Content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="$page.path === '/tour.html'">
|
<template v-else-if="$page.frontmatter.tour">
|
||||||
<Content></Content>
|
<Content></Content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -273,11 +273,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import VueResource from "vue-resource";
|
|
||||||
import VueMoment from "vue-moment";
|
import VueMoment from "vue-moment";
|
||||||
|
import VueResource from "vue-resource";
|
||||||
|
|
||||||
Vue.use(VueResource);
|
|
||||||
Vue.use(VueMoment);
|
Vue.use(VueMoment);
|
||||||
|
Vue.use(VueResource);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
|
@ -393,4 +393,18 @@
|
||||||
@import "../scss/pages/documentation";
|
@import "../scss/pages/documentation";
|
||||||
@import "../scss/partials/navigation";
|
@import "../scss/partials/navigation";
|
||||||
@import "../scss/partials/footer";
|
@import "../scss/partials/footer";
|
||||||
|
|
||||||
|
/**
|
||||||
|
Relative links wreak havoc with nested components extending entire CSS
|
||||||
|
files. In this case, `content/.vuepress/components/Tour/Hook.vue`
|
||||||
|
needs the below style rules removed in order to work.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.page__header {
|
||||||
|
background-image: url("../media/images/background-a.jpg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.page__content {
|
||||||
|
background-image: url("../media/images/grid.png");
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
title: Tour
|
|
||||||
---
|
|
||||||
|
|
||||||
<Hook/>
|
|
6
content/tour/index.md
Normal file
6
content/tour/index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
tour: true
|
||||||
|
title: Tour
|
||||||
|
---
|
||||||
|
|
||||||
|
<Tour-Hook/>
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "lbry.tech",
|
"name": "lbry.tech",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A Vue.js project",
|
"description": "Documentation for the LBRY protocol and associated projects",
|
||||||
"author": "",
|
"author": "LBRY Team",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "./node_modules/vuepress/bin/vuepress.js dev content",
|
"dev": "./node_modules/vuepress/bin/vuepress.js dev content",
|
||||||
|
@ -47,6 +47,8 @@
|
||||||
"chai-cheerio": "^1.0.0",
|
"chai-cheerio": "^1.0.0",
|
||||||
"chai-http": "^4.0.0",
|
"chai-http": "^4.0.0",
|
||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
|
"eslint": "^5.0.1",
|
||||||
|
"eslint-plugin-vue": "^4.5.0",
|
||||||
"mocha": "^5.2.0"
|
"mocha": "^5.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
60
test/api.js
60
test/api.js
|
@ -1,58 +1,76 @@
|
||||||
var cheerio = require('cheerio');
|
"use strict"; /* global describe, it */
|
||||||
var chai = require('chai');
|
|
||||||
var chaiHttp = require('chai-http');
|
|
||||||
var chaiCheerio = require('chai-cheerio');
|
|
||||||
var server = require('../server');
|
// P A C K A G E S
|
||||||
var should = chai.should();
|
|
||||||
|
const cheerio = require("cheerio");
|
||||||
|
const chai = require("chai");
|
||||||
|
const chaiHttp = require("chai-http");
|
||||||
|
const chaiCheerio = require("chai-cheerio");
|
||||||
|
|
||||||
|
// V A R I A B L E
|
||||||
|
|
||||||
|
const server = require("../server");
|
||||||
|
const should = chai.should(); // eslint-disable-line
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// P R O G R A M
|
||||||
|
|
||||||
chai.use(chaiHttp);
|
chai.use(chaiHttp);
|
||||||
chai.use(chaiCheerio);
|
chai.use(chaiCheerio);
|
||||||
|
|
||||||
describe('Api', () => {
|
|
||||||
|
|
||||||
describe('/GET home', () => {
|
|
||||||
it('it should GET the homepage', (done) => {
|
describe("API", () => {
|
||||||
|
describe("/GET home", () => {
|
||||||
|
it("it should GET the homepage", done => {
|
||||||
chai.request(server)
|
chai.request(server)
|
||||||
.get('/')
|
.get("/")
|
||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
res.should.have.status(200);
|
res.should.have.status(200);
|
||||||
res.should.be.html;
|
res.should.be.html;
|
||||||
var $ = cheerio.load(res.text);
|
|
||||||
|
const $ = cheerio.load(res.text);
|
||||||
$("#app").should.exist;
|
$("#app").should.exist;
|
||||||
$("main").should.have.class('home');
|
$("main").should.have.class("home");
|
||||||
$("nav.navigation").should.exist;
|
$("nav.navigation").should.exist;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('/GET github-feed', () => {
|
describe("/GET github-feed", () => {
|
||||||
it('it should GET the github-feed', (done) => {
|
it("it should GET the github-feed", done => {
|
||||||
chai.request(server)
|
chai.request(server)
|
||||||
.get('/github-feed')
|
.get("/github-feed")
|
||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
res.should.have.status(200);
|
res.should.have.status(200);
|
||||||
res.body.should.be.a('array');
|
res.body.should.be.a("array");
|
||||||
res.body.length.should.be.eql(10);
|
res.body.length.should.be.eql(10);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('/GET sitemap', () => {
|
describe("/GET sitemap", () => {
|
||||||
it('it should GET the sitemap', (done) => {
|
it("it should GET the sitemap", done => {
|
||||||
chai.request(server)
|
chai.request(server)
|
||||||
.get('/sitemap.html')
|
.get("/sitemap.html")
|
||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
res.should.have.status(200);
|
res.should.have.status(200);
|
||||||
res.should.be.html;
|
res.should.be.html;
|
||||||
var $ = cheerio.load(res.text);
|
|
||||||
|
const $ = cheerio.load(res.text);
|
||||||
$("#app").should.exist;
|
$("#app").should.exist;
|
||||||
$("#sitemap").should.exist;
|
$("#sitemap").should.exist;
|
||||||
$("#sitemap").should.have.descendants("li");
|
$("#sitemap").should.have.descendants("li");
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in a new issue