惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
K
Kaspersky official blog
T
Tor Project blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
I
Intezer
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Latest news
Latest news
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
P
Proofpoint News Feed
F
Fortinet All Blogs
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
宝玉的分享
宝玉的分享
量子位
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
D
Darknet – Hacking Tools, Hacker News & Cyber Security
aimingoo的专栏
aimingoo的专栏
A
Arctic Wolf
Martin Fowler
Martin Fowler
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
IT之家
IT之家
小众软件
小众软件
T
The Blog of Author Tim Ferriss
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
D
DataBreaches.Net
Webroot Blog
Webroot Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog

Example blog

Ghost routing explained with routes.yaml examples — routes, collections & taxonomies Ghost redirects explained with practical redirects.yaml examples How to Serve JSON or XML Data in Ghost How to Change Your Default Post Template in Ghost Ghost Custom Theme Settings How to add Google Fonts to Ghost Themes How to Configure Ghost with Mailgun Ghost Theme Structure & Organization How to Make Custom Templates in Ghost Themes How to Install Ghost CMS via Ghost-CLI How to Add Syntax Highlighting to Ghost The best Ghost CMS hosting platforms Ghost 6.0 — Social Web and Native Ghost Analytics Ghost CMS Social web beta, email 2FA and more author social links How to keep custom design settings when updating your Ghost theme How to use the public preview card in Ghost How to add members-specific sections in Ghost How to customize the default content CTA in Ghost How to build a custom homepage in Ghost An overview of Ghost editor cards and and how they work Ghost CMS News: One-time payments & collecting sales tax How to customize the private site access template in Ghost How to add custom fonts in Ghost themes Ghost CMS News: Additional payment methods & internal linking How to use Code Injection in Ghost How to set meta data of your custom routes & collections in Ghost Ghost CMS News: TK reminders, ActivityPub and improvements How to format dates and use the date helper in Ghost Ghost CMS internationalization, custom fonts & spam protection Understanding and optimizing post and page settings in Ghost CMS Trigger the Ghost Portal popup based on page scroll progress How to Deploy Your Ghost Theme with GitHub Actions How to create a custom recommendations page for your Ghost CMS theme Ghost CMS News: New editor, refreshed settings & recommendations Ghost CMS News: Source - the new default theme and native image editing How to Add Different Logos for Dark & Light Themes in Ghost Upgrade to Node v18 for Ghost CMS & common errors Ghost Snippets: Adding Schema markup in Ghost How to add a scroll-based progress bar to your Ghost CMS site How to Create a Custom Navigation Template in Ghost How to Segment Subscribers with Member Labels in Ghost The best way to create a contact page in Ghost How to Use the Ghost Subscription Forms in Your Theme & Posts How to update your Ghost site URL when self-hosting Ghost CMS News: Signup cards and better landing pages How to Add Breadcrumbs to Your Ghost Theme How to integrate the Applause Button into your Ghost theme How to Hide a Post From the Home Page in Ghost CMS Ghost CMS block and contentFor helper overview & tips How to add Image Lightbox to Ghost Themes Ghost CMS News: Signup form embed, new editor and bulk actions. Biron Themes becomes Bright Themes 🎉 How to Audit & Test a Ghost Theme How to Create Related Posts Section in Ghost How to Use Ghost Filter Expressions Ghost CMS newsletter settings and post analytics How to Update Your Ghost Theme When We Release New Versions Ghost CMS News: Automatic list cleaning & email troubleshooting How to Create a Featured Post Slider in Ghost How to Add Reading Time to Ghost Blog Posts How to Create a Post Archive for Your Ghost Theme Ghost CMS Price Helper Overview & Tips Self-Hosted Ghost CMS with DigitalOcean Ghost CMS News: Member Growth Sources & Audience Feedback How to Open External Links in a New Tab in Ghost How to Integrate Google Analytics with Ghost Ghost CMS News: History Log & Newsletter Analytics How to Automatically Add Member Labels From Referral Traffic in Ghost? Ghost CMS News: Free trials & email notifications Ghost CMS Match Helper Usage & Tips Ghost CMS News: Native Comments Ghost CMS News: Ghost Explore & Premium Newsletter Previews Ghost CMS News: Native Search The Best Ghost CMS Search Plugins & Libraries Ghost Snippets: Custom Stylish Tables How to Add a Scroll Top & Progress Indicator Button in Ghost Ghost Snippets: Accordions How to Add Tag Dropdown to Your Ghost Theme Ghost 5.0 released 🎉 Ghost Snippets: Custom Subscribe Forms Ghost Snippets: Custom Alert Boxes How to Show Post or Newsletter Issue Number in Ghost How to Self-Host Google Fonts in Ghost CMS Ghost CMS News: Membership, Tiers & Activity Feed Custom Pages in Ghost CMS Themes Ghost CMS Search Using Fuse.js Ghost CMS News: Offers and Discounts & New Cards Ghost CMS News: Membership tiers, email CTA & filters Ghost CMS News: Grammarly Support & Feature Image Captions. Ghost CMS News: Improved Member Accounts & Personalized Newsletter. Ghost 4.0 Launched With Native Newsletters & Membership Ghost CMS News: Cancellation Feedback & Newsletter Stats. Ghost CMS News: Improved Member Dashboard & Sidebar Views. Ghost CMS News: Google Pay support, email newsletters & secondary navigation Ghost CMS News: Member Support, Portal & Content Snippets. Ghost CMS News: Referral Programs & Responsive Images. Ghost Themes as Progressive Web Apps Ghost 3.0 is here with brand new features Ghost 2.0 is here with new features How to Add Search to Ghost Using ghostHunter
Ghost Snippets: Custom Progress Cards & Steps
Bright Themes · 2022-08-02 · via Example blog

