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

Add landing page, show contribution history #10

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .devcontainer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ MarkupSafe==2.1.3
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-autorefs==0.5.0
mkdocs-git-committers-plugin-2==2.4.1
mkdocs-git-revision-date-localized-plugin==1.2.9
mkdocs-macros-plugin==1.0.5
mkdocs-material==9.5.17
mkdocs-material[imaging]==9.5.17
Expand Down
2 changes: 1 addition & 1 deletion docs/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ You can find this documentation [here](https://developer.android.com/build).

- [Official Documentation](https://developer.android.com/build)
- [AGP releases](https://developer.android.com/build/releases/gradle-plugin)
- [Android Gradle Plugin API reference](https://developer.android.com/reference/tools/gradle-api)
- [Android Gradle Plugin API reference](https://developer.android.com/reference/tools/gradle-api)
14 changes: 14 additions & 0 deletions docs/chapters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Gradle Cookbook Chapters
---

Below, you can see the list of the chapters
that are currently available on the cookbook.
More chapters will be added soon, based on contributions.

## By Technology

- [Gradle for Kotlin development](./kotlin/README.md)
- [Gradle for Android development](./android/README.md)
- [Gradle on Continuous Integration](./ci/README.md)

6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Gradle Cookbook
template: home.html
---

Hello, world!
16 changes: 0 additions & 16 deletions docs/README.md → docs/preface.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ with the following in mind:
- Minimizing duplication.
We can include documentation from other sources under the [Gradle GitHub organization](https://github.com/gradle/)

## Chapters

- [Gradle for Kotlin development](./kotlin/README.md)
- [Gradle for Android development](./android/README.md)
- [Gradle on Continuous Integration](./ci/README.md)

More chapters will be added soon, based on contributions.

## Contributing

Contributions are welcome!
You can extend the Cookbook by adding new recipes (e.g. by porting your blogpost),
updating the existing ones,
or even creating whole new sections.
Check out the [Contributor Guide](./CONTRIBUTING.md) for more information.

## Trademark Notice

Gradle and the Gradlephant logo (the "Gradle Marks") are registered trademarks of Gradle, Inc. and/or its subsidiaries.
Expand Down
33 changes: 21 additions & 12 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ site_url: https://cookbook.gradle.org
# Build
site_dir: _site

nav:
- Overview:
- preface.md
- chapters.md
- Contributing: CONTRIBUTING.md
- Gradle on CI:
- Summary: ci/README.md
- Jenkins: ci/jenkins.md
- TeamCity: ci/teamcity.md
- GitHub Actions: ci/github-actions.md
- GitLab CI: ci/gitlab-ci.md
- Travis CI: ci/travis-ci.md
- Gradle for Kotlin: kotlin/README.md
- Gradle for Android: android/README.md

# Theme
theme:
name: material
Expand Down Expand Up @@ -104,18 +119,7 @@ extra:
analytics:
provider: custom

nav:
- Overview: README.md
- Gradle on CI:
- Summary: ci/README.md
- Jenkins: ci/jenkins.md
- TeamCity: ci/teamcity.md
- GitHub Actions: ci/github-actions.md
- GitLab CI: ci/gitlab-ci.md
- Travis CI: ci/travis-ci.md
- Gradle for Kotlin: kotlin/README.md
- Gradle for Android: android/README.md
- Contributing: CONTRIBUTING.md


plugins:
- search
Expand All @@ -139,6 +143,11 @@ plugins:
# import_url: 'https://github.com/gradle/actions?branch=main&edit_uri=/blob/main/'
# imports: [ "README.md", "*" ]

- git-revision-date-localized
- git-committers:
repository: gradle/cookbook
branch: main

- with-pdf:
enabled_if_env: BUILD_PDF
output_path: pdf/cookbook.pdf
Expand Down
120 changes: 120 additions & 0 deletions overrides/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{% extends "main.html" %}
{% block tabs %}
{{ super() }}

<!-- Additional styles for landing page -->
<style>

.md-typeset h1 {
font-size: xx-large;
font-weight: bolder;
margin: unset;
}

/* Application header should be static for the landing page */
.md-header {
position: initial;
display: none;
}

.md-tabs {
display: none;
}

/* Remove spacing, as we cannot hide it completely */
.md-main__inner {
margin: 0;
}

/* Hide main content for now */
.md-content {
display: none;
}

/* Hide table of contents */
@media screen and (min-width: 60em) {
.md-sidebar--secondary {
display: none;
}
}

/* Hide navigation */
@media screen and (min-width: 76.25em) {
.md-sidebar--primary {
display: none;
}
}

.mdx-hero {
margin-inline: auto;
}

.mdx-hero__image {
margin-inline: auto;
}

.mdx-hero__buttons {
margin-bottom: 20px;

}

.md-button {
margin-left: 5px;
margin-right: 5px;
}

.mdx-container {
max-width: 600px;
margin-inline: auto;

@media screen and (min-height: 60em) {
transform: translateY(30%);
}

div {
text-align:center;
}
}

[data-md-color-scheme="slate"] {
.md-button {
color: #f8f8f8;
}
}
</style>

<section class="mdx-container">
<div class="md-grid md-typeset">
<div class="mdx-hero">
<div class="mdx-hero__image">
<img src="assets/images/logos/gradle.svg" alt="Gradle Logo" width="360" draggable="false">
</div>
<div class="mdx-hero__content">
<h1>Gradle Cookbook</h1>
<p>{{ config.site_description }} Contributions are welcome!</p>
</div>
<div class="mdx-hero__buttons">
<a href="{{ 'preface/' | url }}" title="Overview" class="md-button md-button--primary">
Overview
</a>
<a href="{{ 'chapters/' | url }}" title="Chapters" class="md-button">
Chapters
</a>
</div>
</div>
</div>
</section>
{% endblock %}
{% block content %}{% endblock %}
{% block footer %}
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
{% include "partials/copyright.html" %}

<!-- Social links -->
{% if config.extra.social %}
{% include "partials/social.html" %}
{% endif %}
</div>
</div>
{% endblock %}
Loading