Skip to content

Commit 008fc4b

Browse files
authored
Make outdated banner noisier, cleanup layouts (#2634)
* make outdated notice more intrusive * remove inner-page-no-masthead * rename layouts * add code tab notice to tour layout * no outdated notice on sips * do not emit language options for orphan translations * remove redundant layouts
1 parent 5e71a7d commit 008fc4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+527
-1060
lines changed

_getting-started/index.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Getting Started
44
partof: getting-started
55
languages: [fr, ja, ru, uk]
66
includeTOC: true
7-
87
newcomer_resources:
98
- title: Are You Coming From Java?
109
description: What you should know to get to speed with Scala after your initial setup.

_includes/inner-page-main-content.html

-16
This file was deleted.

_includes/outdated-notice.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div class="inline-sticky-top inline-sticky-top-higher">
2+
<div class="wip-notice">
3+
<h4>Outdated Notice</h4>
4+
<p><a class="new-version-notice" href="{{ include.new-version }}"><i class="fa fa-info"></i><span>&nbsp;&nbsp;
5+
This page has a new version.</span></a></p>
6+
</div>
7+
</div>

_includes/sidebar-toc-multipage-overview.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ <h5 class="contents">Contents</h5>
5050
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
5151
{% endfor %}
5252
</ul>
53-
{% elsif page.language %}
54-
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
55-
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
53+
{% elsif page.language and page.orphanTranslation == false %}
54+
<!-- i.e. some pages like '/zh-cn/thanks.html' have no english version -->
55+
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
56+
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
5657
<ul id="available-languages" style="display: none;">
5758
<li><a href="{{ site.baseurl }}{{ engPath }}">English</a></li>
5859
{% for l in engPg.languages %}

_includes/sidebar-toc-singlepage-overview.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ <h5 class="contents">Contents</h5>
99
{% for l in page.languages %}
1010
{% capture intermediate %}{{ page.url }}{% endcapture %}
1111
{% capture rootTutorialURL %}{{ intermediate | remove_first: '/' }}{% endcapture %}
12-
{% assign lang = site.data.languages[l] %}
13-
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
12+
{% assign lang = site.data.languages[l] %}
13+
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
1414
{% endfor %}
1515
</ul>
16-
{% elsif page.language %}
17-
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
18-
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
16+
{% elsif page.language and page.orphanTranslation == false %}
17+
<!-- i.e. some pages like '/zh-cn/thanks.html' have no english version -->
18+
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
19+
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
1920
<ul id="available-languages" style="display: none;">
2021
<li><a href="{{ site.baseurl }}{{ engPath }}">English</a></li>
2122
{% for l in engPg.languages %}

_ja/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: documentation
2+
layout: landing-page-deprecated
33
title: ドキュメント
44
language: ja
55
partof: documentation

_ja/scala3/contribute-to-docs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: inner-page-documentation
2+
layout: singlepage-overview
33
overview-name: "Scala 3 Documentation"
44
title: Contributing to the Docs
55
language: ja

_ja/scala3/guides.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: inner-page-parent
2+
layout: root-index-layout
33
title: Scala 3 のガイド
44
language: ja
55
scala3: true
@@ -36,5 +36,3 @@ guides:
3636
</div>
3737
</div>
3838
</section>
39-
40-

_ja/scala3/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: inner-page-documentation
2+
layout: landing-page
33
title: Documentation for Scala 3
44
language: ja
55
namespace: root
@@ -41,4 +41,4 @@ sections:
4141
description: "Scala 3 の言語仕様"
4242
icon: "fa fa-book"
4343
link: https://docs.scala-lang.org/scala3/reference
44-
---
44+
---

_layouts/inner-page.html _layouts/basic-index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: inner-page-parent
2+
layout: root-index-layout
33
---
44

55
<section class="full-width">

_layouts/blog-detail.html

-6
This file was deleted.

_layouts/blog-list.html

-9
This file was deleted.

_layouts/cheatsheet.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
---
2-
layout: inner-page-parent-dropdown
2+
layout: root-content-layout
33
---
44

55
<section class="full-width">
66
<div class="wrap">
77
<div class="content-primary cheatsheet">
88
<div class="inner-box">
99
<div class="toc-context">
10+
{% if page.new-version %}
11+
{% include outdated-notice.html new-version=page.new-version %}
12+
{% endif %}
1013
{{content}}
1114
</div>
1215

_layouts/contribute.html

-17
This file was deleted.

_layouts/events.html

-13
This file was deleted.

0 commit comments

Comments
 (0)