diff --git a/a_propos.php b/a_propos.php index c7f0654..5ed74f8 100644 --- a/a_propos.php +++ b/a_propos.php @@ -1,38 +1,21 @@ - - - - - - - - - Festiv'Algo - A propos - - - - - -
- -
-
- -


Evènements :

-
-
    -
  • 27/12/19 : Suppression des fonctionnalités non utilisé pour alléger le cout de maintenance.
  • -
  • 20/04/13 : Mise en ligne du site.
  • -
  • 9/05/13 : Correction des problèmes de position du curseur dans l'onglet principal.
  • -
  • 20/05/13 : Ajout de la coloration syntaxique pour le debuggage.
  • -
  • 14/12/13 : Changement de serveur et remise en ligne du site après un mois d'indisponibilité.
  • -
-
-
-
+
+ + +

Evènements :

+
+
    +
  • 27/12/19 : Suppression des fonctionnalités non utilisé pour alléger le cout de maintenance.
  • +
  • 20/04/13 : Mise en ligne du site.
  • +
  • 9/05/13 : Correction des problèmes de position du curseur dans l'onglet principal.
  • +
  • 20/05/13 : Ajout de la coloration syntaxique pour le debuggage.
  • +
  • 14/12/13 : Changement de serveur et remise en ligne du site après un mois d'indisponibilité.
  • +
- - - +
+ \ No newline at end of file diff --git a/aide.php b/aide.php index 3b436f8..2ba9f01 100644 --- a/aide.php +++ b/aide.php @@ -1,113 +1,167 @@ - - - - - - - - - - - - Festiv'Algo - Aide pour la programmation d'algorithmes. Tutoriel d'algorithmique, TI Basic et Basic Casio. - - - +
+
+
+

• Qu'est-ce qu'un algorithme ?

+

+ Le mot "algorithme" vient du nom du mathématicien Persan Al-Khuwarizmi, qui inventa une méthode, au début du IXème siècle, pour résoudre des équations pas à pas.
+ Un algorithme est une suite d'opérations appliquées dans un ordre donné. +

+
+ Schéma d'un algorithme +
- -
- - -
-
-

• Qu'est-ce qu'un algorithme ?

- Schéma d'un algorithme -
- Le mot "algorithme" vient du nom du mathématicien Persan Al-Khuwarizmi, qui inventa une méthode, au début du IXème siècle, pour résoudre des équations pas à pas.
- Un algorithme est une suite d'opérations appliquées dans un ordre donné. -
+

• Variables et affectation

+
+

+ Dans un algorithme, on commence par l'entrée des données. Chacune de ces données est stockée dans la mémoire de la calculatrice ou de l'ordinateur à un emplacement nommé variable et est repérée par une lettre.
+ Les instructions que l'on peut pratiquer avec une variable sont : +

+ +

+ - la saisie : on demande à l'utilisateur de donner une valeur à une variable. +

+
+
+ Saisir A + Algorithme
-
-
-

• Variables et affectation

-
-
- Dans un algorithme, on commence par l'entrée des données. Chacune de ces données est stockée dans la mémoire de la calculatrice ou de l'ordinateur à un emplacement nommé variable et est repérée par une lettre.
- Les instructions que l'on peut pratiquer avec une variable sont :

- - - la saisie : on demande à l'utilisateur de donner une valeur à une variable.
-
-
Saisir A
Algorithme
? → A
Casio
Input A
TI -

Exécution :

- -
-
-
-
- - - l'affectation : on donne à la variable une certaine valeur ou le résultat d'un calcul.
-
-
A Prend_la_valeur 3 * 5
Algorithme
3 * 5 → A
Casio
3 * 5 → A
TI -
-
- - - l'affichage : on affiche le contenu de la variable. -
-
Afficher A
Algorithme
A∠
Casio
Disp A
TI -

Exécution :

-
- 15 -
-
-
-
+
+ ? → A + Casio
-
-

• Les conditions

- Schéma d'une condition -
- La résolution de certains problèmes conduit parfois à une situation dans laquelle la décision prise est soumise à condition.
- Si la condition est vérifiée, on effectue une première tâche, sinon on effectue une seconde tâche. -
-

-
-
-
Si A = 1
Alors ...
(Sinon ...)
Fin_si
Algorithme -
If A = 1
Then ...
(Else ...)
IfEnd
Casio -
If A = 1
Then ...
(Else ...)
End
TI -
- - Le "Sinon" n'est pas systématique. Sans cette instruction, si la condition n'est pas vérifiée, la tâche n'est pas effectuée et l'algorithme passe à l'instruction suivante. -
+
+ Input A + TI
- -
-

• Les boucles

-
- Pendant l'exécution d'un programme, il est possible d'avoir à réaliser plusieurs fois de suites la même tâche.
- Il existe deux types de boucles :

- - - la boucle conditionelle : on répète les mêmes instructions tant qu'une condition est remplie. -
-
Tant_que A = 1
...
...
Fin_tant_que
Algorithme -
While A = 1
...
...
End
Casio -
While A = 1
...
...
WhileEnd
TI -
- - la boucle itérative : on répète les mêmes instructions un certain nombre de fois. -
-
Pour A Allant_de 0 à 10
...
...
Fin_pour
Algorithme -
For 0 → A To 10
...
...
Next
Casio -
For(A,0,10)
...
...
End
TI -
-
+
+
+ Exécution : + +
+ + +

+ - l'affectation : on donne à la variable une certaine valeur ou le résultat d'un calcul. +

+
+
+ A Prend_la_valeur 3 * 5 + Algorithme
-
-
+
+ 3 * 5 → A + Casio +
+
+ 3 * 5 → A + TI +
+
+ +

+ - l'affichage : on affiche le contenu de la variable. +

+
+
+ Afficher A + Algorithme +
+
+ A∠ + Casio +
+
+ Disp A + TI +
+
+
+ Exécution : + 15
- - - + + +
+
+

• Les conditions

+

+ La résolution de certains problèmes conduit parfois à une situation dans laquelle la décision prise est soumise à condition.
+ Si la condition est vérifiée, on effectue une première tâche, sinon on effectue une seconde tâche. +

+
+ Schéma d'une condition +
+ +
+
+
+ Si A = 1
Alors ...
(Sinon ...)
Fin_si + Algorithme +
+
+ If A = 1
Then ...
(Else ...)
IfEnd + Casio +
+
+ If A = 1
Then ...
(Else ...)
End + TI +
+
+ +

Le "Sinon" n'est pas systématique. Sans cette instruction, si la condition n'est pas vérifiée, la tâche n'est pas effectuée et l'algorithme passe à l'instruction suivante.

+
+ + +

• Les boucles

+
+

+ Pendant l'exécution d'un programme, il est possible d'avoir à réaliser plusieurs fois de suites la même tâche.
+ Il existe deux types de boucles : +

+

+ - la boucle conditionelle : on répète les mêmes instructions tant qu'une condition est remplie. +

+
+
+ Tant_que A = 1
...
...
Fin_tant_que + Algorithme +
+
+ While A = 1
...
...
End + Casio +
+
+ While A = 1
...
...
WhileEnd + TI +
+
+ + +

+ - la boucle itérative : on répète les mêmes instructions un certain nombre de fois. +

