diff --git a/assets/img/avatars/128/mouse.png b/assets/img/avatars/128/mouse.png new file mode 100644 index 0000000..9b75967 Binary files /dev/null and b/assets/img/avatars/128/mouse.png differ diff --git a/assets/img/avatars/32/asterix.png b/assets/img/avatars/32/asterix.png new file mode 100644 index 0000000..1dc99b1 Binary files /dev/null and b/assets/img/avatars/32/asterix.png differ diff --git a/assets/img/avatars/32/mouse.png b/assets/img/avatars/32/mouse.png new file mode 100644 index 0000000..3177e4d Binary files /dev/null and b/assets/img/avatars/32/mouse.png differ diff --git a/config.php b/config.php index 287a7cd..b3ab033 100644 --- a/config.php +++ b/config.php @@ -8,7 +8,7 @@ error_reporting(E_ALL); session_start(); -define('DEFAULT_RADIUS', 50); +define('DEFAULT_RADIUS', 10); define('TAILLE_SPRITE', 32); define('DEMI_TAILLE_SPRITE', (TAILLE_SPRITE/2)); @@ -44,13 +44,16 @@ class Player { $players = [ + new Player('2iqUybqeYhX2MvNVZsKYQ59FNAm6wAukpUsfJKFsC4Aw', 'Joe (Astérix)'), + new Player('FR1UMmvimmxEBeghy1Fsizqen3Wse5hYUZU9VnHFPtN8', 'Eva Zykejtepousse'), + new Player('QP1VkfaFUMdHZmHgPMi7q5wJJHaQhZcEqs5A86NigKr', 'Toto du 56'), + new Player('7jikBcC2Cd89SGGDuMXNPqyBXn2FeBFY1XnKAQgyAxeA', 'Astronaut astro'), new Player('2L8vaYixCf97DMT8SistvQFeBj7vb6RQL7tvwyiv1XVH', 'Fred'), new Player('25zB1gSC7Qhwnx463cuDLDCKLRVieLAgFiPbYq6jVHG9', 'Boris'), new Player('u3rNW7CzqDC5V4L3FGVbSPsrBd78y8pkRACKHtBtCPx', 'Syoul'), new Player('8PTThXiUSwwuPoqQWw3tuAn4MpvzQzpKhs6LMuiozS7Z', 'kimamila') ]; - if (!isset($_SESSION['radius'])) { $_SESSION['radius'] = DEFAULT_RADIUS; @@ -70,16 +73,20 @@ $games = [ 'spationaute' => [ 'title' => 'SpaceĞ1', - 'description' => 'Les extraterrestres viennent terraformer ta planète' + 'description' => 'Les extraterrestres viennent terraformer ta planète', + 'default_avatar' => 'assets/img/avatars/32/et-in-flying-saucer.png' ], 'magie' => [ 'title' => 'Ğ1Quest', - 'description' => 'Ğarry Potier à l\'école des sourciers.' + 'description' => 'Ğarry Potier à l\'école des sourciers.', + 'default_avatar' => 'assets/img/avatars/32/wizard.png' ] ]; +$radiuses = [5, 10, 20, 50, 100]; + define('DEFAULT_GAME', 'spationaute'); if (!isset($_SESSION['gameId'])) { diff --git a/geoloc.php b/geoloc.php deleted file mode 100644 index c5b8ac5..0000000 --- a/geoloc.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - Geoloc - - - - - - -

-

- - - - \ No newline at end of file diff --git a/lib/Conversation.class.php b/lib/Conversation.class.php new file mode 100644 index 0000000..6217e90 --- /dev/null +++ b/lib/Conversation.class.php @@ -0,0 +1,91 @@ +getDate() < $msg2->getDate()) ? false : true; +} + +class Conversation { + + private $messages = []; + + private $firstMessage; + + private $lastMessage; + + private $convTitle; + + private $penpalPubkey; + + + + public function __construct () { + + } + + public function addMessage ($msg) { + + $this->messages[] = $msg; + + if (!isset($this->lastMessage, $this->firstMessage)) { + + $this->lastMessage = $msg; + $this->firstMessage = $msg; + + } else { + + if ($msg->getDate() > $this->lastMessage->getDate()) { + + $this->lastMessage = $msg; + } + + if ($msg->getDate() < $this->firstMessage->getDate()) { + + $this->firstMessage = $msg; + } + } + } + + public function sortMessages () { + + uasort($this->messages, 'compareMsgDate'); + + } + + public function getConvTitle () { + + if (!isset($this->convTitle)) { + + $this->convTitle = $this->getFirstMessage()->getTitle(); + } + + return $this->convTitle; + } + + public function getPenpalPubkey () { + + if (!isset($this->penpalPubkey)) { + + $this->penpalPubkey = $this->getFirstMessage()->getPenpalPubkey(); + } + + return $this->penpalPubkey; + } + + public function getMessages () { + + return $this->messages; + } + + public function getFirstMessage () { + + return $this->firstMessage; + } + + public function getLastMessage () { + + return $this->lastMessage; + } +} \ No newline at end of file diff --git a/lib/Fred.class.php b/lib/Fred.class.php index 4f8baae..8f2103c 100644 --- a/lib/Fred.class.php +++ b/lib/Fred.class.php @@ -40,28 +40,71 @@ class Fred { return $ipnsKey; } - public function donneMoiSesPutainDeMessagesGchange ($prenomNom, $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday, $gchangeId) { + public function donneMoiSesPutainDeMessagesGchange ($prenomNom, $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday, $gchangeName) { $salt = $prenomNom; $pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday; - $query = 'salt='. $salt .'&pepper='. $pepper . '&messaging=' . $gchangeId; + $query = 'salt='. $salt .'&pepper='. $pepper . '&messaging=' . $gchangeName; $url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query; - echo '
'; var_dump(htmlspecialchars($url)); echo '
'; + // echo '
'; var_dump(htmlspecialchars($url)); echo '
'; $page1 = file_get_contents($url) or die('

On a fait du sale.

'); - echo '
'; var_dump(htmlspecialchars($page1)); echo '
'; + // echo '
'; var_dump(htmlspecialchars($page1)); echo '
'; preg_match("`url='([^']+)'`isU", $page1, $matches); - $url = $matches[0]; + $url = $matches[1]; - echo '
'; var_dump($url); echo '
'; + // echo '
'; var_dump($url); echo '
'; + + $page2 = ''; + + while (empty($page2)) { + + sleep($this->gatewayDelay); + $page2 = @file_get_contents($url); + } + + // echo '
'; var_dump(htmlspecialchars($page2)); echo '
'; + + $json = $page2; + + return json_decode($json); + + } + public function donneMoiSaPutaindeG1Pub ($prenomNom, $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday) { + + + $salt = $prenomNom; + $pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday; + + $query = 'salt='. $salt .'&pepper='. $pepper . '&g1pub=on'; + + $url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query; + + // echo '
'; var_dump(htmlspecialchars($url)); echo '
'; + + $page1 = file_get_contents($url) + or die('

On a fait du sale.

'); + + // die('
' . htmlspecialchars($page1) . '
'); + + preg_match("`url='([^']+)'`isU", $page1, $matches); + + // die( + // '
' . htmlspecialchars($page1) . '
' . + // '
' . print_r($matches, true) . '
' + // ); + + $url = $matches[1]; + + // die('
' . var_dump($url, true) . '
'); $page2 = ''; @@ -71,14 +114,12 @@ class Fred { $page2 = @file_get_contents($url); } - - echo '
'; var_dump($page2); echo '
'; - die(); + preg_match("`url='.*/user/([^']+)/'`isU", $page2, $matches); - $json = $page2; + $gchangeId = $matches[1]; - return $page1; + return $gchangeId; } } \ No newline at end of file diff --git a/lib/Gchange.class.php b/lib/Gchange.class.php index fd5187d..a5281a9 100644 --- a/lib/Gchange.class.php +++ b/lib/Gchange.class.php @@ -1,6 +1,7 @@ _id . '.json'; + $placesCacheFile = $user->getUserGchangeId() . '.json'; $json = $this->getJsonFromCache($placesCacheDir, $placesCacheFile, $this->cacheLongevity['placesNearby']); if (empty($json)) { - $json = $this->getNearbyPlacesJson($user->_source->geoPoint->lat, $user->_source->geoPoint->lon, RADIUS); + $json = $this->getNearbyPlacesJson($user->getLat(), $user->getLon(), $radius); $this->cacheJson($placesCacheDir, $placesCacheFile, $json); @@ -142,7 +143,7 @@ class Gchange { } public function getNearbyPlaces ($lat, $lon, $maxDistance, $minDistance = NULL) { - + $json = $this->getNearbyPlacesJson($lat, $lon, $maxDistance, $minDistance); $result = json_decode($json); diff --git a/lib/GchangeUser.class.php b/lib/GchangeUser.class.php new file mode 100644 index 0000000..06abf47 --- /dev/null +++ b/lib/GchangeUser.class.php @@ -0,0 +1,60 @@ +userGchangeId = $gchangeObject->_id; + + $this->userName = $gchangeObject->_source->title; + + if (isset($gchangeObject->_source->geoPoint->lat, $gchangeObject->_source->geoPoint->lon)) { + + $this->lat = $gchangeObject->_source->geoPoint->lat; + $this->lon = $gchangeObject->_source->geoPoint->lon; + } + + if (isset($gchangeObject->_source->avatar->_content) and + !empty($gchangeObject->_source->avatar->_content)) { + + + $this->avatarImgSrc = 'data:'. $gchangeObject->_source->avatar->_content_type .';base64,' . $gchangeObject->_source->avatar->_content; + } + } + + public function getUserGchangeId () { + + return $this->userGchangeId; + } + + public function getUserName () { + + return $this->userName; + } + + public function getLat () { + + return $this->lat; + } + + public function getLon () { + + return $this->lon; + } + + public function getAvatarImgSrc () { + + return $this->avatarImgSrc; + } +} \ No newline at end of file diff --git a/lib/Message.class.php b/lib/Message.class.php new file mode 100644 index 0000000..cf59560 --- /dev/null +++ b/lib/Message.class.php @@ -0,0 +1,71 @@ +direction = $direction; + + $this->title = $jaklisObject->title; + + $this->date = $jaklisObject->date; + + $contents = preg_replace("`(?[^\n]*`", '', $jaklisObject->content); + $contents = preg_replace("`(\n\s?){2,}`", '', $contents); + $contents = preg_replace("`^(\n\s?)+`", '', $contents); + $this->contents = $contents; + + $this->gchangeId = $jaklisObject->id; + + $this->penpalPubkey = $jaklisObject->pubkey; + } + + public function getDirection () { + + return $this->direction; + } + + public function getMessage () { + + return $this->msg; + } + + public function getTitle () { + + return $this->title; + } + + public function getDate () { + + return $this->date; + } + + public function getPenpalPubkey () { + + return $this->penpalPubkey; + } + + public function getGchangeId() { + + return $this->gchangeId; + } + + public function getContents() { + + return $this->contents; + } +} \ No newline at end of file diff --git a/lib/Messenger.class.php b/lib/Messenger.class.php new file mode 100644 index 0000000..6ea18eb --- /dev/null +++ b/lib/Messenger.class.php @@ -0,0 +1,106 @@ +gchange = $gchange; + } + + public function addMessages ($msgIn, $msgOut) { + + foreach ($msgIn as $m) { + + if (!isset($this->conversations[$m->pubkey])) { + + $this->conversations[$m->pubkey] = new Conversation(); + } + + $msg = new Message($m, 'in'); + + $this->conversations[$msg->getPenpalPubkey()]->addMessage($msg); + + $this->feedUserBase($msg->getPenpalPubkey()); + } + + foreach ($msgOut as $m) { + + if (!isset($this->conversations[$m->pubkey])) { + + $this->conversations[$m->pubkey] = new Conversation(); + } + + $msg = new Message($m, 'out'); + + $this->conversations[$m->pubkey]->addMessage($msg); + + $this->feedUserBase($msg->getPenpalPubkey()); + } + + foreach ($this->conversations as $conv) { + + $conv->sortMessages(); + + $this->checkIfIsLatestMessage($conv->getLastMessage()); + } + } + + public function checkIfIsLatestMessage ($msg) { + + if (!isset($this->latestMessage)) { + + $this->latestMessage = $msg; + + } else { + + if ($msg->getDate() > $this->getLatestMessage()->getDate()) { + + $this->latestMessage = $msg; + } + + } + } + + public function getLatestMessage () { + + return $this->latestMessage; + } + + public function feedUserBase ($penpalPubkey) { + + if (!isset($users[$penpalPubkey])) { + + $this->users[$penpalPubkey] = $this->gchange->getUser($penpalPubkey); + } + } + public function getConversation ($penpalGchangeId) { + + return $this->conversations[$penpalGchangeId]; + } + + public function getConversations () { + + return $this->conversations; + } + + public function getUser ($pubkey) { + + return $this->users[$pubkey]; + } + + public function getLastConversation () { + + return array_reverse($this->conversations)[0]; + } +} \ No newline at end of file diff --git a/login.php b/login.php index c7d186b..13316a5 100644 --- a/login.php +++ b/login.php @@ -1,17 +1,25 @@ donneMoiSaPutaindeG1Pub($_POST['salt'], $_POST['pepper']); + + $_SESSION['player_pubkey'] = $playerG1Id; $gchange = new Gchange(); $user = $gchange->getUser($_SESSION['player_pubkey']); $_SESSION['player_lat'] = $user->_source->geoPoint->lat; $_SESSION['player_lon'] = $user->_source->geoPoint->lon; + $_SESSION['radius'] = DEFAULT_RADIUS; + + $_SESSION['salt'] = $_POST['salt']; + $_SESSION['pepper'] = $_POST['pepper']; header('Location:map.php'); @@ -22,7 +30,9 @@ if (isset($_POST['player'])) { include_once('header.php'); echo ' -
+ '; + + /*

+ */ + echo '

' . print_r($player, true) . '
'); + +$origLat = $player->getLat(); +$origLon = $player->getLon(); $origLoc = new Location(); $origLoc->setPosition($origLat, $origLon); @@ -33,6 +40,20 @@ echo ' '. $origLat . ' , ' . $origLon .' + +
'; - if (isset($player->_source->avatar->_content) and !empty($player->_source->avatar->_content)) { - - $src = 'data:'. $player->_source->avatar->_content_type .';base64,' . $player->_source->avatar->_content; - - } else { - - $src = 'assets/img/avatars/32/et-in-flying-saucer.png.png'; - } + $avatarSrc = $player->getAvatarImgSrc(); + $src = !empty($avatarSrc) ? $avatarSrc : $games[$_SESSION['gameId']]['default_avatar']; echo ' '. $player->_source->title .' diff --git a/messenger.php b/messenger.php new file mode 100644 index 0000000..ffcb8c0 --- /dev/null +++ b/messenger.php @@ -0,0 +1,122 @@ +donneMoiSesPutainDeMessagesGchange($_SESSION['salt'], $_SESSION['pepper'], 'coucou'); + + +// echo '
'; var_dump($msgIn); echo '
'; +// echo '
'; var_dump($msgOut); echo '
'; + +$messenger->addMessages($msgIn, $msgOut); + +// echo '
'; var_dump($messenger->getConversations()); echo '
'; + +/* +if (!isset($_GET['penpal'])) { + + header('Location: messenger.php?paypal=' . $messenger->getLatestMessage()->getPenpalPubkey()); +} +*/ +$bodyIds = 'messenger-page'; + +include_once('header.php'); + +echo ' + + + + +
+'; + +if (isset($_GET['penpal'])) { + + $displayedConv = $messenger->getConversation($_GET['penpal']); + + echo ' +

+ '. $messenger->getUser($displayedConv->getPenpalPubkey())->getUserName() . ' +

+ +
    '; + + foreach ($displayedConv->getMessages() as $msg) { + + echo ' +
  • + +

    + '. nl2br($msg->getContents()) . ' +

    + +

    + '. date('d-m-Y à h:m', $msg->getDate()) . ' +

    +
  • + '; + + } + echo ' +
'; +} + +echo ' +
'; + +include_once('footer.php'); \ No newline at end of file diff --git a/themes/spationaute/deco.css b/themes/spationaute/deco.css index 0c8564d..7a97e72 100644 --- a/themes/spationaute/deco.css +++ b/themes/spationaute/deco.css @@ -52,6 +52,27 @@ body#sonar { #map { + border-style: solid; + border-color: hsl(132.2, 59.8%, 74.2%); +} + + +#map[data-radius="100"] { + + background: + linear-gradient( 0deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 90deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 45deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + linear-gradient(135deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + repeating-radial-gradient(transparent 0, transparent 5%, hsl(132.2, 59.8%, 74.2%) 5%, hsl(132.2, 59.8%, 74.2%) 5.4%), + /*radial-gradient(circle at center, hsl(132.2, 59.8%, 37.1%) 0%, hsl(132.2, 59.8%, 74.2%) 50%, hsl(132.2, 59.8%, 37.1%) 100%), */ + hsla(132.2, 59.8%, 37.1%, 0.8); + +} + + +#map[data-radius="50"] { + background: linear-gradient( 0deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), linear-gradient( 90deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), @@ -61,11 +82,52 @@ body#sonar { /*radial-gradient(circle at center, hsl(132.2, 59.8%, 37.1%) 0%, hsl(132.2, 59.8%, 74.2%) 50%, hsl(132.2, 59.8%, 37.1%) 100%), */ hsla(132.2, 59.8%, 37.1%, 0.8); - border-style: solid; - border-color: hsl(132.2, 59.8%, 74.2%); +} + + +#map[data-radius="20"] { + + background: + linear-gradient( 0deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 90deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 45deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + linear-gradient(135deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + repeating-radial-gradient(transparent 0, transparent 12.5%, hsl(132.2, 59.8%, 74.2%) 12.5%, hsl(132.2, 59.8%, 74.2%) 12.9%), + /*radial-gradient(circle at center, hsl(132.2, 59.8%, 37.1%) 0%, hsl(132.2, 59.8%, 74.2%) 50%, hsl(132.2, 59.8%, 37.1%) 100%), */ + hsla(132.2, 59.8%, 37.1%, 0.8); } + +#map[data-radius="10"] { + + background: + linear-gradient( 0deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 90deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 45deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + linear-gradient(135deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + repeating-radial-gradient(transparent 0, transparent 25%, hsl(132.2, 59.8%, 74.2%) 25%, hsl(132.2, 59.8%, 74.2%) 25.4%), + /*radial-gradient(circle at center, hsl(132.2, 59.8%, 37.1%) 0%, hsl(132.2, 59.8%, 74.2%) 50%, hsl(132.2, 59.8%, 37.1%) 100%), */ + hsla(132.2, 59.8%, 37.1%, 0.8); + +} + + +#map[data-radius="5"] { + + background: + linear-gradient( 0deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 90deg, transparent 49.85%, hsl(132.2, 59.8%, 74.2%) 49.85%, hsl(132.2, 59.8%, 74.2%) 50.15%, transparent 50.15%), + linear-gradient( 45deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + linear-gradient(135deg, transparent 49.90%, hsl(132.2, 59.8%, 74.2%) 49.90%, hsl(132.2, 59.8%, 74.2%) 50.10%, transparent 50.10%), + repeating-radial-gradient(transparent 0, transparent 50%, hsl(132.2, 59.8%, 74.2%) 100%, hsl(132.2, 59.8%, 74.2%) 100%), + /*radial-gradient(circle at center, hsl(132.2, 59.8%, 37.1%) 0%, hsl(132.2, 59.8%, 74.2%) 50%, hsl(132.2, 59.8%, 37.1%) 100%), */ + hsla(132.2, 59.8%, 37.1%, 0.8); + +} + + + #map-deco { background: @@ -103,6 +165,11 @@ body#sonar { } } +#map .place img { + + border-radius: 50%; +} + #map .place, #map .player { @@ -110,6 +177,17 @@ body#sonar { cursor: pointer; } +#mapview #zoom { + + background-color: black; +} + +#mapview #zoom a, +#mapview #zoom a:visited { + + color: white; + text-decoration: none; +} @@ -190,3 +268,72 @@ body#sonar { color: inherit; text-decoration: none; } + + + + + +#messenger-page { + + background-color: black; + color: white; +} + + + +#messenger-page .penpal { + + background: hsl(0, 100%, 50%); + color: white; + font-weight: bold; +} + +#messenger-page #msgList .message { + + color: white; +} + +#messenger-page #msgList .message.in { + + background-color: hsl(132.2, 59.8%, 12.1%); +} + +#messenger-page #msgList .message.out { + + background-color: hsl(132.2, 59.8%, 12.1%); +} + + +#messenger-page #msgList .message .date { + + color: hsl(132.2, 59.8%, 75.2%); +} + + +#messenger-page #conversations-list .conversation time { + + font-weight: normal; + color: hsl(0, 27.8%, 82.1%); +} + +#messenger-page #conversations-list .conversation cite { + + font-style: normal; + font-weight: bold; +} + +#messenger-page #conversations-list .conversation .contents-preview { + + height: 1rem; + overflow: hidden; +} + +#messenger-page #conversations-list .conversation { + + background-color: hsl(0, 27.8%, 12.1%); +} + +#messenger-page #conversations-list .conversation:hover { + + background-color: hsl(0, 27.8%, 24.2%); +} \ No newline at end of file diff --git a/themes/spationaute/layout.css b/themes/spationaute/layout.css index b1b8952..6dc0e1d 100644 --- a/themes/spationaute/layout.css +++ b/themes/spationaute/layout.css @@ -64,6 +64,19 @@ main { } +#mapview { + + position: relative; +} + +#mapview #zoom { + + position: absolute; + bottom: 0; + right: 0; + + padding: 0.5rem 1rem; +} #map .place, #map .player { @@ -144,3 +157,122 @@ main { background: var(--panel-place-name-bg-color); } + + +#messenger-page main { + + display: flex; +} + +#messenger-page #conversations-list { + + width: 33.333vw; +} + +#messenger-page #conversation { + + width: 66.666vw; +} + +#messenger-page #msgList { + + overflow: hidden; +} + +#messenger-page ul#msgList { + + list-style: none; + margin: 0; + padding: 0; +} + +#messenger-page ul#msgList li { + + margin: 0; + padding: 0; + margin-bottom: 2rem; + width: 50%; +} + +#messenger-page .penpal { + + padding: 1rem 1rem; + margin-top: 0; +} + +#messenger-page #msgList .message.in { + + float: left; + margin-left: 2%; +} + +#messenger-page #msgList .message.out { + + float: right; + margin-right: 2%; +} + +#messenger-page #msgList .message > * { + + margin-left: 1rem; + margin-right: 1rem; +} + +#messenger-page #msgList .message .date { + + text-align: right; +} + + +#messenger-page ul#conversations-list { + + list-style: none; + margin: 0; + padding: 0; +} + +#messenger-page ul#conversations-list li { + + margin: 0; + padding: 0.5rem 1rem; +} + +#messenger-page #conversations-list .conversation { + + position: relative; +} + +#messenger-page #conversations-list .conversation .conv-link, +#messenger-page #conversations-list .conversation .conv-link a { + + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +#messenger-page #conversations-list .conversation .avatar { + + float: left; +} + +#messenger-page #conversations-list .conversation .conv-link a span { + + display: none; +} + + +#messenger-page #conversations-list .conversation blockquote { + + margin: 0; +} + + +#messenger-page #conversations-list .conversation blockquote time { + + position: absolute; + top: 0; + right: 0; +} +