Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-python@v6
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/Summer-school-Intro-Git"]
path = src/Summer-school-Intro-Git
url = git@github.com:Cambridge-ICCS/Summer-school-Intro-Git.git
49 changes: 9 additions & 40 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 37 additions & 11 deletions flake.nix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional to have OS-specific files in the repo?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nix files are like a pyproject.toml file that define system dependencies. I don't have to keep them but it is useful for me to have them in vc for developing the slides

Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
{
description = "Reproducibility in Scientific Software environment";

inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShells.default = import ./shell.nix { inherit pkgs; };
}
);
inputs = {
nixpkgs.url = "github:Nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
myPythonPackages = ps: with ps; [
pandas
numpy
matplotlib
jupyter
jupyter-cache
];
pythonEnv = pkgs.python3.withPackages myPythonPackages;
in
{
devShells.${system}.default = pkgs.mkShell {
packages = [
((pkgs.quarto.override {
extraPythonPackages = myPythonPackages;
}).overrideAttrs (oldAttrs: {
# Remove this overrideAttrs patch when fixed.
# See https://github.com/NixOS/nixpkgs/issues/519484#issuecomment-4667477454
postPatch = (oldAttrs.postPatch or "") + ''
substituteInPlace bin/quarto.js \
--replace-fail "syntax-highlighting" "highlight-style"
'';
}))
pythonEnv
];
shellHook = ''
echo "Quarto Environment Active (Pure Flake)"
echo "Quickstart: run 'quarto render document.qmd'"
'';
};
};
}
14 changes: 0 additions & 14 deletions shell.nix

This file was deleted.

1 change: 1 addition & 0 deletions src/Summer-school-Intro-Git
14 changes: 14 additions & 0 deletions src/_extensions/quarto-ext/attribution/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: Attribution
author: Roland Schmehl
version: 0.1.1
quarto-required: ">=1.2.198"
contributes:
revealjs-plugins:
- name: RevealAttribution
script:
- attribution.js
stylesheet:
- attribution.css



19 changes: 19 additions & 0 deletions src/_extensions/quarto-ext/attribution/attribution.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Attribution plugin: text along the right edge of the viewport */
.attribution{
position: absolute;
top: 50%;
bottom: auto;
left: 50%;
right: auto;
font-size: 0.4em;
pointer-events: none;
text-align: center;
writing-mode: vertical-lr;
transform: translate( -50%, -50% ) scale( 100% ) rotate(-180deg);
text-orientation: sideways;
}

/* Attribution plugin: activate pointer events for attribution text only */
.attribution .content{
pointer-events: auto;
}
75 changes: 75 additions & 0 deletions src/_extensions/quarto-ext/attribution/attribution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*****************************************************************
** Author: Roland Schmehl, r.schmehl@tudelft.nl
**
** A plugin for displaying attribution texts sideways along the right
** edge of the viewport. When resizing the viewport or toggling full
** screen mode, the attribution text sticks persistently to the right
** edge of the viewport.
**
** The dynamic scaling of the attribution text via CSS transform
** is adopted from the fullscreen plugin.
**
** Version: 1.0
**
** License: MIT license (see file LICENSE)
**
******************************************************************/

window.RevealAttribution = window.RevealAttribution || {
id: 'RevealAttribution',
init: function(deck) {
initAttribution(deck);
}
};

