From 3f663c36c3dd136c80821e84c11c2663a672bcd6 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Mon, 31 Aug 2020 08:39:30 +1000 Subject: [PATCH] Provide badge for notion kind of page service --- www/pages/index.vue | 59 +++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/www/pages/index.vue b/www/pages/index.vue index 027456f..80676c4 100644 --- a/www/pages/index.vue +++ b/www/pages/index.vue @@ -8,7 +8,7 @@ - + - -

Color Schemes:

-
- + + Color Schemes: - +

Please copy the markdown script below to your Github readme.md or any other markdown file you want to monitor. @@ -66,13 +64,26 @@ > + + +

+ Or simply insert the following embedded image in a Notion kind of page: +

+ {{ myEmbeddedImageScript(activeBadgeColor) }} +
+
-

Show your page views in seconds

+

Count your page views in seconds

+

Badges generates a unique SVG image for a web page, requests gets calcaulted and reflected on the value of the Badge.
- Think about this is simplifed Goolge Analytics on a static page without JS script, isn't this handy? + Think about this is simplifed Goolge Analytics on a static page + without JS script, isn't this handy?
In the near future, we will allow you to display data from various data source like HTTP API and so on. @@ -86,8 +97,8 @@ alt="Generic placeholder image" height="140" /> -

Just a image

-

+

It's just a image

+

No need to make any API calls, no Google analytics required. As long as the web page allow you to display a svg image.

@@ -100,7 +111,7 @@ height="140" />

No setup no cost

-

+

All you need to do is just copy the generated unique markdown script to your markdown, and wait for the first person to browse your page.
Most importantly, it's free. @@ -114,7 +125,7 @@ height="140" />

Data comes realtime

-

+

The page view count data gets calculated in realtime.
And it will be refreshed on your web page automatically.

@@ -124,15 +135,15 @@

Examples

- + Github profile - + Github repo - + + + + Notion +

- Note: The page view count data can take up to 3 minutes to be - initialised, then it will be refreshed every 30s. + Note: The page view count data may take up to 3 minutes to be + initialized.

@@ -192,6 +211,9 @@ export default Vue.extend({ myBadge: function(color: String): string { return `${this.$config.backendURL}/badges/${this.badge.id}/${color}.svg`; }, + myEmbeddedImageScript(color: string): string { + return ``; + }, createNewBadge() { this.$store.commit("loading/updateLoading"); @@ -241,10 +263,11 @@ export default Vue.extend({ font-size: 13px; } - p.title { + span.title { font-size: 14px; font-weight: 600; color: #333; + margin-right: 20px; } p.warnning { font-size: 13px;