-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #983 from mammaadDeveloper/next-generation-ts
Next generation ts
- Loading branch information
Showing
15 changed files
with
226 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Test make run | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
make-run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: sudo apt-get install build-essential | ||
- name: 'GCC Version' | ||
run: | | ||
gcc --version | ||
- name: Build salam for Linux | ||
run: | | ||
make run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
صفحه: | ||
|
||
تصویر: | ||
منبع="https://editor.salamlang.ir/images/favicon.svg" | ||
تمام | ||
|
||
جعبه: | ||
رنگ پس زمینه = «زرد» | ||
|
||
تمام | ||
|
||
تمام |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const mediatypes = ['external', 'internal', 'download']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,80 @@ | ||
import { RuntimeElement } from './../element'; | ||
import { languages } from './../data/element/language'; | ||
import { LanguageID } from './../../common/language/language'; | ||
import { RuntimeElementAttribute } from './../element_attribute'; | ||
import { RuntimeElementAttributeType } from './../element_attribute_type'; | ||
import { RuntimeElementAttributeValue } from './../element_attribute_value'; | ||
import {RuntimeElement} from './../element'; | ||
import {languages} from '../data/element/language'; | ||
import {LanguageID} from './../../common/language/language'; | ||
import {RuntimeElementAttribute} from '../element_attribute'; | ||
import {RuntimeElementAttributeType} from './../element_attribute_type'; | ||
import {RuntimeElementAttributeValue} from './../element_attribute_value'; | ||
import { mediatypes } from '../data/element/mediatypes'; | ||
|
||
export class RuntimeElementA extends RuntimeElement { | ||
constructor() { | ||
super(true, "a"); | ||
this.addText(LanguageID.LanguageEnglish, "link"); | ||
this.addText(LanguageID.LanguagePersian, "لینک"); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.StringNoEmpty, "download") | ||
.addText(LanguageID.LanguagePersian, "دانلود") | ||
.addText(LanguageID.LanguageEnglish, "download") | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.Url, "href") | ||
.addText(LanguageID.LanguagePersian, "منبع") | ||
.addText(LanguageID.LanguageEnglish, "source") | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.String, "hreflang") | ||
.addText(LanguageID.LanguagePersian, "language") | ||
.addText(LanguageID.LanguageEnglish, "زبان") | ||
.addReservedValues( | ||
languages.map((language: any) => | ||
new RuntimeElementAttributeValue(language.code.toUpperCase()) | ||
.addAllText(language.name) | ||
.addAllText(language.code) | ||
) | ||
) | ||
); | ||
} | ||
}; | ||
constructor() { | ||
super(true, 'a'); | ||
this.addText(LanguageID.LanguageEnglish, 'link'); | ||
this.addText(LanguageID.LanguagePersian, 'لینک'); | ||
this.addAttribute( | ||
new RuntimeElementAttribute( | ||
RuntimeElementAttributeType.StringNoEmpty, | ||
'download' | ||
) | ||
.addText(LanguageID.LanguagePersian, 'دانلود') | ||
.addText(LanguageID.LanguageEnglish, 'download') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.Url, 'href') | ||
.addText(LanguageID.LanguagePersian, 'منبع') | ||
.addText(LanguageID.LanguageEnglish, 'source') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute( | ||
RuntimeElementAttributeType.String, | ||
'hreflang' | ||
) | ||
.addText(LanguageID.LanguagePersian, 'language') | ||
.addText(LanguageID.LanguageEnglish, 'زبان') | ||
.addReservedValues( | ||
languages.map((language) => | ||
new RuntimeElementAttributeValue(language.code.toUpperCase()) | ||
.addAllText(language.name) | ||
.addAllText(language.code) | ||
) | ||
) | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.CSSMedia, 'media') | ||
.addText(LanguageID.LanguageEnglish, 'media') | ||
.addText(LanguageID.LanguagePersian, 'رسانه') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.Urls, 'ping') | ||
.addText(LanguageID.LanguageEnglish, 'ping') | ||
.addText(LanguageID.LanguagePersian, 'پینگ') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.String, 'referrerpolicy') | ||
.addText(LanguageID.LanguageEnglish, 'referrerpolicy') | ||
.addText(LanguageID.LanguagePersian, 'سیاست ارجاع') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.String, 'rel') | ||
.addText(LanguageID.LanguageEnglish, 'rel') | ||
.addText(LanguageID.LanguagePersian, 'رابطه') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.String, 'target') | ||
.addText(LanguageID.LanguageEnglish, 'target') | ||
.addText(LanguageID.LanguagePersian, 'هدف') | ||
); | ||
this.addAttribute( | ||
new RuntimeElementAttribute(RuntimeElementAttributeType.String, 'type') | ||
.addText(LanguageID.LanguageEnglish, 'type') | ||
.addText(LanguageID.LanguagePersian, 'نوع') | ||
.addReservedValues( | ||
mediatypes.map(mediatype => | ||
new RuntimeElementAttributeValue(mediatype) | ||
.addAllText(mediatype) | ||
) | ||
) | ||
); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LanguageID } from "../../common/language/language"; | ||
import { RuntimeElement } from "../element"; | ||
|
||
export class RuntimeElementEm extends RuntimeElement{ | ||
constructor(){ | ||
super(true, 'em'); | ||
this.addText(LanguageID.LanguagePersian, 'em'); | ||
this.addText(LanguageID.LanguagePersian, 'ای ام'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LanguageID } from "../../common/language/language"; | ||
import { RuntimeElement } from "../element"; | ||
|
||
export class RuntimeElementFooter extends RuntimeElement{ | ||
constructor(){ | ||
super(true, 'footer'); | ||
this.addText(LanguageID.LanguageEnglish, 'footer'); | ||
this.addText(LanguageID.LanguagePersian, 'فوتر'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// ToDo: Form tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters