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 Apr 2, 2024
1 parent d349bda commit e4125f0
Show file tree
Hide file tree
Showing 29 changed files with 100 additions and 240 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 --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.
41 changes: 41 additions & 0 deletions assets/scss/_styles_camptocamp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.td-navbar {
.navbar-brand__logo {
fill: white;

svg {
height: 1em;
}
}

&.td-navbar-cover {
&:not(.navbar-bg-onscroll) {
.navbar-brand__logo {
fill: $orange;
}
}
}
}

// Add heading self links support for Asciidoc content
h2,
h3,
h4,
h5,
h6 {
a.anchor {
@extend .td-heading-self-link;

display: inline-block;
width: 1.5em;
margin-left: -1.5em;

&::before {
@extend .fa-solid;

font-size: 0.8em;
vertical-align: middle;

content: '\f0c1';
}
}
}
6 changes: 6 additions & 0 deletions assets/scss/_variables_camptocamp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Camptocamp colors
$c2c-orange: #ff680a;
$c2c-grey: #7a7f82;

$primary: $c2c-orange;
$secondary: $c2c-grey;
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;
3 changes: 3 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,6 +14,7 @@
@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_after_bs";

Expand Down Expand Up @@ -115,4 +117,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.

0 comments on commit e4125f0

Please sign in to comment.