You can use progress indicators to add visual elements in your post and to inform users about state or progress. We have two types of progress indicators: progress cards and progress steps.

With the help of the progress cards, you can highlight the progress in percent values with the help of a linear indicator filled between 0 and 100%.

Progress steps can be used to display progress through a sequence with numbered steps.

Progress elements & markup

You will have to use the HTML card as we need a specific markup for this to work. Here is the code that will be used for the progress cards:

<div class="progress-card">
  <div class="progress-card-content">
    <span class="progress-title">Information gathering</span>
    <span class="progress-description"
      >he focus of the first step is to gather all the necessary information for
      the project. Ask relevant questions to go deeper into the business
      needs.</span
    >
  </div>
  <span class="progress-bar" style="--value:25%;"></span>
</div>

<div class="progress-card" style="--color-accent: #7FFFD4">
  <div class="progress-card-content">
    <span class="progress-title">Planning and strategy, wireframing</span>
    <span class="progress-description"
      >Using the information gathered from phase one, it is time to put it
      together and make a detailed website plan. At this point, a site map is
      developed.</span
    >
  </div>
  <span class="progress-bar" style="--value:60%;"></span>
</div>

<div class="progress-card" style="--color-accent: #00FFFF">
  <div class="progress-card-content">
    <span class="progress-title">Graphical design</span>
    <span class="progress-description"
      >As a part of the design process, it is essential to carefully and
      tastefully apply such visual elements as the logo and brand colors, to
      strengthen the brand identity on the website. During the design phase, the
      team usually creates one or more prototypes for the website.
    </span>
  </div>
  <span class="progress-bar" style="--value:40%;"></span>
</div>

<div class="progress-card" style="--color-accent: #FF7F50">
  <div class="progress-card-content">
    <span class="progress-title">Development/build</span>
    <span class="progress-description"
      >At this point, the design itself should be ready. But it is usually in
      the form of static images. It requires extra development effort to
      translate it into HTML/CSS, and then to add a layer of animations or
      JavaScript, depending on the complexity of the design.</span
    >
  </div>
  <span class="progress-bar" style="--value:75%;"></span>
</div>

Here is the code that will be used for the progress steps:

<div class="progress-step" style="--color-accent: #FF7F50">
  <div class="progress-step-item" data-status="active">
    <span class="number">1</span>
    <span class="description">Problem</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">2</span>
    <span class="description">Goal</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">3</span>
    <span class="description">Users</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">4</span>
    <span class="description">Success</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">5</span>
    <span class="description">Resources</span>
  </div>
</div>

<div class="progress-step" style="--color-accent: #FF7F50">
  <div class="progress-step-item" data-status="complete">
    <span class="number">1</span>
    <span class="description">Problem</span>
  </div>

  <div class="progress-step-item" data-status="active">
    <span class="number">2</span>
    <span class="description">Goal</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">3</span>
    <span class="description">Users</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">4</span>
    <span class="description">Success</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">5</span>
    <span class="description">Resources</span>
  </div>
</div>

