You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by vo...@apache.org on 2022/09/26 18:47:52 UTC
[druid-website-src] 01/01: site build fixes
This is an automated email from the ASF dual-hosted git repository.
vogievetsky pushed a commit to branch site-fixes
in repository https://gitbox.apache.org/repos/asf/druid-website-src.git
commit e2a56441f8dd3f038f8e10f2970d1af50c407f16
Author: Vadim Ogievetsky <va...@ogievetsky.com>
AuthorDate: Mon Sep 26 11:47:18 2022 -0700
site build fixes
---
_config.yml | 1 +
css-extra/code-block-buttons.css | 39 +++++++++++++
css-extra/main.css | 1 +
css-extra/prism.css | 115 +++++++++++++++++++++++++++++++++++++++
package.json | 8 ++-
5 files changed, 162 insertions(+), 2 deletions(-)
diff --git a/_config.yml b/_config.yml
index 5d593580..8a284141 100644
--- a/_config.yml
+++ b/_config.yml
@@ -15,6 +15,7 @@ exclude:
- package.json
- package-lock.json
- scss
+ - css-extra
- private
- _staging
- release.sh
diff --git a/css-extra/code-block-buttons.css b/css-extra/code-block-buttons.css
new file mode 100644
index 00000000..d83896cc
--- /dev/null
+++ b/css-extra/code-block-buttons.css
@@ -0,0 +1,39 @@
+/* "Copy" code block button */
+pre {
+ position: relative;
+}
+
+pre .btnIcon {
+ position: absolute;
+ top: 4px;
+ z-index: 2;
+ cursor: pointer;
+ border: 1px solid transparent;
+ padding: 0;
+ color: #fff;
+ background-color: transparent;
+ height: 30px;
+ transition: all .25s ease-out;
+}
+
+pre .btnIcon:hover {
+ text-decoration: none;
+}
+
+.btnIcon__body {
+ align-items: center;
+ display: flex;
+}
+
+.btnIcon svg {
+ fill: currentColor;
+ margin-right: .4em;
+}
+
+.btnIcon__label {
+ font-size: 11px;
+}
+
+.btnClipboard {
+ right: 10px;
+}
diff --git a/css-extra/main.css b/css-extra/main.css
new file mode 100644
index 00000000..ad659c39
--- /dev/null
+++ b/css-extra/main.css
@@ -0,0 +1 @@
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}b [...]
\ No newline at end of file
diff --git a/css-extra/prism.css b/css-extra/prism.css
new file mode 100644
index 00000000..d783edb5
--- /dev/null
+++ b/css-extra/prism.css
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2017-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * Modified prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+
+code[class*='language-'],
+pre[class*='language-'] {
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+ text-align: left;
+ white-space: pre;
+ word-spacing: normal;
+ word-break: normal;
+ word-wrap: normal;
+ line-height: 1.5;
+
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ -ms-hyphens: none;
+ hyphens: none;
+}
+
+/* Code blocks */
+pre[class*='language-'] {
+ padding: 1em;
+ margin: 0.5em 0;
+ overflow: auto;
+}
+
+/* Inline code */
+:not(pre) > code[class*='language-'] {
+ padding: 0.1em;
+ border-radius: 0.3em;
+ white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+ color: slategray;
+}
+
+.token.punctuation {
+ color: #999;
+}
+
+.namespace {
+ opacity: 0.7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.constant,
+.token.symbol,
+.token.deleted {
+ color: #905;
+}
+
+.token.selector,
+.token.number,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+ color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+ color: #9a6e3a;
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+ color: #07a;
+}
+
+.token.function,
+.token.class-name {
+ color: #dd4a68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+ color: #e90;
+}
+
+.token.important,
+.token.bold {
+ font-weight: bold;
+}
+.token.italic {
+ font-style: italic;
+}
+
+.token.entity {
+ cursor: help;
+}
diff --git a/package.json b/package.json
index b9304f56..87d6a713 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "druid-website",
"version": "0.2.0",
- "description": "Druid Website",
+ "description": "Druid Website (Source)",
"keywords": [
"druid",
"website"
@@ -11,7 +11,8 @@
"run": "bundle exec jekyll serve --future --port 4001 --safe",
"start": "bundle exec jekyll serve --future --port 4001 --safe",
"watch": "gulp watch",
- "compile": "gulp all; bundle exec jekyll build",
+ "clean": "rm -rf css/*",
+ "compile": "gulp all && cp ./css-extra/* ./css && bundle exec jekyll build",
"build": "npm run compile && rm -r ../druid-website/* && cp -r ./_site/* ../druid-website/",
"build-release": "./release.sh"
},
@@ -22,5 +23,8 @@
"gulp-sass": "4.0.1",
"natives": "^1.1.6",
"node-sass": "4.9.2"
+ },
+ "volta": {
+ "node": "10.24.1"
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org