mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
start homepage design, add languages and themes
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "ما هو بليبتشان؟",
|
||||||
|
"go": "اذهب",
|
||||||
|
"or": "أو"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "প্লেবচ্যান কি?",
|
||||||
|
"go": "যাও",
|
||||||
|
"or": "অথবা"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Co je Plebchan?",
|
||||||
|
"go": "jít",
|
||||||
|
"or": "nebo"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Hvad er Plebchan?",
|
||||||
|
"go": "gå",
|
||||||
|
"or": "eller"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Was ist Plebchan?",
|
||||||
|
"go": "gehen",
|
||||||
|
"or": "oder"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Τι είναι το plebchan;",
|
||||||
|
"go": "πήγαινε",
|
||||||
|
"or": "ή"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "What is plebchan?",
|
||||||
|
"go": "go",
|
||||||
|
"or": "or"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "¿Qué es Plebchan?",
|
||||||
|
"go": "ir",
|
||||||
|
"or": "o"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "پلبچن چیست؟",
|
||||||
|
"go": "برو",
|
||||||
|
"or": "یا"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Mikä on Plebchan?",
|
||||||
|
"go": "mennä",
|
||||||
|
"or": "tai"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Ano ang plebchan?",
|
||||||
|
"go": "pumunta",
|
||||||
|
"or": "o"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Qu'est-ce que Plebchan?",
|
||||||
|
"go": "aller",
|
||||||
|
"or": "ou"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "מה זה פלבצ׳ן?",
|
||||||
|
"go": "לך",
|
||||||
|
"or": "או"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "प्लेबचैन क्या है?",
|
||||||
|
"go": "जाओ",
|
||||||
|
"or": "या"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Mi az a Plebchan?",
|
||||||
|
"go": "menni",
|
||||||
|
"or": "vagy"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Apa itu plebchan?",
|
||||||
|
"go": "pergi",
|
||||||
|
"or": "atau"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Cos'è plebchan?",
|
||||||
|
"go": "vai",
|
||||||
|
"or": "oppure"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "プレブチャンとは何ですか?",
|
||||||
|
"go": "行く",
|
||||||
|
"or": "または"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "플레브찬이란 무엇인가요?",
|
||||||
|
"go": "가기",
|
||||||
|
"or": "또는"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "प्लेबचॅन काय आहे?",
|
||||||
|
"go": "जा",
|
||||||
|
"or": "किव्हा"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Wat is plebchan?",
|
||||||
|
"go": "gaan",
|
||||||
|
"or": "of"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Hva er plebchan?",
|
||||||
|
"go": "gå",
|
||||||
|
"or": "eller"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Co to jest plebchan?",
|
||||||
|
"go": "iść",
|
||||||
|
"or": "lub"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "O que é Plebchan?",
|
||||||
|
"go": "vai",
|
||||||
|
"or": "ou"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Ce este Plebchan?",
|
||||||
|
"go": "du-te",
|
||||||
|
"or": "sau"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Что такое плебчан?",
|
||||||
|
"go": "идти",
|
||||||
|
"or": "или"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Çfarë është Plebchan?",
|
||||||
|
"go": "shko",
|
||||||
|
"or": "ose"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Vad är Plebchan?",
|
||||||
|
"go": "gå",
|
||||||
|
"or": "eller"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "ప్లెబ్చాన్ ఏమిటి?",
|
||||||
|
"go": "వెళ్లు",
|
||||||
|
"or": "లేదా"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "พล็อกไซต์คืออะไร?",
|
||||||
|
"go": "ไป",
|
||||||
|
"or": "หรือ"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Plebchan nedir?",
|
||||||
|
"go": "git",
|
||||||
|
"or": "veya"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Що таке Плебчан?",
|
||||||
|
"go": "йди",
|
||||||
|
"or": "або"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "پلیبچان کیا ہے؟",
|
||||||
|
"go": "جا",
|
||||||
|
"or": "یا"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Plebchan là gì?",
|
||||||
|
"go": "đi",
|
||||||
|
"or": "hoặc"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"what_is_plebchan": "Plebchan是什么?",
|
||||||
|
"go": "去",
|
||||||
|
"or": "或者"
|
||||||
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
.app {
|
.app {
|
||||||
background: var(--background-color) var(--background-fade) top center repeat-x;
|
background: var(--background-color) var(--background-fade) top center repeat-x;
|
||||||
font: 13px arial, helvetica, sans-serif;
|
font: 13px/1.231 arial, helvetica, sans-serif;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
|||||||
+12
-2
@@ -1,11 +1,21 @@
|
|||||||
:root .yotsuba {
|
:root .yotsuba {
|
||||||
--background-color: #ffe;
|
--background-color: #ffe;
|
||||||
--background-fade: url("/public/assets/background-fade.png");
|
--background-fade: url("/public/assets/background-fade.png");
|
||||||
--color: #800;
|
--color-primary: #800;
|
||||||
|
--text-primary: #fff;
|
||||||
|
--text-black: #000;
|
||||||
|
--text-white: #fff;
|
||||||
|
--text-background: #fff;
|
||||||
|
--text-link: #00f;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root .yotsuba-b {
|
:root .yotsuba-b {
|
||||||
--background-color: #eef2ff;
|
--background-color: #eef2ff;
|
||||||
--background-fade: url("/public/assets/background-fade-blue.png");
|
--background-fade: url("/public/assets/background-fade-blue.png");
|
||||||
--color: #000;
|
--color-primary: #98e;
|
||||||
|
--text-primary: #000;
|
||||||
|
--text-black: #000;
|
||||||
|
--text-white: #fff;
|
||||||
|
--text-background: #fff;
|
||||||
|
--text-link: #00f;
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,24 @@
|
|||||||
.content {
|
.content {
|
||||||
color: var(--color);
|
color: var(--color-primary);
|
||||||
font-size: 20px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
margin: auto;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 57.69em;
|
width: 57.69em;
|
||||||
min-width: 750px;
|
min-width: 750px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.debug {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debug select {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.logo img {
|
.logo img {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
@@ -15,6 +26,67 @@
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
background: var(--text-background);
|
||||||
|
color: var(--text-black);
|
||||||
|
border: 1px solid;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxBar {
|
||||||
|
background: var(--color-primary);
|
||||||
|
color: var(--text-primary);
|
||||||
|
padding-left: 0.5em;
|
||||||
|
line-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxBar h2 {
|
||||||
|
font-size: 131%;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxContent {
|
||||||
|
line-height: 1.5em;
|
||||||
|
font-size: 93%;
|
||||||
|
padding: 0.5em;
|
||||||
|
padding-top: 0.25em;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxContent a, .boxContent a:visited{
|
||||||
|
color: var(--text-link);
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBar {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBar input, .searchBar button {
|
||||||
|
font-size: 18px;
|
||||||
|
height: 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
appearance: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
border: 1px solid rgb(170, 170, 170);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBar input {
|
||||||
|
width: 400px;
|
||||||
|
padding: 3px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBar button {
|
||||||
|
font-size: 15px;
|
||||||
|
margin-left: 4px;
|
||||||
|
padding: 3px 10px;
|
||||||
|
background-color: rgb(239, 239, 239);
|
||||||
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|||||||
+49
-5
@@ -1,8 +1,9 @@
|
|||||||
import styles from './home.module.css';
|
import styles from './home.module.css';
|
||||||
import useTheme from '../../hooks/use-theme';
|
import useTheme from '../../hooks/use-theme';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
// TODO: remove theme selector for debugging
|
// TODO: remove theme and languages selectors for debugging
|
||||||
const ThemeSettings = () => {
|
const ThemeSettings = () => {
|
||||||
const [theme, setTheme] = useTheme();
|
const [theme, setTheme] = useTheme();
|
||||||
|
|
||||||
@@ -14,21 +15,64 @@ const ThemeSettings = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
const availableLanguages = ['ar', 'bn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fil', 'fr', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'ko', 'mr', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sq', 'sv', 'te', 'th', 'tr', 'uk', 'ur', 'vi', 'zh'];
|
||||||
|
|
||||||
|
const LanguageSettings = () => {
|
||||||
|
const { t, i18n } = useTranslation();
|
||||||
|
const { changeLanguage, language } = i18n;
|
||||||
|
|
||||||
|
const onSelectLanguage = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
||||||
|
changeLanguage(e.target.value);
|
||||||
|
window.location.reload();
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.languageSettings}>
|
||||||
|
<select value={language} onChange={onSelectLanguage}>
|
||||||
|
{availableLanguages.map((lang) => (
|
||||||
|
<option key={lang} value={lang}>
|
||||||
|
{lang}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
|
<div className={styles.debug}>
|
||||||
|
<LanguageSettings />
|
||||||
|
<ThemeSettings />
|
||||||
|
</div>
|
||||||
<Link to='/'>
|
<Link to='/'>
|
||||||
<div className={styles.logo}>
|
<div className={styles.logo}>
|
||||||
<img alt='plebchan' src='/assets/logo/logo-transparent.png' />
|
<img alt='plebchan' src='/assets/logo/logo-transparent.png' />
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
<div className={styles.searchBar}>
|
<div className={styles.searchBar}>
|
||||||
<input type='text' placeholder='Search' />
|
<input type='text' placeholder={`"board.eth" ${t('or')} "12D3KooW..."`} />
|
||||||
<button>Search</button>
|
<button>{t('go')}</button>
|
||||||
</div>
|
</div>
|
||||||
<ThemeSettings />
|
|
||||||
<div className={styles.box}>
|
<div className={styles.box}>
|
||||||
<div className={styles.boxBar}>What is plebchan?</div>
|
<div className={styles.boxBar}>
|
||||||
|
<h2>{t('what_is_plebchan')}</h2>
|
||||||
|
</div>
|
||||||
|
<div className={styles.boxContent}>
|
||||||
|
Plebchan is a serverless, adminless, decentralized 4chan alternative where any pleb can create and own unlimited boards. All data comes from the{' '}
|
||||||
|
<a href='https://plebbit.com' target='_blank' rel='noopener noreferrer'>
|
||||||
|
plebbit
|
||||||
|
</a>{' '}
|
||||||
|
protocol, it's all text including links from which media is embedded, shared peer-to-peer. Users do not need to register an account before participating in the
|
||||||
|
community. Feel free to click on a board below that interests you and jump right in!
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
There are no global rules, each board is completely independent and its owner decides how/if to moderate it.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user