Skip to content

Commit

Permalink
Merge pull request #59 from camarm-dev/dev
Browse files Browse the repository at this point in the history
Changes about cff file, sheets credits and #51
  • Loading branch information
camarm-dev authored Jan 4, 2024
2 parents 31eedf9 + f864b4a commit 097c6ac
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 79 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @camarm-dev
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## PR Checklist
- [ ] Feature is not being developed in a branch of this repository
- [ ] `npm run lint` outputs clean
- [ ] Code builds (`npm run build`)

## What is this PR for ?

Clear and concise explanation of what you have implemented or enhanced.

**Please be active so you can modify and answer what we asked for !**
17 changes: 17 additions & 0 deletions CITATIONS.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# YAML 1.2
---
cff-version: "1.1.0"
message: "If you use this software, or part of this one, please cite it using these metadata."
# doi: 10.23721/100/1503924
title: "Remède - French open source dictionary"
authors:
-
family-names: CAMPONOVO
given-names: Armand
orcid: https://orcid.org/0009-0005-8995-6918
email: [email protected]
abstract: "Remède is a french dictionary database, API and mobile application. It's an open source alternative to Antidote."
date-released: 2023-12-23
repository-code: "https://github.com/camarm-dev/remede"
license: CeCill V2.1
...
67 changes: 62 additions & 5 deletions app/src/components/FicheModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
IonButton,
IonNavLink,
IonLabel, IonBadge,
IonAlert
} from "@ionic/vue";
import {
chevronBackOutline,
Expand Down Expand Up @@ -47,12 +48,20 @@ import {
<ion-title class="remede-font ion-wrap" size="large">{{ nom }}</ion-title>
</ion-label>
<ion-buttons slot="end">
<ion-button @click="openCredits()">
<ion-button id="present-credits">
<ion-icon slot="icon-only" :icon="informationCircleOutline" color="medium"/>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-alert
class="alert"
trigger="present-credits"
header="Crédits"
:sub-header="`Attributions à ${credits.attributions}`"
:message="credits.text">

</ion-alert>
<ion-label>
<p class="ion-padding-start">{{ description }}</p>
</ion-label>
Expand Down Expand Up @@ -91,9 +100,6 @@ export default defineComponent({
goTo(path: string) {
this.$router.push(path)
},
openCredits() {
window.open(this.credits)
},
async shareSheet() {
try {
await Share.share({
Expand Down Expand Up @@ -123,7 +129,58 @@ export default defineComponent({
default:
return 'grey'
}
}
},
}
})
</script>
<style>
.alert .alert-message {
text-align: justify;
color: var(--ion-color-medium);
}
b, strong {
display: inline-block;
transition: .5s ease-in-out;
font-weight: normal;
margin-top: 0;
padding: 0 5px;
margin-bottom: 0;
background: linear-gradient(to right, rgba(255, 235, 9, 0.5), rgba(255, 235, 9, 0.4), rgba(255, 235, 9, 0.5));
border-radius: 3px;
}
b:hover, strong:hover {
z-index: 50;
transform: translateY(-1px);
transition: .5s ease-in-out;
cursor: pointer;
background: var(--ion-color-light);
}
blockquote {
margin-left: 5px;
border-left: 4px rgba(var(--ion-color-primary-rgb), .7) solid;
background-color: var(--ion-color-light);
padding-left: 7px;
border-radius: 3px;
padding-top: 3px;
padding-bottom: 3px;
}
blockquote p {
margin: 0;
padding-top: 5px;
padding-bottom: 5px;
}
a {
color: var(--ion-color-primary);
text-decoration: none;
}
a:hover {
color: var(--ion-color-primary-tint);
text-decoration: underline var(--ion-color-primary-tint);
}
</style>
5 changes: 4 additions & 1 deletion app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import '@ionic/vue/css/display.css';
import './theme/variables.css';

const app = createApp(App)
.use(IonicVue, { mode: 'ios' })
.use(IonicVue, {
mode: 'ios',
innerHTMLTemplatesEnabled: true
})
.use(router);

router.isReady().then(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/views/FichesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
async loadSheets() {
this.loading = true
try {
this.all_sheets = await fetch('https://api-remede.camarm.fr/sheets').then(resp => resp.json())
this.all_sheets = await fetch('http://192.168.1.140:8000/sheets').then(resp => resp.json())
this.sheets = this.all_sheets
this.filters = []
this.failed = false
Expand Down
11 changes: 10 additions & 1 deletion data/fiches/Classes-grammaticales.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
---
nom: Les classes grammaticales
description: Les 9 classes grammaticales et comment les reconnaître !
credits: https://remede.camarm.fr/sheets-credits#classes-grammaticales
credits:
attributions: Remède
url: https://github.com/camarm-dev/remede
text: "
Author(s): [camarm](https://github.com/camarm-dev)
Source: [Remède](https://github.com/camarm-dev/remede)
With help of: [Le Robert en ligne](https://dictionnaire.lerobert.com/guide/qu-est-ce-qu-une-classe-grammaticale)
With help of: [Wikipedia](https://fr.wikipedia.org/wiki/Nom)
File historic and contributions: [On Github](https://github.com/camarm-dev/remede/commits/main/data/fiches/Classes-grammaticales.md)
"
slug: classes-grammaticales
tags:
- grammaire
Expand Down
9 changes: 8 additions & 1 deletion data/fiches/Exemple.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
---
nom: Exemple de fiche
description: Ceci est la première fiche
credits: https://remede.camarm.fr/sheets-credits#example
credits:
attribution: Remède
url: https://github.com/camarm-dev/remede
text: "
Author(s): [camarm](https://github.com/camarm-dev)
Source: [Remède](https://github.com/camarm-dev/remede)
File historic and contributions: [On Github](https://github.com/camarm-dev/remede/commits/main/data/fiches/Exemple.md)
"
slug: example
tags:
- grammaire
Expand Down
28 changes: 4 additions & 24 deletions docs/EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,9 @@ Ceci est un exemple de fiche.

Available tags: `grammaire`, `orthographe`, `conjugaison`, `lexique`, `style`, `typographie`

Please don't forget that to credits one or many contributors, the page `https://remede.camarm.fr/sheets-credits`, placed in `docs/sheets-credits.md` is here to credit yourself and quote the source(s) that helped you.
- Here is how to correctly use this file
```markdown
[...]

## Credits

[//]: # (Begin new crédit)

### Exemple

- Author(s): [Nom](github link / website / wiki page / without link)
- Source: [Remède / Extern source name](remede github link / extern link)
[//]: # (If the source is remède, add)
- With help of [source name](source link)
- With help of [other source name](other source link)

[//]: # (Other fields available)

- File historic and contributions: [On Github](https://github.com/camarm-dev/remede/commits/main/data/fiches/<nom-fiche>.md)

[//]: # (End new credits)
```
- Your credits will be available at `https://remede.camarm.fr/sheets-credits#exemple`
To credit and permit right attribution of these sheets, please **fill correctly** the `credits` fields in the frontmatter.
- `credits.url`: Source URL (Remède GitHub link or source website url)
- `credits.attributions`: The person or project to attribute
- `credits.text`: The ressources that helped you, the file modification historic.

Please fill correctly this file, because it tracks authors and contributions, and is here to respect privacy policies and copyrights about Rèmede and the sources of its data !
38 changes: 13 additions & 25 deletions docs/FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,18 @@ Elles sont écrites en `markdown` et utilisent le `front-matter` pour fonctionne

Exemple de fiche:

```markdown
```yaml
---
nom: Exemple de fiche
description: Ceci est la première fiche
credits: https://remede.camarm.fr/sheets-credits#exemple
credits:
attribution: Remède
url: https://github.com/camarm-dev/remede
text: "
Author(s): [camarm](https://github.com/camarm-dev)
Source: [Remède](https://github.com/camarm-dev/remede)
File historic and contributions: [On Github](https://github.com/camarm-dev/remede/commits/main/data/fiches/Exemple.md)
"
slug: exemple
tags:
- grammaire
Expand All @@ -202,29 +209,10 @@ Ceci est un exemple de fiche.

Les tags disponibles sont: `grammaire`, `orthographe`, `conjugaison`, `lexique`, `style`, `typographie`

Notez que pour les crédits, si la fiche est écrite par un contributeur ou plusieurs (vous) la page `https://remede.camarm.fr/sheets-credits`, placé dans `docs/sheets-credits.md` permet de vous créditer et d'y placer les sources qui vous ont aidés.
- Vous le ferez alors ainsi:
```markdown
[...]
Pour créditer et permettre l'attribution de ces fiches, veuillez remplir correctement les champs `credits`.

## Credits

[//]: # (Nouveau crédit)

### Exemple

- Author(s): [Nom](lien github / site / page wiki / sans lien)
- Source: [Remède / Source externe](lien remede / lien externe)
[//]: # (Si source remède, ajouter)
- Inspiré de [nom](lien)
- Inspiré de [autre nom](autre lien)

[//]: # (Autres champs possibles)

- File historic and contributions: [On Github](https://github.com/camarm-dev/remede/commits/main/data/fiches/<nom-fiche>.md)

[//]: # (Fin des mentions)
```
- Vos crédits seront alors accessible à `https://remede.camarm.fr/sheets-credits#exemple`
- `credits.url`: L'url de la source (Le github Remède, ou lien du site source)
- `credits.attributions`: La personne ou le projet à citer en cas d'attribution
- `credits.text`: Les ressources annexes qui vous ont aidés, l'historique des modifications du fichier

Remplissez bien cette fiche, car elle permet la traçabilité et le respect de la propriété privée et intellectuelle concernant Rèmede et la provenance de ses données.
21 changes: 0 additions & 21 deletions docs/sheets-credits.md

This file was deleted.

1 change: 1 addition & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_sheets():
for filename in files:
with open(f'data/fiches/{filename}') as file:
metadata = frontmatter.load(file)
metadata['credits']['text'] = markdown.markdown(metadata['credits']['text'])
sheets.append({
'nom': metadata['nom'],
'description': metadata['description'],
Expand Down

0 comments on commit 097c6ac

Please sign in to comment.