Skip to content

Commit

Permalink
Merge pull request #83 from posit-dev/express/tooltip-pt-2
Browse files Browse the repository at this point in the history
tooltip styling and express/core tab accentuation
  • Loading branch information
gadenbuie authored Jan 26, 2024
2 parents f0086f5 + 68462fb commit c2bcc81
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
15 changes: 7 additions & 8 deletions components/_partials/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ a.component-list-header-text:hover ~ div.component-list-icon p a i.component-lin
display: flex;
align-items: flex-end;
justify-content: flex-end;
border-bottom: 1px solid #E9ECEF;
border-bottom: 1px solid #ffffff;
border-top: none;
border-left: none;
border-right: none;
Expand All @@ -215,11 +215,10 @@ main a.nav-link:hover {
color: #202020;
background-color: #fff;
border-bottom: 3px solid #202020 !important;
margin-bottom: -2px;
border-left: 1px solid rgba(0, 0, 0, 0);
border-right: 1px solid rgba(0, 0, 0, 0);
border-top: 1px solid rgba(0, 0, 0, 0);
border-radius: 0px;
margin-bottom: 0px;
border-left: 0px solid rgba(0, 0, 0, 0);
border-right: 0px solid rgba(0, 0, 0, 0);
border-top: 0px solid rgba(0, 0, 0, 0);
}

.panel-tabset .nav-tabs .nav-link:hover,
Expand All @@ -232,8 +231,8 @@ main a.nav-link:hover {
}

.panel-tabset .nav-tabs .nav-link {
padding: 0.35rem 1.25rem;
margin-bottom: 0px;
padding: 0.45rem 1.25rem;
margin-bottom: 2px;
}

.iframe-border {
Expand Down
7 changes: 4 additions & 3 deletions include-in-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
function addWhatsShinyExpressTooltip() {
const tooltipContents = `<p><strong>Shiny Express</strong> is a new, streamlined way to write a Shiny app.</p>
<p><strong>Shiny Core</strong> refers to the original, functional Shiny syntax, which is still a great way to write Shiny apps.</p>
<p class="text-right" style="font-size:0.85em;"><a href="/docs/express-introduction.qmd">Read more<i class="bi bi-chevron-right"></i></a></p>`
<p class="fw-600" style="font-size:0.85em;"><a href="/docs/express-introduction.html">Read more <i class="bi bi-chevron-right align-text-top"></i></a></p>`


const tooltipDisplay = `<i class="bi bi-question-circle-fill d-inline d-sm-none"></i><span class="d-none d-sm-inline">What's the difference?</span>`

Expand All @@ -92,10 +93,10 @@

new window.bootstrap.Popover(trigger, {
html: true,
title: "What's Shiny Express?",
title: "Express vs Core",
content: tooltipContents,
placement: 'auto',
trigger: 'click',
trigger: 'focus',
container: tabset
})
})
Expand Down
19 changes: 17 additions & 2 deletions quarto-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1724,21 +1724,36 @@ btn.action-button:hover {

.what-shiny-express {
position: absolute;
top: 0.7em;
top: 0.78em;
right: 1.2em;
font-size: 0.85em;
cursor: pointer;
}

.shiny-mode-tabset[data-group="shiny-app-mode"] > .what-shiny-express {
color: white;
color: $gray-900;
}

.popover {
max-width: 300px;
border: 1px solid $gray-400;
box-shadow: 0px 1px 2px rgba(29,31,33,.1),
0px 2px 3px rgba(29,31,33,.1),
0px 3px 8px rgba(29,31,33,.08);
}


.popover-header {
margin-top: 0;
background-color: $gray-900;
color: $gray-100;
padding: .6rem 1rem;
font-size: .8rem;
font-weight: 700;
}

.popover-body {
font-size: .85rem;
> :first-child {
margin-top: 0;
}
Expand Down

0 comments on commit c2bcc81

Please sign in to comment.