mirror of https://tildegit.org/sbgodin/HtmGem
Compare commits
20 Commits
e479114cf0
...
41d1e3b289
Author | SHA1 | Date |
---|---|---|
|
41d1e3b289 | |
|
12f823fe5a | |
|
86f07b2f2f | |
|
c49e214591 | |
|
0daecbd624 | |
|
5075e7395d | |
|
a79347d339 | |
|
de1e2c0664 | |
|
8207df2b2e | |
|
babf80b5ab | |
|
a4879c929c | |
|
9bb14c4e03 | |
|
852e57d800 | |
|
ef149dcad8 | |
|
c36e9347a6 | |
|
0834fd3bc9 | |
|
678778ba2c | |
|
8e74403bc4 | |
|
211518e098 | |
|
0079c31e14 |
|
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||
=> https://keepachangelog.com/en/1.0.0/ The format is based on keep a Changelog.
|
||||
=> https://semver.org/spec/v2.0.0.html And this project adheres to Semantic Versioning.
|
||||
|
||||
## [1.5.0] - 2022-08-23
|
||||
* Adds the Lagrange style, thanks to Eric <ortie10 at gmx.fr>
|
||||
* Adds circumlunar css
|
||||
* Removes the page-specific CSS
|
||||
* Rewrites the documentation
|
||||
|
||||
## [1.4.1] - 2022-08-02
|
||||
* Adds link to /htmgem on the icon of the menu
|
||||
* Fixes bug about CSS not applied correctly
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
/* Copied from https://gemini.circumlunar.space 2022-08-01 */
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
font-size:16px;
|
||||
line-height:1.6;
|
||||
color:#1E4147;
|
||||
background-color:#AAC789;
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 920px;
|
||||
margin: 0 auto;
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
h1,h2,h3{
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: #eee;
|
||||
border-left: 3px solid #444;
|
||||
margin: 1rem -1rem 1rem calc(-1rem - 3px);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li:not(:last-child) {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
color:#AA2E00;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #802200;
|
||||
}
|
||||
|
||||
/*
|
||||
a:before {
|
||||
content: '⇒';
|
||||
color:#AA2E00;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1.25rem;
|
||||
}
|
||||
*/
|
||||
|
||||
pre {
|
||||
background-color: #eee;
|
||||
margin: 0 -1rem;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
details:not([open]) summary,
|
||||
details:not([open]) summary a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
details summary a:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dl dt:not(:first-child) {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
@media(prefers-color-scheme:dark) {
|
||||
html {
|
||||
background-color: #111;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0087BD;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #802200;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
input {
|
||||
display: block;
|
||||
border: 1px solid #888;
|
||||
padding: .375rem;
|
||||
line-height: 1.25rem;
|
||||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 0;
|
||||
border-color: #80bdff;
|
||||
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
|
||||
}
|
||||
|
||||
|
||||
/* Additions for HtmGem */
|
||||
|
||||
.menu a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu hr {
|
||||
color: red;
|
||||
}
|
||||
|
|
@ -1,20 +1,22 @@
|
|||
# Styles
|
||||
|
||||
=> index.gmi|htmgem htmgem.css
|
||||
=> index.gmi|none None
|
||||
=> index.gmi|terminal terminal.css
|
||||
=> index.gmi|black_wide black_wide.css
|
||||
=> index.gmi|simple simple.css
|
||||
=> index.gmi|raw raw.css
|
||||
=> index.gmi|debug debug.css
|
||||
=> index.gmi|pre Source code
|
||||
=> index.gmi|default,htmgem.css default/htmgem.css
|
||||
=> index.gmi|default,base.css default/base.css
|
||||
=> index.gmi|default,circumlunar.css default/circumlunar.css
|
||||
=> index.gmi|lagrange,lagrange.css lagrange/lagrange.css
|
||||
=> index.gmi|default,terminal.css default/terminal.css
|
||||
=> index.gmi|default,black_wide.css default/black_wide.css
|
||||
=> index.gmi|default,simple.css default/simple.css
|
||||
=> index.gmi|default,raw.css default/raw.css
|
||||
=> index.gmi|default,debug.css default/debug.css
|
||||
=> index.gmi|src Source code
|
||||
=> index.gmi|source Download source code
|
||||
|
||||
Lorem ipsum dolor sit amet.
|
||||
//Lorem// **ipsum** __dolor__ ~~sit amet~~.
|
||||
|
||||
* ligne un de liste non ordonnée
|
||||
* ligne deux de liste non ordonnée
|
||||
* 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
* 2 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
|
||||
> Citation : Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
|
@ -29,11 +31,11 @@ Lorem ipsum dolor sit amet.
|
|||
|| ||
|
||||
```
|
||||
|
||||
# Titre 1
|
||||
# 1 1 1 1 1 1
|
||||
|
||||
## Titre 2
|
||||
## 2 2 2 2 2 2
|
||||
|
||||
### Titre 3
|
||||
### 3 3 3 3 3 3
|
||||
|
||||
=> https://gmi.sbgodin.fr
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,433 @@
|
|||
/*-----------------------
|
||||
|
||||
----------------
|
||||
- Lagrange -
|
||||
----------------
|
||||
|
||||
a template for htmGem
|
||||
|
||||
based on
|
||||
|
||||
https://github.com/skyjake/lagrange
|
||||
|
||||
----------------------------*/
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: nunito;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Nunito Bold'), url(Nunito-Bold.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Mada'), url(Mada-Regular.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
src: url(SourceSansPro-Italic.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: bold;
|
||||
font-weight: 800;
|
||||
src: local('Mada Bold'), url(Mada-Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: mycourier;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Courier'), url(courier.ttf) format('truetype');
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto Mono;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto Mono'), url(RobotoMono.ttf) format('truetype');
|
||||
}
|
||||
|
||||
|
||||
|
||||
body {
|
||||
font-family: "Mada", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 1.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-right: 0em;
|
||||
padding-right: 0em;
|
||||
}
|
||||
.menu-line {
|
||||
font-size: 105%;
|
||||
padding: 1.8em;
|
||||
}
|
||||
|
||||
|
||||
#gmi {
|
||||
max-width: 1024px;
|
||||
margin: auto;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.menu li {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
.menu li::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 2.5em;
|
||||
margin-right: 0.5em;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.05em;
|
||||
}
|
||||
|
||||
p:empty {
|
||||
margin-top: 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
|
||||
|
||||
li, ul {
|
||||
margin: 0 0 0.3em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
h1, h2, h3 {
|
||||
font-family: "Nunito", sans-serif;
|
||||
margin: 0 0 0.0em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1 {
|
||||
font-size: 2.2em;
|
||||
font-weight: 400;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.8em;
|
||||
font-weight: 600;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
h2 span.par-edit {
|
||||
visibility: hidden;
|
||||
font-size: x-small;
|
||||
}
|
||||
h2:hover span.par-edit {
|
||||
visibility: visible;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.6em;
|
||||
font-weight: 700;
|
||||
margin-left: 1em;
|
||||
}
|
||||
h4 {
|
||||
margin-left: 2em;
|
||||
}
|
||||
.link-icon {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
font-family: Symbola;
|
||||
text-indent: 0;
|
||||
}
|
||||
div.link {
|
||||
text-indent: -1.5em;
|
||||
padding-left: 1.5em;
|
||||
margin-top: 0.15em;
|
||||
margin-bottom: 0.15em;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
ol {
|
||||
margin-left: 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
ul li, ol li {
|
||||
margin-top: 5pt;
|
||||
margin-bottom: 5pt;
|
||||
}
|
||||
ul li::before {
|
||||
content: "•";
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 1.1em;
|
||||
margin-left: -1.1em;
|
||||
}
|
||||
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
padding-left: 0.75em;
|
||||
font-size: 100%;
|
||||
font-size: 1em;
|
||||
/*border-left: 1px solid #c38b16;
|
||||
*/
|
||||
margin-left: 1em;
|
||||
/* margin-right: 3em;*/
|
||||
margin-top: -1em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
blockquote:before {
|
||||
content: '“';
|
||||
font-weight: bold;
|
||||
font-size: 2.6em;
|
||||
line-height: 0.1em;
|
||||
/*vertical-align: -0.4em;*/
|
||||
margin-top: -2em;
|
||||
position: relative;
|
||||
top: 0.85em;
|
||||
left: 0.2em;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: Roboto Mono, monospace;
|
||||
font-size: 0.9em;
|
||||
margin-left: 2.8em;
|
||||
margin-bottom: 0.05em;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.menu:nth-of-type(1) .menu-line {
|
||||
text-align: left;
|
||||
}
|
||||
.menu:nth-of-type(3) .menu-line {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.menu hr {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#gmi a {
|
||||
margin: -1.5em;
|
||||
}
|
||||
#gmi a:before {
|
||||
content: "🔗 ";
|
||||
}
|
||||
#gmi a:visited {
|
||||
font-weight: normal;
|
||||
/* doesn't work */
|
||||
}
|
||||
|
||||
|
||||
#gmi a.local:before {
|
||||
content: "➤️ ";
|
||||
font-weight: bold;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.local:visited {
|
||||
font-weight: normal;
|
||||
}
|
||||
#gmi a.gemini:before {
|
||||
content: "➤️ ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#gmi a.gopher:before {
|
||||
content: "📜 ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#gmi a.https:before {
|
||||
content: "🌐 ";
|
||||
font-weight: bolder;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.http:before {
|
||||
content: "🌐 ";
|
||||
font-weight: lighter;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.mumble:before {
|
||||
content: "🎤 ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.mailto:before {
|
||||
content: "✉️ ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
/* Responsivity */
|
||||
@media only screen and (max-width: 499px) and (orientation: portrait) {
|
||||
body {
|
||||
font-size: 1.2em;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.9em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 200%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 160%;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 140%;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 1.5em ;
|
||||
}
|
||||
|
||||
blockquote:before {
|
||||
position: relative;
|
||||
top: 0.85em;
|
||||
left: -0.3em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 0.7em ;
|
||||
}
|
||||
|
||||
#gmi a {
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
filter: invert(100%) hue-rotate(180deg);
|
||||
}
|
||||
html {
|
||||
background-color: #111;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Orange / sepia Colors (for lagrange.css) */
|
||||
|
||||
|
||||
html, body {
|
||||
background: #f5ebd6;
|
||||
color: #192715;
|
||||
}
|
||||
blockquote, pre {
|
||||
/*background: #ede3d0;
|
||||
*/
|
||||
color: #d2780a;
|
||||
}
|
||||
h1 a {
|
||||
color: #eeeeee;
|
||||
font-weight: 800;
|
||||
}
|
||||
h1 {
|
||||
color: #d2780a;
|
||||
font-weight: 800;
|
||||
}
|
||||
h2, h3 {
|
||||
color: #693c05;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a6e82;
|
||||
}
|
||||
a {
|
||||
color: #693c05;
|
||||
}
|
||||
|
||||
ul li::before {
|
||||
color: #503909;
|
||||
}
|
||||
|
||||
|
||||
blockquote:before {
|
||||
color: #e5b77a;
|
||||
}
|
||||
|
||||
.menu-line {
|
||||
background-color: #efd9b7;
|
||||
}
|
||||
.menu-line h1 a {
|
||||
color: #262626;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.menu a, .menu a:visited {
|
||||
#color: #888;
|
||||
}
|
||||
.menu a:hover {
|
||||
#color: #000;
|
||||
}
|
||||
|
||||
#gmi a:before {
|
||||
color: #d2780a;
|
||||
}
|
||||
|
||||
#gmi a:visited {
|
||||
color: #a25707;
|
||||
}
|
||||
|
||||
#gmi a:hover {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.local:before {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.gemini:before {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.https:before {
|
||||
color: #d2780a;
|
||||
}
|
||||
#gmi a.http:before {
|
||||
color: #d2780a;
|
||||
}
|
|
@ -0,0 +1,433 @@
|
|||
/*-----------------------
|
||||
|
||||
----------------
|
||||
- Lagrange -
|
||||
----------------
|
||||
|
||||
a template for htmGem
|
||||
|
||||
based on
|
||||
|
||||
https://github.com/skyjake/lagrange
|
||||
|
||||
----------------------------*/
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: nunito;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Nunito Bold'), url(Nunito-Bold.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Mada'), url(Mada-Regular.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
src: url(SourceSansPro-Italic.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: Mada;
|
||||
font-style: bold;
|
||||
font-weight: 800;
|
||||
src: local('Mada Bold'), url(Mada-Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: mycourier;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Courier'), url(courier.ttf) format('truetype');
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto Mono;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto Mono'), url(RobotoMono.ttf) format('truetype');
|
||||
}
|
||||
|
||||
|
||||
|
||||
body {
|
||||
font-family: "Mada", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 1.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-right: 0em;
|
||||
padding-right: 0em;
|
||||
}
|
||||
.menu-line {
|
||||
font-size: 105%;
|
||||
padding: 1.8em;
|
||||
}
|
||||
|
||||
|
||||
#gmi {
|
||||
max-width: 1024px;
|
||||
margin: auto;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.menu li {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
.menu li::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 2.5em;
|
||||
margin-right: 0.5em;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.05em;
|
||||
}
|
||||
|
||||
p:empty {
|
||||
margin-top: 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
|
||||
|
||||
li, ul {
|
||||
margin: 0 0 0.3em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
h1, h2, h3 {
|
||||
font-family: "Nunito", sans-serif;
|
||||
margin: 0 0 0.0em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1 {
|
||||
font-size: 2.2em;
|
||||
font-weight: 400;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.8em;
|
||||
font-weight: 600;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
h2 span.par-edit {
|
||||
visibility: hidden;
|
||||
font-size: x-small;
|
||||
}
|
||||
h2:hover span.par-edit {
|
||||
visibility: visible;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.6em;
|
||||
font-weight: 700;
|
||||
margin-left: 1em;
|
||||
}
|
||||
h4 {
|
||||
margin-left: 2em;
|
||||
}
|
||||
.link-icon {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
font-family: Symbola;
|
||||
text-indent: 0;
|
||||
}
|
||||
div.link {
|
||||
text-indent: -1.5em;
|
||||
padding-left: 1.5em;
|
||||
margin-top: 0.15em;
|
||||
margin-bottom: 0.15em;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
ol {
|
||||
margin-left: 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
ul li, ol li {
|
||||
margin-top: 5pt;
|
||||
margin-bottom: 5pt;
|
||||
}
|
||||
ul li::before {
|
||||
content: "•";
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 1.1em;
|
||||
margin-left: -1.1em;
|
||||
}
|
||||
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
padding-left: 0.75em;
|
||||
font-size: 100%;
|
||||
font-size: 1em;
|
||||
/*border-left: 1px solid #c38b16;
|
||||
*/
|
||||
margin-left: 1em;
|
||||
/* margin-right: 3em;*/
|
||||
margin-top: -1em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
blockquote:before {
|
||||
content: '“';
|
||||
font-weight: bold;
|
||||
font-size: 2.6em;
|
||||
line-height: 0.1em;
|
||||
/*vertical-align: -0.4em;*/
|
||||
margin-top: -2em;
|
||||
position: relative;
|
||||
top: 0.85em;
|
||||
left: 0.2em;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: Roboto Mono, monospace;
|
||||
font-size: 0.9em;
|
||||
margin-left: 2.8em;
|
||||
margin-bottom: 0.05em;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.menu:nth-of-type(1) .menu-line {
|
||||
text-align: left;
|
||||
}
|
||||
.menu:nth-of-type(3) .menu-line {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.menu hr {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#gmi a {
|
||||
margin: -1.5em;
|
||||
}
|
||||
#gmi a:before {
|
||||
content: "🔗 ";
|
||||
}
|
||||
#gmi a:visited {
|
||||
font-weight: normal;
|
||||
/* doesn't work */
|
||||
}
|
||||
|
||||
|
||||
#gmi a.local:before {
|
||||
content: "➤️ ";
|
||||
font-weight: bold;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.local:visited {
|
||||
font-weight: normal;
|
||||
}
|
||||
#gmi a.gemini:before {
|
||||
content: "➤️ ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#gmi a.gopher:before {
|
||||
content: "📜 ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#gmi a.https:before {
|
||||
content: "🌐 ";
|
||||
font-weight: bolder;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.http:before {
|
||||
content: "🌐 ";
|
||||
font-weight: lighter;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.mumble:before {
|
||||
content: "🎤 ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#gmi a.mailto:before {
|
||||
content: "✉️ ";
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
/* Responsivity */
|
||||
@media only screen and (max-width: 499px) and (orientation: portrait) {
|
||||
body {
|
||||
font-size: 1.2em;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.9em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 200%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 160%;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
-webkit-text-size-adjust: 140%;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 1.5em ;
|
||||
}
|
||||
|
||||
blockquote:before {
|
||||
position: relative;
|
||||
top: 0.85em;
|
||||
left: -0.3em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 0.7em ;
|
||||
}
|
||||
|
||||
#gmi a {
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
filter: invert(100%) hue-rotate(180deg);
|
||||
}
|
||||
html {
|
||||
background-color: #111;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Grey Colors (for lagrange.css) */
|
||||
|
||||
|
||||
html, body {
|
||||
background: #cecece;
|
||||
color: #343434;
|
||||
}
|
||||
blockquote, pre {
|
||||
/*background: #ede8de;
|
||||
*/
|
||||
color: #6e4900;
|
||||
}
|
||||
h1 a {
|
||||
color: #009966;
|
||||
font-weight: 800;
|
||||
}
|
||||
h1 {
|
||||
color: #009966;
|
||||
font-weight: 800;
|
||||
}
|
||||
h2, h3 {
|
||||
color: #005b3d;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a6e82;
|
||||
}
|
||||
a {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
ul li::before {
|
||||
color: #503909;
|
||||
}
|
||||
|
||||
|
||||
blockquote:before {
|
||||
color: #a29271;
|
||||
}
|
||||
|
||||
.menu-line {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
.menu-line h1 a {
|
||||
color: #005035;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.menu a, .menu a:visited {
|
||||
#color: #888;
|
||||
}
|
||||
.menu a:hover {
|
||||
#color: #000;
|
||||
}
|
||||
|
||||
#gmi a:before {
|
||||
color: #d2780a;
|
||||
}
|
||||
|
||||
#gmi a:visited {
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
#gmi a:hover {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.local:before {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.gemini:before {
|
||||
color: #0a6e82;
|
||||
}
|
||||
|
||||
#gmi a.https:before {
|
||||
color: #d2780a;
|
||||
}
|
||||
#gmi a.http:before {
|
||||
color: #d2780a;
|
||||
}
|
110
docs/BNF-fr.gmi
110
docs/BNF-fr.gmi
|
@ -1,110 +0,0 @@
|
|||
# BNF
|
||||
### Backus-Naur Form
|
||||
=> https://fr.wikipedia.org/wiki/Forme_de_Backus-Naur Wikipedia / BNF
|
||||
|
||||
Le but de ce document est de montrer la BNF que HtmGem utilise et la façon dont il détermine le type de ligne et quelles informations il en tire. Pour cela, il utilise des **accolades** pour montrer explicitement quelles informations il prend. De plus, la **forme canonique** montre comment ça devrait être affiché.
|
||||
|
||||
———————————————————— ✀ ————————————————————
|
||||
|
||||
textgemini = *(link / preformat / heading / ulist / quoted / plain)
|
||||
; Preformat toggle starts as 'false'.
|
||||
|
||||
plain = **{[WSP] text} [WSP]** end-of-line
|
||||
; If preformat toggle is false, wrap text to the
|
||||
; width of the display. Otherwise, do no wrapping.
|
||||
; canonical form = {[WSP] text}
|
||||
|
||||
preformat = "```" **[WSP]** [{alt-text}] **[WSP]** end-of-line
|
||||
; Preformat toggle set to opposite state:
|
||||
; false goes to true
|
||||
; true goes to false
|
||||
; While in preformat toggle is true, link, heading,
|
||||
; ulist and quoted lines are NOT interpreted, but
|
||||
; displayed as is to the user.
|
||||
; canonical form = ``` [SP {alt-text}]
|
||||
|
||||
link = '=>' **[WSP]** [{URI-reference}] [**[WSP]** {text}] end-of-line
|
||||
; canonical form = '=>' SP {uri-reference} [SP {text}]
|
||||
|
||||
heading = '#' **[WSP]** [{text}] **[WSP]** end-of-line
|
||||
/ '##' **[WSP]** {text} **[WSP]** end-of-line
|
||||
/ '###' **[WSP]** {text} **[WSP]** end-of-line
|
||||
; canonical form = ('#' / '##' / '###') [SP {text}]
|
||||
|
||||
ulist = '*' **[WSP]** {text} **[WSP]** end-of-line
|
||||
; canonical form = '*' SP {text}
|
||||
|
||||
quoted = '>' **[WSP]** {text} **[WSP]** end-of-line
|
||||
; canonical form = '>' SP {text}
|
||||
|
||||
alt-text = text
|
||||
text = ***UVCHAR**
|
||||
end-of-line = [CR] LF
|
||||
|
||||
UVCHAR = VCHAR / UTF8-2v / UTF8-3 / UTF8-4
|
||||
UTF8-2v = %xC2 %xA0-BF UTF8-tail ; no C1 control set
|
||||
/ %xC3-DF UTF8-tail
|
||||
|
||||
; CRLF from RFC-5234
|
||||
; DIGIT from RFC-5234
|
||||
; SP from RFC-5234
|
||||
; VCHAR from RFC-5234
|
||||
; OCTET from RFC-5234
|
||||
; WSP from RFC-5234
|
||||
;
|
||||
; UTF8-3 from RFC-3629
|
||||
; UTF8-4 from RFC-3629
|
||||
; UTF8-tail from RFC-3629
|
||||
|
||||
———————————————————— ✀ ————————————————————
|
||||
|
||||
Cette BNF a été adaptée à l’implémentation de HtmGem depuis la version du groupe de travail.
|
||||
=> https://gitlab.com/gemini-specification/gemini-text/-/issues/7 Gitlab / Original ticket
|
||||
|
||||
Changements :
|
||||
* gestion des espaces blancs
|
||||
* capture du texte {}
|
||||
* forme canonique
|
||||
|
||||
Les espaces blancs terminant une ligne ne sont jamais utilisés. Voir la définition de //text// dans la BNF, qui ne contient plus //SP//.
|
||||
|
||||
# Exemples
|
||||
|
||||
## => liens
|
||||
|
||||
### Lien normal
|
||||
> link = '=>' [WSP] [{URI-reference}] [[WSP] {text}] end-of-line
|
||||
> ; canonical form = '=>' SP {uri-reference} [SP {text}]
|
||||
|
||||
Source: => foo.invalid text of the link
|
||||
Data: '=>' {'foo.invalid'} {'text of the link'}
|
||||
Canonical: => foo.invalid text of the link
|
||||
Html: <a href="foo.invalid">text of the link</a>
|
||||
|
||||
Source: =>foo.invalid text of the link
|
||||
Data: '=>' {'foo.invalid'} {'text of the link'}
|
||||
Canonical: => foo.invalid text of the link
|
||||
Html: <a href="foo.invalid">text of the link</a>
|
||||
|
||||
Source: => just_a_page
|
||||
Data: '=>' {'just_a_page'} {}
|
||||
Canonical: => just_a_page
|
||||
Html: <a href="just_a_page">just_a_page</a>
|
||||
|
||||
Source: =>
|
||||
Data: '=>' {''} {''}
|
||||
Canonical: =>
|
||||
Html: <a href=""> </a>
|
||||
|
||||
## # En-têtes
|
||||
> heading = '#' **[WSP]** [{text}] **[WSP]** end-of-line
|
||||
> (…)
|
||||
> ; canonical form = ('#' / '##' / '###') [SP {text}]
|
||||
|
||||
Source: #title
|
||||
Data: '#' {"title"}
|
||||
Canonical: # title
|
||||
|
||||
Source: # title with two spaces between title and with
|
||||
Data: '#' {"title with spaces"}
|
||||
Canonical: # title with two spaces between title and with
|
|
@ -1,63 +0,0 @@
|
|||
# Advanced configuration
|
||||
❗️ This page works with URL rewriting enabled ❗️
|
||||
|
||||
By default, the same style is used for all the pages, //htmgem/css/htmgem.css//, except when a file having the same name as the page but with the extension **.css** exists in the same directory. In such as case, it's used.
|
||||
|
||||
When the CSS option is activated in the configuration (see /rewrite// below) other behaviors are possible. **Beware**, it won't work with a Gemini client as HtmGem is only reachable with a web browser.
|
||||
* &style=**htmgem** : Uses the default style.
|
||||
* &style=**none** : The page HTML is sent without style.
|
||||
* &style=**<autre nom>** : The file htmgem/css/<autre nom>.css is used as a style.
|
||||
* &style=**/<path>** : The provided file (absolute path) is used as a style.
|
||||
* &style=**source** : The source code of the page is sent to the browser, see below…
|
||||
* &style=**pre** : The source code of the page is sent to the browser enclosed in //<pre>//, see below…
|
||||
|
||||
## URL rewriting to set the style to use
|
||||
|
||||
Modifying the web server configuration works but it's rather heavy. It's possible to test a particular style this way:
|
||||
> https://site.tld/htmgem/index.php?url=/url/page.gmi&style=<…>
|
||||
|
||||
It's also possible to make a URL rewriting which incorporate the style:
|
||||
> rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1;
|
||||
> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/index.php?rw=1&url=$1&style=$2;
|
||||
|
||||
For instance, when it's activated:
|
||||
=> configuration-en.gmi%20|%20pre Shows the readable source code on the screen, using the markup **<pre>**.
|
||||
=> configuration-en.gmi%20|%20source configuration-en.gmi | source : Downloads the source code.
|
||||
|
||||
### With style already included…
|
||||
|
||||
=> configuration-en.gmi%20|%20htmgem Style //HtmGem//, the default style
|
||||
=> configuration-en.gmi%20|%20none Style //none//
|
||||
=> configuration-en.gmi%20|%20terminal Style //terminal//
|
||||
=> configuration-en.gmi%20|%20black_wide Style //black wide//
|
||||
=> configuration-en.gmi%20|%20simple Style //simple//
|
||||
=> configuration-en.gmi%20|%20raw Style //raw//
|
||||
=> configuration-en.gmi%20|%20debug Style //debug//
|
||||
|
||||
=> ../css Style selector: the page containing the style allows to test them 😎
|
||||
|
||||
## Text decoration
|
||||
|
||||
The text decoration, which interprets the **bold** for instance, is not part of GemText definition. The text decoration applies everywhere except on the titles and preformated texts.
|
||||
|
||||
### Disable the text decoration
|
||||
|
||||
It's possible to:
|
||||
* disable and enable the text decoration with a line **^^^**,
|
||||
* add what follows to the URL **rewriting**:
|
||||
> &textDecoration=0
|
||||
|
||||
## BNF / Syntax
|
||||
|
||||
HtmGem uses a precise implementation of the GemText BNF. It indicates exactly what text portions are to be used.
|
||||
=> BNF-en.gmi BNF
|
||||
|
||||
=> tutogemtext-en.gmi How to build GemText pages?
|
||||
|
||||
———————————————————— ————————————————————
|
||||
|
||||
Amongst the distributed files and directories, only the ones below are useful for HtmGem:
|
||||
* **htmgem/*.php** : These files translate the GemText to HTML.
|
||||
* **htmgem/css/htmgem.css** : If it's missing, the display will be without style — literally.
|
||||
* **htmgem/css/…** : Keep the styles you use.
|
||||
The others can be deleted (included this present file //configuration-en.gmi//) although they are not harmful.
|
|
@ -1,63 +0,0 @@
|
|||
# Configuration avancée
|
||||
❗️ Cette page fonctionne avec la réécriture d’URL activée ❗️
|
||||
|
||||
Par défaut, le même style est utilisé pour toutes les pages, //htmgem/css/htmgem.css//, sauf lorsqu’un fichier ayant le même nom que la page mais avec l’extension **.css** existe dans le même répertoire. Dans ce cas, il est utilisé.
|
||||
|
||||
Lorsque l’option css est activé dans la configuration (voir //rewrite// plus bas) d’autres comportements sont possibles. **Attention**, cela ne fonctionnera pas avec un client Gemini puisque HtmGem n’est accessible que via un navigateur web.
|
||||
* &style=**htmgem** : Utilise le style par défaut.
|
||||
* &style=**none** : La page HTML est envoyée sans style.
|
||||
* &style=**<autre nom>** : Le fichier htmgem/css/<autre nom>.css est utilisé en tant que style.
|
||||
* &style=**/<path>** : Le fichier indiqué (chemin absolu) est utilisé en tant que style.
|
||||
* &style=**source** : Le code source de la page est envoyée au navigateur, voir ci-après…
|
||||
* &style=**pre** : Le code source de la page est envoyée au navigateur encadré par des //<pre>//, voir ci-après…
|
||||
|
||||
## Réécriture d’URL pour préciser le style à utiliser
|
||||
|
||||
Modifier la configuration du serveur web fonctionne mais est assez lourd. On peut tester un style en particulier de la façon suivante :
|
||||
> https://site.tld/htmgem/index.php?url=/url/page.gmi&style=<…>
|
||||
|
||||
Il est aussi possible de faire une réécriture d’URL qui intègre le style :
|
||||
> rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1;
|
||||
> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/index.php?rw=1&url=$1&style=$2;
|
||||
|
||||
Par exemple, lorsque ce sera activé :
|
||||
=> configuration-fr.gmi%20|%20pre Produit le code source de façon lisble à l’écran en utilisant la balise **<pre>**.
|
||||
=> configuration-fr.gmi%20|%20source configuration-fr.gmi | source : Téléverse le code source.
|
||||
|
||||
### Avec les styles déjà fournis…
|
||||
|
||||
=> configuration-fr.gmi%20|%20htmgem Style //HtmHem//, le style par défaut
|
||||
=> configuration-fr.gmi%20|%20none Style //none//
|
||||
=> configuration-fr.gmi%20|%20terminal Style //terminal//
|
||||
=> configuration-fr.gmi%20|%20black_wide Style //black wide//
|
||||
=> configuration-fr.gmi%20|%20simple Style //simple//
|
||||
=> configuration-fr.gmi%20|%20raw Style //brut//
|
||||
=> configuration-fr.gmi%20|%20debug Style //debug//
|
||||
|
||||
=> ../css Sélecteur de style : la page contenant les styles permet de les essayer 😎
|
||||
|
||||
## Décoration du texte
|
||||
|
||||
La décoration du texte, qui interprête le **gras** par exemple, ne fait pas partie de la définition de GemText. La décoration du texte s’applique partout sauf sur les titres et blocs préformatés.
|
||||
|
||||
### Désactiver la décoration du texte
|
||||
|
||||
On peut :
|
||||
* désactiver et activer la décoration du texte avec une ligne **^^^**,
|
||||
* ajouter ce qui suit à la **réécriture** d’URL :
|
||||
> &textDecoration=0
|
||||
|
||||
## BNF / Syntax
|
||||
|
||||
HtmGem utilise une implémentation précise de la BNF de GemText. Il indique exactement quelle portions de texte doivent être utilisées.
|
||||
=> BNF-fr.gmi BNF
|
||||
|
||||
=> tutogemtext-fr.gmi Comment faire des pages GemText ?
|
||||
|
||||
———————————————————— ————————————————————
|
||||
|
||||
Parmi les fichiers et répertoires distribués, seuls sont utiles pour le fonctionnement de HtmGem :
|
||||
* **htmgem/*.php** : Ces fichiers se chargent de traduire le GemText en HTML.
|
||||
* **htmgem/css/htmgem.css** : S’il manque, l’affichage sera dépourvu de style — littéralement.
|
||||
* **htmgem/css/…** : Conservez les styles que vous utilisez.
|
||||
Les autres peuvent être supprimés (y compris ce présent fichier //configuration-fr.gmi//) bien qu’ils ne présentent aucun danger.
|
|
@ -1,9 +1,14 @@
|
|||
# Developers' documentation
|
||||
|
||||
=> BNF-en.gmi BNF / Backus-Naur Form
|
||||
# Documentation
|
||||
|
||||
=> https://gmi.sbgodin.fr/htmgem Project main page
|
||||
=> https://tildegit.org/Sbgodin/htmgem Source code, comments
|
||||
=> https://gemini.circumlunar.space Main Gemini capsule
|
||||
|
||||
=> ../CHANGELOG.gmi Change log
|
||||
=> ../COPYING.gmi Licence Gnu Affero General Public License v3 — 19 november 2007
|
||||
=> ../COPYING.gmi License Gnu Affero General Public License v3 — 19 november 2007
|
||||
=> BNF.gmi BNF / Backus-Naur Form
|
||||
=> specification_Gemini_v0.16.1.gmi Specification Gemini v0.16.1 (no impact on HtmGem)
|
||||
=> specification_Gemini_v0.14.3.gmi Specification Gemini v0.14.3
|
||||
|
||||
=> ../css Styles 😎
|
||||
=> ../tests Tests 😅
|
||||
|
|
|
@ -1,42 +1,50 @@
|
|||
# HtmGem, installation
|
||||
# To install HtmGem
|
||||
|
||||
To run HtmGem — after having copied the files — there is nothing to do but to add the URL rewriting rules.
|
||||
* Download HtmGem
|
||||
=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip
|
||||
* Copy the files at the root of the website.
|
||||
* Configurer la réécriture d’URL (//URL Rewriting//).
|
||||
* Write some text in /index.gmi.
|
||||
* Just open your website!
|
||||
|
||||
## Prerequisites
|
||||
* Go to /htmgem to get the documentation.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* Php v7.3 minimum
|
||||
* Module **php-mbstring** to manage unicode
|
||||
* A web server (Apache and Nginx tested)
|
||||
* Module **mod-rewrite** to handle the Gemini pages
|
||||
|
||||
## Installation
|
||||
|
||||
### Download
|
||||
=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Stable version
|
||||
=> https://tildegit.org/Sbgodin/htmgem Project repository
|
||||
* Module **Php-mbstring** to handle l’unicode
|
||||
* A web server (Apache and Nginx supported)
|
||||
* Module **mod-rewrite** for the URL rewriting
|
||||
|
||||
### Nginx
|
||||
```
|
||||
# This text must be placed in the server's configuration
|
||||
index index.gmi index.php index.html
|
||||
rewrite ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1;
|
||||
rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1&style=default,htmgem.css;
|
||||
error_page 403 /htmgem;
|
||||
location = /favicon.ico { alias /var/www/dev/htmgem/favicon.ico; }
|
||||
```
|
||||
|
||||
### Apache
|
||||
```
|
||||
# This text can be placed at the root of the web site in a file ".htaccess".
|
||||
DirectoryIndex index.gmi index.php index.html
|
||||
RewriteEngine on
|
||||
RewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1
|
||||
rewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1&style=default,htmgem.css
|
||||
```
|
||||
|
||||
Afterwards,
|
||||
* When a file ends by **.gmi.** is asked, HtmGem will display it in the browser.
|
||||
* When only the directory is asked (http://site.tld/path) the file //index.gmi// will be automatically choosen.
|
||||
Other available styles:
|
||||
* style=lagrange,lagrange.css
|
||||
* style=lagrange,lagrange_gray.css
|
||||
* style=default,circumlunar.css
|
||||
* etc…
|
||||
|
||||
=> tutogemtext-en.gmi How to build GemText pages?
|
||||
## Text decoration
|
||||
|
||||
## Advanced configuration
|
||||
The text decoration, which interprets the bold for instance, is not part of GemText definition. The text decoration applies everywhere except on the titles and preformated texts.
|
||||
|
||||
Add additional styles as a link parameter or adapt the text decoration:
|
||||
=> configuration-en.gmi Advanced configuration
|
||||
It's possible to disable the text decoration with a line **^^^** or add to the URL rewriting:
|
||||
> &textDecoration=0
|
||||
|
||||
|
||||
=> ../css Styles
|
||||
|
||||
=> tutogemtext-en.gmi How to make GemText pages?
|
||||
|
|
|
@ -1,42 +1,50 @@
|
|||
# HtmGem, installation
|
||||
# Pour installer HtmGem
|
||||
|
||||
Pour faire fonctionner HtmGem — après avoir copié les fichiers — il ne reste qu’à ajouter les règles de réécriture d’URL (//URL Rewriting//).
|
||||
* Télécharger HtmGem
|
||||
=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip
|
||||
* Copier les fichiers à la racine du site.
|
||||
* Configurer la réécriture d’URL (//URL Rewriting//).
|
||||
* Écrire du texte dans /index.gmi.
|
||||
* Ouvrir la page du site!
|
||||
|
||||
* Accéder à /htmgem pour la documentation.
|
||||
|
||||
## Prérequis
|
||||
|
||||
* Php v7.3 minimum
|
||||
* Module **Php-mbstring** pour gérer l’unicode
|
||||
* Un serveur web (Apache et Nginx testés)
|
||||
* Module **mod-rewrite** pour prendre en charge les pages Gemini
|
||||
|
||||
## Installation
|
||||
|
||||
### Téléchargement
|
||||
=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Version stable
|
||||
=> https://tildegit.org/Sbgodin/htmgem Dépôt du projet
|
||||
* Un serveur web (Apache et Nginx supportés)
|
||||
* Module **mod-rewrite** pour la réécriture d’URL
|
||||
|
||||
### Nginx
|
||||
```
|
||||
# Ce texte doit être placé dans la configuration du serveur.
|
||||
index index.gmi index.php index.html
|
||||
rewrite ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1;
|
||||
rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1&style=default,htmgem.css;
|
||||
error_page 403 /htmgem;
|
||||
location = /favicon.ico { alias /var/www/dev/htmgem/favicon.ico; }
|
||||
```
|
||||
|
||||
### Apache
|
||||
```
|
||||
# Ce texte peut se placer à la racine du site dans un fichier ".htaccess".
|
||||
DirectoryIndex index.gmi index.php index.html
|
||||
RewriteEngine on
|
||||
RewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1
|
||||
rewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1&style=default,htmgem.css
|
||||
```
|
||||
|
||||
Par la suite,
|
||||
* Quand un fichier se terminant par **.gmi** sera demandé, HtmGem l’affichera dans le navigateur.
|
||||
* Quand seul le répertoire sera demandé (http://site.tld/path) le fichier //index.gmi// sera automatiquement choisi.
|
||||
Autres styles disponibles :
|
||||
* style=lagrange,lagrange.css
|
||||
* style=lagrange,lagrange_gray.css
|
||||
* style=default,circumlunar.css
|
||||
* etc…
|
||||
|
||||
## Décoration du texte
|
||||
|
||||
La décoration du texte, qui interprête le **gras** par exemple, ne fait pas partie de la définition de GemText. La décoration du texte s’applique partout sauf sur les titres et blocs préformatés.
|
||||
|
||||
On peut désactiver la décoration du texte avec une ligne **^^^** ou ajouter à la **réécriture** d’URL :
|
||||
> &textDecoration=0
|
||||
|
||||
|
||||
=> ../css Styles
|
||||
|
||||
=> tutogemtext-fr.gmi Comment faire des pages GemText ?
|
||||
|
||||
## Configuration avancée
|
||||
|
||||
Ajoutez des styles supplémentaires en paramètre de lien ou adaptez la décoration du texte :
|
||||
=> configuration-fr.gmi Configuration avancée
|
||||
|
|
|
@ -0,0 +1,355 @@
|
|||
```
|
||||
NOTE: this page was downloaded on 2021-03-04 from the original capsule
|
||||
gemini://gemini.circumlunar.space/docs/specification.gmi Gemini
|
||||
https://gemini.circumlunar.space/docs/specification.gmi Web
|
||||
```
|
||||
^^^
|
||||
|
||||
# Project Gemini
|
||||
|
||||
## Speculative specification
|
||||
|
||||
v0.14.3, November 29th 2020
|
||||
|
||||
This is an increasingly less rough sketch of an actual spec for Project Gemini. Although not finalised yet, further changes to the specification are likely to be relatively small. You can write code to this pseudo-specification and be confident that it probably won't become totally non-functional due to massive changes next week, but you are still urged to keep an eye on ongoing development of the protocol and make changes as required.
|
||||
|
||||
This is provided mostly so that people can quickly get up to speed on what I'm thinking without having to read lots and lots of old phlog posts and keep notes.
|
||||
|
||||
Feedback on any part of this is extremely welcome, please email solderpunk@posteo.net.
|
||||
|
||||
# 1 Overview
|
||||
|
||||
Gemini is a client-server protocol featuring request-response transactions, broadly similar to gopher or HTTP. Connections are closed at the end of a single transaction and cannot be reused. When Gemini is served over TCP/IP, servers should listen on port 1965 (the first manned Gemini mission, Gemini 3, flew in March '65). This is an unprivileged port, so it's very easy to run a server as a "nobody" user, even if e.g. the server is written in Go and so can't drop privileges in the traditional fashion.
|
||||
|
||||
## 1.1 Gemini transactions
|
||||
|
||||
There is one kind of Gemini transaction, roughly equivalent to a gopher request or a HTTP "GET" request. Transactions happen as follows:
|
||||
|
||||
C: Opens connection
|
||||
S: Accepts connection
|
||||
C/S: Complete TLS handshake (see section 4)
|
||||
C: Validates server certificate (see 4.2)
|
||||
C: Sends request (one CRLF terminated line) (see section 2)
|
||||
S: Sends response header (one CRLF terminated line), closes connection
|
||||
under non-success conditions (see 3.1 and 3.2)
|
||||
|