+
+
+ Pour A Allant_de 0 à 10
...
...
Fin_pour + Algorithme +
+
+ For 0 → A To 10
...
...
Next + Casio +
+
+ For(A,0,10)
...
...
End + TI +
+
+
+ +
+ \ No newline at end of file diff --git a/assets/css/aide.css b/assets/css/aide.css deleted file mode 100644 index 261f35d..0000000 --- a/assets/css/aide.css +++ /dev/null @@ -1,202 +0,0 @@ -#content -{ - height: 2010px; -} - -article -{ - position: absolute; - width: 980px; - top: 285px; - left: 0px; -} - -h2 -{ - font-family: 'Crete Round', serif; - font-size: 24px; - font-style: bold; - color: black; - text-align: left; - margin-left: 70px; - margin-bottom: 20px; -} - -.partie -{ - margin-bottom: 50px; -} - -.paragraphes -{ - text-align: justify; - background-color: #FFD745; - border: solid; - border-width: 4px; - border-radius: 5px; - border-color: #FAC801; - font-family: 'Crete Round', serif; - font-size: 16px; - font-style: none; - color: black; - padding: 5px 11px 7px 11px; - margin-left: 45px; - margin-right: 45px; -} - -#par1 -{ - width: 455px; -} - -#par3 -{ - width: 515px; -} - -#schema_algo -{ - float: right; - margin-left: 45px; - margin-right: 45px; - margin-top: -44px; -} - -#schema_condition -{ - float: right; - margin-left: 45px; - margin-right: 45px; - margin-top: -44px; -} - -.exemples_code -{ - margin-left: 25px; - margin-bottom: 10px; -} - -#code_condition -{ - height: 68px; -} - -.code_algo -{ - display: inline-block; - background-color: rgb(255, 84, 84); - width: 230px; - height: 22px; - border: solid; - border-radius: 14px; - border-width: 4px; - border-color: rgb(236, 10, 10); - font-family: Verdanna, Arial; - color: rgb(173, 0, 0); - font-size: 14px; - padding-left: 8px; - padding-top: 4px; - margin: 14px -40px 12px 0px; -} - - -.type_algo -{ - font-family: 'Crete Round', serif; - position: relative; - right: 30px; - top: -6px; - font-size: 12px; - color: rgb(218, 7, 7); -} - -.code_casio -{ - display: inline-block; - background-color: rgb(145, 226, 99); - width: 230px; - height: 22px; - border: solid; - border-radius: 14px; - border-width: 4px; - border-color: rgb(66, 167, 66); - font-family: Verdanna, Arial; - color: rgb(62, 139, 10); - font-size: 14px; - padding-left: 8px; - padding-top: 4px; - margin: 14px -7px 12px 0px; -} - -#type_condition -{ - top: -54px; -} - -.type_casio -{ - font-family: 'Crete Round', serif; - position: relative; - right: 31px; - top: -6px; - font-size: 12px; - color: rgb(58, 173, 30); -} - -.code_ti -{ - display: inline-block; - background-color: rgb(155, 148, 248); - width: 230px; - height: 22px; - border: solid; - border-radius: 14px; - border-width: 4px; - border-color: rgb(60, 103, 167); - font-family: Verdanna, Arial; - color: rgb(40, 83, 175); - font-size: 14px; - padding-left: 8px; - padding-top: 4px; - margin: 14px -40px 12px 0px; -} - -.type_ti -{ - font-family: 'Crete Round', serif; - position: relative; - right: -19px; - top: -6px; - font-size: 12px; - color: rgb(12, 26, 99); -} - -.resultats_code -{ - width: 622px; - height: 45px; - background-color: #EED858; - border: solid; - border-width: 4px; - border-radius: 14px; - border-color: #D2A124; - font-family: 'Crete Round', serif; - padding: 0px 0px 8px 12px; - padding-left: 6px; -} - -.resultats_title -{ - font-size: 18px; - color: #DB7517; - margin-top: 0px; -} - -.resultats_content -{ - font-size: 15px; - color: #D29A17; - margin-top: -16px; - margin-left: 8px; -} - diff --git a/assets/css/exemples.css b/assets/css/exemples.css deleted file mode 100644 index 5f84165..0000000 --- a/assets/css/exemples.css +++ /dev/null @@ -1,85 +0,0 @@ -article -{ - margin-top: 30px; -} - -h2 -{ - font-size: 24px; - font-style: bold; - color: black; - text-align: left; - margin: 10px 10px 20px 10px; -} - -h4 -{ - font-size: 12px; - font-style: bold; - color: rgb(255, 143, 0); - text-align: left; - margin: 18px 10px 6px 10px; -} - -#contenu -{ - margin-top: 10px; -} - -.exemples -{ - text-align: justify; - background-color: #FFD745; - border: solid; - border-width: 4px; - border-radius: 5px; - border-color: #FAC801; - font-family: 'Crete Round', serif; - font-size: 16px; - font-style: none; - color: black; - padding: 5px 11px 7px 11px; - margin-left: 45px; - margin-right: 262px; -} - -.auteur -{ - font-size: 14px; - text-align: left; - margin: 0px 10px 10px 20px; -} - -.description -{ - font-size: 14px; - text-align: left; - margin: 0px 10px 10px 20px; -} - -.cleditorMain -{ - position: relative; - top: 0px; - left: 198px; -} - -.tester -{ - margin-left: 444px; -} - -#code -{ - width: 400px; - padding: 3px 0px 4px 8px; - margin-left: 198px; - font-family: 'Crete Round', serif; - color: rgb(206, 133, 4); - text-align: left; - border: solid; - border-width: 4px; - border-radius: 5px; - border-color: rgb(221, 147, 53); - background-color: rgb(247, 226, 119); -} \ No newline at end of file diff --git a/assets/css/stylesheet.css b/assets/css/stylesheet.css index 84ae766..dfe98ef 100644 --- a/assets/css/stylesheet.css +++ b/assets/css/stylesheet.css @@ -1,4 +1,6 @@ -/*---------Download fonts---------*/ +/************** +* Custom font import +***************/ @font-face { font-family: 'Crete Round'; @@ -13,7 +15,7 @@ } @font-face { - font-family: 'Crete Round'; + font-family: 'z'; src: url('../fonts/Crete_Round/CreteRound-Italic-webfont.eot'); src: url('../fonts/Crete_Round/CreteRound-Italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Crete_Round/CreteRound-Italic-webfont.woff') format('woff'), @@ -24,46 +26,58 @@ } -body -{ - background-color: #FDF697; +@font-face { + font-family: 'Action Man'; + src: url('../fonts/Action_Man/Action_Man-webfont.eot'); + src: url('../fonts/Action_Man/Action_Man-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/Action_Man/Action_Man-webfont.woff') format('woff'), + url('../fonts/Action_Man/Action_Man-webfont.ttf') format('truetype'), + url('../fonts/Action_Man/Action_Man-webfont.svg#ActionManRegular') format('svg'); + font-weight: normal; + font-style: normal; } -h1 +/************** +* General style +***************/ + +h2 { - text-align: center; - display: inline; - font-weight: normal; + font-family: 'Crete Round', serif; + font-size: 24px; + font-style: bold; + color: black; + text-align: left; + margin-top: 20px; + margin-bottom: 12px; + clear: both; +} + +h3 +{ + font-size: 16px; + font-style: bold; + color: rgb(255, 143, 0); + text-align: left; } a { font-style: normal; - text-decoration: none; - color: black; - cursor: pointer; + cursor: pointer; + color: #C51111; + text-decoration: underline; } -em +/************** +* Theme and general layout +***************/ + +body { - font-style: normal; + background-color: #FDF697; } -strong -{ - font-weight: normal; -} - -mark -{ - background-color: transparent; - color: inherit; -} - -#algorithmie -{ - position: relative; -} #content { @@ -82,684 +96,12 @@ mark text-align: center; } -.conversion -{ - position: relative; - cursor: pointer; - z-index: 1; -} - -.icone -{ - position: relative; - bottom: 180px; - right: 99px; - margin-right: 7px; - cursor: pointer; -} - -#support_menus -{ - position: absolute; - top: -187px; - left: 247px; -} - -#selection -{ - position: absolute; - top: -91px; - left: 255px; - z-index: 10; -} - -.onglet_deroulant -{ - position: absolute; - left: 255px; -} - -#onglet_deroulant1 -{ - top: -126px; - z-index: 9; -} - -#onglet_deroulant2 -{ - top: -97px; - z-index: 8; -} - -#onglet_deroulant3 -{ - top: -68px; - z-index: 7; -} - -#onglet_deroulant4 -{ - top: -39px; - z-index: 6; -} - -#onglet_deroulant5 -{ - top: -10px; - z-index: 5; -} - -#onglet_deroulant6 -{ - top: 19px; - z-index: 4; -} - -#onglet_deroulant7 -{ - top: 48px; - z-index: 3; -} - -#onglet_deroulant8 -{ - top: 77px; - z-index: 2; -} - -.instruction -{ - position: absolute; - left: 470px; - font-family: 'Crete Round', serif; - font-size: 16px; - color: #9B7606; - cursor: pointer; - width: 116px; - height: 33px; -} - -#instruction1 -{ - top: -136px; - z-index: 10; -} - -#instruction2 -{ - top: -107px; - z-index: 10; -} - -#instruction3 -{ - top: -78px; - z-index: 10; -} - -#instruction4 -{ - top: -49px; - z-index: 10; -} - -#instruction5 -{ - top: -20px; - z-index: 10; -} - -#instruction6 -{ - top: 9px; - z-index: 10; -} - -#instruction7 -{ - top: 38px; - z-index: 10; -} - -#instruction8 -{ - top: 67px; - z-index: 10; -} - -#vous_programmez_en, .langage_actuel -{ - font-family: 'Crete Round', serif; - font-size: 16px; - position: relative; - color: #D70404; -} - -#vous_programmez_en -{ - bottom: -3px; - right: 371px; -} - -.langage_actuel -{ - bottom: 2px; -} - -#langage_algo -{ - right: 407px; -} - -#langage_casio -{ - right: 407px; -} - -#langage_ti -{ - right: 420px; -} - -#infos -{ - width: 355px; - height: 44px; - background-color: #FFD745; - border: solid; - border-width: 4px; - border-radius: 5px; - border-color: #FAC801; - position: absolute; - top: -194px; - right: 43px; - font-family: 'Crete Round', serif; - color: #D70404; - font-size: 14px; - font-style: normal; - text-decoration: none; - text-align: justify; - padding: 6px 8px 0px 9px; - z-index: 1; - cursor: help; - overflow: auto; -} - -#syntaxe -{ - position: absolute; - top: 22px; - left: 8px; -} - -.mot_cle -{ - color: #D70404; - font-size: 16px; - font-family: 'Crete Round', serif; -} - -.indications -{ - - color: #C17700; - font-size: 14px; - font-family: 'Crete Round', serif; - font-style: italic; -} - -#syntaxe_titre -{ - position: absolute; - top: -8px; - left: 6px; - font-size: 11px; - color: #C17700; -} - -#annonces -{ - width: 235px; - height: 322px; - background-color: #FFE378; - border: solid; - border-width: 4px; - border-radius: 15px; - border-color: #FAC54A; - position: absolute; - top: 374px; - right: 22px; - font-family: 'Crete Round', serif; - font-size: 12px; - color: #C17700; - font-style: normal; - text-decoration: none; - text-align: left; - padding: 0px 8px 0px 9px; -} - -#texteAnnonce -{ - position: absolute; - left: 704px; - top: 450px; - text-align: center; - width: 225px; - font-family: Navig, Arial; - font-size: 20px; - color: rgb(11, 122, 196); -} - -#pub1 -{ - position: absolute; - left: 706px; - top: 408px; - z-index: 1; -} - -#pub2 -{ - position: absolute; - left: 830px; - top: 408px; - z-index: 1; -} - -#pub3 -{ - position: absolute; - left: 784px; - top: 323px; -} - -.pub4 -{ - position: relative; - margin-top: 40px; -} - -#pub_aide -{ - position: absolute; - left: 127px; - top: 2010px; -} - -.cleditorMain -{ - position: absolute; - top: -84px; - left: 263px; - z-index: 1; - margin-bottom: 0px; - border: solid; - border-width: 4px; - border-color: #FFAF22; - padding:0 1px 1px; - background-color: #FAF07A; -} - -#disable -{ - position: absolute; - z-index: 1; - left: 263px; - top: -84px; -} - -#debug -{ - position: absolute; - width: 634px; - height: 92px; - top: 285px; - left: 42px; - background-color: #DF6060; - border: solid; - border-width: 4px; - border-color: #D12424; - overflow: auto; -} - -#attention -{ - position: absolute; - left: 10px; - top: 8px; -} - -#debug_titre -{ - position: absolute; - top: 2px; - left: 55px; - font-family: 'Crete Round', serif; - font-size: 16px; - color: #AC0000; -} - -.erreurs -{ - position: relative; - top: 40px; - left: 14px; - text-align: left; - width: 315px; -} - -#description_erreur -{ - font-family: 'Crete Round', serif; - font-size: 14px; - color: #771A1A; -} - -#suggestion_erreur -{ - font-family: 'Crete Round', serif; - font-style: italic; - font-size: 14px; - color: #1B6618; -} - -.ampoule -{ - position: relative; - top: 4px; - left: 3px; - margin-right: 2px; -} - -.signes_icone -{ - position: absolute; - left: 635px; - cursor: pointer; -} - -#signe_icone1 -{ - top : -75px; -} - -#signe_icone2 -{ - top : -35px; -} - -#signe_icone3 -{ - top : 5px; -} - -#signe_icone4 -{ - top : 45px; -} - -#signe_icone5 -{ - top : 85px; -} - -#signe_icone6 -{ - top : 125px; -} - -#signe_icone7 -{ - top : 165px; -} - -#signe_icone8 -{ - top : 205px; -} - -.signes -{ - position: absolute; - left: 643px; - cursor: pointer; -} - -#signe1 -{ - top : -89px; -} - -#signe2 -{ - top : -49px; -} - -#signe3 -{ - top : -9px; -} - -#signe4 -{ - top : 34px; - left: 642px; -} - -#signe5 -{ - top : 73px; -} - -#signe6 -{ - top : 110px; -} - -#signe7 -{ - top : 150px; - left: 644px; -} - -#signe8 -{ - top : 192px; -} - -#execution -{ - width: 622px; - height: 210px; - background-color: #EED858; - border: solid; - border-width: 4px; - border-color: #D2A124; - position: absolute; - bottom: -496px; - left: 42px; - font-family: 'Crete Round', serif; - font-style: normal; - text-decoration: none; - text-align: left; - padding: 48px 0px 8px 12px; - overflow: auto; - word-wrap: break-word; -} - -#resultats_titre -{ - position: absolute; - top: -12px; - left: 10px; - font-size: 18px; - color: #DB7517; -} - -#resultats -{ - position: relative; - bottom: 19px; - font-size: 15px; - color: #D29A17; -} - -#fin_execution -{ - color: red; - font-size: 18px; - position: absolute; - right: 14px; -} - -#lire -{ - resize: none; -} - -.bouton -{ - position: absolute; - top: 285px; - right: 158px; - cursor: pointer; -} - -#reset -{ - right: 53px; -} - -#variables -{ - width: 172px; - height: 106px; - background-color: #FFD745; - border: solid; - border-width: 4px; - border-color: #FAC801; - position: absolute; - top: 383px; - right: 53px; - font-family: 'Crete Round', serif; - font-style: normal; - text-decoration: none; - text-align: left; - padding: 6px 8px 0px 9px; - overflow: auto; - word-wrap: break-word; -} - -#variable_titre -{ - position: absolute; - top: -12px; - left: 5px; - font-size: 14px; - color: #D70404; -} - -.vars -{ - position: relative; - top: 18px; - left: 4px; - margin-top: 3px; - margin-bottom: 0px; - font-size: 14px; - color: #D70404; -} - -#publier -{ - position: absolute; - bottom: -501px; - right: 53px; - cursor: pointer; -} - -footer -{ - text-align: center; - font-family: normal, Arial; -} - -#partenaires -{ - margin: auto; -} - -.espace -{ - margin-left: 9px; - margin-right: 9px; -} - -.nom_part -{ - font-size: 12px; -} - -#auteur -{ - font-size: 14px; -} - -#credits_images -{ - font-size: 12px; -} - -.lien -{ - color: #C51111; - text-decoration: underline; -} - -.publier_titres -{ - margin-left: 170px; -} - -#avertissement -{ - font-family: 'Crete Round', serif; - font-size: 14px; - text-align: left; - margin-left: 200px; -} - -#capcha -{ - margin-left: 260px; -} - -#ins -{ - color: red; -} - - -/********************** - * includes/menu.php - **********************/ #banner { text-align:center; margin: 45px 0 16px 0; } -@font-face { - font-family: 'Action Man'; - src: url('../fonts/Action_Man/Action_Man-webfont.eot'); - src: url('../fonts/Action_Man/Action_Man-webfont.eot?#iefix') format('embedded-opentype'), - url('../fonts/Action_Man/Action_Man-webfont.woff') format('woff'), - url('../fonts/Action_Man/Action_Man-webfont.ttf') format('truetype'), - url('../fonts/Action_Man/Action_Man-webfont.svg#ActionManRegular') format('svg'); - font-weight: normal; - font-style: normal; -} - #menu { width: 900px; @@ -781,10 +123,430 @@ footer line-height: 25px; margin: 0 16px 0px 16px; font-size: 1.2em; + color: black; + text-decoration: none; } #menu a:hover { background: rgb(238,0,33); background: linear-gradient(167deg, rgba(238,0,33,1) 0%, rgba(177,24,40,1) 100%); -} \ No newline at end of file +} + +#contenu { + padding: 0px 45px; +} + +article +{ + margin-top: 30px; +} + +#footer { + text-align: center; + font-family: 'Crete Round', serif; +} +#footer .partners a { + margin: 0 8px; + text-decoration: none; + color: black; + font-size: 12px; + display: inline-block; +} +#footer .partners img { + display: block; +} +#footer .copyright { + text-decoration: none; + color: black; + font-size: 14px; +} +#footer .credits_images { + text-decoration: none; + color: black; + font-size: 12px; +} + +/************** +* Help page specific layout +***************/ + +#help_page .float_block { + float: right; + margin: 0 16px; +} + +#help_page .layout_float { + display: flex; + flex-direction: row; + align-items: flex-start; +} +#help_page .layout_float > img { + height: auto; + flex-grow: 0; + flex-shrink: 0; + margin-left: 32px; + margin-top: 20px; + margin-bottom: 20px; +} + +/************** +* About page specific layout +***************/ +#about_page > iframe { + margin: 20px 0; +} + +/************** +* example page specific layout +***************/ +.example form { + text-align: right; +} + +/************** +* programm page specific layout +***************/ +#programm { + display: grid; + grid-template-columns: 220px 260px auto; +} + +#programm .current_language { + grid-column: 1; + grid-row: 1; + font-family: 'Crete Round', serif; + font-size: 16px; + position: relative; + color: #D70404; + margin-top: 8px; +} +#programm .current_language > span { + font-weight: bold; +} + +#programm .top_buttons { + grid-column: 2; + grid-row: 1; + text-align:left; +} + +#programm #infos { + grid-column: 3; + grid-row: 1; + background-color: #FFD745; + border: solid; + border-width: 4px; + border-radius: 5px; + border-color: #FAC801; + font-family: 'Crete Round', serif; + color: #D70404; + font-size: 12px; + font-style: normal; + text-decoration: none; + text-align: justify; + margin-top: 0; + min-height: 50px; + padding: 0px 3px 0px 3px; +} + +#programm #infos .mot_cle +{ + color: #D70404; + font-family: 'Crete Round', serif; + font-weight: bold; +} + +#programm #infos .indications +{ + + color: #C17700; + font-family: 'Crete Round', serif; + font-style: italic; +} + +#dropdown_menu { + position: absolute; + display: flex; + flex-direction: column; + list-style-type: none; + z-index: 1; + padding: 0; + margin: 0; +} +#dropdown_menu > li > a { + display: block; + width: 130px; + height: 33px; + background-color: white; + line-height: 33px; + font-family: 'Crete Round', serif; + font-size: 16px; + color: #9B7606; + text-decoration: none; + border-style: solid; + border-width: 4px; + margin-bottom: -4px; + border-top-color: #ffce67; + border-left-color: #ffce67; + border-bottom-color: #d69c3f; + border-right-color: #d69c3f; + padding: 0 5px; +} +#dropdown_menu > li > a:hover { + background: rgb(255,190,62); + background: linear-gradient(180deg, rgba(255,190,62,1) 0%, rgba(255,122,49,1) 100%); +} + +#programm .action_buttons { + grid-column: 1; + grid-row: 2; +} +#programm .action_buttons button { + border: 0; + cursor: pointer; + background: none; + display: inline; + margin: 0; + padding: 0; +} +#programm .editor { + grid-column: 2 / 4; + grid-row: 2; + margin-bottom: 10px; +} +#programm .editor .cleditorMain { + border: solid; + border-width: 4px; + border-color: #FFAF22; + background-color: #FAF07A; +} +#programm .editor #disable { + background-color: gray; + opacity: 0.3; + position: absolute; + cursor: not-allowed; + /* Add margin the size of the border */ + margin: 4px; + /* Same fixed size as editor */ + width: 620px; + height: 314px; +} + +#programm .signes_container { + float: right; + display: flex; + flex-direction: column; + width: 32px; +} +#programm .signes_container > button { + margin-bottom: 16px; + max-width: 25px; + max-height: 25px; + border-width: 3px; + font-size: 16px; + padding: 0; + border-left-color: #989993; + border-bottom-color: #74746f; + border-right-color: #80807b; + border-top-color: #a5a5a0; + background-color: #a19e9d; + background: linear-gradient(45deg, #a19e9d 0%, #efefef 100%); + cursor: pointer; +} + +#programm #debug { + grid-column: 2 / 4; + grid-row: 3; + background-color: #DF6060; + border: solid; + border-width: 4px; + border-color: #D12424; + overflow: auto; + max-height: 400px; + overflow: auto; + padding: 2px 5px; + font-family: 'Crete Round', serif; +} +#programm #debug .debug_title { + font-size: 16px; + color: #AC0000; + margin-bottom: 8px; +} +#programm #debug .debug_title img { + display: inline-block; + margin-top: 8px; + margin-bottom: -8px; +} +#programm #debug .debug_content { + text-align: left; + font-size: 14px; + color: #771A1A; +} +#programm #debug #suggestion_erreur +{ + font-size: 14px; + color: #1B6618; +} +#programm #debug .ampoule +{ + margin-right: 2px; +} + +#programm #execution { + grid-column: 2 / 4; + grid-row: 3; + max-height: 400px; + overflow-y: auto; + background-color: #EED858; + border: solid; + border-width: 4px; + border-color: #D2A124; + font-family: 'Crete Round', serif; + font-style: normal; + text-decoration: none; + text-align: left; + overflow: auto; + word-wrap: break-word; + padding: 2px 5px; + font-size: 12px; +} +#programm #execution p { + margin: 0; + padding: 0; +} +#programm #execution > span { + font-size: 18px; + color: #DB7517; +} +#programm #execution #fin_execution +{ + color: red; + font-size: 18px; +} + +#programm #variables { + grid-column: 1; + grid-row: 3; + max-height: 400px; + overflow-y: auto; + margin-right: 16px; + background-color: #FFD745; + border: solid; + border-width: 4px; + border-color: #FAC801; + font-family: 'Crete Round', serif; + font-style: normal; + text-decoration: none; + text-align: left; + overflow: auto; + word-wrap: break-word; + font-size: 12px; + padding: 2px 5px; +} +#programm #variables > span +{ + font-size: 18px; + color: #D70404; +} +#programm #variables .vars +{ + margin-top: 3px; + margin-bottom: 0px; + font-size: 14px; + color: #D70404; +} + + +/************** +* Text blocks +***************/ +.text_block { + text-align: justify; + background-color: #FFD745; + border: solid; + border-width: 4px; + border-radius: 5px; + border-color: #FAC801; + font-family: 'Crete Round', serif; + font-size: 16px; + color: black; + padding: 5px 11px 7px 11px; + margin-bottom: 40px; +} + +p .text_block { + margin: 0; +} + +.text_block >p:first-child { + margin-top: 0; +} + +/************** +* Code example + code result +***************/ +.code_example_container { + display: flex; + flex-direction: row; + align-items: flex-start; + width: 100%; +} +.code_example_container > * { + flex-grow: 1; + flex-basis: 0; +} + +.code_example { + border: solid; + border-radius: 14px; + border-width: 4px; + font-family: 'Verdanna', Arial; + font-size: 14px; + font-weight: bold; + position: relative; + margin: 8px 16px; + padding: 5px 6px; +} +.code_example > small { + line-height: 12px; + position: absolute; + top: 2px; + right: 5px; + font-weight: normal; + font-family: 'Crete Round', serif; +} + +.code_example.code_algo { + background-color: rgb(255, 84, 84); + border-color: rgb(236, 10, 10); + color: rgb(173, 0, 0); +} +.code_example.code_casio { + background-color: rgb(145, 226, 99); + border-color: rgb(66, 167, 66); + color: rgb(62, 139, 10); +} +.code_example.code_ti { + background-color: rgb(155, 148, 248); + border-color: rgb(60, 103, 167); + color: rgb(40, 83, 175); +} + +.code_result { + border: solid; + border-radius: 14px; + border-width: 4px; + font-family: 'Crete Round', serif; + background-color: #EED858; + border-color: #D2A124; + margin: 8px 16px; + color: #D29A17; + padding: 6px 18px; +} +.code_result > span { + font-size: 18px; + color: #DB7517; + margin: 0px 6px 3px -6px; + display: block; +} diff --git a/assets/img/help/schema_algo.png b/assets/img/help/schema_algo.png index 91cacd7..de6d420 100644 Binary files a/assets/img/help/schema_algo.png and b/assets/img/help/schema_algo.png differ diff --git a/assets/img/programm/editor/onglet_deroulant.png b/assets/img/programm/editor/onglet_deroulant.png deleted file mode 100644 index 44f78f4..0000000 Binary files a/assets/img/programm/editor/onglet_deroulant.png and /dev/null differ diff --git a/assets/img/programm/editor/onglet_deroulant_selection.png b/assets/img/programm/editor/onglet_deroulant_selection.png deleted file mode 100644 index cf9a9d6..0000000 Binary files a/assets/img/programm/editor/onglet_deroulant_selection.png and /dev/null differ diff --git a/assets/img/programm/editor/support_menus.png b/assets/img/programm/editor/support_menus.png deleted file mode 100644 index 9a75b2b..0000000 Binary files a/assets/img/programm/editor/support_menus.png and /dev/null differ diff --git a/assets/js/compil1.js b/assets/js/compil1.js index 219ccb2..0e2655d 100644 --- a/assets/js/compil1.js +++ b/assets/js/compil1.js @@ -1131,6 +1131,7 @@ function affiche_erreurs(code) { var a; affiche_debug(); + let html_errors = ''; for(a = nb_erreurs - 1; a >= 0; a--) { @@ -1139,37 +1140,37 @@ function affiche_erreurs(code) { switch(erreur_syntaxe[4 * a + 2]) { case "non_reconnu": - $("#debug_titre").after("

