diff --git a/src/docs/components/SnippetCard.js b/src/docs/components/SnippetCard.js index 63039a542..beb993de8 100644 --- a/src/docs/components/SnippetCard.js +++ b/src/docs/components/SnippetCard.js @@ -96,18 +96,12 @@ const FullCard = ({ snippetData, difficulty, isDarkMode }) => { > {examplesOpen ? : }Examples - {/* */} {examplesOpen && (
           )}
-        {/*  */}
       
     
   );
@@ -122,14 +116,15 @@ const ShortCard = ({
   difficulty, 
 }) => {
   return (
+    
     

- + {snippetData.title} -

-
+
+ ); }; diff --git a/src/docs/pages/archive.js b/src/docs/pages/archive.js index 8fb35c4cb..b48aa13e8 100644 --- a/src/docs/pages/archive.js +++ b/src/docs/pages/archive.js @@ -23,7 +23,7 @@ const ArchivePage = props => {

Archived snippets

These snippets, while useful and interesting, didn't quite make it into the repository due to either having very specific use-cases or being outdated. However we felt like they might still be useful to some readers, so here they are.

-

Click on a snippet's name to view its code.

+

Click on a snippet card to view the snippet.

{posts && posts.map(({ node }) => ( { ) : ( <>

- Click on a snippet's name to view its code. + Click on a snippet card to view the snippet.

Search results

{searchResults.map(snippet => ( diff --git a/src/docs/pages/list.js b/src/docs/pages/list.js index d1fb38a44..4f2428107 100644 --- a/src/docs/pages/list.js +++ b/src/docs/pages/list.js @@ -65,7 +65,7 @@ const ListPage = props => {

Snippet List

- Click on a snippet’s name to view its code or a tag name to view all + Click on a snippet card to view the snippet or a tag name to view all snippets in that category.

{tags.sort((a,b) => a.localeCompare(b)).map(tag => ( diff --git a/src/docs/pages/search.js b/src/docs/pages/search.js index dac028f95..7e582ce60 100644 --- a/src/docs/pages/search.js +++ b/src/docs/pages/search.js @@ -49,7 +49,7 @@ const SearchPage = props => { setSearchQuery={setSearchQuery} defaultValue={props.searchQuery} /> -

Click on a snippet's name to view its code.

+

Click on a snippet card to view the snippet.

{/* Display page background or results depending on state */} {searchQuery.length === 0 ? ( <> diff --git a/src/docs/styles/_card.scss b/src/docs/styles/_card.scss index b260a4e55..4dab5ee71 100644 --- a/src/docs/styles/_card.scss +++ b/src/docs/styles/_card.scss @@ -2,6 +2,8 @@ // Cards // =================================================== .card { + backface-visibility: hidden; + will-change: transform; position: relative; transition: all 0.3s ease; margin: 1rem 1.25rem; @@ -143,3 +145,14 @@ margin-top: 0.375rem; } } + +.clickable-card-wrapper { + &:link, &:visited { + &:hover, &:focus { + text-decoration: none; + .card { + transform: scale(1.025); + } + } + } +} diff --git a/src/docs/templates/TagPage.js b/src/docs/templates/TagPage.js index 492bba162..101605ad2 100644 --- a/src/docs/templates/TagPage.js +++ b/src/docs/templates/TagPage.js @@ -25,7 +25,7 @@ const TagRoute = props => {

{capitalize(tag)}

-

Click on a snippet's name to view its code.

+

Click on a snippet card to view the snippet.

{posts && posts.map(({ node }) => (