Skip to content

Commit

Permalink
feat: add Camptocamp customizations
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-soubeyrand committed May 29, 2024
1 parent 1ff7f50 commit 8346f1a
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 256 deletions.
38 changes: 38 additions & 0 deletions README.camptocamp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Docsy

This theme is a customized version of Hugo [Docsy] theme with Camptocamp branding.

## 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 git@github.com:google/docsy.git
git fetch upstream
```

### Rebasing on upstream main branch

```
git checkout upstream
git pull --tags --ff-only upstream main
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
git tag <upstream-tag>.c2c.<version>
git push origin <upstream-tag>.c2c.<version>
```

[Docsy]: https://www.docsy.dev
Binary file removed assets/icons/logo.png
Binary file not shown.
238 changes: 1 addition & 237 deletions assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions assets/scss/_asciidoc.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
$admonition-note: $secondary !default;
$admonition-tip: $info !default;
$admonition-important: $primary !default;
$admonition-caution: $warning !default;
$admonition-warning: $danger !default;

$admonition-colors: (
"note": $admonition-note,
"tip": $admonition-tip,
"important": $admonition-important,
"caution": $admonition-caution,
"warning": $admonition-warning,
);

$theme-colors: map-merge($theme-colors, $admonition-colors);

// Add heading self links support
h2,
h3,
Expand Down
17 changes: 17 additions & 0 deletions assets/scss/_styles_camptocamp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.td-navbar {
.navbar-brand__logo {
fill: white;

svg {
height: 1em;
}
}

&.td-navbar-cover {
&:not(.navbar-bg-onscroll) {
.navbar-brand__logo {
fill: $orange;
}
}
}
}
15 changes: 15 additions & 0 deletions assets/scss/_variables_asciidoc_after_bs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$admonition-note: $secondary !default;
$admonition-tip: $info !default;
$admonition-important: $primary !default;
$admonition-caution: $warning !default;
$admonition-warning: $danger !default;

$admonition-colors: (
"note": $admonition-note,
"tip": $admonition-tip,
"important": $admonition-important,
"caution": $admonition-caution,
"warning": $admonition-warning,
);

$theme-colors: map-merge($theme-colors, $admonition-colors);
7 changes: 7 additions & 0 deletions assets/scss/_variables_camptocamp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import url(../fonts/inter/inter.css);

// Camptocamp colors
$primary: #ff680a;
$secondary: #7a7f82;

$font-family-sans-serif: 'Inter';
6 changes: 6 additions & 0 deletions assets/scss/_variables_camptocamp_after_bs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$success: $green;
$info: $cyan;
$warning: $yellow;
$danger: $red;
$light: $gray-100;
$dark: $gray-900;
4 changes: 4 additions & 0 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "../vendor/bootstrap/scss/functions";

@import "variables_forward";
@import "variables_camptocamp";
@import "variables_project";
@import "variables";
@import "support/mixins";
Expand All @@ -13,7 +14,9 @@
@import "../vendor/Font-Awesome/scss/brands.scss";
@import "../vendor/Font-Awesome/scss/v4-shims.scss";

@import "variables_camptocamp_after_bs";
@import "variables_project_after_bs";
@import "variables_asciidoc_after_bs";

@import "support/utilities";
@import "colors";
Expand Down Expand Up @@ -116,4 +119,5 @@
}
}

@import "styles_camptocamp";
@import "styles_project";
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/google/docsy
module github.com/camptocamp/docsy

go 1.12

Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/absURL.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Get 0 | absURL }}
4 changes: 2 additions & 2 deletions layouts/shortcodes/blocks/feature.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $icon := .Get "icon" | default "fa-lightbulb" -}}
<div class="col-lg-4 mb-5 mb-lg-0 text-center">
<div class="mb-4 h1">
{{ $width := .Get "width" | default 4 }}
<div class="col-lg-{{ $width }} mb-5 mb-lg-0 text-center"><div class="mb-4 h1">
<i class="{{ if not (or (hasPrefix $icon "fas ") (hasPrefix $icon "fab ")) }}fas {{ end }}{{ $icon }}"></i>
</div>
<h4 class="h3">
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/relURL.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Get 0 | relURL }}
Binary file modified static/favicons/android-144x144.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/android-192x192.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/android-36x36.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/android-48x48.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/android-72x72.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/android-96x96.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/apple-touch-icon-180x180.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/favicons/favicon-1024.png
Binary file not shown.
Binary file modified static/favicons/favicon-16x16.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/favicons/favicon-256.png
Binary file not shown.
Binary file modified static/favicons/favicon-32x32.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicons/favicon.ico
100755 → 100644
Binary file not shown.
Binary file removed static/favicons/pwa-192x192.png
Binary file not shown.
Binary file removed static/favicons/pwa-512x512.png
Binary file not shown.
Binary file removed static/favicons/tile150x150.png
Binary file not shown.
Binary file removed static/favicons/tile310x150.png
Binary file not shown.
Binary file removed static/favicons/tile310x310.png
Binary file not shown.
Binary file removed static/favicons/tile70x70.png
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions static/fonts/inter/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@font-face {
font-family: 'Inter';
src: url('./Inter-VariableFont_slnt,wght.ttf') format('truetype');
}

0 comments on commit 8346f1a

Please sign in to comment.