1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-06-15 06:26:47 +00:00

Add branding, bump versions of quarto and julia

This commit is contained in:
Anson 2024-11-26 09:18:17 +00:00
parent c0c91caace
commit e7bd5e439b
10 changed files with 233 additions and 289 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@ ghost-upload/target/
posts/*/\.jupyter_cache/
/.quarto/*
!/.quarto/_freeze/
!/.quarto/_freeze/*
!/.quarto/_freeze/*
/.quarto/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,7 @@ const kProgressiveAttr = "data-src";
let categoriesLoaded = false;
window.quartoListingCategory = (category) => {
category = atob(category);
if (categoriesLoaded) {
activateCategory(category);
setCategoryHash(category);
@ -15,7 +16,9 @@ window["quarto-listing-loaded"] = () => {
if (hash) {
// If there is a category, switch to that
if (hash.category) {
activateCategory(hash.category);
// category hash are URI encoded so we need to decode it before processing
// so that we can match it with the category element processed in JS
activateCategory(decodeURIComponent(hash.category));
}
// Paginate a specific listing
const listingIds = Object.keys(window["quarto-listings"]);
@ -58,7 +61,10 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
);
for (const categoryEl of categoryEls) {
const category = categoryEl.getAttribute("data-category");
// category needs to support non ASCII characters
const category = decodeURIComponent(
atob(categoryEl.getAttribute("data-category"))
);
categoryEl.onclick = () => {
activateCategory(category);
setCategoryHash(category);
@ -208,7 +214,9 @@ function activateCategory(category) {
// Activate this category
const categoryEl = window.document.querySelector(
`.quarto-listing-category .category[data-category='${category}'`
`.quarto-listing-category .category[data-category='${btoa(
encodeURIComponent(category)
)}']`
);
if (categoryEl) {
categoryEl.classList.add("active");
@ -231,7 +239,9 @@ function filterListingCategory(category) {
list.filter(function (item) {
const itemValues = item.values();
if (itemValues.categories !== null) {
const categories = itemValues.categories.split(",");
const categories = decodeURIComponent(
atob(itemValues.categories)
).split(",");
return categories.includes(category);
} else {
return false;

View File

@ -2,9 +2,10 @@ FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
ENV JULIA_VERSION=1.10.5 \
JULIA_MAJOR_VERSION=1.10 \
JULIA_PATH=/usr/local/julia
ENV JULIA_VERSION=1.11.1 \
JULIA_MAJOR_VERSION=1.11 \
JULIA_PATH=/usr/local/julia \
QUARTO_VERSION=1.6.37
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils dialog \
@ -17,12 +18,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Use a RUN command for architecture detection and conditional logic
RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.57/quarto-1.5.57-linux-$(if [ "$(uname -m)" = "x86_64" ]; then echo "amd64"; else echo "arm64"; fi).tar.gz -O quarto.tar.gz \
RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-$(if [ "$(uname -m)" = "x86_64" ]; then echo "amd64"; else echo "arm64"; fi).tar.gz -O quarto.tar.gz \
&& tar -xzf quarto.tar.gz -C /opt \
&& mkdir -p /opt/quarto \
&& mv /opt/quarto-1.5.57/* /opt/quarto/ \
&& mv /opt/quarto-${QUARTO_VERSION}/* /opt/quarto/ \
&& ln -s /opt/quarto/bin/quarto /usr/local/bin/quarto \
&& rm -rf quarto.tar.gz /opt/quarto-1.5.57
&& rm -rf quarto.tar.gz /opt/quarto-${QUARTO_VERSION}
RUN python3 -m pip install jupyter webio_jupyter_extension jupyter-cache

File diff suppressed because it is too large Load Diff

View File

@ -17,4 +17,4 @@ SatelliteToolbox = "6ac157d9-b43d-51bb-8fab-48bf53814f4a"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
[compat]
julia = "1.10"
julia = "1.11"

5
_brand.yml Normal file
View File

@ -0,0 +1,5 @@
typography:
fonts:
- family: JetBrains Mono
source: google
monospace: JetBrains Mono

View File

@ -19,7 +19,6 @@ format:
html:
code-tools: true
code-fold: false
jupyter: julia-1.10
freeze: true
---

View File

@ -1 +1,4 @@
/* css styles */
code {
font-family: "JetBrains Mono", monospace;
font-feature-settings: "liga" 1, "calt" 1;
}