Skip to content
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
10 changes: 8 additions & 2 deletions .freeCodeCamp/client/templates/landing.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.description {
max-width: 750px;
margin-left: auto;
margin-right: auto;
}

.blocks {
list-style-type: none;
display: flex;
Expand Down Expand Up @@ -33,7 +39,7 @@
cursor: pointer;
background-color: var(--dark-3);
}
.tags-row{
.tags-row {
display: flex;
}

Expand All @@ -49,4 +55,4 @@
width: -webkit-fit-content;
width: -moz-fit-content;
width: fit-content;
}
}
2 changes: 2 additions & 0 deletions .freeCodeCamp/client/templates/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const Landing = ({
freeCodeCampConfig,
locale
}: LandingProps) => {
const title = freeCodeCampConfig.client?.landing?.[locale]?.title;
return (
<>
{title && <h1>{title}</h1>}
<p className='description'>
{freeCodeCampConfig.client?.landing?.[locale]?.description}
</p>
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "create-freecodecamp-os-app"
version = "3.0.0"
version = "3.0.1"
edition = "2021"
description = "CLI to create the boilerplate for a new freeCodeCamp-OS app"
license = "BSD-3-Clause"
Expand Down
1 change: 1 addition & 0 deletions cli/src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub struct Assets {

#[derive(Serialize, Deserialize, Debug)]
pub struct Landing {
pub title: String,
pub description: String,
#[serde(rename = "faq-link")]
pub faq_link: Option<String>,
Expand Down
3 changes: 2 additions & 1 deletion cli/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Course {
"author": "",
"license": "MIT",
"dependencies": {
"@freecodecamp/freecodecamp-os": "^3.0.0"
"@freecodecamp/freecodecamp-os": "^3.1.0"
},
"type": "module"
});
Expand Down Expand Up @@ -173,6 +173,7 @@ impl Course {
assets: None,
landing: Some(json!({
"english": Landing {
title: "Course title".to_string(),
description: "Course description".to_string(),
faq_link: None,
faq_text: None,
Expand Down
11 changes: 11 additions & 0 deletions docs/src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [3.1.0] - 2024-02-05

### Add

- `client.landing.locale.title` field for landing page `h1`

### Fix

- Give `.description` element a `max-width` of `750px`
- Add `ws` as dependency

## [3.0.0] - 2024-02-01

### Change
Expand Down
3 changes: 2 additions & 1 deletion docs/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ By default, the server and client communicate over port `8080`. To change this,

- `assets.header`: path relative to the root of the course - `string`
- `assets.favicon`: path relative to the root of the course - `string`
- `landing.description`: description of the course shown on the landing page - `string`
- `landing.<locale>.description`: description of the course shown on the landing page - `string`
- `landing.<locale>.title`: title of the course shown on the landing page - `string`
- `landing.<locale>.faq-link`: link to the FAQ page - `string`
- `landing.<locale>.faq-text`: text to display for the FAQ link - `string`
- `static`: static resources to serve - `string | string[] | Record<string, string> | Record<string, string>[]`
Expand Down
Loading