Commit 725d7f89 authored by Laurent Sittler's avatar Laurent Sittler ©
Browse files

First release

parent c98cd060
{
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"compatible-vendor-prefixes": false,
"duplicate-properties": false,
"empty-rules": false,
"errors": false,
"fallback-colors": false,
"ids": false,
"important": false,
"known-properties": false,
"order-alphabetical": false,
"outline-none": false,
"overqualified-elements": false,
"qualified-headings": false,
"regex-selectors": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false
}
\ No newline at end of file
{
"rules": {
"semi": [2, "always"]
}
}
\ No newline at end of file
# Logs
logs
*.log
npm-debug.log*
# Dependency
package-lock.json
# Dependency directories
node_modules
# Build generated files
assets/built
dist
# OSX
.DS_Store
# Windows
Thumbs.db
# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj
# Environment
.env
# Tests and coverage files
junit
image: node:latest
stages:
- .pre
- test
- build
- deploy
install:
stage: .pre
script:
- npm i
artifacts:
paths:
- node_modules/
expire_in: 30min
cache:
paths:
- node_modules/
test:
stage: test
script:
- npm run test
lint:
stage: test
script:
- npm run lint
artifacts:
paths:
- ./junit
reports:
junit: ./junit/*lint.xml
build:
stage: build
script:
- npm run zip
artifacts:
expire_in: 1 day
paths:
- dist/
deploy:
stage: deploy
script:
- npm run deploy
when: manual
only:
- master
\ No newline at end of file
10
\ No newline at end of file
# Ghost Fluent UI
Ghost theme using the Fluent UI framework
\ No newline at end of file
Ghost theme using the Fluent UI framework and based on the Microsoft SharePoint design.
[[_TOC_]]
## Configuration
To enjoy the features of this theme, some of them should be configured manually in accordance with your wishes.
You can see more information about the configuration into the [Wiki](./-/wikis) pages of this project.
## Path to awesome
* `npm i` to install dependencies
* `npm run dev` to launch watcher
## Developer environment
### Windows Prerequisites
* Python for Windows
* Install NPM Build Tools as Administrator
```bash
npm install --global --production windows-build-tools
```
### Docker environment
Use the provided Docker compose to install and test the theme:
1. Install Docker for Desktop
2. Create `data` folder into the parent folder of the solution (`../`) to keep persistent data
1. Create `ghost` folder
2. Create `mysql` folder
3. Create `elasticsearch` folder
4. Create `isso` folder
3. Launch Docker compose
```bash
docker-compose -f ghost-compose.yml up -d
```
4. Edit your `hosts` file by adding at the end of the file:
```
127.0.0.1 fluent-ui.local
```
* Windows
```
C:\Windows\System32\driver\etc\hosts
```
* MAC and Linux
```
/etc/hosts
```
5. From your favorite browser, go to http://fluent-ui.local/ghost
6. Configure your developer environment and active **fluent-ui** theme
### Local deployment test
Among the different gulp tasks, one of thme consist to deploy automatically the theme into the target Ghost environment.
It is possible to test it locally:
1. Create a Ghost integration access token (from the admin web interface)
2. Create a `.env` file into the root of the solution
3. Append to the environment file, `GHOST_API_URL=`
4. Append to the environment file, `GHOST_ADMIN_API_KEY`
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.cc-window{opacity:1;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-bottom,.cc-animate.cc-revoke.cc-active.cc-top,.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;transition:max-height 1s}
.cc-link,.cc-revoke:hover{text-decoration:underline}.cc-revoke,.cc-window{position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1}
.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-ms-flex:1 0 auto;flex:1 0 auto}.cc-window.cc-banner{-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{display:block;-ms-flex:1 1 auto;flex:1 1 auto;max-width:100%;margin-right:1em}.cc-compliance{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-floating .cc-compliance>.cc-btn{-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em}
@media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-floating,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-ms-flex:1 1 auto;flex:1 1 auto}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-ms-flex-align:unset;align-items:unset}.cc-window.cc-banner .cc-message{margin-right:0}}
.cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block}
.cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em 2em 1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
Original highlight.js style (c) Ivan Sagalaev <[email protected]>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
/*
* Visual Studio 2015 dark style
* Author: Nicolas LLOBERA <[email protected]>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #1E1E1E;
color: #DCDCDC;
}
.hljs-keyword,
.hljs-literal,
.hljs-symbol,
.hljs-name {
color: #569CD6;
}
.hljs-link {
color: #569CD6;
text-decoration: underline;
}
.hljs-built_in,
.hljs-type {
color: #4EC9B0;
}
.hljs-number,
.hljs-class {
color: #B8D7A3;
}
.hljs-string,
.hljs-meta-string {
color: #D69D85;
}
.hljs-regexp,
.hljs-template-tag {
color: #9A5334;
}
.hljs-subst,
.hljs-function,
.hljs-title,
.hljs-params,
.hljs-formula {
color: #DCDCDC;
}
.hljs-comment,
.hljs-quote {
color: #57A64A;
font-style: italic;
}
.hljs-doctag {
color: #608B4E;
}
.hljs-meta,
.hljs-meta-keyword,
.hljs-tag {
color: #9B9B9B;
}
.hljs-variable,
.hljs-template-variable {
color: #BD63C5;
}
.hljs-attr,
.hljs-attribute,
.hljs-builtin-name {
color: #9CDCFE;
}
.hljs-section {
color: gold;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
/*.hljs-code {
font-family:'Monospace';
}*/
.hljs-bullet,
.hljs-selector-tag,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #D7BA7D;
}
.hljs-addition {
background-color: #144212;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #600;
display: inline-block;
width: 100%;
}
This diff is collapsed.
if (window.hasOwnProperty('Type')) {
Type.registerNamespace('fluentui');
} else {
window.fluentui = window.fluentui || {};
}
fluentui.comment = (function () {
/**
* Comments service configuration
*/
var _config;
function constructor() {
var cWrapper = document.getElementById('commentsWrapper');
var pThread = document.getElementById('p-comments-thread');
if (cWrapper && pThread) {
if ('undefined' !== typeof comment_config && null != comment_config && comment_config.service) {
_config = comment_config;
switch(comment_config.service) {
case 'isso':
issoConnector();
break;
default:
cWrapper.remove();
}
} else {
cWrapper.remove();
}
}
}
function issoConnector() {
if (_config.url) {
var pThread = document.getElementById('p-comments-thread');
/* Add isso-thread ID into DOM */
var thread = document.createElement('div');
thread.id = 'isso-thread';
thread.setAttribute('data-title', pThread.getAttribute('data-title'));
pThread.appendChild(thread);
/* Build script tag */
var isso = document.createElement('script');
var html = document.getElementsByTagName('html')[0];
var lang = _config.lang ? _config.lang : html.lang;
isso.dataset.isso = _config.url;
isso.dataset.issoLang = lang;
isso.dataset.issoId = pThread.getAttribute('data-comment-id');
isso.dataset.issoRequireAuthor = _config.requireAuthor;
isso.dataset.issoRequireEmail = _config.requireEmail;
isso.dataset.issoReplyToSelf = _config.replyToSelf;
isso.dataset.issoVote = _config.vote;
isso.dataset.issoAvatar = _config.avatar;
isso.dataset.issoGravatar = _config.gravatar;
isso.dataset.issoReplyNotifications = _config.replyNotifications;
var u = new URL('js/embed.min.js', _config.url);
isso.src = u.href.replace(u.protocol, '');
document.body.appendChild(isso);
} else {
var cWrapper = document.getElementById('commentsWrapper');
if (cWrapper) {
cWrapper.remove();
}
}
}
return {
init: function () {
constructor();
}
};
})();
document.addEventListener('DOMContentLoaded', fluentui.comment.init());
\ No newline at end of file
if (window.hasOwnProperty('Type')) {
Type.registerNamespace('fluentui');
} else {
window.fluentui = window.fluentui || {};
}
fluentui.content = (function () {
/**
* Update images Gallery style attribute
*/
function imgGallery() {
var images = document.querySelectorAll('.kg-gallery-image img');
images.forEach(function (image) {
var container = image.closest('.kg-gallery-image');
var width = image.attributes.width.value;
var height = image.attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
});
}
/**
* Update all blockquotes in accordance with the format
*/
function alertColor() {
var blockq = document.getElementsByTagName('blockquote');
if (blockq) {
for (var b = 0; b < blockq.length; b++) {
var grp = blockq[b].innerText.match(/^\[.*?\]/gi) || [''];
if (null != grp[0]) {
switch (grp[0].toLowerCase()) {
case '[danger]':
blockq[b].className = 'is-danger';
blockq[b].innerHTML = blockq[b].innerHTML.replace(/^\[.*?\]/gi, '');
blockq[b].innerHTML = '<i class="ms-Icon ms-Icon--ErrorBadge"></i>' + blockq[b].innerHTML;
break;
case '[warning]':
blockq[b].className = 'is-warning';
blockq[b].innerHTML = blockq[b].innerHTML.replace(/^\[.*?\]/gi, '');
blockq[b].innerHTML = '<i class="ms-Icon ms-Icon--Warning"></i>' + blockq[b].innerHTML;
break;
case '[success]':
blockq[b].className = 'is-success';
blockq[b].innerHTML = blockq[b].innerHTML.replace(/^\[.*?\]/gi, '');
blockq[b].innerHTML = '<i class="ms-Icon ms-Icon--Lightbulb"></i>' + blockq[b].innerHTML;
break;
case '[info]':
blockq[b].className = 'is-info';
blockq[b].innerHTML = blockq[b].innerHTML.replace(/^\[.*?\]/gi, '');
blockq[b].innerHTML = '<i class="ms-Icon ms-Icon--Info"></i>' + blockq[b].innerHTML;
break;
case '[note]':
blockq[b].innerHTML = blockq[b].innerHTML.replace(/^\[.*?\]/gi, '');
blockq[b].innerHTML = '<i class="ms-Icon ms-Icon--Info"></i>' + blockq[b].innerHTML;
break;
default:
break;
}
}
}
}
}
/**
* Add a code header above the pre tag
*/
function codeHeader() {
var scripts = document.querySelectorAll('pre>code');
if (scripts) {
for (var i = 0; i < scripts.length; i++) {
var l = scripts[i].className.match(/language-([A-z]+)/) || ['', scripts[i].className.replace('hljs', '').trim()];
if (null != l[1] && 'nohighlight' != l[1].toLowerCase()) {
var r = document.createElement('div');
r.className = 'codeHeader';
var o = document.createElement('span');
o.className = 'language';
o.innerText = l[1];
r.append(o);
var b = document.createElement('button');
b.type = 'button';
b.className = 'action';
var icon = document.createElement('i');
icon.className = 'ms-Icon ms-Icon--Copy';
var btnText = document.createElement('span');
btnText.innerText = 'Copy';
b.append(icon);
b.append(btnText);
r.append(b);
scripts[i].parentNode.parentNode.insertBefore(r, scripts[i].parentNode);
b.addEventListener('click', copyCode);
}
}
}
}
/**
* Copy Code in accordance with the clicked button
*/
function copyCode() {
var pre = this.parentNode.nextSibling;
if ('PRE' == pre.nodeName) {