Skip to content

Commit

Permalink
feat: use an input to display the URL in
Browse files Browse the repository at this point in the history
  • Loading branch information
bgatellier committed Feb 3, 2024
1 parent f99f2fc commit 6f87201
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 46 deletions.
26 changes: 0 additions & 26 deletions assets/css/51_page-result.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,6 @@
* RESULT PAGE SPECIFIC STYLES
*/

.result-url-wrapper {
font-weight: var(--font-weight-bold);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

/**
* For small screens, put the URL on a new line,
* and move truncate feature from the wrapper to the URL.
*/
@media (max-width: 60rem) {
.result-url-wrapper {
overflow: auto;
text-overflow: initial;
white-space: initial;
}

.result-url {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

/*! purgecss start ignore */
.result-badge {
font-size: var(--s2);
Expand Down
3 changes: 1 addition & 2 deletions assets/js/components/SiteAnalysisResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ class SiteAnalysisResult {
_updateUrl(url) {
const urlElement = this.el.querySelector(".result-url")

urlElement.setAttribute("href", url)
urlElement.setAttribute("title", url)
urlElement.setAttribute("value", url)
}
}
export default SiteAnalysisResult;
4 changes: 2 additions & 2 deletions content/en/result/_#first_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id="intro"
widget="result-intro"
+++

Calculated
Calculated on {{< result-date >}}

<h1 class="h2 result-url-wrapper">
Results from {{< result-date >}}
Analysis results
</h1>

{{< result-url >}}
4 changes: 3 additions & 1 deletion content/fr/result/_#first_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ id="intro"
widget="result-intro"
+++

Calculé le {{< result-date >}}

<h1 class="h2 result-url-wrapper">
Résultat du {{< result-date >}}
Résultats de l'analyse
</h1>

{{< result-url >}}
16 changes: 1 addition & 15 deletions layouts/partials/components/result-url.html
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
<p class="stack-l">
<input class="result-url" data-int="url">
<span>
<a href="/" class="button-default js-button-retest"
><span class="icon-square-wrapper bg-darkish" aria-label="{{ i18n `ReTest` }}"
>{{ partial "svg/inline-svg-use" "icon-refresh" }}</span
>&nbsp;<span class="hide-mobile">{{ i18n `ReTest` }}</span></a
>
<a id="share-btn" href="/" role="button" class="button-default"
><span class="icon-square-wrapper bg-darkish" aria-label="{{ i18n `Share` }}"
>{{ partial "svg/inline-svg-use" "icon-share" }}</span
>&nbsp;<span class="hide-mobile">{{ i18n `Share` }}</span></a
>
</span>
</p>
<input class="result-url" data-int="url">
13 changes: 13 additions & 0 deletions layouts/partials/widgets/result-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
>{{ partial "svg/inline-svg-use" "icon-arrow-left" }}&nbsp;{{ i18n `Back` }}</a
>
</div>

<div class="display:flex justify-content:end text-align:end">
<a href="/" class="button-default js-button-retest"
><span class="icon-square-wrapper bg-darkish" aria-label="{{ i18n `ReTest` }}"
>{{ partial "svg/inline-svg-use" "icon-refresh" }}</span
>&nbsp;<span class="hide-mobile">{{ i18n `ReTest` }}</span></a
>
<a id="share-btn" href="/" role="button" class="button-default"
><span class="icon-square-wrapper bg-darkish" aria-label="{{ i18n `Share` }}"
>{{ partial "svg/inline-svg-use" "icon-share" }}</span
>&nbsp;<span class="hide-mobile">{{ i18n `Share` }}</span></a
>
</div>
</div>
</div>
<div class="stack-l">
Expand Down

0 comments on commit 6f87201

Please sign in to comment.