File tree Expand file tree Collapse file tree 5 files changed +30
-12
lines changed Expand file tree Collapse file tree 5 files changed +30
-12
lines changed Original file line number Diff line number Diff line change 110110 @if (selectedLink().id !== "/" && !versioning.isLatestVersion()) {
111111 < blockquote class ="blockquote-warning version-no-longer-maintained ">
112112 < div class ="blockquote-warning__container ">
113- < p >
114- This is documentation for Mercury
115- < span class ="body-semi-bold-m "> {{ libraryVersion }}</ span
116- > , which is no longer actively maintained.
117- </ p >
113+ @if (versioning.isBetaVersion) {
114+ < p >
115+ This is the documentation for the upcoming
116+ < span class ="body-semi-bold-m "
117+ > Mercury {{ libraryVersionWithoutBeta }}</ span
118+ >
119+ version, which is currently in Beta.
120+ </ p >
121+ } @else {
122+ < p >
123+ This is the documentation for Mercury
124+ < span class ="body-semi-bold-m "> {{ libraryVersion }}</ span
125+ > , which is no longer actively maintained.
126+ </ p >
127+ }
118128
119129 < p >
120130 For up-to-date documentation, see the
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ export class AppComponent {
100100 ] ;
101101
102102 libraryVersion = `v${ mercuryVersion } ` ;
103+ libraryVersionWithoutBeta = `v${ mercuryVersion . replace ( / - b e t a .* / , "" ) } ` ;
103104
104105 constructor ( ) {
105106 this . router . events . subscribe ( event => {
Original file line number Diff line number Diff line change @@ -125,4 +125,5 @@ main {
125125 margin-block-start : calc (
126126 #{$mainPaddingBlockStart } * -1
127127 ); // makes the warning stick to the top
128+ text-align : center ;
128129}
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ const checkIfCurrentVersionIsTheLatest = (
1919 return latestReleasedVersion === mercuryVersion ;
2020} ;
2121
22+ const checkIfCurrentVersionIsBeta = ( ) : boolean =>
23+ mercuryVersion . includes ( "beta" ) || mercuryVersion . includes ( "next" ) ;
24+
2225@Injectable ( { providedIn : "root" } )
2326export class VersioningService {
2427 platform = inject ( PLATFORM_ID ) ;
@@ -32,6 +35,8 @@ export class VersioningService {
3235 checkIfCurrentVersionIsTheLatest ( this . latestVersion ( ) )
3336 ) ;
3437
38+ isBetaVersion = checkIfCurrentVersionIsBeta ( ) ;
39+
3540 constructor ( ) {
3641 if ( isPlatformBrowser ( this . platform ) ) {
3742 // fetch("/services/versions")
Original file line number Diff line number Diff line change @@ -110,23 +110,24 @@ ch-code {
110110}
111111
112112.blockquote-warning {
113- // TODO: Use Mercury "state message" class when available
114- padding : var (--size-6 );
115- margin : 0 ;
116113 display : grid ;
117114 justify-content : center ;
118-
119- border-inline-start : var ( --size-2 ) solid var ( --color-border-neutral-default ) ;
115+ padding : var ( --size-6 );
116+ margin : 0 ;
120117 background-color : var (--color-accent-warning-contrast );
121-
122118 color : var (--mer-text__on-message );
123119 line-height : var (--line-height-spacious );
124- border-inline-start : none ;
125120
126121 & __container {
122+ display : grid ;
127123 max-inline-size : var (--main-content-max-inline-size );
128124 margin-inline : var (--main-content-margin-inline );
129125 text-align : center ;
126+ gap : var (--size-4 );
127+
128+ a :hover {
129+ text-decoration : underline ;
130+ }
130131 }
131132}
132133
You can’t perform that action at this time.
0 commit comments