Skip to content

Commit d9af232

Browse files
authored
New header and skip empty stream (#197)
1 parent 4e7ba13 commit d9af232

22 files changed

+343
-128
lines changed

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dev-rh:
88
dev-ibm:
99
quarkus dev -Dquarkus.profile=dev,ibm
1010
dev-camel:
11-
quarkus dev -Dquarkus.profile=dev,camel
11+
quarkus dev -Dquarkus.profile=dev,redhat-camel
1212
build:
1313
quarkus build -DskipTests
1414
start-ibm:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.quarkus.code</groupId>
88
<artifactId>code-quarkus-parent</artifactId>
9-
<version>51</version>
9+
<version>53</version>
1010
</parent>
1111

1212
<artifactId>code-quarkus-redhat-app</artifactId>

src/main/java/OfferingPlatformOverride.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ public class OfferingPlatformOverride implements PlatformOverride {
1616
public static final List<Preset> IBM_PRESETS = List.of(
1717
// Some presets are duplicated to support platforms before and after the Big Reactive Renaming
1818
new Preset("rest-service", "REST service",
19-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/network--services.svg",
19+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/rest-service.svg",
2020
List.of("io.quarkus:quarkus-rest")),
2121
new Preset("db-service", "REST service with database",
22-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/database.svg",
22+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/db-service.svg",
2323
List.of("io.quarkus:quarkus-rest", "io.quarkus:quarkus-rest-jackson",
2424
"io.quarkus:quarkus-hibernate-orm-panache", "io.quarkus:quarkus-jdbc-postgresql")),
2525
new Preset("event-driven-kafka", "Event driven service with Kafka",
26-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/event-driven.svg",
26+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/event-driven.svg",
2727
List.of("io.quarkus:quarkus-messaging-kafka")),
2828
new Preset("cli", "Command-line tool",
29-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/systems-devops--code.svg",
29+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/cli.svg",
3030
List.of("io.quarkus:quarkus-picocli")),
3131
new Preset("webapp-mvc", "Web app with Model-View-Controller",
32-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/controls-framework.svg",
32+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/webapp-mvc.svg",
3333
List.of("io.quarkiverse.renarde:quarkus-renarde", "io.quarkiverse.web-bundler:quarkus-web-bundler")),
3434
new Preset("webapp-npm", "Web app with NPM UI",
35-
"https://raw.githubusercontent.com/carbon-design-system/carbon/main/packages/pictograms/src/svg/ibm--z-os-package-manager.svg",
35+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/webapp-npm.svg",
3636
List.of("io.quarkus:quarkus-rest", "io.quarkus:quarkus-rest-jackson",
3737
"io.quarkiverse.quinoa:quarkus-quinoa")),
3838
new Preset("webapp-qute", "Web app with ServerSide Rendering",
39-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/active--server.svg",
39+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/webapp-qute.svg",
4040
List.of("io.quarkiverse.qute.web:quarkus-qute-web", "io.quarkiverse.web-bundler:quarkus-web-bundler")),
4141
new Preset("ai-infused", "AI Infused service",
42-
"https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/pictograms/src/svg/machine--learning--06.svg",
42+
"https://raw.githubusercontent.com/redhat-developer/code.quarkus.redhat.com/refs/heads/main/assets/icons/ibm-presets/ai-infused.svg",
4343
List.of("io.quarkiverse.langchain4j:quarkus-langchain4j-openai",
4444
"io.quarkiverse.langchain4j:quarkus-langchain4j-easy-rag")));
4545

@@ -62,7 +62,9 @@ public List<Preset> presets() {
6262
case "ibm":
6363
return IBM_PRESETS;
6464
default:
65-
return PlatformService.DEFAULT_PRESETS;
65+
return PlatformService.DEFAULT_PRESETS.stream()
66+
.map(p -> new Preset(p.key(), p.title(), p.icon().replace("_neg", "_pos"), p.extensions()))
67+
.toList();
6668
}
6769
}
6870

src/main/resources/application.properties

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ quarkus.web-bundler.bundle.community-app=false
66
quarkus.web-bundler.bundle.ibm-app=true
77
quarkus.web-bundler.bundle.ibm-app.key=ibm
88

9-
quarkus.web-bundler.bundle.camel-app=true
10-
quarkus.web-bundler.bundle.camel-app.key=camel
9+
quarkus.web-bundler.bundle.redhat-camel-app=true
10+
quarkus.web-bundler.bundle.redhat-camel-app.key=camel
11+
quarkus.web-bundler.bundle.redhat-camel-app.dir=redhat-camel-app
1112

1213
quarkus.web-bundler.bundle.redhat-app=true
1314
quarkus.web-bundler.bundle.redhat-app.key=redhat
@@ -18,10 +19,10 @@ io.quarkus.code.ui.name=code.quarkus.redhat.com
1819
io.quarkus.code.ui.favicon=https://www.redhat.com/favicon.ico
1920
block-static-name=ibm
2021

21-
%camel.io.quarkus.code.offering=camel
22-
%camel.io.quarkus.code.offering.support-tag=camel-support
23-
%camel.io.quarkus.code.ui.name=code.quarkus-camel.redhat.com
24-
%camel.io.quarkus.code.ui.favicon=https://camel.apache.org/favicon-96x96.png
22+
%redhat-camel.io.quarkus.code.offering=redhat-camel
23+
%redhat-camel.io.quarkus.code.offering.support-tag=redhat-camel-support
24+
%redhat-camel.io.quarkus.code.ui.name=code.quarkus-camel.redhat.com
25+
%redhat-camel.io.quarkus.code.ui.favicon=https://camel.apache.org/favicon-96x96.png
2526

2627
%ibm.io.quarkus.code.offering=ibm
2728
%ibm.io.quarkus.code.offering.support-tag=ibm-support
@@ -30,6 +31,7 @@ block-static-name=ibm
3031
%ibm.block-static-name=redhat
3132

3233
io.quarkus.code.ui.id=${io.quarkus.code.offering}
34+
%redhat-camel.io.quarkus.code.ui.id=camel
3335

3436
io.quarkus.code.quarkus-platforms.registry-id=registry.quarkus.redhat.com
3537
%test.io.quarkus.code.quarkus-platforms.registry-id=

src/main/resources/web/camel-app/header/company-header.jsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/main/resources/web/camel-app/header/company-header.scss

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/main/resources/web/camel-app/media/quarkus-logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import React from 'react';
22
import './company-header.scss';
3-
import { CompanyHeader as LibCompanyHeader } from '../../lib';
4-
import { createLinkTracker, useAnalytics } from '../../lib';
5-
import { FaAngleLeft } from 'react-icons/fa';
6-
import quarkusLogo from '../media/quarkus-logo.svg';
3+
import {CompanyHeader as LibCompanyHeader} from '../../lib';
4+
import {createLinkTracker, useAnalytics} from '../../lib';
5+
import {FaAngleLeft} from 'react-icons/fa';
76

87
export function CompanyHeader(props) {
98
const analytics = useAnalytics();
109
const linkClick = (e) => {
1110
const link = e.target.getAttribute('href');
1211
analytics.event('UX', 'Click on header link', link);
1312
};
14-
const linkTracker = createLinkTracker(analytics,'UX', 'Header');
13+
const linkTracker = createLinkTracker(analytics, 'UX', 'Header');
1514
const isCodeQuarkusReferrer = document.referrer.includes("code.quarkus.io");
1615
return (
17-
<LibCompanyHeader {...props} quarkusLogo={quarkusLogo}>
16+
<LibCompanyHeader {...props} brand={(
17+
<div className="brand">
18+
<a href="https://www.ibm.com" onClick={linkClick}>IBM</a>&nbsp;Enterprise Build of Quarkus
19+
</div>
20+
)}>
1821
<>
19-
<div className="brand">
20-
<a href="https://www.ibm.com" onClick={linkClick}>IBM</a>&nbsp;Enterprise Build of Quarkus
21-
</div>
2222
{isCodeQuarkusReferrer && (
2323
<div className="nav-container">
2424
<a href="https://code.quarkus.io" onClick={linkTracker}><FaAngleLeft/> Back to code.quarkus.io</a>
2525
</div>
2626
)}
27-
</>
27+
</>
2828
</LibCompanyHeader>
2929
);
3030
}

src/main/resources/web/ibm-app/header/company-header.scss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@
99
font-weight: 600;
1010
display: inline-block;
1111
}
12-
@media screen and (max-width: 900px) {
13-
margin-left: 20px;
14-
margin-right: 20px;
15-
}
12+
13+
}
14+
15+
@media screen and (max-width: 900px) {
16+
.brand {
17+
margin-left: 10px;
18+
margin-right: 10px;
19+
font-size: 1rem;
20+
}
21+
.nav-container {
22+
display: none;
1623
}
24+
}
1725

1826
}

src/main/resources/web/ibm-app/media/quarkus-logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)