Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.3.0 #44

Merged
merged 40 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f4804ae
sleep and upgrad e pip to avoid race conditions
jhkennedy Mar 17, 2022
ee141e6
pin `mkdocs-material` to latest version
jtherrmann Sep 28, 2023
9cef4fa
update header
jtherrmann Sep 29, 2023
192bafe
fix logos
jtherrmann Sep 29, 2023
0cdea10
Start updating the footer
jtherrmann Sep 29, 2023
d1b3d35
Get social icons to display
jtherrmann Oct 2, 2023
01bba6f
remove logo.html
jtherrmann Oct 2, 2023
db9ad47
fix sidebar title font color
jtherrmann Oct 2, 2023
bdc3948
fix footer size
jtherrmann Oct 2, 2023
f6a7a8d
restore md-footer style to broken version
jtherrmann Oct 2, 2023
1e0fb22
remove footer gradient
jtherrmann Oct 2, 2023
a6909bf
restore footer background image to center
jtherrmann Oct 2, 2023
bb70728
lighten footer background
jtherrmann Oct 4, 2023
d936877
Cite upstream files
jtherrmann Oct 4, 2023
92c6cc5
always include social
jtherrmann Oct 4, 2023
831d2cb
changelog
jtherrmann Oct 4, 2023
69e6324
Add `create-jira-issue.yml`
jtherrmann Oct 4, 2023
f871541
remove gitleaks
jtherrmann Oct 4, 2023
ee3038f
Merge pull request #41 from ASFHyP3/create-jira-issue
jtherrmann Oct 4, 2023
1304b48
Merge branch 'develop' into upgrade-mkdocs-material
jtherrmann Oct 4, 2023
9066141
go back to search plugin
jtherrmann Oct 4, 2023
9920c1e
update changelog
jtherrmann Oct 4, 2023
4805180
drop background and box shadow for nav titles
jhkennedy Oct 5, 2023
66ff5e4
Merge pull request #42 from ASFHyP3/no-box-shadow
jtherrmann Oct 5, 2023
e2f1a5f
fix sidebar heading background color
jtherrmann Oct 5, 2023
d4edd49
Merge pull request #38 from ASFHyP3/upgrade-mkdocs-material
jtherrmann Oct 6, 2023
b239518
cite base.html in main.html
jtherrmann Oct 6, 2023
3581576
drop google analytics
jtherrmann Oct 6, 2023
e64b41c
update changelog and readme regarding analytics
jtherrmann Oct 6, 2023
e892d99
Warn against navigation.instant
jtherrmann Oct 6, 2023
21c135a
Merge branch 'develop' into upgrade-mkdocs-material
jtherrmann Oct 6, 2023
96847cc
fix changelog
jtherrmann Oct 6, 2023
8f2fc42
add upgrade guide to README
jtherrmann Oct 6, 2023
8aeaf07
update mkdocs-material pin
jtherrmann Oct 6, 2023
b9847c8
Merge pull request #43 from ASFHyP3/upgrade-mkdocs-material
jtherrmann Oct 6, 2023
2d7afce
fix `mkdocs-material` pin
jtherrmann Oct 6, 2023
19e57b6
Merge branch 'develop' into upgrade-mkdocs-material
jtherrmann Oct 6, 2023
2a23509
Update setup.py
jtherrmann Oct 6, 2023
6c49607
Merge pull request #45 from ASFHyP3/upgrade-mkdocs-material
jtherrmann Oct 6, 2023
61a90c7
Update asf_theme/partials/copyright.html
jhkennedy Oct 6, 2023
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
15 changes: 15 additions & 0 deletions .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Create Jira issue

on:
issues:
types: [labeled]

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
JIRA_FIELDS: ${{ secrets.JIRA_FIELDS }}
34 changes: 2 additions & 32 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,5 @@ name: Static analysis
on: push

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Scan for secrets with gitleaks
uses: zricethezav/gitleaks-action@master


trufflehog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install trufflehog gitdb2=="2.*"

