From 96cd9c8ff77d215581842a53063f4ae3311b3eb5 Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Sat, 11 Nov 2023 18:35:58 +0800 Subject: [PATCH] Add in CNAME, fixed header for table, change dark mode with user preference --- docs/CNAME | 1 + docs/file/index.md | 40 +- docs/javascripts/tableselect.js | 25 +- docs/stylesheets/extra.css | 10 +- mkdocs.yml | 4 + site/404.html | 24 +- site/CNAME | 1 + site/database/index.html | 26 +- site/file/index.html | 66 +- site/index.html | 26 +- site/javascripts/tableselect.js | 25 +- site/sitemap.xml | 15 + site/sitemap.xml.gz | Bin 127 -> 219 bytes site/stylesheets/extra.css | 10 +- spec/user-config.json | 1689 ----------------------------- tech/templates/template-index.ftl | 4 +- 16 files changed, 185 insertions(+), 1781 deletions(-) create mode 100644 docs/CNAME create mode 100644 site/CNAME delete mode 100644 spec/user-config.json diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..c136b18 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +tech-diff.com \ No newline at end of file diff --git a/docs/file/index.md b/docs/file/index.md index f60e740..e059012 100644 --- a/docs/file/index.md +++ b/docs/file/index.md @@ -25,7 +25,7 @@ hide: - Name + Name Apache Iceberg Apache ORC Apache Parquet @@ -33,7 +33,7 @@ hide: Delta Lake - Description + Description Iceberg is a high-performance format for huge analytic tables. ORC is a self-describing type-aware columnar file format designed for Hadoop workloads. Apache Parquet is an open source, column-oriented data file format designed for efficient data storage and retrieval. @@ -41,7 +41,7 @@ hide: Delta Lake is an open-source storage framework that enables building a Lakehouse architecture. - License + License Apache license 2.0 Apache license 2.0 Apache license 2.0 @@ -49,7 +49,7 @@ hide: Apache license 2.0 - Source code + Source code https://github.com/apache/iceberg https://github.com/apache/orc https://github.com/apache/parquet-format @@ -57,7 +57,7 @@ hide: https://github.com/delta-io/delta - Website + Website https://iceberg.apache.org/ https://orc.apache.org/ https://parquet.apache.org/ @@ -65,7 +65,7 @@ hide: https://delta.io/ - Year created + Year created 2017 2013 2013 @@ -73,7 +73,7 @@ hide: 2019 - Company + Company Netflix Hortonworks, Facebook Twitter, Cloudera @@ -81,7 +81,7 @@ hide: Databricks - Language support + Language support java, scala, c++, python java, scala, c++, python, r, php @@ -89,7 +89,7 @@ hide: scala, java, python, rust - Use cases + Use cases Write once read many, Analytics, Efficient storage, ACID transactions Write once read many, Analytics, Efficient storage, ACID transactions Write once read many, Analytics, Efficient storage, Column based queries @@ -97,7 +97,7 @@ hide: Write once read many, Analytics, Efficient storage, ACID transactions - Is human readable + Is human readable @@ -110,7 +110,7 @@ hide: - Orientation + Orientation column row column @@ -118,7 +118,7 @@ hide: column - Has type system + Has type system ✅ ✅ @@ -131,7 +131,7 @@ hide: - Has nested structure support + Has nested structure support ✅ ✅ @@ -144,7 +144,7 @@ hide: - Has native compression + Has native compression ✅ ✅ @@ -157,7 +157,7 @@ hide: - Has encoding support + Has encoding support ✅ ✅ @@ -170,7 +170,7 @@ hide: - Has constraint support + Has constraint support @@ -183,7 +183,7 @@ hide: - Has acid support + Has acid support ✅ @@ -196,7 +196,7 @@ hide: - Has metadata + Has metadata ✅ ✅ @@ -209,7 +209,7 @@ hide: - Data processing framework support + Data processing framework support Apache Drill, @@ -243,7 +243,7 @@ hide: - Analytics query support + Analytics query support diff --git a/docs/javascripts/tableselect.js b/docs/javascripts/tableselect.js index 5d647b4..e595b1c 100644 --- a/docs/javascripts/tableselect.js +++ b/docs/javascripts/tableselect.js @@ -1,7 +1,23 @@ -let prefers = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; -let html = document.querySelector('html'); +const matchDarkMode = window.matchMedia("(prefers-color-scheme: dark)"); +if (matchDarkMode.matches) { + document.querySelector('html').classList.add("dark"); +} -html.classList.add(prefers); +let colourPaletteButton = document.querySelectorAll('[data-md-component="palette"]'); +if (colourPaletteButton.length > 0) { + colourPaletteButton[0].addEventListener("click", function(event) { + event.stopPropagation(); + let targetAttr = event.target.getAttribute("data-md-color-media"); + if (targetAttr != null) { + let html = document.querySelector("html"); + if (targetAttr === "(prefers-color-scheme: light)" && html.classList.contains("dark")) { + html.classList.remove("dark"); + } else if (targetAttr === "(prefers-color-scheme: dark)" && !html.classList.contains("dark")) { + html.classList.add("dark"); + } + } + }) +} document$.subscribe(function() { const tables = document.querySelectorAll("table"); @@ -9,7 +25,8 @@ document$.subscribe(function() { const dataTable = new DataTable(table, { ordering: false, paging: false, - autoWidth: true + autoWidth: true, + fixedHeader: true }) document.querySelectorAll("a.toggle-vis").forEach((el) => { diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 5e10632..4937185 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -1,3 +1,11 @@ .red-cross { color: #d9534f; -} \ No newline at end of file +} + +.md-header { + position: unset; +} + +.sorting_disabled { + font-size: 0.8rem; +} diff --git a/mkdocs.yml b/mkdocs.yml index 61aec37..4572515 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,10 +1,12 @@ site_name: Tech Diff +site_url: https://tech-diff.com/ repo_url: https://github.com/pflooky/tech-diff repo_name: tech-diff theme: name: material features: + - header.autohide - navigation.tabs - navigation.sections - navigation.instant @@ -42,10 +44,12 @@ nav: extra_javascript: - https://code.jquery.com/jquery-3.7.0.js - https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js + - https://cdn.datatables.net/fixedheader/3.4.0/js/dataTables.fixedHeader.min.js - javascripts/tableselect.js extra_css: - https://cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css + - https://cdn.datatables.net/fixedheader/3.4.0/css/fixedHeader.dataTables.min.css - stylesheets/extra.css markdown_extensions: diff --git a/site/404.html b/site/404.html index 371bc7b..8d3935d 100644 --- a/site/404.html +++ b/site/404.html @@ -19,7 +19,7 @@ - Data Tech Compare + Tech Diff @@ -47,6 +47,8 @@ + + @@ -83,7 +85,7 @@