Skip to content

Commit

Permalink
Make table to wrap words from all content by words (Azure#2042)
Browse files Browse the repository at this point in the history
* Make table to wrap words from all content by words

* media support for small screen on Lang filter
  • Loading branch information
vhvb1989 authored Nov 19, 2020
1 parent 115defa commit e809f95
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 6 deletions.
11 changes: 10 additions & 1 deletion _includes/releases/nav.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
[.NET](#net) | [Java](#java) | [JavaScript/TypeScript](#javascript) | [Python](#python) | [C++](#c) | [Embedded C](#embedded-c) | [Android](#android) |[iOS](#ios) |
<div class="nav-language-filter">
<div class="nav-language-filter-cell"><a href="#net">.NET</a></div>
<div class="nav-language-filter-cell"><a href="#java">Java</a></div>
<div class="nav-language-filter-cell"><a href="#javascript">JavaScript/TypeScript</a></div>
<div class="nav-language-filter-cell"><a href="#python">Python</a></div>
<div class="nav-language-filter-cell"><a href="#c">C++</a></div>
<div class="nav-language-filter-cell"><a href="#embedded-c">Embedded C</a></div>
<div class="nav-language-filter-cell"><a href="#android">Android</a></div>
<div class="nav-language-filter-cell"><a href="#ios">iOS</a></div>
</div>
4 changes: 2 additions & 2 deletions _includes/releases/pkgrow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if item.Hide != "true" %}
<tr>
<td>{{ item.DisplayName }}</td>
<td class="table-display-text-th">{{ item.DisplayName }}</td>
<td>
{% assign trimmedPackage = item.Package | remove: package_trim %}

Expand Down Expand Up @@ -67,6 +67,6 @@
{% include releases/pkgbadge.md label="github" preview="true" url=url version=item.VersionPreview %}
{% endif %}
</td>
<td>{{ item.Notes }}</td>
<td class="table-display-text-th">{{ item.Notes }}</td>
</tr>
{% endif %}
4 changes: 2 additions & 2 deletions _includes/releases/pkgtable.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<table>
<tr>
<th>Display Name</th>
<th class="table-display-text-th table-display-name-th">Display Name</th>
<th>Package</th>
<th>Microsoft Docs</th>
<th>GitHub Docs</th>
<th>Source</th>
<th>Notes</th>
<th class="table-display-text-th">Notes</th>
</tr>
<tbody id="myTable">
{% for item in packages %}
Expand Down
33 changes: 32 additions & 1 deletion css/customstyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ table {
max-width: 100%;
margin-bottom: 20px;
border: 1px solid #dedede;
width: 100%;
word-break: break-word;
}

table > thead > tr > th,
Expand All @@ -168,7 +170,7 @@ table > tfoot > tr > th,
table > thead > tr > td,
table > tbody > tr > td,
table > tfoot > tr > td {
padding: 8px;
padding: 7px 0px 7px 0px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
Expand Down Expand Up @@ -1343,3 +1345,32 @@ h4.panel-title {
.badge-preview {
margin-left: 0px;
}

.table-display-name-th {
width: 18rem;
}

.table-display-text-th {
padding: 7px;
}

.nav-language-filter {
background-color: #F9F9F9;
border: 1px solid #dedede;
display: flex;
margin-bottom: 20px;
}

.nav-language-filter-cell {
align-items: center;
display: flex;
flex:1;
justify-content: center;
padding: 7px 0 7px 0;
}

@media (max-width: 600px) {
.nav-language-filter {
flex-direction: column;
}
}

0 comments on commit e809f95

Please sign in to comment.