Skip to content

Commit

Permalink
Homepage and search updates (#1519)
Browse files Browse the repository at this point in the history
  • Loading branch information
beets authored Apr 7, 2022
1 parent 26a7d60 commit 2bffdc4
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions server/templates/static/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h2>Explore the data</h2>
</div>
</section>

<section id="by-the-numbers">
<section id="new-update">
<div class="container">
<div class="highlight">
<h3>New update</h3>
Expand All @@ -99,13 +99,13 @@ <h3>New update</h3>
</div>
</section>

<section>
<section id="by-the-numbers">
<div class="container">
<h3>By the numbers</h3>
<p>We have continuously added data to the Data Commons graph over the last 4 years. As of April 2022, the graph contains:</p>
<ul>
<li>570 billion triples</li>
<li>2.8 billion time series</li>
<li>1.4 billion triples</li>
<li>3 billion time series</li>
<li>2.9 million places</li>
<li>90,000 variables</li>
</ul>
Expand Down
6 changes: 4 additions & 2 deletions static/css/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ $highlighted-box-max-width: 600px;
}

.search-results-sv-show-more {
color: var(--dc-primary);
cursor: pointer;
font-size: $font-size-small;
width: fit-content;
border-radius: 0.2rem;
padding: 0 0.2rem;
margin-left: -0.2rem;
margin-top: .5rem;
}

.search-results-sv-show-more:hover {
Expand Down Expand Up @@ -227,7 +229,7 @@ $highlighted-box-max-width: 600px;
align-items: center;
width: 100%;
border: $border;
padding: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem 0 0 0.5rem;
position: relative;
}
Expand Down Expand Up @@ -277,7 +279,7 @@ $highlighted-box-max-width: 600px;
}

.search-input-result {
padding: 0.2rem 0.5rem;
padding: 0.2rem 1rem;
cursor: pointer;
}

Expand Down
4 changes: 2 additions & 2 deletions static/css/static.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ h2 {
padding: 5px !important;
}

#homepage #by-the-numbers .highlight {
#homepage #new-update .highlight {
background: #fff5d7;
border-radius: 10px;
padding: 1em 2em;
}

#homepage #by-the-numbers h3 {
#homepage #new-update h3 {
margin-top: 0;
padding-top: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/search/place_results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function PlaceResults(props: PlaceResultsProps): JSX.Element {
</div>
) : (
<>
<div className="search-results-section-title">Places</div>
<h2 className="search-results-section-title">Places</h2>
<div className="search-results-section-content">
<div className="search-results-list">
{props.places.map((place) => {
Expand Down
4 changes: 2 additions & 2 deletions static/js/search/statvar_results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export function StatVarResults(props: StatVarResultsProps): JSX.Element {
</div>
) : (
<>
<div className="search-results-section-title">
<h2 className="search-results-section-title">
Statistical Variables
</div>
</h2>
<div className="search-results-section-content">
<div className="search-results-list">
{shownStatVars.map((sv) => {
Expand Down
2 changes: 1 addition & 1 deletion static/js/shared/source_selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function SourceSelector(props: SourceSelectorPropType): JSX.Element {
color="light"
onClick={() => setModalOpen(true)}
>
Edit {props.svInfoList.length > 1 ? "Sources" : "Source"}
Select {props.svInfoList.length > 1 ? "Sources" : "Source"}
</Button>
<Modal
isOpen={modalOpen}
Expand Down
8 changes: 4 additions & 4 deletions static/js/tools/timeline/__snapshots__/page.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Single place and single stat var 1`] = `
"<div class=\\"card\\">
<div class=\\"chart-svg\\"></div>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Edit Source</button>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Select Source</button>
<div><span class=\\"chart-option\\"><button id=\\"pc-cb-age\\" class=\\"option-checkbox\\"></button><label for=\\"pc-cb-age\\">Ratio of </label><input disabled=\\"\\" placeholder=\\"Count_Person\\"></span><span class=\\"chart-option\\"><button id=\\"delta-cb-age\\" class=\\"option-checkbox\\"></button><label for=\\"delta-cb-age\\">Delta</label></span></div>
</div>
<div class=\\"statVarChipRegion\\">
Expand All @@ -15,7 +15,7 @@ exports[`Single place and single stat var 1`] = `
exports[`Single place and single stat var 2`] = `
"<div class=\\"card\\">
<div class=\\"chart-svg\\"></div>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Edit Source</button>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Select Source</button>
<div><span class=\\"chart-option\\"><button id=\\"pc-cb-age\\" class=\\"option-checkbox\\"></button><label for=\\"pc-cb-age\\">Ratio of </label><input disabled=\\"\\" placeholder=\\"Count_Person\\"></span><span class=\\"chart-option\\"><button id=\\"delta-cb-age\\" class=\\"option-checkbox\\"></button><label for=\\"delta-cb-age\\">Delta</label></span></div>
</div>
<div class=\\"statVarChipRegion\\">
Expand Down Expand Up @@ -65,7 +65,7 @@ exports[`Single place and single stat var 3`] = `
exports[`chart options 1`] = `
"<div class=\\"card\\">
<div class=\\"chart-svg\\"></div>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Edit Source</button>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Select Source</button>
<div><span class=\\"chart-option\\"><button id=\\"pc-cb-count\\" class=\\"option-checkbox\\"></button><label for=\\"pc-cb-count\\">Ratio of </label><input disabled=\\"\\" placeholder=\\"Count_Person\\"></span><span class=\\"chart-option\\"><button id=\\"delta-cb-count\\" class=\\"option-checkbox\\"></button><label for=\\"delta-cb-count\\">Delta</label></span></div>
</div>
<div class=\\"statVarChipRegion\\">
Expand All @@ -77,7 +77,7 @@ exports[`chart options 1`] = `
exports[`statVar not in PV-tree 1`] = `
"<div class=\\"card\\">
<div class=\\"chart-svg\\"></div>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Edit Source</button>
<div class=\\"chart-options\\"><button type=\\"button\\" class=\\"source-selector-open-modal-button btn btn-light btn-sm\\">Select Source</button>
<div><span class=\\"chart-option\\"><button id=\\"pc-cb-count\\" class=\\"option-checkbox\\"></button><label for=\\"pc-cb-count\\">Ratio of </label><input disabled=\\"\\" placeholder=\\"Count_Person\\"></span><span class=\\"chart-option\\"><button id=\\"delta-cb-count\\" class=\\"option-checkbox\\"></button><label for=\\"delta-cb-count\\">Delta</label></span></div>
</div>
<div class=\\"statVarChipRegion\\">
Expand Down

0 comments on commit 2bffdc4

Please sign in to comment.