Skip to content

Commit

Permalink
feat: add Camptocamp theme
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-soubeyrand committed Jun 7, 2024
1 parent 3e20f31 commit ffdbfed
Show file tree
Hide file tree
Showing 10 changed files with 843 additions and 1 deletion.
42 changes: 42 additions & 0 deletions README.camptocamp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# reveal.js

This is [reveal.js] with Camptocamp theme.

## Contributing

`upstream` branch must be a direct ancestor of the upstream main branch: it can be behind the upstream main branch, but cannot diverge from it. `main` branch must be ahead of `upstream` branch: each time `upstream` is synced with upstream, `main` has to be rebased.

### Prerequisites

Add upstream remote repository:

```
git remote add upstream [email protected]:hakimel/reveal.js.git
git fetch upstream
```

### Rebasing on upstream main branch

```
git checkout upstream
git pull --tags --ff-only upstream master
git push
git checkout main
git rebase upstream
git push --force-with-lease
```

### Releasing a new version

```
git checkout <upstream-tag>
git cherry-pick upstream..main
cat package.json | jq -r '.version |= (split(".") | map(. |= tonumber) | .[2] |= . * 100 + 1000 + 1 | join("."))' | tee package.json
git add package.json
git commit --amend
tag="$(jq -r .version package.json)"
git tag "$tag"
git push origin "$tag"
```

[reveal.js]: https://revealjs.com/
95 changes: 95 additions & 0 deletions css/theme/source/camptocamp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* Camptocamp theme for reveal.js.
*/


// Default mixins and settings -----------------
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------


// Include theme-specific fonts
@import url(./fonts/inter/inter.css);

$camptocampOrangeColor: #ff680a;
$camptocampGreyColor: #7a7f82;

// Override theme settings (see ../template/settings.scss)
$backgroundColor: #ffffff;

$mainColor: $camptocampGreyColor;
$headingColor: $camptocampOrangeColor;

$mainFontSize: 42px;
$mainFont: 'Inter', Helvetica, sans-serif;
$headingFont: 'Inter', Helvetica, sans-serif;
$headingTextShadow: none;
$headingLetterSpacing: normal;
$headingTextTransform: uppercase;
$headingFontWeight: 600;
$linkColor: $camptocampOrangeColor;
$linkColorHover: lighten($linkColor, 15%);
$selectionBackgroundColor: lighten($linkColor, 25%);

$heading1Size: 2.5em;
$heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;

.reveal-viewport {
.slide-background.title {
background: #000000;
}

#logo-title {
content: url(../img/logo-title.svg);
position: fixed;
top: 2%;
left: 2%;
height: 15%;
z-index: 1;
}

#logo-header-left {
content: url(../img/logo-header-left.svg);
position: fixed;
top: 2%;
left: 2%;
height: 5%;
z-index: 1;
}

#logo-header-right {
content: url(../img/logo-header-right.svg);
position: fixed;
top: 2%;
right: 2%;
height: 5%;
z-index: 1;
}

&:not(.title),
&.overview {
#logo-title {
display: none;
}
}

&.title,
&.overview {
#logo-header-left,
#logo-header-right {
display: none;
}
}

section.title ul:has(>li>.author) {
text-align: center;
margin: 0;
}
}

// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
89 changes: 89 additions & 0 deletions dist/img/logo-header-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions dist/img/logo-header-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ffdbfed

Please sign in to comment.