diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66cb5de --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +node_modules +.DS_Store +dist +*.local +.vite-inspect +.remote-assets +components.d.ts +venv +*.pdf diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 26cdfaa..0b5ed85 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -130,7 +130,7 @@ MD030: # MD033/no-inline-html - Inline HTML MD033: # Allowed elements - allowed_elements: ["br", "center", "img", "script", "form", "input", "a"] + allowed_elements: ["br", "center", "img", "script", "form", "input", "a", "div", "center","small","v-clicks"] # MD034/no-bare-urls - Bare URL used MD034: false diff --git a/2024/LPC/challanges-in-developing-trustworthy-linux-based-systems.md b/2024/LPC/challanges-in-developing-trustworthy-linux-based-systems.md new file mode 100644 index 0000000..eed7a6c --- /dev/null +++ b/2024/LPC/challanges-in-developing-trustworthy-linux-based-systems.md @@ -0,0 +1,337 @@ +## Kudos for review and feedback + +* Ross Philipson +* Daniel P. Smith +* Andrew Cooper +* Richard Pesaud + +--- + +# Glossary + +* LVFS - Linux Vendor Firmware Service +* HSI - Host Security ID +* HCL - Hardware Compatibility List +* FSF RYF - Free Software Foundation, Respect Your Freedom +* SMM - System Management Mode +* TEE - Trusted Execution Environment +* AMD PSP/ASP - AMD Platform Security Processor/AMD Security Processor +* Intel PPAM - Intel Platform Properties Assessment Module +* TCG DICE - Trusted Computing Group, Device Identifier Engine +* UEFI - Unified Extensible Firmware Interface +* OCP - Open Compute Project +* SNIA - Storage Networking Industry Association +* DMTF SPDM - Distributed Management Task Force, Security Protocol and Data Model + + + +--- + +## Goal + +The presentation highlights five challenging areas and activities related to +Linux-based system booting and security from platform vendor and user +perspective. + +The focus is on: +* Highlighting the problems to provide inspiration and work as an anchor for +future CfP processes. We see challenges and issues in the open source communities +in various areas, including only sometimes being able to get domain experts in +these topics. +* Make valuable references to past events. +* Get feedback on what is missing. + + + +--- + +## Challenge 1: Assessment + +
+ + + +
+ +* Lack of OS awareness about hardware security capabilities leads to the +inability to evaluate and improve system security posture. +* Over the last two years, we have seen number of various communities +approaching this topic. + - GNOME introduced the Device Security Settings page (based on [LVFS HSI](https://fwupd.github.io/libfwupdplugin/hsi.html)). + - KDE Plasma added Firmware Security page (based on [LVFS HSI](https://fwupd.github.io/libfwupdplugin/hsi.html)). + - Qubes OS Security Report (based on Qubes HCL). + - FSF RYF Certification (unclear rules). + + +--- +clicks: 4 +--- + + +## Assessment + +* Some interfaces for CPU assessment already exist. We have tools like: + - `lscpu`, which shows `/sys/devices/system/cpu/vulnerabilities`. + - `/proc/cpuinfo` bugs. +* We could only secure our ecosystem if we knew what security mechanisms are +available on a given piece of hardware. +* Shipping hardware with Linux would be more challenging without exposing the +interface, which will help assess security configuration and help protect +against misconfiguration of security features. +* Achieving results requires broader cooperation between communities and vendors. +* Followed presentations and communities discussed this topic: + - [Embedded Recipes: LVFS: The next 50 million firmware updates](https://embedded-recipes.org/2022/wp-content/uploads/2022/06/LVFS-ER-avec-compression.pdf). + - [TrenchBoot Summit: LVFS Host Security ID (HSI) and Silicon-Based Core Security](https://www.youtube.com/live/xZoCtNV8Qs0). + - Arm SystemArchAC Security Sub-team. + + + + +--- +clicks: 2 +--- + + +# Challenge 2: SMM (TEE?) as Chain of Trust Gap + +* For various reasons, vendors add secure areas that try to guarantee the +confidentiality and integrity of the code and data inside it. +* This creates an exciting attack target that has been abused many times +in the past. +* Solutions: + - SMI Transfer Monitor - Linux driver [out of + tree](https://github.com/EugeneDMyers/stm_linux_module), probably far from + making it first-class citizen. + - Project Mu - has an SMM Supervisor integrated on top of STM API. Microsoft + Secured Core PC makes it a requirement, as does other SMM threat-mitigating + technology. + - Ron Minnich: [Let's move SMM out of firmware and into the kernel](https://www.youtube.com/watch?v=6GEaw4msq6g). +* Followed presentations and communities discussed this topic: + - [BSides Portland: ABC to XYZ of Writing System Management Mode (SMM) Drivers](https://youtu.be/BQajtsy6kp0). + - [Dasharo Dev vPub: Overview of the Intel SMI Transfer Monitor on Dasharo Firmware](https://youtu.be/3PmOcjQX-9Y). +* SMM (TEE?), by definition, should not give direct access to the user, but it +needs to communicate the platform security state to the user. Is there a place +for it in the Linux kernel? + + + + +--- +clicks: 5 +--- + + +# Challenge 3: All your hardware belong to us + +* The growth of hardware and firmware components like AMD PSP features, Intel +PPAM and ME features, or MS Pluton, and how those effectively block/enable +building trustworthy systems by the open-source community. +* In parallel, this creates an ecosystem in which we cannot leverage the the +full potential of hardware and firmware in our machines. +* On one side, this is an attack vector that we cannot do anything about. On +the other side, our hardware no longer belongs to us if anyone is surprised by +that fact. +* Followed presentations and communities discussed this topic: + - [BlackHat: Breaking Firmware Trust From Pre-EFI: Exploiting Early Boot Phases](https://youtu.be/Z81s7UIiwmI) + - [SMM isolation - SMI deprivileging (ISRD)](https://tandasat.github.io/blog/2024/02/29/ISRD.html) +* Why did it all happen? + - [USENIX ATC '21/OSDI '21 Joint Keynote Address-It's Time for Operating Systems to Rediscover Hardware](https://www.youtube.com/watch?v=36myc8wQhLo) + + + + +--- +clicks: 4 +--- + + +# Challenge 4: Root of Trust + +* There are promising plans for defeating the lack of consistent assessment, +implementation, and provisioning of Root of Trust on very different hardware +configurations through Caliptra, DICE, SPDM, and more, as well as what impact +it may have on the OS. +* Some SPDM-related patches are slowly landing in Linux. +* Followed presentations and communities discussed this topic: + - [UEFI Forum: Using SPDM in UEFI for Device Attestation](https://youtu.be/RJHd3Mqk4Uw). + - [OCP: OCP Attestation using SPDM and DICE](https://youtu.be/qO2BrMZZy2Y). + - [OCP: TPM Transport Security: Defeating Active Interposers with DICE](https://youtu.be/DKfbkOTYzOU). + - [OCP: And Update on Caliptra](https://youtu.be/DKfbkOTYzOU). + - [SNIA: TCG DICE & DMTF SPDM Binding Overview](https://youtu.be/fxp7UHFaBLs). + + + +--- + +# Challenge 5: What we can do better with DRTM for AMD + + + +* Lessons learned from the 11-th series of making 20+ year-old security tech + for Intel CPUs first-class citizens in the Linux kernel. +* Make sure to consider platform-specific challenges and architectural + alignment (Intel vs AMD, ARM inclusion). Design a robust ABI framework up + front to reflect this. +* Consider configuration impacts and document them upfront (e.g., KASLR, + IOMMU in the Linux kernel). +* Check various compilers and build environments from the beginning. Ensure + successful builds with the new features turned on and off in the + configuration. + + + +--- + +# Challenge 5: What we can do better with DRTM for AMD + + + +* Plan for all entry points and boot protocols (32/64 bit, legacy/UEFI). Note + that the upstream work assumes 64b environments to run in, but it should + build in all environments +* Be willing to accommodate feedback and suggestions where possible and + attempt to get assistance from the community (e.g., WAIT/MONITOR, + linker-based `kernel_info` placement). +* Avoid tight coupling to specific hardware behaviors (e.g., TPM access). +* Is there anything missing? + + + + +--- +layout: cover +background: /intro.png +class: text-center + +--- + +# Q&A + +piotr.krol@3mdeb.com + + diff --git a/2024/LPC/changelog.md b/2024/LPC/changelog.md new file mode 100644 index 0000000..6e42059 --- /dev/null +++ b/2024/LPC/changelog.md @@ -0,0 +1,14 @@ +- [ ] add kudos +- [ ] fix page numbers is PDF + + removed for now +- [ ] add slides for Google AVF (GPLv2 pKVM and BSD 3-clause gunyah) + + at this point I have not enough understanding of it to speak about that + + there are some notes on hackernews +- [ ] add slide for pKVM neutering of Arm TrustZone EL3 as equivalent to SMM/TEE +- [x] remove LVFS rant, and put it to comment +- [x] s/STM/SMM Supervisor/ +- [x] s/YO/year-old/ +- [x] add glossary +- [x] capitalize first letter and end with period +- [ ] incomplete sentence "Without exposing..." +- [ ] TB section improvements diff --git a/README.md b/README.md index a3cfc91..cd53866 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,54 @@ $ tree -L 2 ║           ║
║           ║
║    TBD   ║
+ +## Usage + +Historically we used [remarkjs](https://github.com/remarkjs/remark) with our +own [remark-remplates](https://github.com/3mdeb/remark-templates), but since +September 2024 we started switching to [slidev](https://sli.dev/). + +## How to preview presentation + +### slidev + +* Install npm manager e.g. [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script) +* Use lts version of npm: + +```bash +nvm install --lts +nvm use --lts +``` + +* Host presentations: + +```bash +npm run dev -- -p 8000 --remote --force +``` + +* Open content in browser on http://0.0.0.0:8000 + +### remarkjs + +* Clone repository +* Initialize submodules + + ```bash + git submodule update --init --recursive --checkout + ``` + +* Run local HTTP server e.g. + + ```bash + python -m http.server + ``` + +* Open content in browser on http://0.0.0.0:8000 + +## Contribution + +* Please feel free to create issues for improvement ideas and bugs, as well as + pull requests to fix any issues. +* If you intend to provide code improvements, please install all dependencies. +* Before pushing code for review, ensure that `pre-commit run --all-files` does + not return any issues. diff --git a/components/Counter.vue b/components/Counter.vue new file mode 100644 index 0000000..eaa6a79 --- /dev/null +++ b/components/Counter.vue @@ -0,0 +1,37 @@ + + + diff --git a/global-top.vue b/global-top.vue new file mode 100644 index 0000000..72218e3 --- /dev/null +++ b/global-top.vue @@ -0,0 +1,15 @@ + diff --git a/package.json b/package.json new file mode 100644 index 0000000..b861c39 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "presentation", + "type": "module", + "private": true, + "scripts": { + "build": "slidev build", + "dev": "slidev --open", + "export": "slidev export" + }, + "dependencies": { + "@slidev/cli": "^0.49.29", + "@slidev/theme-default": "latest", + "@slidev/theme-seriph": "latest", + "vue": "^3.4.38" + }, + "devDependencies": { + "markdown-it-admon": "^1.0.1" + } +} diff --git a/public/2024/LPC/qos_sec_report.png b/public/2024/LPC/qos_sec_report.png new file mode 100644 index 0000000..08945cc Binary files /dev/null and b/public/2024/LPC/qos_sec_report.png differ diff --git a/public/dasharo-sygnet-white.svg b/public/dasharo-sygnet-white.svg new file mode 100644 index 0000000..92ccafe --- /dev/null +++ b/public/dasharo-sygnet-white.svg @@ -0,0 +1,62 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/public/fonts/miriam/MiriamLibre-Bold 2.ttf b/public/fonts/miriam/MiriamLibre-Bold 2.ttf new file mode 100755 index 0000000..a0533e8 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Bold 2.ttf differ diff --git a/public/fonts/miriam/MiriamLibre-Bold 3.ttf b/public/fonts/miriam/MiriamLibre-Bold 3.ttf new file mode 100755 index 0000000..a0533e8 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Bold 3.ttf differ diff --git a/public/fonts/miriam/MiriamLibre-Bold.ttf b/public/fonts/miriam/MiriamLibre-Bold.ttf new file mode 100755 index 0000000..a0533e8 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Bold.ttf differ diff --git a/public/fonts/miriam/MiriamLibre-Regular 2.ttf b/public/fonts/miriam/MiriamLibre-Regular 2.ttf new file mode 100755 index 0000000..1a5b9b5 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Regular 2.ttf differ diff --git a/public/fonts/miriam/MiriamLibre-Regular 3.ttf b/public/fonts/miriam/MiriamLibre-Regular 3.ttf new file mode 100755 index 0000000..1a5b9b5 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Regular 3.ttf differ diff --git a/public/fonts/miriam/MiriamLibre-Regular.ttf b/public/fonts/miriam/MiriamLibre-Regular.ttf new file mode 100755 index 0000000..1a5b9b5 Binary files /dev/null and b/public/fonts/miriam/MiriamLibre-Regular.ttf differ diff --git a/public/fonts/opensans/OpenSans-Bold.ttf b/public/fonts/opensans/OpenSans-Bold.ttf new file mode 100755 index 0000000..fd79d43 Binary files /dev/null and b/public/fonts/opensans/OpenSans-Bold.ttf differ diff --git a/public/fonts/opensans/OpenSans-BoldItalic.ttf b/public/fonts/opensans/OpenSans-BoldItalic.ttf new file mode 100755 index 0000000..9bc8009 Binary files /dev/null and b/public/fonts/opensans/OpenSans-BoldItalic.ttf differ diff --git a/public/fonts/opensans/OpenSans-ExtraBold.ttf b/public/fonts/opensans/OpenSans-ExtraBold.ttf new file mode 100755 index 0000000..21f6f84 Binary files /dev/null and b/public/fonts/opensans/OpenSans-ExtraBold.ttf differ diff --git a/public/fonts/opensans/OpenSans-ExtraBoldItalic.ttf b/public/fonts/opensans/OpenSans-ExtraBoldItalic.ttf new file mode 100755 index 0000000..31cb688 Binary files /dev/null and b/public/fonts/opensans/OpenSans-ExtraBoldItalic.ttf differ diff --git a/public/fonts/opensans/OpenSans-Italic.ttf b/public/fonts/opensans/OpenSans-Italic.ttf new file mode 100755 index 0000000..c90da48 Binary files /dev/null and b/public/fonts/opensans/OpenSans-Italic.ttf differ diff --git a/public/fonts/opensans/OpenSans-Light.ttf b/public/fonts/opensans/OpenSans-Light.ttf new file mode 100755 index 0000000..0d38189 Binary files /dev/null and b/public/fonts/opensans/OpenSans-Light.ttf differ diff --git a/public/fonts/opensans/OpenSans-LightItalic.ttf b/public/fonts/opensans/OpenSans-LightItalic.ttf new file mode 100755 index 0000000..68299c4 Binary files /dev/null and b/public/fonts/opensans/OpenSans-LightItalic.ttf differ diff --git a/public/fonts/opensans/OpenSans-Regular.ttf b/public/fonts/opensans/OpenSans-Regular.ttf new file mode 100755 index 0000000..db43334 Binary files /dev/null and b/public/fonts/opensans/OpenSans-Regular.ttf differ diff --git a/public/fonts/opensans/OpenSans-Semibold.ttf b/public/fonts/opensans/OpenSans-Semibold.ttf new file mode 100755 index 0000000..1a7679e Binary files /dev/null and b/public/fonts/opensans/OpenSans-Semibold.ttf differ diff --git a/public/fonts/opensans/OpenSans-SemiboldItalic.ttf b/public/fonts/opensans/OpenSans-SemiboldItalic.ttf new file mode 100755 index 0000000..59b6d16 Binary files /dev/null and b/public/fonts/opensans/OpenSans-SemiboldItalic.ttf differ diff --git a/public/intro.png b/public/intro.png new file mode 100644 index 0000000..d410f10 Binary files /dev/null and b/public/intro.png differ diff --git a/slides.md b/slides.md new file mode 100644 index 0000000..c0bce2a --- /dev/null +++ b/slides.md @@ -0,0 +1,25 @@ +--- +theme: ./theme +background: /intro.png +# some information about your slides (markdown enabled) +title: "Presentation Title" +info: false +# apply unocss classes to the current slide +class: text-center +# https://sli.dev/features/drawing +drawings: + persist: false +# slide transition: https://sli.dev/guide/animations.html#slide-transitions +transition: slide-left +# enable MDC Syntax: https://sli.dev/features/mdc +mdc: true + +--- + +## Presentation title + + +--- +src: ./pages/imported-slides.md +--- + diff --git a/snippets/external.ts b/snippets/external.ts new file mode 100644 index 0000000..40c109b --- /dev/null +++ b/snippets/external.ts @@ -0,0 +1,12 @@ +/* eslint-disable no-console */ + +// #region snippet +// Inside ./snippets/external.ts +export function emptyArray(length: number) { + return Array.from({ length }) +} +// #endregion snippet + +export function sayHello() { + console.log('Hello from snippets/external.ts') +} diff --git a/theme/LICENSE b/theme/LICENSE new file mode 100644 index 0000000..e778b54 --- /dev/null +++ b/theme/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Slidev.js Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/theme/layoutHelper.ts b/theme/layoutHelper.ts new file mode 100644 index 0000000..7d78f52 --- /dev/null +++ b/theme/layoutHelper.ts @@ -0,0 +1,38 @@ +import type { CSSProperties } from 'vue' + +/** + * Resolve urls from frontmatter and append with the base url + */ +export function resolveAssetUrl(url: string) { + if (url.startsWith('/')) + return import.meta.env.BASE_URL + url.slice(1) + return url +} + +export function handleBackground(background?: string, dim = false): CSSProperties { + const isColor = background && ['#', 'rgb', 'hsl'].some(v => background.indexOf(v) === 0) + + const style = { + background: isColor + ? background + : undefined, + color: (background && !isColor) + ? 'white' + : undefined, + backgroundImage: isColor + ? undefined + : background + ? dim + ? `linear-gradient(#0005, #0008), url(${resolveAssetUrl(background)})` + : `url("${resolveAssetUrl(background)}")` + : undefined, + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center', + backgroundSize: 'cover', + } + + if (!style.background) + delete style.background + + return style +} diff --git a/theme/layouts/cover.vue b/theme/layouts/cover.vue new file mode 100644 index 0000000..af03ef7 --- /dev/null +++ b/theme/layouts/cover.vue @@ -0,0 +1,20 @@ + + + diff --git a/theme/layouts/fact.vue b/theme/layouts/fact.vue new file mode 100644 index 0000000..476665c --- /dev/null +++ b/theme/layouts/fact.vue @@ -0,0 +1,7 @@ + diff --git a/theme/layouts/intro.vue b/theme/layouts/intro.vue new file mode 100644 index 0000000..e8f67cc --- /dev/null +++ b/theme/layouts/intro.vue @@ -0,0 +1,7 @@ + diff --git a/theme/layouts/quote.vue b/theme/layouts/quote.vue new file mode 100644 index 0000000..f262dce --- /dev/null +++ b/theme/layouts/quote.vue @@ -0,0 +1,7 @@ + diff --git a/theme/layouts/section.vue b/theme/layouts/section.vue new file mode 100644 index 0000000..fd8ba16 --- /dev/null +++ b/theme/layouts/section.vue @@ -0,0 +1,7 @@ + diff --git a/theme/layouts/statement.vue b/theme/layouts/statement.vue new file mode 100644 index 0000000..72b77ed --- /dev/null +++ b/theme/layouts/statement.vue @@ -0,0 +1,7 @@ + diff --git a/theme/package.json b/theme/package.json new file mode 100644 index 0000000..078899b --- /dev/null +++ b/theme/package.json @@ -0,0 +1,36 @@ +{ + "name": "@slidev/theme-default", + "version": "0.25.0", + "description": "Default theme for Slidev", + "author": "antfu ", + "license": "MIT", + "funding": "https://github.com/sponsors/antfu", + "homepage": "https://sli.dev", + "repository": { + "type": "git", + "url": "https://github.com/slidevjs/themes" + }, + "bugs": "https://github.com/slidevjs/themes/issues", + "keywords": [ + "slidev-theme", + "slidev" + ], + "engines": { + "node": ">=14.0.0", + "slidev": ">=v0.47.0" + }, + "slidev": { + "defaults": { + "fonts": { + "mono": "Fira Code", + "sans": "Avenir Next,Nunito Sans", + "local": "Avenir Next" + } + } + }, + "dependencies": { + "@slidev/types": "^0.47.0", + "codemirror-theme-vars": "^0.1.2", + "prism-theme-vars": "^0.2.4" + } +} diff --git a/theme/styles/index.ts b/theme/styles/index.ts new file mode 100644 index 0000000..5212497 --- /dev/null +++ b/theme/styles/index.ts @@ -0,0 +1,5 @@ +import '@slidev/client/styles/layouts-base.css' +import './layouts.css' +import './prism.css' +import './remark-slides.css' +import "markdown-it-admon/styles/admonition.css" diff --git a/theme/styles/layouts.css b/theme/styles/layouts.css new file mode 100644 index 0000000..f3f04dd --- /dev/null +++ b/theme/styles/layouts.css @@ -0,0 +1,76 @@ +.slidev-layout { + h1 + p { + @apply -mt-2 opacity-50 mb-4; + } + + p + h2, ul + h2, table + h2 { + @apply mt-10; + } + + h1 { + @apply text-4xl mb-4 -ml-[0.05em]; + } + + h2 { + @apply text-3xl; + } + + h3 { + @apply text-2xl; + } + + h4 { + @apply text-xl; + } + + h5 { + @apply text-base; + } + + h6 { + @apply text-sm pt-1 uppercase tracking-widest font-500 -ml-[0.05em]; + } + + h6:not(.opacity-100) { + @apply opacity-40; + } +} + +.slidev-layout.cover, +.slidev-layout.intro { + @apply h-full grid; + + h1 { + @apply text-6xl leading-20; + } +} + + +.slidev-layout.fact { + @apply text-center grid h-full; + h1 { + @apply text-8xl font-700; + } + h1 + p { + @apply font-700 text-2xl; + } +} +.slidev-layout.statement { + @apply text-center grid h-full; + + h1 { + @apply text-6xl font-700; + } +} +.slidev-layout.quote { + @apply grid h-full; + + h1 + p { + @apply mt-2; + } +} +.slidev-layout.section { + h1 { + @apply text-6xl font-500 leading-20; + } +} diff --git a/theme/styles/prism.css b/theme/styles/prism.css new file mode 100644 index 0000000..5c05711 --- /dev/null +++ b/theme/styles/prism.css @@ -0,0 +1,54 @@ +@import 'prism-theme-vars/base.css'; +@import 'codemirror-theme-vars/base.css'; +@import 'prism-theme-vars/to-codemirror.css'; + +:root { + --prism-font-family: var(--slidev-code-font-family); + --prism-background: var(--slidev-code-background); +} + +html:not(.dark) { + --prism-foreground: #393a34; + --prism-comment: #a0ada0; + --prism-string: #b56959; + --prism-literal: #2f8a89; + --prism-number: #296aa3; + --prism-keyword: #1c6b48; + --prism-function: #6c7834; + --prism-boolean: #1c6b48; + --prism-constant: #a65e2b; + --prism-deleted: #a14f55; + --prism-class: #2993a3; + --prism-builtin: #ab5959; + --prism-property: #b58451; + --prism-namespace: #b05a78; + --prism-punctuation: #8e8f8b; + --prism-decorator: #bd8f8f; + --prism-regex: #ab5e3f; + --prism-json-property: #698c96; +} + +html.dark { + --prism-foreground: #d4cfbf; + --prism-comment: #758575; + --prism-string: #d48372; + --prism-literal: #429988; + --prism-keyword: #4d9375; + --prism-boolean: #1c6b48; + --prism-number: #6394bf; + --prism-variable: #c2b36e; + --prism-function: #a1b567; + --prism-deleted: #a14f55; + --prism-class: #54b1bf; + --prism-builtin: #e0a569; + --prism-property: #dd8e6e; + --prism-namespace: #db889a; + --prism-punctuation: #858585; + --prism-decorator: #bd8f8f; + --prism-regex: #ab5e3f; + --prism-json-property: #6b8b9e; + --prism-line-number: #888888; + --prism-line-number-gutter: #eeeeee; + --prism-line-highlight-background: #444444; + --prism-selection-background: #444444; +} diff --git a/theme/styles/remark-slides.css b/theme/styles/remark-slides.css new file mode 100644 index 0000000..cc725af --- /dev/null +++ b/theme/styles/remark-slides.css @@ -0,0 +1,480 @@ +@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); +@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); +@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); + + +@font-face { + font-family: "Open Sans Bold"; + src: url(../fonts/opensans/OpenSans-Bold.ttf) format("truetype"); +} + +@font-face { + font-family: "Open Sans Regular"; + src: url(../fonts/opensans/OpenSans-Regular.ttf) format("truetype"); +} + +@font-face { + font-family: "Open Sans Light"; + src: url(../fonts/opensans/OpenSans-Light.ttf) format("truetype"); +} + +@font-face { + font-family: "Miriam Libre Bold"; + src: url(../fonts/miriam/MiriamLibre-Bold.ttf) format("truetype"); +} + +@font-face { + font-family: "Miriam Libre Regular"; + src: url(../fonts/miriam/MiriamLibre-Regular.ttf) format("truetype"); +} + +@font-face { + font-family: "Miriam Libre Light"; + src: url(../fonts/miriam/MiriamLibre-Light.ttf) format("truetype"); +} + +body { font-family: "Open Sans Regular", sans-serif } +h1, h2, h3 { + font-family: 'Miriam Libre Regular'; + font-weight: normal; + color:#2BBA47; +} + +.remark-slide-content h1{ + font-size: 30px; + position: fixed; + right: 30px; + top: 12px; + max-width: 800px; + +} + +.remark-slide-content h3{ + font-size:25px; +} + +.intro h3{ + color:#fff; +} +.image-120 img { + width: 120%; +} +.image-110 img { + width: 110%; +} +.image-100 img { + width: 100%; +} + +.image-99 img { + width: 99%; +} +.image-95 img { + width: 95%; +} +.image-90 img { + width: 90%; +} +.image-85 img { + width: 85%; +} +.image-80 img { + width: 80%; +} +.image-75 img { + width: 75%; +} +.image-70 img { + width: 70%; +} +.image-65 img { + width: 65%; +} +.image-60 img { + width: 60%; +} +.image-50 img { + width: 50%; +} +.image-45 img { + width: 45%; +} +.image-40 img { + width: 40%; +} +.image-35 img { + width: 35%; +} +.image-30 img { + width: 30%; +} +.image-20 img { + width: 20%; +} +.image-15 img { + width: 15%; +} +.image-10 img { + width: 10%; +} +.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono' } + +.small-code .remark-code-line { + font-size: 10px; +} + +.code-11px .remark-code-line { + font-size: 11px; +} + +.code-12px .remark-code-line { + font-size: 12px; +} + +.code-13px .remark-code-line { + font-size: 13px; +} + +.code-15px .remark-code-line { + font-size: 15px; +} + +.medium-code .remark-code-line { + font-size: 16px; +} + +.diff-code { + margin-left: -40px; +} + +.diff-code .remark-code-line { + font-size: 14px; +} + +.mem-code .remark-code-line { + font-size: 15px; +} + +.dp-code .remark-code-line { + font-size: 22px; +} + +.bottomBar{ + font-size: 15px; + color: #fff; + position:fixed; + bottom:18px; + left:50%; + transform: translate(-50%,0); + text-align:center; + width:100%; +} + +.remark-slide-content{ + background-image: url('../images/background2.png'); + background-repeat:no-repeat; + background-size:contain; + background-position:center; + color:#333; + padding-top: 100px; + + +} + +.intro p{ + color:#fff; + +} + +.intro h2{ + background-position: calc(50% - 65px) 2px; + background-size: 20px 20px; + background-repeat: no-repeat; + color:#fff; + font-size:20px; +} + +.remark-slide-number{ + bottom: 20px; + color:#fff; +} + +p{ + flex-direction: column; + justify-content: center; +} + +.left-code-column50 { + width: 55%; + float: left; + margin-left:-50px; + margin-top:-30px; +} + +.right-code-column50 { + width: 55%; + float: right; + margin-right:-50px; + margin-top:-30px; +} + +.left-column50 { + width: 50%; + float: left; +} + +.left-column45 { + width: 45%; + float: left; +} + +.left-column55 { + width: 55%; + float: left; +} + +.left-column30 { + width: 30%; + float: left; +} + +.right-column45 { + width: 45%; + float: right; +} + +.right-column50 { + width: 50%; + float: right; +} + +.right-column55 { + width: 55%; + float: right; +} + + +.right-column70 { + width: 70%; + float: right; +} + +.intro { + background-image: url('../images/intro.png') !important; + background-repeat:no-repeat; + background-size:contain; + background-position:center; + color:#fff +} + +a{ + color:#2BBA47; + font-size:1em; +} + +.intro h1 { + font-size:40px; + position:static !important; + max-width:none !important; + top:0; + right:0; +} + +.intro .bottomBar{ + display:none; +} + +.remak-slide ul { + list-style-type: disc; + padding: 0; + margin: 0; + margin-top:-0.5em; + margin-bottom:-0.5em; + margin-left: 1em; + list-style-color: #2BBA47; +} + +ul ul{ + list-style-type: circle; + margin-left: 1em; +} + +.pure-table thead { + background-color: #3D3D3D !important; + color: #ebebeb; + text-align: left; + vertical-align: bottom; + font-family:"montserratLight" ,sans-serif; +} +.th{ + padding-top:9px!important; + padding-bottom:9px!important; +} +.pure-table td { + border-left: 1px solid #E2E2E2 !important; + border-left-width: 1px; + border-width: 0 0 0 1px; + border-left-width: 1px; + font-size: 11px !important; + margin: 0; + overflow: visible; + padding: 0.5em 0.6em !important; +} +.pure-table th { + border-left: 1px solid #3D3D3D !important; + border-left-width: 1px; + border-width: 0 0 0 1px; + border-left-width: 1px; + font-size: 10px !important; + margin: 0; + overflow: visible; + padding: 0.4em 0.8em !important; +} +.pure-table { + border:0px !important; +} +.pure-table table tbody{ + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + border: 1px solid #E2E2E2 !important; +} +.pure-table-bordered td { + border-bottom: 1px solid #cbcbcb; +} +.pure-table td, .pure-table th { + border-left: 1px solid #cbcbcb; + border-left-width: 1px; + border-width: 0 0 0 1px; + border-bottom-width: 0px; + border-left-width: 1px; + font-size: inherit; + margin: 0; + overflow: visible; + padding: .5em 1em; +} +.pure-table-striped tr:nth-child(2n-1) td { + background-color: #f2f2f2; +} +.flag-true{ + width:15px; + height:15px; + background:url(remark-templates/3mdeb-trainings-template/images/accept.svg); + margin-left:auto; + margin-right:auto; + background-size:8px auto; + background-position:center center; + background-repeat:no-repeat; +} +.flag-false{ + margin-left:auto; + margin-right:auto; + width:15px; + height:15px; + background:url(remark-templates/3mdeb-trainings-template/images/close.svg); + background-size:8px auto; + background-position:center center; + background-repeat:no-repeat; +} +h4{ + font-size:12px; +} +h5 { + margin: 5px 0 5px 0; + font-size: 10px; +} + +li { + padding-left: 0.5em; + /* text-indent: -.7em; */ +} + +.code-comment { + position:relative; + top:-0.7em; + font-size: 0.8em; + font-style: italic; +} + +.footnote { + bottom: 9em; + font-size: 10px; + left: 4em; + position: absolute; + right: 4em; +} + +.hljs-default .hljs, .hljs-default .hljs-subst { + color: #444; + font-size: 15px; +} + +.image-left { + float: left; + width: 20em; + margin-top: -2em; + margin-left: -2em; +} + +@page { + size: 908px 681px; + margin: 0; +} + +@media print { + .remark-slide-scaler { + width: 100% !important; + height: 100% !important; + transform: scale(1) !important; + top: 0 !important; + left: 0 !important; + } +} + +.code-comment{ + position: relative; + top: -1em; + font-style: italic; + font-size:0.75em; + +} + +a { + font-size: 1em; + font-weight: bold; +} + +.left-column50 { + width: 50%; + float: left; +} + +.left-column45 { + width: 45%; + float: left; +} + +.left-column55 { + width: 55%; + float: left; +} + +.left-column30 { + width: 30%; + float: left; +} + +.right-column45 { + width: 45%; + float: right; +} + +.right-column50 { + width: 50%; + float: right; +} + +.right-column55 { + width: 55%; + float: right; +} diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..9276941 --- /dev/null +++ b/vercel.json @@ -0,0 +1,7 @@ +{ + "rewrites": [ + { "source": "/(.*)", "destination": "/index.html" } + ], + "buildCommand": "npm run build", + "outputDirectory": "dist" +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..02abb41 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'vite'; +import MdItAdmon from 'markdown-it-admon'; + +export default defineConfig({ + server: { + fs: { + strict: false, + }, + }, + slidev: { + vue: { + /* vue options */ + }, + markdown: { + /* markdown-it options */ + markdownItSetup(md) { + /* custom markdown-it plugins */ + md.use(MdItAdmon); + }, + }, + }, +});