const initAttribution = function(Reveal){

var ready = false;
var resize = false;
var scale = 1;

window.addEventListener( 'ready', function( event ) {

var content;

// Remove configured margin of the presentation
var attribution = document.getElementsByClassName("attribution");
var width = window.innerWidth;
var configuredWidth = Reveal.getConfig().width;
var configuredHeight = Reveal.getConfig().height;

scale = 1/(1-Reveal.getConfig().margin);

for (var i = 0; i < attribution.length; i++) {
content = attribution[i].innerHTML;
attribution[i].style.width = configuredWidth + "px";
attribution[i].style.height = configuredHeight + "px";
attribution[i].innerHTML = "<span class='content'>" + content + "</span>";
attribution[i].style.transform = 'translate( -50%, -50% ) scale( ' + scale*100 + '% ) rotate(-180deg)';
}

// Scale with cover class to mimic backgroundSize cover
resizeCover();

});

window.addEventListener( 'resize', resizeCover );

function resizeCover() {

// Scale to mimic backgroundSize cover
var attribution = document.getElementsByClassName("attribution");
var xScale = window.innerWidth / Reveal.getConfig().width;
var yScale = window.innerHeight / Reveal.getConfig().height;
var s = 1;

if (xScale > yScale) {
// The div fits perfectly in x axis, stretched in y
s = xScale/yScale;
}
for (var i = 0; i < attribution.length; i++) {
attribution[i].style.transform = 'translate( -50%, -50% ) scale( ' + s*scale*100 + '% ) rotate(-180deg)';
}
}

};
103 changes: 100 additions & 3 deletions src/custom.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,106 @@
/*-- scss:defaults --*/

$presentation-font-size-root: 1.5em;
$presentation-line-height: 1.5em;
// FONTS
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

ul {
$presentation-heading-font: 'Montserrat', sans-serif;

$accent: #0c4e8a;
/*-- scss:rules --*/

// Title and headings styling
#title-slide {
text-align: center;

.title {
font-family: $presentation-heading-font;
font-weight: 400;
font-size: 2.5em;
color: #0c4e8a;
}

.subtitle {
color: $accent;
font-style: italic;
}

.author,
.quarto-title-author-name {
color: $body-color;
font-size: 1.2em;
}

.quarto-title-authors {
display: flex;
justify-content: center;
flex-direction: row; // Ensure horizontal layout
flex-wrap: wrap;
gap: 2em; // Space between authors
// display: flex;
// flex-direction: row;
// flex-wrap: wrap;

.quarto-title-author {
padding-left: 0em;
padding-right: 0em;
width: auto; // Allow variable width based on content
max-width: 30%; // Limit width so multiple fit on one row
flex: 0 0 auto; // Don't grow or shrink
}
}

.institute,
.quarto-title-affiliation,
.quarto-title-author-email {
font-style: italic;
font-size: 80%;
// color: #fffafa;
}

.date {
font-weight: 400; // Set your desired font weight (100-900)
font-size: 1em; // Optionally adjust the size
color: $body-color; // Use the default text color or set your own
margin-top: 1em; // Add some space above the date
}


}

// Control heading size and weight for non-title slides
.reveal h1:not(#title-slide h1) {
font-size: 2.0em;
font-weight: 600;
}

.reveal h2:not(#title-slide h2) {
font-size: 1.7em;
font-weight: 550;
}

.reveal h3:not(#title-slide h3) {
font-size: 1.3em;
font-weight: 500;
}

/*-- vertically center columns (or any container) --*/
.v-center-container {
display: flex;
justify-content: center;
align-items: center;
height: 90%;
}

/*-- Get rid of column margins - quarto revealjs has strange behaviour --*/
.reveal .columns> {

.column,
.column:last-child {

> :not(ul, ol) {

margin-left: 0em;
margin-right: 0em;
}
}
}
8 changes: 4 additions & 4 deletions src/dependencies.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- Ideally automate the fetching of the data
:::
:::{.column width="40%"}
![Example of a zenodo listing. Note how each version of the dataset has a different reference](img/zenodo.png)
![Example of a zenodo listing. Note how each version of the dataset has a different reference](images/zenodo.png)
:::
:::

Expand Down Expand Up @@ -91,9 +91,9 @@
- Portable and cross-platform
:::
:::{.column width="40%"}
![](img/docker-logo-ocean-blue.svg)
![](img/apptainer.svg)
![](img/podman-logo-source.svg)
![](images/docker-logo-ocean-blue.svg)
![](images/apptainer.svg)
![](images/podman-logo-source.svg)
:::
:::

Expand Down
2 changes: 1 addition & 1 deletion src/documentation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
::::

::::{.column width=50%}
![](img/ftorch-readme.png)
![](images/ftorch-readme.png)
::::
:::

Expand Down
Loading