• ligne " + erreur_syntaxe[4 * a + 3] + " : expression \"" + erreur_syntaxe[4 * a + 1] + "\" non reconnue.
Suggestion : vérifiez la syntaxe du mot.

"); + html_errors += "

• ligne " + erreur_syntaxe[4 * a + 3] + " : expression \"" + erreur_syntaxe[4 * a + 1] + "\" non reconnue.
Suggestion : vérifiez la syntaxe du mot.

"; expression = erreur_syntaxe[4 * a + 1]; break; case "manquant": - $("#debug_titre").after("

• ligne " + erreur_syntaxe[4 * a + 3] + " : élément de syntaxe manquant.
Suggestion : ajoutez " + erreur_syntaxe[4 * a] + ".

"); + html_errors += "

• ligne " + erreur_syntaxe[4 * a + 3] + " : élément de syntaxe manquant.
Suggestion : ajoutez " + erreur_syntaxe[4 * a] + ".

"; break; case "tout": - $("#debug_titre").after("

• ligne " + erreur_syntaxe[4 * a + 3] + " : élément manquant.

"); + html_errors += "

• ligne " + erreur_syntaxe[4 * a + 3] + " : élément manquant.

"; break; case "instruction_illegale": - $("#debug_titre").after("

• ligne " + erreur_syntaxe[4 * a + 3] + " : instruction \"" + erreur_syntaxe[4 * a + 1] + "\" inadaptée au contexte.
Suggestion : vérifiez vos " + erreur_syntaxe[4 * a + 4] + ".

