diff --git a/assets/svg/logo-git.svg b/assets/svg/logo-git.svg new file mode 100644 index 00000000..12ee983e --- /dev/null +++ b/assets/svg/logo-git.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/logo-wikijs.svg b/assets/svg/logo-wikijs.svg new file mode 100644 index 00000000..e1f6f0ea --- /dev/null +++ b/assets/svg/logo-wikijs.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/js/app.js b/client/js/app.js index 07f9366b..82e01764 100644 --- a/client/js/app.js +++ b/client/js/app.js @@ -13,8 +13,7 @@ import { ApolloClient } from 'apollo-client' import { HttpLink } from 'apollo-link-http' import { InMemoryCache } from 'apollo-cache-inmemory' import store from './store' -import icons from '../svg/nc-icons.svg' - +import icons from '../svg/icons.svg' // ==================================== // Load Modules // ==================================== diff --git a/client/js/app.old.js b/client/js/app.old.js deleted file mode 100644 index fc69cfc3..00000000 --- a/client/js/app.old.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict' - -/* global $, siteConfig */ -/* eslint-disable no-new */ - -import Vue from 'vue' -import VueResource from 'vue-resource' -import VueClipboards from 'vue-clipboards' -import VueLodash from 'vue-lodash' -import store from './store' -import i18next from 'i18next' -import i18nextXHR from 'i18next-xhr-backend' -import VueI18Next from '@panter/vue-i18next' -import 'jquery-contextmenu' -import 'jquery-simple-upload' -import 'jquery-smooth-scroll' -import 'jquery-sticky' - -// ==================================== -// Load Helpers -// ==================================== - -import helpers from './helpers' -import _ from './helpers/lodash' - -// ==================================== -// Load Vue Components -// ==================================== - -import alertComponent from './components/alert.vue' -import anchorComponent from './components/anchor.vue' -import colorPickerComponent from './components/color-picker.vue' -import editorCodeblockComponent from './components/editor-codeblock.vue' -import editorFileComponent from './components/editor-file.vue' -import editorVideoComponent from './components/editor-video.vue' -import historyComponent from './components/history.vue' -import loadingSpinnerComponent from './components/loading-spinner.vue' -import modalCreatePageComponent from './components/modal-create-page.vue' -import modalCreateUserComponent from './components/modal-create-user.vue' -import modalDeleteUserComponent from './components/modal-delete-user.vue' -import modalDiscardPageComponent from './components/modal-discard-page.vue' -import modalMovePageComponent from './components/modal-move-page.vue' -import modalProfile2faComponent from './components/modal-profile-2fa.vue' -import modalUpgradeSystemComponent from './components/modal-upgrade-system.vue' -import pageLoaderComponent from './components/page-loader.vue' -import searchComponent from './components/search.vue' -import toggleComponent from './components/toggle.vue' -import treeComponent from './components/tree.vue' - -import adminEditUserComponent from './pages/admin-edit-user.component.js' -import adminProfileComponent from './pages/admin-profile.component.js' -import adminSettingsComponent from './pages/admin-settings.component.js' -import adminThemeComponent from './pages/admin-theme.component.js' -import contentViewComponent from './pages/content-view.component.js' -import editorComponent from './components/editor.component.js' -import sourceViewComponent from './pages/source-view.component.js' - -// ==================================== -// Initialize Vue Modules -// ==================================== - -Vue.use(VueResource) -Vue.use(VueClipboards) -Vue.use(VueI18Next) -Vue.use(VueLodash, _) -Vue.use(helpers) - -// ==================================== -// Register Vue Components -// ==================================== - -Vue.component('alert', alertComponent) -Vue.component('adminEditUser', adminEditUserComponent) -Vue.component('adminProfile', adminProfileComponent) -Vue.component('adminSettings', adminSettingsComponent) -Vue.component('adminTheme', adminThemeComponent) -Vue.component('anchor', anchorComponent) -Vue.component('colorPicker', colorPickerComponent) -Vue.component('contentView', contentViewComponent) -Vue.component('editor', editorComponent) -Vue.component('editorCodeblock', editorCodeblockComponent) -Vue.component('editorFile', editorFileComponent) -Vue.component('editorVideo', editorVideoComponent) -Vue.component('history', historyComponent) -Vue.component('loadingSpinner', loadingSpinnerComponent) -Vue.component('modalCreatePage', modalCreatePageComponent) -Vue.component('modalCreateUser', modalCreateUserComponent) -Vue.component('modalDeleteUser', modalDeleteUserComponent) -Vue.component('modalDiscardPage', modalDiscardPageComponent) -Vue.component('modalMovePage', modalMovePageComponent) -Vue.component('modalProfile2fa', modalProfile2faComponent) -Vue.component('modalUpgradeSystem', modalUpgradeSystemComponent) -Vue.component('pageLoader', pageLoaderComponent) -Vue.component('search', searchComponent) -Vue.component('sourceView', sourceViewComponent) -Vue.component('toggle', toggleComponent) -Vue.component('tree', treeComponent) - -// ==================================== -// Load Localization strings -// ==================================== - -i18next - .use(i18nextXHR) - .init({ - backend: { - loadPath: siteConfig.path + '/js/i18n/{{lng}}.json' - }, - lng: siteConfig.lang, - fallbackLng: siteConfig.lang - }) - -$(() => { - // ==================================== - // Notifications - // ==================================== - - $(window).bind('beforeunload', () => { - store.dispatch('startLoading') - }) - $(document).ajaxSend(() => { - store.dispatch('startLoading') - }).ajaxComplete(() => { - store.dispatch('stopLoading') - }) - - // ==================================== - // Bootstrap Vue - // ==================================== - - const i18n = new VueI18Next(i18next) - if (document.querySelector('#root')) { - window.wikijs = new Vue({ - mixins: [helpers], - components: {}, - store, - i18n, - el: '#root', - methods: { - changeTheme(opts) { - this.$el.className = `has-stickynav is-primary-${opts.primary} is-alternate-${opts.alt}` - this.$refs.header.className = `nav is-${opts.primary}` - this.$refs.footer.className = `footer is-${opts.footer}` - } - }, - mounted() { - $('a:not(.toc-anchor)').smoothScroll({ speed: 500, offset: -50 }) - $('#header').sticky({ topSpacing: 0 }) - $('.sidebar-pagecontents').sticky({ topSpacing: 15, bottomSpacing: 75 }) - } - }) - } -}) diff --git a/client/scss/base/icons.scss b/client/scss/base/icons.scss index 4caaa870..33ea58d0 100644 --- a/client/scss/base/icons.scss +++ b/client/scss/base/icons.scss @@ -13,24 +13,11 @@ fill: none; } - &.is-16 { - width: 16px; - height: 16px; - } - - &.is-18 { - width: 18px; - height: 18px; - } - - &.is-20 { - width: 20px; - height: 20px; - } - - &.is-24 { - width: 24px; - height: 24px; + @each $size in 16,18,20,24,48,64,96,128 { + &.is-#{$size} { + width: #{$size}px; + height: #{$size}px; + } } &.has-right-pad { diff --git a/client/scss/components/config-manager.scss b/client/scss/components/config-manager.scss index 05a02239..8800b263 100644 --- a/client/scss/components/config-manager.scss +++ b/client/scss/components/config-manager.scss @@ -1,5 +1,6 @@ .config-manager { background-image: linear-gradient(to right, mc('indigo', '400'), mc('indigo', '600')); + background-repeat: no-repeat; width: 100%; min-height: 100%; padding-top: 1rem; @@ -22,6 +23,10 @@ border-bottom: 1px solid mc('indigo', '50'); margin-bottom: 1rem; + img { + max-height: 100px; + } + h2 { margin: 0; color: mc('indigo', '700'); @@ -30,6 +35,27 @@ } + .is-logo { + text-align: center; + padding: .5rem 0 1.5rem 0; + border-bottom: 1px solid mc('indigo', '50'); + margin-bottom: 1rem; + display: flex; + justify-content: center; + align-items: center; + + img { + max-height: 64px; + } + + h4 { + font-size: 1.2rem; + font-weight: 600; + margin-left: 1.5rem; + color: mc('grey', '700'); + } + } + i.icon-loader { display: inline-block; color: mc('indigo', '500') diff --git a/client/svg/nc-icons.svg b/client/svg/icons.svg similarity index 74% rename from client/svg/nc-icons.svg rename to client/svg/icons.svg index 24bb25a6..ea6ab535 100644 --- a/client/svg/nc-icons.svg +++ b/client/svg/icons.svg @@ -1 +1 @@ -check simpleworld 2 webpage 2 square remove 12 spaceship settings preferences palette image home 52 dashboard 30 cloud download 95 cloud upload 96 code chat 33 man 23 cd reader check boldcircle ms dots \ No newline at end of file +check simpleworld 2 webpage 2 square remove 12 spaceship settings preferences palette image home 52 dashboard 30 cloud download 95 cloud upload 96 code chat 33 man 23 cd reader check boldcircle ms dotsmetrics key 26 database connect butterfly radar \ No newline at end of file diff --git a/server/configure.js b/server/configure.js index cc8bf161..f7135b9f 100644 --- a/server/configure.js +++ b/server/configure.js @@ -77,10 +77,10 @@ module.exports = () => { Promise.mapSeries([ () => { const semver = require('semver') - if (!semver.satisfies(semver.clean(process.version), '>=8.8.1')) { - throw new Error('Node.js version is too old. Minimum is 8.8.1.') + if (!semver.satisfies(semver.clean(process.version), '>=8.9.0')) { + throw new Error('Node.js version is too old. Minimum is 8.9.0.') } - return 'Node.js ' + process.version + ' detected. Minimum is 8.8.1.' + return 'Node.js ' + process.version + ' detected. Minimum is 8.9.0.' }, () => { return Promise.try(() => { diff --git a/server/views/configure/index.pug b/server/views/configure/index.pug index bf412654..6df3a606 100644 --- a/server/views/configure/index.pug +++ b/server/views/configure/index.pug @@ -19,7 +19,7 @@ block body i(v-if='loading') .panel-content.is-text .welcome - img(src='/images/logo.png', alt='Wiki.js') + img(src='svg/logo-wikijs.svg', alt='Wiki.js Logo') h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown p This installation wizard will guide you through the steps needed to get your wiki up and running in no time! p Detailed information about installation and usage can be found on the #[a(href='https://wiki.requarks.io/docs') official documentation site]. #[br] Should you have any question or would like to report something that doesn't look right, feel free to create a new issue on the #[a(href='https://github.com/Requarks/wiki/issues') GitHub project]. @@ -48,9 +48,12 @@ block body template(v-else-if='state === "syscheck"') .panel h2.panel-title.is-featured - span System Check + span Wiki.js i(v-if='loading') .panel-content.is-text + .is-logo + svg.icons.is-64: use(xlink:href='#nc-metrics') + h4 System Check p(v-if='loading') #[svg.icons.is-24.is-text: use(xlink:href='#nc-ms-dots')] Checking your system for compatibility... p(v-if='!loading && syscheck.ok') ul @@ -73,25 +76,17 @@ block body template(v-else-if='state === "general"') .panel h2.panel-title.is-featured - span General + span Wiki.js i(v-if='loading') .panel-content.form-sections section + .is-logo + svg.icons.is-64: use(xlink:href='#nc-butterfly') + h4 General Information p.control.is-fullwidth label.label Site Title input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }') span.desc The site title will appear in the top left corner on every page and within the window title bar. - section.columns - .column.is-half - p.control - label.label Port - input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }') - span.desc The port on which Wiki.js will listen to. Usually port 80 if connecting directly, or a random port (e.g. 3000) if using a web server in front of it. Set #[strong $(PORT)] to use the PORT environment variable. - .column.is-half - p.control.is-fullwidth - label.label Site Relative Path - input(type='text', placeholder='/', v-model='conf.path', data-vv-scope='general', name='ipt-path', v-validate='{ required: true, min: 1 }') - span.desc The relative path to your wiki. Unless you configure a reverse proxy in front of Wiki.js to handle requests made to a sub-directory, #[strong it is recommended to leave the default value]. section.columns .column.is-half p.control @@ -100,6 +95,17 @@ block body each lg in data.langs option(value=lg.id)= lg.name span.desc The language in which navigation, help and other UI elements will be displayed. + .column.is-half + p.control.is-fullwidth + label.label Site Relative Path + input(type='text', placeholder='/', v-model='conf.path', data-vv-scope='general', name='ipt-path', v-validate='{ required: true, min: 1 }') + span.desc The relative path to your wiki. Unless you configure a reverse proxy in front of Wiki.js to handle requests made to a sub-directory, #[strong it is recommended to leave the default value]. + section.columns + .column.is-half + p.control + label.label Server Port + input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }') + span.desc The port on which Wiki.js will listen to. Usually port 80 if connecting directly, or a random port (e.g. 3000) if using a web server in front of it. Set #[strong $(PORT)] to use the PORT environment variable. .column.is-half p.control.is-fullwidth input#ipt-public(type='checkbox', v-model='conf.public', data-vv-scope='general', name='ipt-public') @@ -107,7 +113,7 @@ block body span.desc Should the site be accessible (read only) without login. section p.control.is-fullwidth - label.label Local Repository Path + label.label Local Server Repository Path input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='general', name='ipt-repopath', v-validate='{ required: true, min: 2 }') span.desc The path where the local git repository will be created, used to store content in markdown files and uploads.#[br] #[strong It is recommended to leave the default value]. .panel-footer @@ -122,9 +128,12 @@ block body template(v-else-if='state === "considerations"') .panel h2.panel-title.is-featured - span Important Considerations + span Wiki.js i(v-if='loading') .panel-content.is-text + .is-logo + svg.icons.is-64: use(xlink:href='#nc-radar') + h4 Important Considerations h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy? p ul @@ -149,9 +158,12 @@ block body template(v-else-if='state === "git"') .panel h2.panel-title.is-featured - span Git Repository + span Wiki.js i(v-if='loading') .panel-content.is-text + .is-logo + img(src='svg/logo-git.svg', alt='Git Logo') + h4 Git Repository p Wiki.js stores article content and uploads locally on disk. All content is then regularly kept in sync with a remote git repository. This acts a backup protection and provides history / revert features. While optional, it is HIGHLY recommended to setup the remote git repository connection. .panel-content.form-sections section.columns diff --git a/tools/fuse_tasks.js b/tools/fuse_tasks.js index fec343dd..6b095d73 100644 --- a/tools/fuse_tasks.js +++ b/tools/fuse_tasks.js @@ -68,5 +68,12 @@ module.exports = Promise.mapSeries([ () => { console.info(colors.white(' └── ') + colors.green('Clearing fuse-box cache...')) return fs.emptyDirAsync('./.fusebox') + }, + /** + * Delete Test Results + */ + () => { + console.info(colors.white(' └── ') + colors.green('Clearing test results...')) + return fs.remove('./test_results') } ], f => { return f() })