refactor: reorganize custom content I

main
gravel 2 months ago
parent 28798b1224
commit 8456a34389
Signed by: gravel
GPG Key ID: C0538F3C906B308F

5
.gitignore vendored

@ -21,8 +21,9 @@ listings/lp-output/*
cache
cache-lt
# Local config
config/*.ini
# Custom content
/custom/config/*.ini
/custom/site-components/*.php
# Archives
/etc/archives/logrotate.status

@ -46,12 +46,6 @@
*/
$TEMPLATES_ROOT="$PROJECT_ROOT/sites";
/**
* @var string $LANGUAGES_ROOT
* Directory containing languages module.
*/
$LANGUAGES_ROOT="$PROJECT_ROOT/languages";
/**
* @var string $QR_CODES
* Directory containing served QR codes.
@ -94,11 +88,29 @@
*/
$SOURCES_CACHE="$LONG_TERM_CACHE_ROOT/sources";
/**
* @var string $CUSTOM_CONTENT_ROOT
* Directory containing custom site content.
*/
$CUSTOM_CONTENT_ROOT="$PROJECT_ROOT/custom";
/**
* @var string $CONFIG_ROOT
* Directory containing local config files.
* Directory containing custom config files.
*/
$CONFIG_ROOT="$CUSTOM_CONTENT_ROOT/config";
/**
* @var string $LANGUAGES_ROOT
* Directory containing languages module.
*/
$LANGUAGES_ROOT="$CUSTOM_CONTENT_ROOT/languages";
/**
* @var string $CUSTOM_COMPONENTS_ROOT
* Directory containing custom site components.
*/
$CONFIG_ROOT="$PROJECT_ROOT/config";
$CUSTOM_COMPONENTS_ROOT="$CUSTOM_CONTENT_ROOT/site-components";
/**
* @var string $LISTING_PROVIDER_ROOT

@ -8,9 +8,9 @@
<span class="banner-note">
news banner
</span>
<p class="banner-title">Search rankings? Check. ✔️</p>
<p class="banner-title">Title</p>
<p
class="banner-subtitle"
>Next stop? <a href="/support/" title="Support us">You decide</a>.</p>
>Description with <a href="#" title="sample link">link</a>.</p>
</div>

@ -1,31 +0,0 @@
# Language information on sessioncommunities.online
## Contribute
To help label Communities by language, send your labelings to us ([see contact info](../README.md#contact-us)), or fork this repository and submit a pull request with your changes (account required).
To make language tags a native feature, support this issue on Oxen Github.
- <https://github.com/oxen-io/session-pysogs/issues/186>
## File format
Communities are each identified by a short string. You can copy this identifier using the "Copy Community ID" button from within Community details. It should be of the form `roomname+xxxx`.
Language labels for communities are grouped by server for easy navigation:
```php
// https://open.getsession.org/
$server_languages[] = array(
"crypto+a03c" => "🇬🇧",
"lokinet+a03c" => "🇬🇧",
"oxen+a03c" => "🇬🇧",
"session-farsi+a03c" => "🇮🇷",
"session-updates+a03c" => "🇬🇧",
"session+a03c" => "🇬🇧"
);
```
To label a Community, you would search for the `xxxx` suffix (in this case `a03c`) in the [flags file](./language-flags.php) and add the appropriate entry.
If you cannot find any entries for this code, copy an existing block from another server & replace the entries with your own. If you have trouble entering language flags on your keyboard, you may find it helpful to copy them from <https://www.alt-codes.net/flags>.

@ -12,7 +12,7 @@
require_once 'servers/known-servers.php';
require_once 'servers/servers-rooms.php';
require_once 'servers/sources.php';
require_once 'languages/language-flags.php';
require_once 'custom/languages/language-flags.php';
/**
* Fetch online Communities and write the resulting data to disk.

@ -4,7 +4,7 @@
* Represent Session Communities and Session Open Group Servers.
*/
require_once 'languages/language-flags.php';
require_once 'custom/languages/language-flags.php';
require_once 'servers/known-servers.php';
require_once 'servers/tags.php';
require_once 'utils/fetching-coroutines.php';

@ -52,11 +52,7 @@
<gap></gap>
<div id="details-modal-room-info">
<p id="details-modal-language">
Language<sup><a
href="<?=$REPOSITORY_CANONICAL_URL?>/src/branch/main/languages"
target="_blank"
title="Community language data on Codeberg"
>help us label</a></sup>: <span
Language: <span
id="details-modal-language-flag"
data-hydrate-with="language_flag"
></span>

@ -60,7 +60,7 @@
class="non-anchorstyle"
><?php include SiteGeneration::getOwnSubDocumentPath('h1'); ?></a>
<?php include "+components/issue-banner.php" ?>
<?php include "custom/site-components/issue-banner.php" ?>
<?php include "+components/communities-search.php"; ?>

Loading…
Cancel
Save