diff --git a/farfetched.php b/farfetched.php
index 5f2ae1e..e295f26 100644
--- a/farfetched.php
+++ b/farfetched.php
@@ -7,17 +7,24 @@ $gchange = new Gchange();
$javascripts['header'][] = 'lib/js/farfetched.js';
+$bodyIds = 'farfetched';
include_once('header.php');
?>
-
Envoi possible
-
+
+
+
+ Offres immatérielles
+
+
-Offres immatérielles
-
0) {
+
+ offerImg.src = 'data:' + (record._source.pictures[0].file._content_type) + ';base64,' + (record._source.pictures[0].file._content)
+
+ } else {
+
+ offerImg.src = 'themes/' + gameId + '/default-shippable.256.png'
+ }
+
+ offerImg.alt = record._source.title
+ offerImg.title = record._source.title
+
+ // offerLink.innerHTML = record._source.title
offerLink.href = 'https://www.gchange.fr/#/app/market/view/' + record._id + '/'
+ offerSpan.append(offerImg)
+ offerLink.append(offerSpan)
offerLi.append(offerLink)
- shippableElt.append(offerLi)
+ offersElt.append(offerLi)
}
}
-fetchImmaterial(30)
+function displayImmaterial (records) {
+
+ let offersElt = document.getElementById('immaterial-offers');
+
+ for (record of records) {
+
+ offerLi = document.createElement('li')
+
+ offerLink = document.createElement('a')
+
+ offerSpan = document.createElement('span')
+
+ offerImg = document.createElement('img')
+
+ if (record._source.picturesCount > 0) {
+
+ offerImg.src = 'data:' + (record._source.pictures[0].file._content_type) + ';base64,' + (record._source.pictures[0].file._content)
+
+ } else {
+
+ offerImg.src = 'themes/' + gameId + '/default-immaterial.256.png'
+ }
+
+ offerImg.alt = record._source.title
+ offerImg.title = record._source.title
+
+ // offerLink.innerHTML = record._source.title
+ offerLink.href = 'https://www.gchange.fr/#/app/market/view/' + record._id + '/'
+
+ offerSpan.append(offerImg)
+ offerLink.append(offerSpan)
+ offerLi.append(offerLink)
+ offersElt.append(offerLi)
+ }
+}
+
+fetchImmaterial(18)
.then(records => {
displayImmaterial(records.hits.hits)
@@ -259,7 +300,7 @@ fetchImmaterial(30)
console.error(error)
})
-fetchShippable(30)
+fetchShippable(18)
.then(records => {
displayShippable(records.hits.hits)
diff --git a/messenger.php b/messenger.php
index 436c87b..b549dcb 100644
--- a/messenger.php
+++ b/messenger.php
@@ -7,6 +7,8 @@ require_once('lib/Gchange.class.php');
require_once('lib/Jaklis.class.php');
require_once('lib/ErrorsHandler.class.php');
+$javascripts['header'][] = 'lib/js/messenger.js';
+
$gchange = new Gchange();
$messenger = new Messenger($gchange);
$fred = new Fred();
@@ -153,7 +155,9 @@ if (isset($_GET['penpal'])) {
-
+
+
+
';
}
diff --git a/themes/spationaute/css/dashboard.deco.css b/themes/spationaute/css/dashboard.deco.css
index 7a7a968..429778c 100644
--- a/themes/spationaute/css/dashboard.deco.css
+++ b/themes/spationaute/css/dashboard.deco.css
@@ -47,4 +47,10 @@
background-image: url('../img/dashboard-minelife.png');
background-size: cover;
+}
+
+#dashboard-tiddlywiki {
+
+ background-image: url('../img/dashboard-tiddlywiki.png');
+ background-size: cover;
}
\ No newline at end of file
diff --git a/themes/spationaute/css/dashboard.layout.css b/themes/spationaute/css/dashboard.layout.css
index 25b21d3..06f9723 100644
--- a/themes/spationaute/css/dashboard.layout.css
+++ b/themes/spationaute/css/dashboard.layout.css
@@ -1,7 +1,15 @@
+body#home header {
+
+ font-size: 2rem;
+ text-align: center;
+ margin-top: 2rem;
+ margin-bottom: 3rem;
+}
+
body#home nav {
display: flex;
- align-items: center;
+ align-items: flex-start;
height: 100vh;
}
@@ -16,6 +24,13 @@ body#home nav ul {
flex-wrap: wrap;
}
+body#home nav ul > * {
+
+ margin-bottom: 3rem;
+ margin-left: 5vw;
+ margin-right: 5vw;
+}
+
#dashboard-map {
border-radius: 12.5vw;
@@ -24,7 +39,8 @@ body#home nav ul {
#dashboard-map a span,
#dashboard-messenger a span,
#dashboard-farfetched a span,
-#dashboard-minelife a span {
+#dashboard-minelife a span ,
+#dashboard-tiddlywiki a span {
display: none;
}
@@ -32,10 +48,11 @@ body#home nav ul {
#dashboard-map a,
#dashboard-messenger a,
#dashboard-farfetched a,
-#dashboard-minelife a {
+#dashboard-minelife a ,
+#dashboard-tiddlywiki a {
- width: 20vw;
- height: 20vw;
+ width: 15vw;
+ height: 15vw;
display: block;
}
diff --git a/themes/spationaute/css/deco.css b/themes/spationaute/css/deco.css
index 0088615..192e8d9 100644
--- a/themes/spationaute/css/deco.css
+++ b/themes/spationaute/css/deco.css
@@ -341,6 +341,10 @@ body#sonar {
color: hsl(132.2, 59.8%, 75.2%);
}
+#messenger-page #conversations-list {
+
+ background-color: hsl(0, 27.8%, 12.1%);
+}
#messenger-page #conversations-list .conversation time {
@@ -368,4 +372,21 @@ body#sonar {
#messenger-page #conversations-list .conversation:hover {
background-color: hsl(0, 27.8%, 24.2%);
-}
\ No newline at end of file
+}
+
+#messenger-page #conversation form,
+#messenger-page #conversation textarea {
+
+ background-color: hsl(0, 50.8%, 95.1%);
+}
+
+#messenger-page #conversation textarea,
+#messenger-page #conversation .submit-button-wrapper input {
+
+ font-size: 1.5rem;
+}
+
+#messenger-page #conversation .submit-button-wrapper input {
+
+ background-color: transparent;
+}
diff --git a/themes/spationaute/css/farfetched.layout.css b/themes/spationaute/css/farfetched.layout.css
new file mode 100644
index 0000000..1b9bdd2
--- /dev/null
+++ b/themes/spationaute/css/farfetched.layout.css
@@ -0,0 +1,75 @@
+body#farfetched main {
+
+ display: flex;
+ justify-content: space-evenly;
+ margin-top: 1.5rem;
+}
+
+
+body#farfetched main > section h2 {
+
+ text-align: center;
+ background-color: white;
+ color: black;
+ margin-top: 0;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+}
+body#farfetched main > section {
+
+ width: 48%;
+ /*overflow: hidden;*/
+ border: 0.125rem;
+
+ border-style: solid;
+ border-color: white;
+}
+
+body#farfetched main > section ul {
+
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+body#farfetched main > section ul li {
+
+ margin: 0;
+ padding: 0;
+}
+
+body#farfetched main > section .offers-list {
+
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+}
+
+
+
+body#farfetched main > section .offers-list > * {
+
+ margin: 0.5rem;
+
+}
+
+body#farfetched main > section .offers-list a {
+
+ display: block;
+ width: 5rem;
+ height: 5rem;
+
+ overflow: hidden;
+}
+
+body#farfetched main > section .offers-list a span {
+
+ display: block;
+
+ overflow: visible;
+}
+
+body#farfetched main > section .offers-list a span img {
+
+ width: 100%;
+}
\ No newline at end of file
diff --git a/themes/spationaute/css/layout.css b/themes/spationaute/css/layout.css
index a4e50ad..658dc26 100644
--- a/themes/spationaute/css/layout.css
+++ b/themes/spationaute/css/layout.css
@@ -223,15 +223,21 @@ main {
+
+#messenger-page > footer {
+ display: none;
+}
+
#messenger-page main {
display: flex;
+ height: 100vh;
}
#messenger-page #conversations-list {
width: 33.333vw;
- height: 100vh;
+ height: 100%;
overflow-y: auto;
}
@@ -286,6 +292,8 @@ main {
position: absolute;
top: 0;
right: 0;
+ padding-right: 0.5rem;
+ padding-top: 0.5rem;
}
@@ -293,6 +301,8 @@ main {
#messenger-page #conversation {
+ height: 100vh;
+ overflow-y: auto;
width: 66.666vw;
}
@@ -345,6 +355,61 @@ main {
text-align: right;
}
+#messenger-page #conversation {
+
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+#messenger-page #conversation #msgList {
+
+ overflow-y: auto;
+ flex-grow: 1;
+}
+
+#messenger-page #conversation form {
+
+ align-self: flex-end;
+
+ display: flex;
+ width: 100%;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+}
+
+#messenger-page #conversation label {
+
+ display: none;
+}
+
+#messenger-page #conversation textarea {
+
+ flex-basis: 100%;
+ flex-grow: 1;
+ margin-left: 1rem;
+ margin-right: 1rem;
+ border: 0;
+}
+
+#messenger-page #conversation textarea:focus {
+
+ outline: 0;
+}
+
+#messenger-page #conversation .submit-button-wrapper {
+
+ margin-left: 1rem;
+ margin-right: 1rem;
+ display: flex;
+ align-items: center;
+}
+
+#messenger-page #conversation .submit-button-wrapper input {
+
+ border: 0;
+}
+
diff --git a/themes/spationaute/default-immaterial.256.png b/themes/spationaute/default-immaterial.256.png
new file mode 100644
index 0000000..3af2bd2
Binary files /dev/null and b/themes/spationaute/default-immaterial.256.png differ
diff --git a/themes/spationaute/default-shippable.256.png b/themes/spationaute/default-shippable.256.png
new file mode 100644
index 0000000..15b8f9b
Binary files /dev/null and b/themes/spationaute/default-shippable.256.png differ
diff --git a/themes/spationaute/img/dashboard-minelife.png b/themes/spationaute/img/dashboard-minelife.png
index cda9e69..f9f9951 100644
Binary files a/themes/spationaute/img/dashboard-minelife.png and b/themes/spationaute/img/dashboard-minelife.png differ
diff --git a/themes/spationaute/img/dashboard-tiddlywiki.png b/themes/spationaute/img/dashboard-tiddlywiki.png
new file mode 100644
index 0000000..dd2bedc
Binary files /dev/null and b/themes/spationaute/img/dashboard-tiddlywiki.png differ
diff --git a/themes/spationaute/js/messenger/messenger.js b/themes/spationaute/js/messenger/messenger.js
new file mode 100644
index 0000000..aa957ff
--- /dev/null
+++ b/themes/spationaute/js/messenger/messenger.js
@@ -0,0 +1,7 @@
+
+/*
+
+var form = document.querySelector('#messenger-page #conversation > form');
+
+form.addEventListener
+*/
\ No newline at end of file