"); + html_errors += "

• ligne " + erreur_syntaxe[4 * a + 3] + " : instruction \"" + erreur_syntaxe[4 * a + 1] + "\" inadaptée au contexte.
Suggestion : vérifiez vos " + erreur_syntaxe[4 * a + 4] + ".

"; expression = erreur_syntaxe[4 * a + 1]; break; case "erreur_conditions": - $("#debug_titre").after("

• Erreur de conditions
Suggestion : vérifiez vos conditions.

"); + html_errors += "

• Erreur de conditions
Suggestion : vérifiez vos conditions.

"; break; case "erreur_boucles": - $("#debug_titre").after("

• Erreur de boucles
Suggestion : vérifiez vos boucles.

"); + html_errors += "

• Erreur de boucles
Suggestion : vérifiez vos boucles.

"; break; case "erreur_ti": - $("#debug_titre").after("

• Erreur de structure
Suggestion : vérifiez vos conditions et vos boucles.

"); + html_errors += "

• Erreur de structure
Suggestion : vérifiez vos conditions et vos boucles.

"; break; default: - $("#debug_titre").after("

• ligne " + erreur_syntaxe[4 * a + 3] + " : " + erreur_syntaxe[4 * a + 2] + " au contexte.
Suggestion : remplacer \"" + erreur_syntaxe[4 * a + 1] + "\" par " + erreur_syntaxe[4 * a] + ".

