Skip to content

Commit

Permalink
Fix reset zoom button
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfield committed Dec 27, 2024
1 parent fd2575e commit 40a8b37
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 21 deletions.
19 changes: 17 additions & 2 deletions scss/site/performance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1443,13 +1443,14 @@ table.activity-table {
top: 0;
right: 0;
height: 100%;
display: flex;
align-items: center;
margin-right: 0.6em;
}

.btn {
font-size: 0.9em;
height: 100%;
padding: 0 0.4em;
margin-left: 0.4rem;
opacity: 0;
visibility: hidden;
transition: opacity 300ms, visibility 300ms;
Expand All @@ -1460,6 +1461,20 @@ table.activity-table {
}
}
}

@media only screen and (max-width: 768px) {
& {
padding-left: 0.6rem;
padding-right: 0.6rem;
justify-content: space-between;

> .btn,
> .buttons {
position: static;
margin-right: 0;
}
}
}
}

.chart-tooltip {
Expand Down
8 changes: 5 additions & 3 deletions templates/performance/fitness/activity-stats.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span><span class="panel-name">{{name}}</span> - <span class="metric-display"></span></span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>

<div class="chart-tooltip"></div>
Expand Down
8 changes: 5 additions & 3 deletions templates/performance/fitness/athlete-stats-chart.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span class="panel-name">{{name}}</span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>

<div class="chart-tooltip"></div>
Expand Down
8 changes: 5 additions & 3 deletions templates/performance/fitness/elevation.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span class="panel-name">{{name}}</span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>

<div class="chart-tooltip"></div>
Expand Down
8 changes: 5 additions & 3 deletions templates/performance/fitness/training-load.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span class="panel-name">{{name}}</span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>
<div class="chart-tooltip"></div>
<div class="sauce-panel-content chart"><canvas/></div>
8 changes: 5 additions & 3 deletions templates/performance/fitness/zonetime.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span><span class="panel-name">{{name}}</span> - <span class="metric-display"></span></span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>

<div class="chart-tooltip zonetime"></div>
Expand Down
8 changes: 5 additions & 3 deletions templates/performance/peaks/chart.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<header class="title">
<span class="panel-name">{{name}}</span>
<div class="chart-reset-zoom hidden btn btn-xs btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
<div class="buttons">
<div class="chart-reset-zoom btn-sm hidden btn btn-outline btn-secondary">{{{reset_zoom}}}</div>
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</div>
</header>
<div class="peaks-controls-view"></div>
<div class="chart-tooltip"></div>
Expand Down
2 changes: 1 addition & 1 deletion templates/performance/peaks/table.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="title">
<span class="panel-name">{{name}}</span>
<div class="btn btn-xs btn-icon-only btn-unstyled sauce-panel-settings"
<div class="btn btn-icon-only btn-unstyled sauce-panel-settings"
title="{{{panel_settings_tooltip}}}">{{=icon cog-duotone=}}</div>
</header>
<div class="sauce-panel-content table-view peaks-view loading-mask loading">
Expand Down

0 comments on commit 40a8b37

Please sign in to comment.