<div class="progress-step" style="--color-accent: #FF7F50">
  <div class="progress-step-item" data-status="complete">
    <span class="number">1</span>
    <span class="description">Problem</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">2</span>
    <span class="description">Goal</span>
  </div>

  <div class="progress-step-item" data-status="active">
    <span class="number">3</span>
    <span class="description">Users</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">4</span>
    <span class="description">Success</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">5</span>
    <span class="description">Resources</span>
  </div>
</div>

<div class="progress-step" style="--color-accent: #FF7F50">
  <div class="progress-step-item" data-status="complete">
    <span class="number">1</span>
    <span class="description">Problem</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">2</span>
    <span class="description">Goal</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">3</span>
    <span class="description">Users</span>
  </div>

  <div class="progress-step-item" data-status="active">
    <span class="number">4</span>
    <span class="description">Success</span>
  </div>

  <div class="progress-step-item" data-status="incomplete">
    <span class="number">5</span>
    <span class="description">Resources</span>
  </div>
</div>

<div class="progress-step" style="--color-accent: #FF7F50">
  <div class="progress-step-item" data-status="complete">
    <span class="number">1</span>
    <span class="description">Problem</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">2</span>
    <span class="description">Goal</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">3</span>
    <span class="description">Users</span>
  </div>

  <div class="progress-step-item" data-status="complete">
    <span class="number">4</span>
    <span class="description">Success</span>
  </div>

  <div class="progress-step-item" data-status="active">
    <span class="number">5</span>
    <span class="description">Resources</span>
  </div>
</div>

Progress card & step styling

Let's start styling our progress cards. You can add this in Code Injection in the Ghost Admin.

.progress-card {
  --color-accent: #333;
  --color-border: #e4e4e4;
  width: 100%;
  border-radius: 5px;
  margin-bottom: 2em;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-bottom: 0;
}

.progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-accent);
  opacity: 0.05;
}

.progress-card.orange {
  --color-accent: #ffc48b;
}
.progress-card.purple {
  --color-accent: #b4b3ff;
}
.progress-card.pink {
  --color-accent: #ffb3c0;
}

.progress-card-content {
  padding: 1em;
}

.progress-card .progress-bar {
  background-color: var(--color-border);
  display: block;
  width: 100%;
  height: 5px;
  position: relative;
}

.progress-card .progress-bar::before {
  content: '';
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  height: 5px;
  background-color: var(--color-accent);
  opacity: 0.15;
}

.progress-card .progress-bar::after {
  content: '';
  width: var(--value);
  position: absolute;
  left: 0;
  top: 0;
  height: 5px;
  background-color: var(--color-accent);
}

.progress-title {
  font-weight: 600;
  margin-bottom: 0.25em;
  opacity: 0.9;
}

.progress-description {
  font-size: 0.9rem;
  opacity: 0.85;
}

.progress-card span {
  display: block;
}

Here is the styling for the progress steps:

.progress-step {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 4em;
  --color-accent: #8056d6;
  --color-border: #e0e0e0;
  font-weight: 500;
}

.progress-step span.number {
  height: 1.2em;
  width: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background-color: #f8f8f8;
}

.progress-step::before {
  background-color: var(--color-border);
  content: '';
  height: 2px;
  position: absolute;
  right: 0;
  top: calc(50% - 1px);
  width: 100%;
  z-index: -1;
}

.progress-step-item[data-status='complete'] .number {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.progress-step-item[data-status='active'] .number {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.progress-step-item[data-status='complete'] .description {
  opacity: 1;
}

.progress-step-item[data-status='active'] .description {
  color: var(--color-accent);
}

.progress-step div {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.progress-step .description {
  position: absolute;
  top: 3.5em;
  font-size: 0.85rem;
  opacity: 0.8;
}

The final result

Ghost CMS Progress Card
Ghost CMS Progress Card

You can change the color of the progress cards, by changing the value of the --color-accent property on the first row of each div HTML element, if you don't specify a color the default black will be used, like for the first element in the code example.

Ghost CMS Progress Step
Ghost CMS Progress Step

To manage the filled part of the bottom line you have to change the --value property of the span element of the progress card. You can even create a snippet out of it, so you don't have to remember the markup.

You can remove and add rows, and also steps. You can do this by deleting or adding a div HTML element. A row element is a div element with the progress-step class, a step element is a div element with the progress-step-item class.

The progress step can be incomplete, active, and complete. You can specify this by changing the value of the data-status property for each progress-step-item element.
You can change the color of the progress step, by changing the value of the --color-accent property for each progress-step element.

Creating a snippet out of the markup will make it easy to include it anywhere in your posts.