"); + html_errors += "

• ligne " + erreur_syntaxe[4 * a + 3] + " : " + erreur_syntaxe[4 * a + 2] + " au contexte.
Suggestion : remplacer \"" + erreur_syntaxe[4 * a + 1] + "\" par " + erreur_syntaxe[4 * a] + ".

"; expression = erreur_syntaxe[4 * a + 1]; break; } @@ -1177,20 +1178,24 @@ function affiche_erreurs(code) { if(erreur_syntaxe[4 * a + 2] != "erreur_conditions" && erreur_syntaxe[4 * a + 2] != "erreur_boucles" && erreur_syntaxe[4 * a + 2] != "erreur_ti") code = surligne_erreurs(code, erreur_syntaxe[4 * a + 3], expression); } + + if(html_errors) { + $('#programm #debug .debug_content').html(html_errors); + } return code; } // affiche le "debug" function affiche_debug() { - $('#execution').css('height', '85px'); + $('#execution').hide(); $('#debug').show(); } // cache le "debug" function masque_erreurs() { + $('#execution').show(); $('#debug').hide(); - $('#execution').css('height', '210px'); } // efface le debug diff --git a/assets/js/execution.js b/assets/js/execution.js index c87ca9a..e5713bf 100644 --- a/assets/js/execution.js +++ b/assets/js/execution.js @@ -54,8 +54,8 @@ function execution(langage_source, nb) { if(result == "failed") return "failed"; - $('#executer').hide(); - $('#pause').show(); + $('#programm .action_buttons .executer').hide(); + $('#programm .action_buttons .pause').show(); reset_variables(); $("#saisie").cleditor()[0].disable(true); @@ -71,8 +71,8 @@ function instructions(nb, langage_source) { { if(pause == 1) { - $('#executer').unbind('click'); - $('#executer').click(function() { + $('#programm .action_buttons .executer').unbind('click'); + $('#programm .action_buttons .executer').click(function() { execution(langage_source, nb + 1); }); @@ -338,8 +338,8 @@ function instructions(nb, langage_source) { { display("Fin de l'exécution"); process = 0; - $('#pause').hide(); - $('#executer').show(); + $('#programm .action_buttons .pause').hide(); + $('#programm .action_buttons .executer').show(); $("#saisie").cleditor()[0].disable(false); } } @@ -365,8 +365,8 @@ function lire(myvar, langage_source, nb, id) { if(pause == 1) { - $('#executer').hide(); - $('#pause').show(); + $('#programm .action_buttons .executer').hide(); + $('#programm .action_buttons .pause').show(); } pause = 0; diff --git a/assets/js/interface.js b/assets/js/interface.js index beb6ded..a5e75b8 100644 --- a/assets/js/interface.js +++ b/assets/js/interface.js @@ -4,7 +4,16 @@ var reset = 0; var lire_pending = 0; var langage_avant_publier = 1; + $(document).ready(function() { + const btn_conversion_algo = $('#programm .action_buttons .conversion_algo'); + const btn_conversion_casio = $('#programm .action_buttons .conversion_casio'); + const btn_conversion_ti = $('#programm .action_buttons .conversion_ti'); + + const btn_action_executer = $('#programm .action_buttons .executer'); + const btn_action_pause = $('#programm .action_buttons .pause'); + const btn_action_reset = $('#programm .action_buttons .reset'); + var TIME = 600; var langage = 1; @@ -23,31 +32,29 @@ $(document).ready(function() { ]; function affiche_conversion() { - $('#conversion_algo').show(); - $('#conversion_casio').show(); - $('#conversion_ti').show(); if(langage == 1) { - $('#conversion_algo').hide(); - $('#conversion_casio').css('bottom', '-70px').css('right', '264px'); - $('#conversion_ti').css('bottom', '-216px').css('right', '450px'); + btn_conversion_algo.hide(); + btn_conversion_casio.show(); + btn_conversion_ti.show(); } else if(langage == 2) { - $('#conversion_casio').hide(); - $('#conversion_ti').css('bottom', '-70px').css('right', '450px'); - $('#conversion_algo').css('bottom', '-216px').css('right', '264px'); + btn_conversion_casio.hide(); + btn_conversion_ti.show(); + btn_conversion_algo.show(); } else if(langage == 3) { - $('#conversion_ti').hide(); - $('#conversion_algo').css('bottom', '-70px').css('right', '264px'); - $('#conversion_casio').css('bottom', '-216px').css('right', '450px'); + btn_conversion_ti.hide(); + btn_conversion_algo.show(); + btn_conversion_casio.show(); } + return false; } function hide_langage() { - $('.langage_actuel').hide(); + $('.current_language > span').hide(); } function affiche_langage() { @@ -65,10 +72,10 @@ $(document).ready(function() { function changement_langage() { var result; - $('#conversion_algo').click(function(event) { + btn_conversion_algo.click(function(event) { if(new Date().getTime() - time > TIME && process == 0) { - $('#executer').unbind('click'); + btn_action_executer.unbind('click'); time = new Date().getTime(); process = 1; result = traduction(langage, 1, 1); @@ -84,10 +91,10 @@ $(document).ready(function() { $("#saisie").cleditor()[0].disable(false); } }); - $('#conversion_casio').click(function(event) { + btn_conversion_casio.click(function(event) { if(new Date().getTime() - time > TIME && process == 0) { - $('#executer').unbind('click'); + btn_action_executer.unbind('click'); time = new Date().getTime(); process = 1; result = traduction(langage, 2, 1); @@ -103,10 +110,10 @@ $(document).ready(function() { $("#saisie").cleditor()[0].disable(false); } }); - $('#conversion_ti').click(function(event) { + btn_conversion_ti.click(function(event) { if(new Date().getTime() - time > TIME && process == 0) { - $('#executer').unbind('click'); + btn_action_executer.unbind('click'); time = new Date().getTime(); process = 1; result = traduction(langage, 3, 1); @@ -125,11 +132,11 @@ $(document).ready(function() { } function init_boutons() { - $('#pause').hide(); + btn_action_pause.hide(); } function boutons() { - $('#executer').click(function() { + btn_action_executer.click(function() { if(process == 0) { pause = 0; @@ -140,20 +147,20 @@ $(document).ready(function() { } if(lire_pending == 1 && pause == 1) { - $('#executer').hide(); - $('#pause').show(); + btn_action_executer.hide(); + btn_action_pause.show(); pause = 0; document.getElementById("lire").focus(); } }); - $('#pause').click(function() { - $('#pause').hide(); - $('#executer').show(); + btn_action_pause.click(function() { + btn_action_pause.hide(); + btn_action_executer.show(); pause = 1; }); - $('#reset').click(function() { - $('#pause').hide(); - $('#executer').show(); + btn_action_reset.click(function() { + btn_action_pause.hide(); + btn_action_executer.show(); reset = 1; process = 0; execution_init(); @@ -228,10 +235,8 @@ $(document).ready(function() { } } - function menus_deroulants_init() { - $('.onglet_deroulant').hide(); - $('.instruction').hide(); - $('#selection').hide(); + function close_dropdown_menu() { + $('#dropdown_menu').hide(); } function menus_deroulants_show() { @@ -239,8 +244,6 @@ $(document).ready(function() { var iconeNb, indice_pointeur, ongletNb; var id = $(this).attr('id'); - $('#selection').hide(); - if(id == 'entrees-sorties') iconeNb = 0; if(id == 'conditions') @@ -252,82 +255,47 @@ $(document).ready(function() { indice_pointeur = indices[(langage - 1) * 4 + iconeNb]; ongletNb = indices[(langage - 1) * 4 + iconeNb + 1] - indice_pointeur; - - menus_deroulants_init(); - affiche_menu_deroulant(iconeNb, ongletNb, indice_pointeur); - selection(iconeNb, ongletNb, id, indice_pointeur); - menus_deroulants_hide(ongletNb, id); - }); + let x = $(this).position().left; + // avoid overlapping the info box + if (iconeNb >= 3) + x = $(this).position().left + $(this).width() - 130 + let y = $(this).position().top + $(this).height(); + + close_dropdown_menu(); + show_dropdown(x, y, ongletNb, indice_pointeur); + add_instruction_events(ongletNb); + add_dropdown_close_events(); + }) } - function menus_deroulants_hide(ongletNb, id, indice_pointeur) { - $('#support_menus, .cleditorMain').mouseenter(function() { - menus_deroulants_init(); + function add_dropdown_close_events() { + $('.cleditorMain').mouseenter(function() { + close_dropdown_menu(); }); + $('.top_buttons').mouseleave(() => { + close_dropdown_menu(); + }) } - function affiche_menu_deroulant(iconeNb, ongletNb, indice_pointeur) { - var i; - - $('.onglet_deroulant').css('left', 255 + 69 * iconeNb); - + function show_dropdown(x, y, ongletNb, indice_pointeur) { + $('#dropdown_menu').hide(); + $('#dropdown_menu').empty(); + $('#dropdown_menu').css('top', y); + $('#dropdown_menu').css('left', x); for(i = 1; i <= ongletNb; i++) { - $('#onglet_deroulant' + i).show(); - $('#instruction' + i).replaceWith("

