Skip to content

Instantly share code, notes, and snippets.

@quangmai911
Forked from tdmrhn/cpt-archive-card-1.css
Created April 24, 2021 12:41
Show Gist options
  • Save quangmai911/bb928e0e453782e03a681b9aa7548ecd to your computer and use it in GitHub Desktop.
Save quangmai911/bb928e0e453782e03a681b9aa7548ecd to your computer and use it in GitHub Desktop.
Custom Post Archive Card Design
[data-prefix="projeler_archive"] [data-cards="simple"] .entry-card {position:relative; padding:0; overflow:hidden; border-radius:20px;}
[data-prefix="projeler_archive"] [data-cards="simple"] .entry-card .ct-image-container{margin:0;}
[data-prefix="projeler_archive"] [data-cards="simple"] .entry-excerpt {position:absolute; width:100%; height:100%; padding:60px 30px; top:0; left:100%; transition:.5s; color:var(--paletteColor5); background:var(--paletteColor3);}
[data-prefix="projeler_archive"] [data-cards="simple"] .entry-card:hover .entry-excerpt {top:0; left:0%;}
[data-prefix="projeler_archive"] [data-cards="simple"] .entry-title {position:absolute; bottom:0; padding:30px; margin:0; width:100%; background:linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);color:var(--paletteColor5);z-index:1;}
@quangmai911
Copy link
Author

CPT Card Design Idea
Featured image: Predefined 4/3
Title: H2
Excerpt: 40
Card type: Simple
Preview;
https://suprd.com/what-we-done/
CSS;
https://gist.github.com/.../c89a00a0c53a6c5cd3455c9f29858b19
P.S.: Just change the [data-prefix="projeler_archive"] to your defined slug (change only "projeler").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment