Skip to content

Commit

Permalink
docs: add plausible analytics for better privcay
Browse files Browse the repository at this point in the history
  • Loading branch information
khawarizmus committed Oct 6, 2023
1 parent 5e6d8d1 commit ddf4eda
Show file tree
Hide file tree
Showing 6 changed files with 377 additions and 9 deletions.
14 changes: 7 additions & 7 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"hash": "2ac064c2",
"browserHash": "17e02623",
"hash": "fa628c01",
"browserHash": "5d98ddba",
"optimized": {
"vue": {
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "28607c0c",
"fileHash": "ebb0ce03",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/.pnpm/@[email protected]/node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "a477b2a0",
"fileHash": "df8ccb83",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "f7bf987a",
"fileHash": "e7d2521b",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "00fa4d89",
"fileHash": "32fe33db",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "e45c5000",
"fileHash": "74a2d189",
"needsInterop": false
}
},
Expand Down
6 changes: 5 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ import taskList from 'markdown-it-task-lists'
// if version doesn't work we need to use this plugin https://github.com/semantic-release/git
export default defineConfig({
title: 'Prayers-Call',
description: 'A reactive prayer times calculation library for node and the browser built with Typescript',
description: 'Reactive prayer times calculator built for Node and the Browser',
ignoreDeadLinks: true, // FIXME: remove this when the docs are mature
lastUpdated: true,
// <script defer data-domain="prayers-call.netlify.app" src="https://plausible.io/js/script.js"></script>
head: [
['script', { defer: 'defer', 'data-domain': 'prayers-call.netlify.app', src: 'https://plausible.io/js/script.js' }],
],
themeConfig: {
nav: nav(),
outline: [1, 4],
Expand Down
47 changes: 47 additions & 0 deletions docs/components/MethodsMap.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div ref="map"></div>
</template>

<script setup lang="ts">
import * as Plot from '@observablehq/plot'
import { onMounted, ref } from 'vue'
const map = ref<HTMLElement | null>(null)
onMounted(() => {
// const plot = Plot.plot({
// height: 12 * 160, // 160px per month
// width: root.value?.clientWidth,
// marks: [
// // plot the world map
// Plot.geo({
// // the data is a topojson file
// data: Plot.topojson(
// "https://vega.github.io/vega-datasets/data/world-110m.json"
// ),
// // the projection is a d3 projection
// projection: "geoNaturalEarth1",
// // the outline of the map is a path
// outline: ({ type }) => type === "Sphere",
// // the land is a filled path
// fill: ({ type }) => type !== "Sphere",
// // the stroke of the land is white
// stroke: ({ type }) => type !== "Sphere" && "#fff",
// // the stroke width of the land is 0.5
// strokeWidth: ({ type }) => type !== "Sphere" && 0.5,
// // the color of the land is a gradient
// color: {
// // the domain is the min and max of the population
// domain: [0, 1400000000],
// // the range is a color scheme
// range: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"],
// // the value is the population
// value: (d) => d.properties.pop_est,
// },
// }),
// ],
// });
// map.value?.lastChild?.remove();
// map.value?.append(plot);
})
</script>
10 changes: 9 additions & 1 deletion docs/config/methods.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<!-- <script setup>
import MethodsMap from '../components/MethodsMap.vue'
</script> -->

# Calculation Methods

## Overview

Calculation methods are sets of parameters and rules used to compute Islamic prayer times. These methods are often standardized by religious authorities or geographical regions. They define specific angles of the sun or time intervals, and other factors to accurately calculate the times for Fajr, Sunrise, Dhuhr, Asr, Maghrib, and Isha prayers.

## Available Methods and Their Parameters
## Available Methods

We recommend using `prayers-call` pre-defined calculation methods, as they are endorsed by official religious authorities making them more accurate and consistent with the local community. These methods are available via the [`Method`](../api.md#method) enum. However, if you need to, you can create your own custom method using the [`CustomMethod`](../api.md#custommethod) interface for that check the [Building a Custom Method](#building-a-custom-method) section.

Expand Down Expand Up @@ -66,6 +70,10 @@ const methods = recommendMethod({ latitude: 21.3891, longitude: 39.8579 }) // me
console.log(methods) // Output: ['UmmAlQura']
```

<!-- The following is a map projecting the recommended methods for each country. hover on a country to see the recommended methods.
<MethodsMap /> -->

::: tip Help wanted
We're looking for help to map more countries with their respective methods. If you have the knowledge and resources to help us or have found any issue, please [open an issue](https://github.com/whiterocktech/prayers-call/issues/new/choose) or submit a pull request.
:::
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@antfu/ni": "^0.17.2",
"@antfu/utils": "^0.5.2",
"@npmcli/ci-detect": "^3.0.2",
"@observablehq/plot": "^0.6.11",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/node": "^18.7.5",
Expand Down
Loading

0 comments on commit ddf4eda

Please sign in to comment.