" + instructions[indice_pointeur + i - 1] + "

"); - $('#instruction' + i).css('left', 261 + 69 * iconeNb).show(); + $('#dropdown_menu').append('
  • ' + instructions[indice_pointeur + i - 1] + '
  • ') } + $('#dropdown_menu').show(); } - function Valeur_top(valeur_top) { - var onglet_click = 0; - - switch(valeur_top) - { - case '-136px': - onglet_click = 1; - break; - case '-107px': - onglet_click = 2; - break; - case '-78px': - onglet_click = 3; - break; - case '-49px': - onglet_click = 4; - break; - case '-20px': - onglet_click = 5; - break; - case '9px': - onglet_click = 6; - break; - case '38px': - onglet_click = 7; - break; - case '67px': - onglet_click = 8; - break; - } - - return onglet_click; - } - - function selection(iconeNb, ongletNb, id, indice_pointeur) { - var i, valeur_top, onglet_click, text, syntaxe, test; + function add_instruction_events(ongletNb) { + var i, syntaxe; for(i = 1; i <= ongletNb; i++) { $('#instruction' + i).mouseenter(function() { - valeur_top = $(this).css('top'); - onglet_click = Valeur_top(valeur_top); - - $('#selection').css('top', -155 + 29 * onglet_click) - .css('left', 255 + 69 * iconeNb) - .show(); - - text = instructions[indice_pointeur + onglet_click - 1]; - + let text = instructions[$(this).data('instruction-number')] switch(text) { case 'Lire': @@ -479,19 +447,14 @@ $(document).ready(function() { break; } - $('#info_contenu').replaceWith("

    Syntaxe

    " + "
    " + syntaxe + "
    "); + $('#infos').html(syntaxe); }); } $('.instruction').click(function() { - var num; - - valeur_top = $(this).css('top'); - menus_deroulants_init(id); - - onglet_click = Valeur_top(valeur_top); - - num = indice_pointeur + onglet_click - 1; - text = instructions[num]; + let num = $(this).data('instruction-number'); + let text = instructions[num] + close_dropdown_menu(); + console.log(num) if((num >= 16 && num <= 18) || num == 13 || (num >= 35 && num <= 37) || num == 49) text += "()"; @@ -500,12 +463,8 @@ $(document).ready(function() { if(num == 32) text = "()" + text; - /*if(text == "∠") - text = "∠"; - if(text == "→") - text = "→";*/ - addText(text + " "); + return false; }); } @@ -534,9 +493,11 @@ $(document).ready(function() { } $("#saisie").cleditor().focus(); // transforme le textarea en éditeur html + + $('#execution').show(); $('#debug').hide(); $('#disable').hide(); - menus_deroulants_init(''); + close_dropdown_menu(); affiche_langage(); changement_langage(); affiche_conversion(); @@ -544,26 +505,10 @@ $(document).ready(function() { boutons(); signes(); menus_deroulants_show(); - copie_contenu(); default_code(); alert_mobile(); }); -function copie_contenu() { - $('#publier').click(function() { - var texte; - - if(langage_avant_publier == 1) - texte = document.getElementById('saisie').value; - else - texte = traduction(langage_avant_publier, 1, 0); - - while(texte.indexOf(";") != -1) - texte = texte.replace(";","@"); - createCookie("algorithme",texte,1); - }); -} - function createCookie(name,value,days) { if (days) { var date = new Date(); diff --git a/assets/js/jquery/jquery.cleditor.js b/assets/js/jquery/jquery.cleditor.js index 546704b..f4b325e 100644 --- a/assets/js/jquery/jquery.cleditor.js +++ b/assets/js/jquery/jquery.cleditor.js @@ -36,7 +36,7 @@ $.cleditor = { // Define the defaults used for all new cleditor instances defaultOptions: { - width: 349, // width not including margins, borders or padding + width: 620, // width not including margins, borders or padding height: 314, // height not including margins, borders or padding controls: // controls to add to the toolbar "undo redo | print", diff --git a/assets/js/traduction.js b/assets/js/traduction.js index 47092d1..5b5278b 100644 --- a/assets/js/traduction.js +++ b/assets/js/traduction.js @@ -9,8 +9,8 @@ function traduction(langage_source, langage_cible, remplacer) { "Valeur_absolue", "Abs", "Abs" ]; - $('#pause').hide(); - $('#executer').show(); + $('#programm .action_buttons .pause').hide(); + $('#programm .action_buttons .executer').show(); reset = 1; process = 0; execution_init(); diff --git a/exemples.php b/exemples.php index 9017d26..6adbaf1 100644 --- a/exemples.php +++ b/exemples.php @@ -1,11 +1,12 @@ 'Algorithme d\'Euclide', 'auteur' => 'Nitrosax', - 'description' => 'Calcule le Plus Grand Commun Diviseur entre deux nombres entiers.', + 'description' => '

    Calcule le Plus Grand Commun Diviseur entre deux nombres entiers.

    ', 'programme' => '
    Lire A
    Lire B
    Tant_que B ≠ 0
    @@ -19,7 +20,7 @@ $db_examples = [ [ 'titre' => 'Plus ou moins', 'auteur' => 'Paul', - 'description' => 'Petit jeu où il faut deviner un nombre.', + 'description' => '

    Petit jeu où il faut deviner un nombre.

    ', 'programme' => '
    Afficher "Nombre maximal ?"
    Lire A
    A Prend_la_valeur Partie_entière (Hasard (a))
    @@ -38,7 +39,7 @@ $db_examples = [ [ 'titre' => 'Suite de Syracuse', 'auteur' => 'Nitrosax', - 'description' => 'Affiche les termes de la suite de Syracuse en fonction du nombre de départ choisi par l\'utilisateur.', + 'description' => '

    Affiche les termes de la suite de Syracuse en fonction du nombre de départ choisi par l\'utilisateur.

    ', 'programme' => '
    Lire A
    Tant_que A > 1
    Si Partie_décimale (A/2) = 0
    @@ -52,8 +53,8 @@ $db_examples = [ [ 'titre' => 'Suite de Fibonacci', 'auteur' => 'Dark-Storm', - 'description' => 'Cet algorithme calcule les N premiers termes de la suite de Fibonacci. N est rentré par l\'utilisateur. -La suite de Fibonacci sert à déterminer une approximation du nombre d\'Or en divisant un terme par le terme précédent.', + 'description' => '

    Cet algorithme calcule les N premiers termes de la suite de Fibonacci. N est rentré par l\'utilisateur. +La suite de Fibonacci sert à déterminer une approximation du nombre d\'Or en divisant un terme par le terme précédent.

    ', 'programme' => '
    A Prend_la_valeur 0
    B Prend_la_valeur 1
    C Prend_la_valeur 0
    @@ -68,8 +69,8 @@ La suite de Fibonacci sert à déterminer une approximation du nombre d\'Or en d [ 'titre' => 'Suite géométrique', 'auteur' => 'domPayeur', - 'description' => 'Une toute petite contribution pour essayer Festiv\'Algo. -Le programme génère les termes u_1, u_2 ... u_n d\'une suite géométrique avec un rappel de cours.', + 'description' => '

    Une toute petite contribution pour essayer Festiv\'Algo.

    +

    Le programme génère les termes u_1, u_2 ... u_n d\'une suite géométrique avec un rappel de cours.

    ', 'programme' => '
    Afficher " Programme suite géométrique"
    Afficher " Un+1=q* Un"
    Afficher " Un=Uo*q^n"
    @@ -88,12 +89,15 @@ Le programme génère les termes u_1, u_2 ... u_n d\'une suite géométrique ave ], [ 'titre' => 'Méthode de Monte Carlo ', 'auteur' => 'domPayeur', - 'description' => 'Le hasard et la loi des grands nombres (ou stabilisation de la fréquence) pour déterminer une valeur approchée de PI. -Le principe: -Un point est généré de manière aléatoire dans un carré de côté 1. -On calcule la distance séparant ce point de l\'un des sommets du carré. -Si cette distance est inférieure à 1, le point est alors à l\'intérieur du quart de disque de rayon 1 ayant pour centre ce sommet. -L\'aire du quart de disque est Pi/4 et la fréquence d\'apparition du point dans ce quart de disque se stabilise pour un grand nombre de lancers autour de la valeur théorique qui est la probabilité de cet événement: ici le rapport aire du quart de disque / aire du carré soit ( Pi/4)/1 donc Pi/4; il ne reste plus qu\'à multiplier par 4 pour obtenir une valeur approchée de Pi.', + 'description' => ' +

    Le hasard et la loi des grands nombres (ou stabilisation de la fréquence) pour déterminer une valeur approchée de PI.

    +

    Le principe:

    + ', 'programme' => '
    Afficher "Méthode de Monte-Carlo"
    Afficher "Valeur approchée de pi"
    Afficher "Grâce au rand !"
    @@ -113,7 +117,7 @@ L\'aire du quart de disque est Pi/4 et la fréquence d\'apparition du point dans [ 'titre' => 'R.O.C. du Bac S', 'auteur' => 'Nitrosax', - 'description' => 'Une restitution organisée de connaissance que les candidats du Bac S doivent connaître par coeur. Elle permet de montrer que pour tout nombre A rentré par l\'utilisateur, il existe un rang N tel que Un > A. L\'exemple utilise la suite : Un = 3^N.', + 'description' => '

    Une restitution organisée de connaissance que les candidats du Bac S doivent connaître par coeur. Elle permet de montrer que pour tout nombre A rentré par l\'utilisateur, il existe un rang N tel que Un > A. L\'exemple utilise la suite : Un = 3^N.

    ', 'programme' => '
    Lire A
    N Prend_la_valeur 0
    Tant_que 3^n ≤ A
    @@ -124,46 +128,29 @@ L\'aire du quart de disque est Pi/4 et la fréquence d\'apparition du point dans ]; ?> - - - - - - - - - Festiv'Algo - Exemples d'algorithmes - - - - - -
    - -
    - $dnn) - { - ?> -
    -
    -

    -

    Auteur :

    -

    Description :


    -
    - - -
    -
    -
    - - -
    -
    - - - \ No newline at end of file + $dnn) + { + ?> +
    +

    + +

    Auteur :

    +

    + +

    + +

    Description :

    + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/includes/bas_de_page.php b/includes/bas_de_page.php deleted file mode 100644 index 7ab91d9..0000000 --- a/includes/bas_de_page.php +++ /dev/null @@ -1,26 +0,0 @@ - - diff --git a/includes/config.php b/includes/config.php index e0233ba..ebb607d 100644 --- a/includes/config.php +++ b/includes/config.php @@ -1,23 +1,4 @@ +$base_url = '/FestivAlgo/'; \ No newline at end of file diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..9506a91 --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,35 @@ +
    + + + + + \ No newline at end of file diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..9feab6f --- /dev/null +++ b/includes/header.php @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + Festiv'Algo - <?= $page_title ?> + + + + + + + +
    + + + + + +
    + diff --git a/includes/init.php b/includes/init.php deleted file mode 100644 index 63cbe47..0000000 --- a/includes/init.php +++ /dev/null @@ -1,3 +0,0 @@ - - - Bannière Festiv'Algo - - - - diff --git a/index.php b/index.php index 0ce5f5f..acd4e9c 100644 --- a/index.php +++ b/index.php @@ -1,156 +1,125 @@ + +
    +

    + Vous programmez en
    + algorithme + Basic Casio + Ti-Basic +

    - - - - - - - - - - - - - - - - - Festiv'Algo - Programmer, exécuter et traduire des algorithmes pour toutes les calculatrices - - - - - -
    - +
    + Entrées/Sorties + Conditions + Boucles + Autres - - - - -
    - - - - Entrées/Sorties - Conditions - Boucles - Autres - - - - - - - - - - -

    -

    -

    -

    -

    -

    -

    -

    - -

    Cliquez sur l'une des icônes, puis sélectionnez une instruction.

    - -
    -
    - -

    Erreurs de syntaxe :

    -
    - - - - - - - - - - -

    -

    -

    -

    -

    ^

    -

    π

    -

    e

    -

    ln

    - -
    -

    Exécution :

    -
    -
    -
    - - - -
    -
    -

    Variables :

    - -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -
    - - -
    +
    - - - \ No newline at end of file + +

    Cliquez sur l'une des icônes, puis sélectionnez une instruction.

    + + + +
    +
    + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    + + Erreurs de syntaxe : +
    +
    +
    +
    + +
    + Exécution : +
    +
    + +
    + Variables : + +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +

    +
    +
    + \ No newline at end of file