- name: Scan for secrets with trufflehog
run: |
git fetch origin +refs/tags/*:refs/tags/*
export LAST_TAG_HASH=$(git show-ref --hash -- $(git describe --abbrev=0))
trufflehog --regex --entropy True --since_commit "${LAST_TAG_HASH}" \
--exclude_paths .trufflehog.txt file://"${PWD}"
call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
2 changes: 2 additions & 0 deletions .github/workflows/tag-and-distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ jobs:
- name: Pip install ${{ needs.package.outputs.SDIST_VERSION }}
shell: bash -l {0}
run: |
sleep 30s
python -m pip install --upgrade pip
python -m pip install mkdocs-asf-theme==${{ needs.package.outputs.SDIST_VERSION }}
55 changes: 0 additions & 55 deletions .gitleaks.toml

This file was deleted.

1 change: 0 additions & 1 deletion .trufflehog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.*gitleaks.toml$
.*mkdocs_theme.yml$
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0]

### Changed
- Upgraded `mkdocs-material` to v9.4.2. We have updated our templates in [asf_theme/partials](./asf_theme/partials) to match the [upstream versions](https://github.com/squidfunk/mkdocs-material/tree/9.4.2/src/templates/partials) as closely as possible. This introduces breaking changes. In particular:
- If you want a footer, you should make the following change to your website's `mkdocs.yml` file:
```diff
theme:
features:
+ - navigation.footer
```
- You should carefully review your website to confirm that everything still renders and functions as expected.
- If anything does not work as expected, you may want to read the [`mkdocs-material` upgrade guide](https://squidfunk.github.io/mkdocs-material/upgrade/) starting at [Upgrading from 6.x to 7.x](https://squidfunk.github.io/mkdocs-material/upgrade/#upgrading-from-6x-to-7x) for any other important changes that may apply to your website.

### Removed
- Analytics is no longer provided by default. You should follow <https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/> to enable analytics for your website.

### Fixed
- Fixed <https://github.com/ASFHyP3/mkdocs-asf-theme/issues/27> by upgrading `mkdocs-material`.

## [0.2.4](https://github.com/ASFHyP3/mkdocs-asf-theme/compare/v0.2.3...v0.2.4)

Expand All @@ -17,7 +35,6 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
- ASF logo and background map now appear correctly in "Project" or repo level sites


## [0.2.2](https://github.com/ASFHyP3/mkdocs-asf-theme/compare/v0.2.1...v0.2.2)

### Changed
Expand Down
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ which generates [ASF HyP3's documentation](https://hyp3-docs.asf.alaska.edu/).

## Customization

> [!WARNING]
> You should NOT include the `navigation.instant` feature in your `mkdocs.yml`.
> See <https://github.com/ASFHyP3/hyp3-docs/pull/371> for more information.

This theme has been developed with sensible defaults to be used out-of-the-box by
ASF documentation sites. While sections below describe how to customize the
ASF-specific features of this theme, we hope most users won't need them.
Expand All @@ -42,21 +46,8 @@ consider either:

### Analytics

This theme will provide Google Analytics integration for an ASF documentation site.
However, analytics can be customized in your `mkdocs.yml` with
```yaml
google_analytics:
- UA-XXXXXXXX-X
- auto # or a specific site URL
```

To turn off analytics entirely, remove the site level `google_analytics`
configuration and clear the theme one with
```yaml
theme:
name: asf-theme
google_analytics:
```
You can follow <https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/>
to enable analytics for your site.

### Logos

Expand Down Expand Up @@ -145,3 +136,29 @@ theme:
- icon: fontawesome/brands/gitter
link: https://gitter.im/ASFHyP3/community
```

## Development

### Upgrading `mkdocs-material` to a new major version

When upgrading the `mkdocs-material` dependency to a new major version,
you should reference the [upgrade guide](https://squidfunk.github.io/mkdocs-material/upgrade/)
for any important changes.

In particular, you should update each template `.html` file in [asf_theme/partials](./asf_theme/partials)
to match the latest upstream version as closely as possible.
Each template file should include a comment near the top of the file
with a link to the upstream version upon which it was based.
When updating a particular template file,
you can `diff` it against the linked upstream version to see what changes were made.
Then you can apply those changes to the *latest* upstream version of the file.

For example, when updating `header.html` from major version 9 to 10,
you can `diff` our version of `header.html` against the `9.x.x` upstream version linked near the top of the file.
Then you can download the latest `10.x.x` upstream version from <https://github.com/squidfunk/mkdocs-material>
and apply the `diff` changes, adapting them as necessary for the latest version of `mkdocs-material`.

You may also have to update
[asf_theme/assets/stylesheets/asf.css](./asf_theme/assets/stylesheets/asf.css),
[asf_theme/main.html](./asf_theme/main.html),
and [asf_theme/mkdocs_theme.yml](./asf_theme/mkdocs_theme.yml) as appropriate.
47 changes: 35 additions & 12 deletions asf_theme/assets/stylesheets/asf.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,38 @@ a {
}

.md-header, .md-footer {
background: rgb(101, 102, 92);
background: linear-gradient(180deg, rgba(101, 102, 92, 1) 0%, rgba(106, 106, 106, 1) 100%);
box-shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.5);
transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;

}

.md-header-nav__button.md-logo img {
height: 2.0rem;
width: auto;
display: inline-block;
margin-top: -7px;
.md-header {
background: rgb(101, 102, 92);
background: linear-gradient(180deg, rgba(101, 102, 92, 1) 0%, rgba(106, 106, 106, 1) 100%);
}

.md-footer-nav {
.md-footer {
background: rgb(106, 106, 106);
background-image: url("../images/map.png");
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
min-height: 510px;
min-height: 574px;
border-top: 58px solid #ffcd00;
}

.md-header__button.md-logo img {
height: 2.0rem;
width: auto;
display: inline-block;
margin-top: -7px;
}

.md-footer-meta.md-typeset {
position: absolute;
bottom: 0;
width: 100%;
}

.md-footer-container {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -82,14 +91,28 @@ a {
background-color: black;
}

.md-footer-copyright-link {
.md-copyright-link {
color: #1bb0ce !important;
}

.md-footer-copyright {
.md-copyright {
margin-left: 0;
}

.md-nav__title {
color: black;
}

.md-nav--primary .md-nav__title {
background: #f8f8f8;
box-shadow: none;
}

.md-nav--secondary .md-nav__title {
background: #f8f8f8;
box-shadow: none;
}

.expert-rec-search {
margin-top: 10px;
}
6 changes: 1 addition & 5 deletions asf_theme/main.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- Extends https://github.com/squidfunk/mkdocs-material/blob/9.4.2/src/templates/base.html -->
{% extends "base.html" %}
{% block styles %}
{{ super() }}
Expand All @@ -19,11 +20,6 @@
data-current-daac="ASF DAAC">
</script>
{% endblock %}
{% block analytics %}
{% if config.google_analytics or config.theme.google_analytics %}
{% include "partials/integrations/analytics.html" %}
{% endif %}
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'assets/javascripts/expert-rec-search.js' | url }}"></script>
Expand Down
5 changes: 0 additions & 5 deletions asf_theme/mkdocs_theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ social:
link: https://twitter.com/Ak_Satellite
- icon: fontawesome/brands/youtube
link: https://www.youtube.com/channel/UChCfI0oVWw4qDwEidnDskJQ

# ASF's Google Analytics
google_analytics:
- UA-991100-5
- search.asf.alaska.edu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016-2020 Martin Donath <[email protected]>
Copyright (c) 2016-2023 Martin Donath <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand All @@ -20,9 +20,26 @@
IN THE SOFTWARE.
-->

<!-- Logo -->
{% if config.theme.logo %}
<img src="{{ config.theme.logo | url }}" alt="logo" />
{% elif config.theme.icon.logo %}
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
{% endif %}
<!-- Adapted from https://github.com/squidfunk/mkdocs-material/blob/9.4.2/src/templates/partials/copyright.html -->

<!-- Copyright and theme information -->
<div class="md-copyright">
<div class="md-copyright__highlight">
{% if config.copyright or config.theme.copyright %}
&copy; <span id="copyright-year"></span>
<script type="text/javascript">
current_year = new Date().getFullYear();
document.getElementById("copyright-year").innerHTML=current_year;
</script>
{{ config.copyright if config.copyright else config.theme.copyright}}
{% endif %}
<!-- ASF non-discrimination disclaimer-->
&nbsp;&nbsp;
<a href="https://www.alaska.edu/nondiscrimination"
target="_blank"
class="md-copyright-link">
UA is an AA/EO employer and educational institution and prohibits
illegal discrimination against any individual
</a>
</div>
</div>
Loading
Loading