From 4f2e1b68c47d8cb801a2b6b66cb94c95059e19f7 Mon Sep 17 00:00:00 2001 From: Mars Lee Date: Sat, 28 Mar 2020 13:43:42 -0400 Subject: [PATCH 01/11] Add installation widget --- config.yaml | 5 ++ layouts/index.html | 4 ++ layouts/partials/css.html | 3 + layouts/partials/installationWidget.html | 88 ++++++++++++++++++++++++ layouts/partials/javascript.html | 3 +- static/css/installationWidget.css | 8 +++ static/js/installationWidget.js | 18 +++++ 7 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/installationWidget.html create mode 100644 static/css/installationWidget.css create mode 100644 static/js/installationWidget.js diff --git a/config.yaml b/config.yaml index 6f47e9cce2..00f5261dbb 100644 --- a/config.yaml +++ b/config.yaml @@ -66,6 +66,11 @@ params: tabs: title: ECOSYSTEM section5: false + installationWidget: + title: INSTALLATION WIDGET + features: + - title: Quality 1 + text: Text on Quality 1 languages: en: diff --git a/layouts/index.html b/layouts/index.html index f31546d627..f2eba6f380 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,6 +11,10 @@ {{ partial "section2.html" . }} {{ end }} + {{ if .Site.Params.installationWidget }} + {{ partial "installationWidget.html" . }} + {{ end }} + {{ if .Site.Params.tabs }} {{ partial "tabs.html" . }} {{ end }} diff --git a/layouts/partials/css.html b/layouts/partials/css.html index 745cd8b7f1..3741316c53 100644 --- a/layouts/partials/css.html +++ b/layouts/partials/css.html @@ -14,6 +14,8 @@ {{- end }} + + @@ -26,3 +28,4 @@ + diff --git a/layouts/partials/installationWidget.html b/layouts/partials/installationWidget.html new file mode 100644 index 0000000000..1224cbb507 --- /dev/null +++ b/layouts/partials/installationWidget.html @@ -0,0 +1,88 @@ +{{- $section2 := .Site.Params.installationWidget }} +{{- $title := index $section2 "title" }} +{{- $features := index $section2 "features" }} +
+
+ +
+
+
+
Your OS
+
+
+
Package
+
+
+
Python version
+
+
+
Run this Command:
+
+
+ +
+
+ +
+ +
+
+
MacOS
+
+
+
Windows
+
+
+
+
+
Conda
+
+
+
Pip
+
+
+
Source
+
+
+
+
+
3.6
+
+
+
3.7
+
+
+
3.8
+
+
+
+
+
Run this Command:
+
+
+
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/layouts/partials/javascript.html b/layouts/partials/javascript.html index a141944eb1..606614c3fa 100644 --- a/layouts/partials/javascript.html +++ b/layouts/partials/javascript.html @@ -19,4 +19,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/static/css/installationWidget.css b/static/css/installationWidget.css new file mode 100644 index 0000000000..fe63e526b7 --- /dev/null +++ b/static/css/installationWidget.css @@ -0,0 +1,8 @@ +.installationWidget { + border: 1px solid black; +} + +.installationWidget .container { + display: flex; + flex-direction: column; +} \ No newline at end of file diff --git a/static/js/installationWidget.js b/static/js/installationWidget.js new file mode 100644 index 0000000000..16834dd74c --- /dev/null +++ b/static/js/installationWidget.js @@ -0,0 +1,18 @@ +// let linux = document.getElementById('linux'); +// let macos = document.getElementById('macos'); +// let windows = document.getElementById('windows'); +// let conda = document.getElementById('conda'); +// let pip = document.getElementById('pip'); +// let source = document.getElementById('source'); +// let py36 = document.getElementById('3.6'); +// let py37 = document.getElementById('3.7'); +// let py38 = document.getElementById('3.8'); + +const replyClick = () => { + alert("Button clicked, id " + this.id); + console.log("installationWidget runs"); +} + +document.getElementById('linux').onclick = replyClick(); +document.getElementById('macos').onclick = replyClick(); +document.getElementById('windows').onclick = replyClick(); \ No newline at end of file From 0634ec3d650aa099ab84c7520b359a15bc7a879c Mon Sep 17 00:00:00 2001 From: Mars Lee Date: Tue, 24 Mar 2020 10:09:33 -0400 Subject: [PATCH 02/11] Increase contrast ratio in footer --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 48918a4d72..872ac04e53 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -12,7 +12,7 @@