632 |
633 | This program is free software: you can redistribute it and/or modify
634 | it under the terms of the GNU Affero General Public License as
635 | published by the Free Software Foundation, either version 3 of the
636 | License, or (at your option) any later version.
637 |
638 | This program is distributed in the hope that it will be useful,
639 | but WITHOUT ANY WARRANTY; without even the implied warranty of
640 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
641 | GNU Affero General Public License for more details.
642 |
643 | You should have received a copy of the GNU Affero General Public License
644 | along with this program. If not, see .
645 |
646 | Also add information on how to contact you by electronic and paper
647 | mail.
648 |
649 | If your software can interact with users remotely through a computer
650 | network, you should also make sure that it provides a way for users to
651 | get its source. For example, if your program is a web application, its
652 | interface could display a "Source" link that leads users to an archive
653 | of the code. There are many ways you could offer source, and different
654 | solutions will be better for different programs; see section 13 for
655 | the specific requirements.
656 |
657 | You should also get your employer (if you work as a programmer) or
658 | school, if any, to sign a "copyright disclaimer" for the program, if
659 | necessary. For more information on this, and how to apply and follow
660 | the GNU AGPL, see .
661 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | English
5 |
6 |
7 |
8 | Français
9 |
10 |
11 |
12 | 💻 To developpers
13 |
14 |
15 | 
16 |
17 | ---
18 |
19 | # A dynamic theme for Mastodon
20 |
21 | ## Presentation
22 |
23 | This is a CSS overlay that can be applied to the advanced web interface of Mastodon websites.
(Don't worry, you don't need to know CSS or what “CSS” even means.)
24 |
25 | It brings:
26 | - The ability to control the width of the columns (by dragging their lower right corner),
27 | - A more rounded feel,
28 | - The columns are spread rather than stacked to the left,
29 | - The decorative image (bottom left) can be better handled in some instances, and the possibility to choose a custom one instead.
30 |
31 | ## Installation
32 |
33 | ### Set up the website and the browser to apply the custom theme
34 |
35 | - If not already done, enable the **Dark theme**\* and the **advanced web interface** for Mastodon:
36 |
Go in Mastodon “Preferences” (on the right side of the default Mastodon view). Then, in “Appearance”, check “Enable advanced web interface”, and select “Mastodon (Dark)” as the “Site them”.
37 |
\* Alternatively, if you do not want to use a dark theme, you can [remove the additional recoloring](#no-color) provided by this tool.
38 | - Install the ***Stylus*** browser extension, or any other extension that allows to apply custom CSS to a web page. *Stylus* is available on [Firefox](https://addons.mozilla.org/en-US/firefox/addon/styl-us/) and [Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne)).
39 | - Add a style for your Mastodon web page. Typically, for *Stylus*:
40 | - Go to your Mastodon web page,
41 | - Click the button of the extension, then click “Write style for …”. (Stop at the first slash, thus including the name of your instance but not more than that.)
42 | - Select [**the right CSS file**](#choose-the-right-css-file), copy-paste the CSS code in the *Stylus* window.
43 | - [**Customize**](#customization) if need be.
44 |
45 | ### Choose the right CSS file
46 |
47 | The only difference between the proposed CSS files lies in how the decorative bottom left image is handled. The optimal choice depends on what your Mastodon instance uses or what you want to use instead.
48 |
49 |
50 |
51 | - If you want to keep the **instance image**:
52 | - If your instance uses something that is integrated to the design **with transparency**, and that shall be kept to the lower left corner (which is the case for many instances that keep the default mastodon 🐘 drawing), use [`mastodon.css`](mastodon.css).
53 | - If your instance uses a custom picture with **no transparency** that should be properly framed and centered, use [`instance.css`](instance.css).
54 | - If you want to use **you own image** (or **no image**):
55 | - If it has **transparency** and be kept to the lower left corner, use [`custom-transp.css`](custom-transp.css).
56 | - If it has **no transparency** and shall be properly framed, used [`custom.css`](custom.css).
57 | (While `instance.css` will center the image when the column is too wide for it, `custom.css` was created to use higher resolution images that would take the whole available width, and be cropped accordingly to fit a target height.)
58 |
59 | ### Customization
60 |
61 | #### Specify a custom picture
62 |
63 | If you are using `custom.css` or `custom-transp.css`, find these lines (toward the end) and put the URL of the image you want to use in between the parentheses:
64 | ```css
65 | .drawer__inner__mastodon {
66 | background: url(""); /* 👈 Put image url here. */
67 | ```
68 |
69 | With `custom.css`, by default, when the image is cropped, its center is kept. It might not perfectly fit your picture, but you can change that by modifying the next line:
70 | ```css
71 | background-position: center center;
72 | ```
73 | The first `center` can be replaced with `top` or `bottom`, and the second `center` with `left` or `right`, depending on the area of the picture you want to keep.
74 |
75 | #### Custom modifications
76 |
77 | You can modify the rest of the code to your liking. For those unfamiliar with CSS, here are a few things you might want to do and how…
78 |
79 | Not happy with the new colors?
80 |
81 | Just remove the whole *Recolor* section (from `/* Recolor */` to `/* Roundness */`).
82 |
83 | If just don't like the gradient on the leftmost column, remove this:
84 | ```css
85 | .drawer__inner {
86 | background: linear-gradient(0deg, $left-bottom 0%, $left-top 100%);
87 | }
88 | ```
89 | For keeping a slightly darker color with no gradient, you can also replace it with:
90 | ```css
91 | .drawer__inner {
92 | background: #333746;
93 | }
94 | ```
95 |
96 |
97 |
98 | The bottom left image is too small or grows too big?
99 |
100 | Find these lines and change the maximal height (by default, `200px`) as you see fit:
101 | ```css
102 | .drawer__inner__mastodon {
103 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
104 | ```
105 |
106 |
107 |
108 | Defining default column widths
109 |
110 | It is not possible to memorize the column widths to be reused the next time you open the web page. However, you can define default column widths by adding lines to the CSS code.
111 |
112 | For the leftmost column:
113 | ```css
114 | .drawer { width: 20%; }
115 | ```
116 |
117 | For the other columns:
118 | ```css
119 | .column { width: 20%; }
120 | ```
121 |
122 | For the 2nd column (“Home”):
123 | ```css
124 | .column:nth-of-type(2) { width: 20%; }
125 | ```
126 |
127 | For the 3rd column (“Notifications”):
128 | ```css
129 | .column:nth-of-type(2) { width: 20%; }
130 | ```
131 |
132 | In the previous examples, the column width(s) were set to 20% of the total width of the page; but you can put whatever size you want. You can also use pixels as the unit (e.g., by replacing `20%` by `400px`), or even do calculations between percents and pixels (e.g., ny replacing `20%` by `calc( 25% - 30px )`).
133 |
134 |
135 |
136 |
137 | ---
138 |
139 | # Un thème dynamique pour Mastodon
140 |
141 | ## Présentation
142 |
143 | Il s'agit d'une surcouche CSS qui peut être appliquée à l'interface web avancée des sites Mastodon.
144 | (Ne vous en faites pas, vous n'avez pas besoin de connaître le CSS, ou même ce que “CSS” signifie.)
145 |
146 | Ça vous apportera :
147 | - La possibilité de contrôler la largeur des colonnes (en tirant le coin en bas à droite de chaque colonne),
148 | - Un design plus rond,
149 | - Des colonnes réparties sur la page web et non regroupées à gauche,
150 | - Une meilleure prise en charge de l'image décorative (en bas à gauche) sur certaines instances, et la possibilité de mettre la vôtre à la place.
151 |
152 | ## Installation
153 |
154 | ### Préparer le site et le navigateur pour appliquer le thème
155 |
156 | - Si vous ne l'avez pas déjà fait, activez le **thème sombre**\* et l'**interface web avancée** de Mastodon :
157 |
Cliquez sur “Préférences” (à droite dans la vue simple par défaut de Mastodon).
158 |
\*Alternativement, si vous ne voulez pas un thème sombre, vous pourrez [retirer les couleurs](#pas-de-couleur) créées pas cet outil.
159 | - Installez l'extension de navigateur ***Stylus***, ou tout autre extension permettant d'appliquer un code CSS personnalisé à une page web. *Stylus* est disponible sur [Firefox](https://addons.mozilla.org/en-US/firefox/addon/styl-us/) et [Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne)).
160 | - Ajoutez un style pour votre site Mastodon. Typiquement, avec *Stylus" :
161 | - Allez sur votre site Mastodon,
162 | - Cliquez le bouton de l'extension, puis cliquez sur “Write style for …”. (Arrêtez-vous à la première barre oblique, incluant ainsi le nom de votre instance Mastodon mais pas plus que ça.)
163 | - Sélectionnez [**le bon fichier CSS**](#choisir-le-bon-fichier-css), et copiez-collez le code dans la fenêtre ouverte par *Stylus* à l'étape précédente.
164 | - [**Personnalisez**](#personnalisation) si nécessaire.
165 |
166 | ### Choisir le bon fichier CSS
167 |
168 | La seule différence entre les fichiers CSS proposés est dans le traitement de l'image décorative en bas à gauche. Le choix optimal dépend de ce que votre instance Mastodon utilise, ou si vous voulez choisir votre propre image.
169 |
170 |
171 |
172 | - Si vous voulez garder l'**image de l'instance** :
173 | - Si l'image est intégrée au design du site avec de la **transparence**, et gagne à rester dans le coin en bas à gauche (ce qui est le cas de bien des instances, utilisant le dessin de mastodonte 🐘 par défaut), utilisez [`mastodon.css`](mastodon.css).
174 | - Si l'image est une image **sans transparence** qui gagne à être proprement cadrée et centrée, utilisez [`instance.css`](instance.css).
175 | - Si vous voulez utilisez une **image de votre choix** (ou **pas d'image**) :
176 | - Si elle a de la transparence et gagne à rester dans le coin en bas à gauche, utilisez [`custom-transp.css`](custom-transp.css).
177 | - Si elle n'a pas de transparence, et gagne à être cadrée et centrée, utilisez [`custom.css`](custom.css).
178 | (Tandis que `instance.css` centrera l'image quand la colonne de gauche est trop large pour elle, `custom.css` a été créé pour utiliser une image de plus grande résolution qui prendra toute la largeur disponible, et rognera pour atteindre la hauteur attendue. Typiquement, `piaille.css` a été créé pour piaille.fr, et remplace la photo d'oiseau de l'instance par une version de meilleure qualité.)
179 |
180 | ### Personnalisation
181 |
182 | #### Choisir une image personnalisée
183 |
184 | Si vous utilisez `custom.css` ou `custom-transp.css`, trouvez ces lignes (vers la fin), et mettez l'url de l'image que vous voulez utiliser entre les parenthèses :
185 | ```css
186 | .drawer__inner__mastodon {
187 | background: url(""); /* 👈 Put image url here. */
188 | ```
189 |
190 | Avec `custom.css`, par défaut, quand l'image est rognée, c'est son centre qui est gardé. Ce n'est peut-être pas le comportement idéal pour votre image, mais vous pouvez le changer en modifiant la ligne suivante :
191 | ```css
192 | background-position: center center;
193 | ```
194 | Le premier `center` (centre) peut être remplacé avec `top` (haut) ou `bottom` (bas), et le second `center` par `left` (gauche) or `right` (droite), selon la zone de l'image que vous souhaitez garder.
195 |
196 | #### Autres modifications personnelles
197 |
198 | Vous pouvez modifier le reste du code comme vous le souhaitez. Pour ceux et celles qui ne maîtrisent pas le CSS, voilà quelques modifications que vous pourriez vouloir faire et comment :
199 |
200 | Vous n'aimez pas les nouvelles couleurs ?
201 |
202 | Retirez simplement toute la section *Recolor* dans le code (de `/* Recolor */` à `/* Roundness */`).
203 |
204 | Si vous n'aimez juste pas le gradient dans la colonne de gauche, retirez :
205 | ```css
206 | .drawer__inner {
207 | background: linear-gradient(0deg, $left-bottom 0%, $left-top 100%);
208 | }
209 | ```
210 | Pour toutefois garder une couleur légèrement plus sombre mais sans gradient, vous pouvez aussi remplacer ce code par :
211 | ```css
212 | .drawer__inner {
213 | background: #333746;
214 | }
215 | ```
216 |
217 |
218 |
219 | L'image en pas à gauche est trop petite ou devient trop grande ?
220 |
221 | Cherchez ces lignes et changez la hauteur maximale (`max-height`, qui est par défaut à 200 px) comme vous le souhaitez :
222 | ```css
223 | .drawer__inner__mastodon {
224 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
225 | ```
226 |
227 |
228 |
229 | Fixer des largeurs de colonne par défaut
230 |
231 | Il n'est pas possible de mémoriser les largeurs des colonnes pour les réutiliser la prochaine fois où vous ouvrirez la page. En revanche il est possible de fixer des largeurs par défaut en ajoutant des lignes au code CSS.
232 |
233 | Pour la colonne de gauche :
234 | ```css
235 | .drawer { width: 20%; }
236 | ```
237 |
238 | Pour les autres colonnes :
239 | ```css
240 | .column { width: 20%; }
241 | ```
242 |
243 | Pour la deuxième colonne (“Accueil”) :
244 | ```css
245 | .column:nth-of-type(2) { width: 20%; }
246 | ```
247 |
248 | Pour la troisième colonne (“Notifications”) :
249 | ```css
250 | .column:nth-of-type(2) { width: 20%; }
251 | ```
252 |
253 | Les exemples précédents fixent la largeur de la ou des colonnes à 20% de la largeur de la page, mais vous pouvez mettre ce que vous voulez. Vous pouvez aussi utiliser des pixels comme unité (ex. en remplaçant `20%` par `400px`), ou même des calculs entre pourcents et pixels (ex. en remplaçant `20%` par `calc( 25% - 30px )`).
254 |
255 |
256 |
257 |
258 |
259 | ---
260 |
261 | # Notes to developers
262 |
263 | If you want to toy with this project, know that the CSS files are compiled from the SCSS files in the `sccs/` folder.
264 | This avoids to manually duplicate the same pieces of code throughout the various CSS files.
265 |
266 | The CSS might not be optimally organized: some selectors can appear several times.
267 | This is because I prioritized ease of modification for the users (including those not knowing CSS).
268 | Thus, the CSS is thematically organized (based on what it does), and a user can easily delete a whole section if they do not like what it does.
269 |
--------------------------------------------------------------------------------
/custom-transp.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* By: Bunker D
3 | Twitter: @Bunker_D_
4 | Mastodon: @bunkerd@piaille.fr
5 | Email: contact@bunkerd.fr
6 | License: GNU AGPL
7 | */
8 | /* Columns: resizable, spread, round */
9 | .drawer {
10 | margin-right: auto;
11 | resize: horizontal;
12 | min-width: 240px;
13 | }
14 |
15 | .column {
16 | padding: 0 !important;
17 | margin: 0.5em;
18 | margin-right: auto;
19 | border-radius: 25px;
20 | resize: horizontal;
21 | }
22 |
23 | .column-header {
24 | padding: 0 0.4em 0 0.1em;
25 | }
26 |
27 | .column-header__back-button {
28 | background-color: inherit;
29 | }
30 |
31 | .drawer__inner {
32 | display: flex;
33 | scrollbar-width: thin;
34 | scrollbar-color: #282c39 #20232c;
35 | }
36 |
37 | .drawer__inner__mastodon {
38 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
39 | background: none;
40 | flex: none;
41 | margin: auto 0 0 0;
42 | }
43 |
44 | /* Recolor */
45 | body {
46 | background: #16191e;
47 | }
48 |
49 | .compose-form .autosuggest-textarea__textarea,
50 | .compose-form .spoiler-input__input,
51 | .compose-form .compose-form__modifiers {
52 | background: #181a1b;
53 | color: #ddd;
54 | }
55 | .compose-form .compose-form__buttons-wrapper {
56 | background: #232628;
57 | }
58 |
59 | .text-icon-button,
60 | .icon-button.inverted,
61 | .character-counter {
62 | color: #a8a9a9;
63 | }
64 |
65 | .search__input {
66 | background: #20232c;
67 | }
68 |
69 | .search__input:focus {
70 | background: #242733;
71 | }
72 |
73 | .search-popout {
74 | background: #181a1b;
75 | color: #98B0C6;
76 | }
77 | .search-popout em {
78 | color: #ddd;
79 | }
80 |
81 | .column-header,
82 | .column-header__button {
83 | background: #282c39;
84 | }
85 |
86 | .column-header__collapsible {
87 | scrollbar-width: thin;
88 | scrollbar-color: #393f4f #20232c;
89 | }
90 |
91 | .column > .scrollable {
92 | background: #20232c;
93 | scrollbar-width: thin;
94 | scrollbar-color: #282c39 #20232c;
95 | }
96 |
97 | .column-link {
98 | background: #20232c;
99 | }
100 |
101 | .account__header__bar,
102 | .column-back-button,
103 | .detailed-status,
104 | .detailed-status__action-bar {
105 | background: #282c39;
106 | }
107 |
108 | .drawer__inner {
109 | background: linear-gradient(0deg, #20232c 0%, #333746 100%);
110 | }
111 |
112 | /* Roundness */
113 | .drawer__header, .drawer__tab {
114 | border-radius: 25px;
115 | }
116 |
117 | .search__input {
118 | border-radius: 25px;
119 | padding-left: 20px;
120 | }
121 |
122 | .search__icon .fa {
123 | right: 20px;
124 | }
125 |
126 | .drawer__pager {
127 | border-radius: 10px 10px 25px 25px;
128 | }
129 |
130 | .autosuggest-textarea textarea {
131 | border-radius: 12px 12px 0 0 !important;
132 | }
133 |
134 | .compose-form__buttons-wrapper {
135 | border-radius: 0 0 12px 12px !important;
136 | }
137 |
138 | .compose-form__publish-button-wrapper button {
139 | border-radius: 12px !important;
140 | }
141 |
142 | /* Default widths */
143 | .drawer { /* Left pannel */
144 | width: 15%;
145 | }
146 |
147 | .column { /* Other pannels */
148 | width: 17%;
149 | }
150 |
151 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
152 | width: 27%;
153 | }
154 |
155 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
156 | width: 22%;
157 | }
158 |
159 | /* Custom picture */
160 | .drawer__inner__mastodon {
161 | background: url(""); /* 👈 Put image url here. */
162 | background-repeat: no-repeat;
163 | background-size: contain;
164 | background-position: bottom left;
165 | height: 5000px;
166 | }
167 |
168 | .drawer__inner__mastodon img {
169 | visibility: hidden;
170 | }
--------------------------------------------------------------------------------
/custom.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* By: Bunker D
3 | Twitter: @Bunker_D_
4 | Mastodon: @bunkerd@piaille.fr
5 | Email: contact@bunkerd.fr
6 | License: GNU AGPL
7 | */
8 | /* Columns: resizable, spread, round */
9 | .drawer {
10 | margin-right: auto;
11 | resize: horizontal;
12 | min-width: 240px;
13 | }
14 |
15 | .column {
16 | padding: 0 !important;
17 | margin: 0.5em;
18 | margin-right: auto;
19 | border-radius: 25px;
20 | resize: horizontal;
21 | }
22 |
23 | .column-header {
24 | padding: 0 0.4em 0 0.1em;
25 | }
26 |
27 | .column-header__back-button {
28 | background-color: inherit;
29 | }
30 |
31 | .drawer__inner {
32 | display: flex;
33 | scrollbar-width: thin;
34 | scrollbar-color: #282c39 #20232c;
35 | }
36 |
37 | .drawer__inner__mastodon {
38 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
39 | background: none;
40 | flex: none;
41 | margin: auto 0 0 0;
42 | }
43 |
44 | /* Recolor */
45 | body {
46 | background: #16191e;
47 | }
48 |
49 | .compose-form .autosuggest-textarea__textarea,
50 | .compose-form .spoiler-input__input,
51 | .compose-form .compose-form__modifiers {
52 | background: #181a1b;
53 | color: #ddd;
54 | }
55 | .compose-form .compose-form__buttons-wrapper {
56 | background: #232628;
57 | }
58 |
59 | .text-icon-button,
60 | .icon-button.inverted,
61 | .character-counter {
62 | color: #a8a9a9;
63 | }
64 |
65 | .search__input {
66 | background: #20232c;
67 | }
68 |
69 | .search__input:focus {
70 | background: #242733;
71 | }
72 |
73 | .search-popout {
74 | background: #181a1b;
75 | color: #98B0C6;
76 | }
77 | .search-popout em {
78 | color: #ddd;
79 | }
80 |
81 | .column-header,
82 | .column-header__button {
83 | background: #282c39;
84 | }
85 |
86 | .column-header__collapsible {
87 | scrollbar-width: thin;
88 | scrollbar-color: #393f4f #20232c;
89 | }
90 |
91 | .column > .scrollable {
92 | background: #20232c;
93 | scrollbar-width: thin;
94 | scrollbar-color: #282c39 #20232c;
95 | }
96 |
97 | .column-link {
98 | background: #20232c;
99 | }
100 |
101 | .account__header__bar,
102 | .column-back-button,
103 | .detailed-status,
104 | .detailed-status__action-bar {
105 | background: #282c39;
106 | }
107 |
108 | .drawer__inner {
109 | background: linear-gradient(0deg, #20232c 0%, #333746 100%);
110 | }
111 |
112 | /* Roundness */
113 | .drawer__header, .drawer__tab {
114 | border-radius: 25px;
115 | }
116 |
117 | .search__input {
118 | border-radius: 25px;
119 | padding-left: 20px;
120 | }
121 |
122 | .search__icon .fa {
123 | right: 20px;
124 | }
125 |
126 | .drawer__pager {
127 | border-radius: 10px 10px 25px 25px;
128 | }
129 |
130 | .autosuggest-textarea textarea {
131 | border-radius: 12px 12px 0 0 !important;
132 | }
133 |
134 | .compose-form__buttons-wrapper {
135 | border-radius: 0 0 12px 12px !important;
136 | }
137 |
138 | .compose-form__publish-button-wrapper button {
139 | border-radius: 12px !important;
140 | }
141 |
142 | /* Default widths */
143 | .drawer { /* Left pannel */
144 | width: 15%;
145 | }
146 |
147 | .column { /* Other pannels */
148 | width: 17%;
149 | }
150 |
151 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
152 | width: 27%;
153 | }
154 |
155 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
156 | width: 22%;
157 | }
158 |
159 | /* Properly frame a custom of instance-specific bottom-left image */
160 | .drawer__inner__mastodon {
161 | padding: 10px;
162 | }
163 |
164 | .drawer__inner__mastodon img {
165 | max-width: 100%;
166 | width: unset;
167 | border-radius: 15px;
168 | height: -webkit-fit-content;
169 | height: -moz-fit-content;
170 | height: fit-content;
171 | max-height: inherit;
172 | margin: 0 auto;
173 | }
174 |
175 | /* Custom picture */
176 | .drawer__inner__mastodon {
177 | background: url(""); /* 👈 Put image url here. */
178 | background-position: center center;
179 | /* 💡 👆 Controls the focus point when cropped.
180 | First word: top, center, or bottom
181 | Second word: left, center, or right
182 | */
183 | background-repeat: no-repeat;
184 | background-size: cover;
185 | padding: 0;
186 | margin: auto 10px 10px 10px;
187 | border-radius: 15px;
188 | height: 5000px;
189 | }
190 |
191 | .drawer__inner__mastodon img {
192 | visibility: hidden;
193 | }
--------------------------------------------------------------------------------
/doc/mastodon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bunker-D/Mastodon-CSS/7a4634a36cfbd8275e0fe0f249bff42222fc3cc6/doc/mastodon.png
--------------------------------------------------------------------------------
/doc/mastodon540.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bunker-D/Mastodon-CSS/7a4634a36cfbd8275e0fe0f249bff42222fc3cc6/doc/mastodon540.mp4
--------------------------------------------------------------------------------
/instance.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* By: Bunker D
3 | Twitter: @Bunker_D_
4 | Mastodon: @bunkerd@piaille.fr
5 | Email: contact@bunkerd.fr
6 | License: GNU AGPL
7 | */
8 | /* Columns: resizable, spread, round */
9 | .drawer {
10 | margin-right: auto;
11 | resize: horizontal;
12 | min-width: 240px;
13 | }
14 |
15 | .column {
16 | padding: 0 !important;
17 | margin: 0.5em;
18 | margin-right: auto;
19 | border-radius: 25px;
20 | resize: horizontal;
21 | }
22 |
23 | .column-header {
24 | padding: 0 0.4em 0 0.1em;
25 | }
26 |
27 | .column-header__back-button {
28 | background-color: inherit;
29 | }
30 |
31 | .drawer__inner {
32 | display: flex;
33 | scrollbar-width: thin;
34 | scrollbar-color: #282c39 #20232c;
35 | }
36 |
37 | .drawer__inner__mastodon {
38 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
39 | background: none;
40 | flex: none;
41 | margin: auto 0 0 0;
42 | }
43 |
44 | /* Recolor */
45 | body {
46 | background: #16191e;
47 | }
48 |
49 | .compose-form .autosuggest-textarea__textarea,
50 | .compose-form .spoiler-input__input,
51 | .compose-form .compose-form__modifiers {
52 | background: #181a1b;
53 | color: #ddd;
54 | }
55 | .compose-form .compose-form__buttons-wrapper {
56 | background: #232628;
57 | }
58 |
59 | .text-icon-button,
60 | .icon-button.inverted,
61 | .character-counter {
62 | color: #a8a9a9;
63 | }
64 |
65 | .search__input {
66 | background: #20232c;
67 | }
68 |
69 | .search__input:focus {
70 | background: #242733;
71 | }
72 |
73 | .search-popout {
74 | background: #181a1b;
75 | color: #98B0C6;
76 | }
77 | .search-popout em {
78 | color: #ddd;
79 | }
80 |
81 | .column-header,
82 | .column-header__button {
83 | background: #282c39;
84 | }
85 |
86 | .column-header__collapsible {
87 | scrollbar-width: thin;
88 | scrollbar-color: #393f4f #20232c;
89 | }
90 |
91 | .column > .scrollable {
92 | background: #20232c;
93 | scrollbar-width: thin;
94 | scrollbar-color: #282c39 #20232c;
95 | }
96 |
97 | .column-link {
98 | background: #20232c;
99 | }
100 |
101 | .account__header__bar,
102 | .column-back-button,
103 | .detailed-status,
104 | .detailed-status__action-bar {
105 | background: #282c39;
106 | }
107 |
108 | .drawer__inner {
109 | background: linear-gradient(0deg, #20232c 0%, #333746 100%);
110 | }
111 |
112 | /* Roundness */
113 | .drawer__header, .drawer__tab {
114 | border-radius: 25px;
115 | }
116 |
117 | .search__input {
118 | border-radius: 25px;
119 | padding-left: 20px;
120 | }
121 |
122 | .search__icon .fa {
123 | right: 20px;
124 | }
125 |
126 | .drawer__pager {
127 | border-radius: 10px 10px 25px 25px;
128 | }
129 |
130 | .autosuggest-textarea textarea {
131 | border-radius: 12px 12px 0 0 !important;
132 | }
133 |
134 | .compose-form__buttons-wrapper {
135 | border-radius: 0 0 12px 12px !important;
136 | }
137 |
138 | .compose-form__publish-button-wrapper button {
139 | border-radius: 12px !important;
140 | }
141 |
142 | /* Default widths */
143 | .drawer { /* Left pannel */
144 | width: 15%;
145 | }
146 |
147 | .column { /* Other pannels */
148 | width: 17%;
149 | }
150 |
151 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
152 | width: 27%;
153 | }
154 |
155 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
156 | width: 22%;
157 | }
158 |
159 | /* Properly frame a custom of instance-specific bottom-left image */
160 | .drawer__inner__mastodon {
161 | padding: 10px;
162 | }
163 |
164 | .drawer__inner__mastodon img {
165 | max-width: 100%;
166 | width: unset;
167 | border-radius: 15px;
168 | height: -webkit-fit-content;
169 | height: -moz-fit-content;
170 | height: fit-content;
171 | max-height: inherit;
172 | margin: 0 auto;
173 | }
--------------------------------------------------------------------------------
/mastodon.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* By: Bunker D
3 | Twitter: @Bunker_D_
4 | Mastodon: @bunkerd@piaille.fr
5 | Email: contact@bunkerd.fr
6 | License: GNU AGPL
7 | */
8 | /* Columns: resizable, spread, round */
9 | .drawer {
10 | margin-right: auto;
11 | resize: horizontal;
12 | min-width: 240px;
13 | }
14 |
15 | .column {
16 | padding: 0 !important;
17 | margin: 0.5em;
18 | margin-right: auto;
19 | border-radius: 25px;
20 | resize: horizontal;
21 | }
22 |
23 | .column-header {
24 | padding: 0 0.4em 0 0.1em;
25 | }
26 |
27 | .column-header__back-button {
28 | background-color: inherit;
29 | }
30 |
31 | .drawer__inner {
32 | display: flex;
33 | scrollbar-width: thin;
34 | scrollbar-color: #282c39 #20232c;
35 | }
36 |
37 | .drawer__inner__mastodon {
38 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
39 | background: none;
40 | flex: none;
41 | margin: auto 0 0 0;
42 | }
43 |
44 | /* Recolor */
45 | body {
46 | background: #16191e;
47 | }
48 |
49 | .compose-form .autosuggest-textarea__textarea,
50 | .compose-form .spoiler-input__input,
51 | .compose-form .compose-form__modifiers {
52 | background: #181a1b;
53 | color: #ddd;
54 | }
55 | .compose-form .compose-form__buttons-wrapper {
56 | background: #232628;
57 | }
58 |
59 | .text-icon-button,
60 | .icon-button.inverted,
61 | .character-counter {
62 | color: #a8a9a9;
63 | }
64 |
65 | .search__input {
66 | background: #20232c;
67 | }
68 |
69 | .search__input:focus {
70 | background: #242733;
71 | }
72 |
73 | .search-popout {
74 | background: #181a1b;
75 | color: #98B0C6;
76 | }
77 | .search-popout em {
78 | color: #ddd;
79 | }
80 |
81 | .column-header,
82 | .column-header__button {
83 | background: #282c39;
84 | }
85 |
86 | .column-header__collapsible {
87 | scrollbar-width: thin;
88 | scrollbar-color: #393f4f #20232c;
89 | }
90 |
91 | .column > .scrollable {
92 | background: #20232c;
93 | scrollbar-width: thin;
94 | scrollbar-color: #282c39 #20232c;
95 | }
96 |
97 | .column-link {
98 | background: #20232c;
99 | }
100 |
101 | .account__header__bar,
102 | .column-back-button,
103 | .detailed-status,
104 | .detailed-status__action-bar {
105 | background: #282c39;
106 | }
107 |
108 | .drawer__inner {
109 | background: linear-gradient(0deg, #20232c 0%, #333746 100%);
110 | }
111 |
112 | /* Roundness */
113 | .drawer__header, .drawer__tab {
114 | border-radius: 25px;
115 | }
116 |
117 | .search__input {
118 | border-radius: 25px;
119 | padding-left: 20px;
120 | }
121 |
122 | .search__icon .fa {
123 | right: 20px;
124 | }
125 |
126 | .drawer__pager {
127 | border-radius: 10px 10px 25px 25px;
128 | }
129 |
130 | .autosuggest-textarea textarea {
131 | border-radius: 12px 12px 0 0 !important;
132 | }
133 |
134 | .compose-form__buttons-wrapper {
135 | border-radius: 0 0 12px 12px !important;
136 | }
137 |
138 | .compose-form__publish-button-wrapper button {
139 | border-radius: 12px !important;
140 | }
141 |
142 | /* Default widths */
143 | .drawer { /* Left pannel */
144 | width: 15%;
145 | }
146 |
147 | .column { /* Other pannels */
148 | width: 17%;
149 | }
150 |
151 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
152 | width: 27%;
153 | }
154 |
155 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
156 | width: 22%;
157 | }
--------------------------------------------------------------------------------
/piaille.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* By: Bunker D
3 | Twitter: @Bunker_D_
4 | Mastodon: @bunkerd@piaille.fr
5 | Email: contact@bunkerd.fr
6 | License: GNU AGPL
7 | */
8 | /* Columns: resizable, spread, round */
9 | .drawer {
10 | margin-right: auto;
11 | resize: horizontal;
12 | min-width: 240px;
13 | }
14 |
15 | .column {
16 | padding: 0 !important;
17 | margin: 0.5em;
18 | margin-right: auto;
19 | border-radius: 25px;
20 | resize: horizontal;
21 | }
22 |
23 | .column-header {
24 | padding: 0 0.4em 0 0.1em;
25 | }
26 |
27 | .column-header__back-button {
28 | background-color: inherit;
29 | }
30 |
31 | .drawer__inner {
32 | display: flex;
33 | scrollbar-width: thin;
34 | scrollbar-color: #282c39 #20232c;
35 | }
36 |
37 | .drawer__inner__mastodon {
38 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
39 | background: none;
40 | flex: none;
41 | margin: auto 0 0 0;
42 | }
43 |
44 | /* Recolor */
45 | body {
46 | background: #16191e;
47 | }
48 |
49 | .compose-form .autosuggest-textarea__textarea,
50 | .compose-form .spoiler-input__input,
51 | .compose-form .compose-form__modifiers {
52 | background: #181a1b;
53 | color: #ddd;
54 | }
55 | .compose-form .compose-form__buttons-wrapper {
56 | background: #232628;
57 | }
58 |
59 | .text-icon-button,
60 | .icon-button.inverted,
61 | .character-counter {
62 | color: #a8a9a9;
63 | }
64 |
65 | .search__input {
66 | background: #20232c;
67 | }
68 |
69 | .search__input:focus {
70 | background: #242733;
71 | }
72 |
73 | .search-popout {
74 | background: #181a1b;
75 | color: #98B0C6;
76 | }
77 | .search-popout em {
78 | color: #ddd;
79 | }
80 |
81 | .column-header,
82 | .column-header__button {
83 | background: #282c39;
84 | }
85 |
86 | .column-header__collapsible {
87 | scrollbar-width: thin;
88 | scrollbar-color: #393f4f #20232c;
89 | }
90 |
91 | .column > .scrollable {
92 | background: #20232c;
93 | scrollbar-width: thin;
94 | scrollbar-color: #282c39 #20232c;
95 | }
96 |
97 | .column-link {
98 | background: #20232c;
99 | }
100 |
101 | .account__header__bar,
102 | .column-back-button,
103 | .detailed-status,
104 | .detailed-status__action-bar {
105 | background: #282c39;
106 | }
107 |
108 | .drawer__inner {
109 | background: linear-gradient(0deg, #20232c 0%, #333746 100%);
110 | }
111 |
112 | /* Roundness */
113 | .drawer__header, .drawer__tab {
114 | border-radius: 25px;
115 | }
116 |
117 | .search__input {
118 | border-radius: 25px;
119 | padding-left: 20px;
120 | }
121 |
122 | .search__icon .fa {
123 | right: 20px;
124 | }
125 |
126 | .drawer__pager {
127 | border-radius: 10px 10px 25px 25px;
128 | }
129 |
130 | .autosuggest-textarea textarea {
131 | border-radius: 12px 12px 0 0 !important;
132 | }
133 |
134 | .compose-form__buttons-wrapper {
135 | border-radius: 0 0 12px 12px !important;
136 | }
137 |
138 | .compose-form__publish-button-wrapper button {
139 | border-radius: 12px !important;
140 | }
141 |
142 | /* Default widths */
143 | .drawer { /* Left pannel */
144 | width: 15%;
145 | }
146 |
147 | .column { /* Other pannels */
148 | width: 17%;
149 | }
150 |
151 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
152 | width: 27%;
153 | }
154 |
155 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
156 | width: 22%;
157 | }
158 |
159 | /* Properly frame a custom of instance-specific bottom-left image */
160 | .drawer__inner__mastodon {
161 | padding: 10px;
162 | }
163 |
164 | .drawer__inner__mastodon img {
165 | max-width: 100%;
166 | width: unset;
167 | border-radius: 15px;
168 | height: -webkit-fit-content;
169 | height: -moz-fit-content;
170 | height: fit-content;
171 | max-height: inherit;
172 | margin: 0 auto;
173 | }
174 |
175 | /* Custom picture */
176 | .drawer__inner__mastodon {
177 | background: url("https://piaille.fr/system/accounts/headers/109/268/390/733/962/322/original/3e8ce35840f9b144.jpg"); /* 👈 Put image url here. */
178 | background-position: center center;
179 | /* 💡 👆 Controls the focus point when cropped.
180 | First word: top, center, or bottom
181 | Second word: left, center, or right
182 | */
183 | background-repeat: no-repeat;
184 | background-size: cover;
185 | padding: 0;
186 | margin: auto 10px 10px 10px;
187 | border-radius: 15px;
188 | height: 5000px;
189 | }
190 |
191 | .drawer__inner__mastodon img {
192 | visibility: hidden;
193 | }
--------------------------------------------------------------------------------
/scss/custom-transp.scss:
--------------------------------------------------------------------------------
1 | @import "mastodon.scss";
2 |
3 | $img-url: "" !default;
4 |
5 | /* Custom picture */
6 | .drawer__inner__mastodon {
7 | background: url( $img-url ); /* 👈 Put image url here. */
8 | background-repeat: no-repeat;
9 | background-size: contain;
10 | background-position: bottom left;
11 | height: 5000px;
12 | }
13 | .drawer__inner__mastodon img {
14 | visibility: hidden;
15 | }
16 |
--------------------------------------------------------------------------------
/scss/custom.scss:
--------------------------------------------------------------------------------
1 | @import "instance.scss";
2 |
3 | $img-url: "" !default;
4 |
5 | /* Custom picture */
6 | .drawer__inner__mastodon {
7 | background: url( $img-url ); /* 👈 Put image url here. */
8 | background-position: center center;
9 | /* 💡 👆 Controls the focus point when cropped.
10 | First word: top, center, or bottom
11 | Second word: left, center, or right
12 | */
13 | background-repeat: no-repeat;
14 | background-size: cover;
15 | padding: 0;
16 | margin: auto 10px 10px 10px;
17 | border-radius: calc($corners - 10px);
18 | height: 5000px;
19 | }
20 | .drawer__inner__mastodon img {
21 | visibility: hidden;
22 | }
23 |
--------------------------------------------------------------------------------
/scss/instance.scss:
--------------------------------------------------------------------------------
1 | @import "mastodon.scss";
2 |
3 | /* Properly frame a custom of instance-specific bottom-left image */
4 | .drawer__inner__mastodon {
5 | padding: 10px;
6 | }
7 | .drawer__inner__mastodon img {
8 | max-width: 100%;
9 | width: unset;
10 | border-radius: calc($corners - 10px);
11 | height: fit-content;
12 | max-height: inherit;
13 | margin: 0 auto;
14 | }
15 |
--------------------------------------------------------------------------------
/scss/mastodon.scss:
--------------------------------------------------------------------------------
1 | /* By: Bunker D
2 | Twitter: @Bunker_D_
3 | Mastodon: @bunkerd@piaille.fr
4 | Email: contact@bunkerd.fr
5 | License: GNU AGPL
6 | */
7 |
8 | $body-bg: #16191e;
9 | $input-bg: #181a1b;
10 | $input-col: #ddd;
11 | $input-hl: #98B0C6;
12 | $input-bottom-bg: #232628;
13 | $input-bottom-col: #a8a9a9;
14 | $search-bg: #20232c;
15 | $search-focus: #242733;
16 | $left-top: #333746;
17 | $left-bottom: #20232c;
18 | $column-bg: #20232c;
19 | $column-head: #282c39;
20 | $column-head-drop: #393f4f;
21 |
22 | $corners: 25px;
23 | $corners-small: 10px;
24 | $corners-input: 12px;
25 |
26 | /* Columns: resizable, spread, round */
27 |
28 | .drawer {
29 | margin-right: auto;
30 | resize: horizontal;
31 | min-width: 240px;
32 | }
33 | .column {
34 | padding: 0 !important;
35 | margin: .5em;
36 | margin-right: auto;
37 | border-radius: $corners;
38 | resize: horizontal;
39 | }
40 | .column-header {
41 | padding: 0 .4em 0 .1em;
42 | }
43 | .column-header__back-button{
44 | background-color: inherit;
45 | }
46 | .drawer__inner {
47 | display: flex;
48 | scrollbar-width: thin;
49 | scrollbar-color: $column-head $column-bg;
50 | }
51 | .drawer__inner__mastodon {
52 | max-height: 200px; /* 💡 If the bottom-left picture grows to big, change that. */
53 | background: none;
54 | flex: none;
55 | margin: auto 0 0 0;
56 | }
57 |
58 | /* Recolor */
59 |
60 | body {
61 | background: $body-bg;
62 | }
63 |
64 | .compose-form {
65 | .autosuggest-textarea__textarea,
66 | .spoiler-input__input,
67 | .compose-form__modifiers {
68 | background: $input-bg;
69 | color: $input-col;
70 | }
71 | .compose-form__buttons-wrapper {
72 | background: $input-bottom-bg;
73 | }
74 | }
75 |
76 | .text-icon-button,
77 | .icon-button.inverted,
78 | .character-counter {
79 | color: $input-bottom-col;
80 | }
81 |
82 | .search__input {
83 | background: $search-bg
84 | }
85 | .search__input:focus {
86 | background: $search-focus
87 | }
88 |
89 | .search-popout {
90 | background: $input-bg;
91 | color: $input-hl;
92 | em {
93 | color: $input-col;
94 | }
95 | }
96 |
97 | .column-header,
98 | .column-header__button {
99 | background: $column-head;
100 | }
101 | .column-header__collapsible {
102 | scrollbar-width: thin;
103 | scrollbar-color: $column-head-drop $column-bg;
104 | }
105 |
106 | .column > .scrollable {
107 | background: $column-bg;
108 | scrollbar-width: thin;
109 | scrollbar-color: $column-head $column-bg;
110 | }
111 |
112 | .column-link {
113 | background: $column-bg;
114 | }
115 | .account__header__bar,
116 | .column-back-button,
117 | .detailed-status,
118 | .detailed-status__action-bar {
119 | background: $column-head;
120 | }
121 |
122 | .drawer__inner {
123 | background: linear-gradient(0deg, $left-bottom 0%, $left-top 100%);
124 | }
125 |
126 | /* Roundness */
127 |
128 | .drawer__header, .drawer__tab {
129 | border-radius: $corners;
130 | }
131 | .search__input {
132 | border-radius: $corners;
133 | padding-left: 20px
134 | }
135 | .search__icon .fa {
136 | right: 20px;
137 | }
138 | .drawer__pager {
139 | border-radius: $corners-small $corners-small $corners $corners;
140 | }
141 | .autosuggest-textarea textarea {
142 | border-radius: $corners-input $corners-input 0 0 !important;
143 | }
144 | .compose-form__buttons-wrapper {
145 | border-radius: 0 0 $corners-input $corners-input !important;
146 | }
147 | .compose-form__publish-button-wrapper button {
148 | border-radius: $corners-input !important;
149 | }
150 |
151 | /* Default widths */
152 |
153 | .drawer{ /* Left pannel */
154 | width: 15%;
155 | }
156 |
157 | .column{ /* Other pannels */
158 | width: 17%;
159 | }
160 |
161 | .column:nth-of-type(2) { /* Second pannel (overriding “other pannels”) */
162 | width: 27%;
163 | }
164 |
165 | .column:nth-of-type(4) { /* Fourth pannel (overriding “other pannels”) */
166 | width: 22%;
167 | }
168 |
--------------------------------------------------------------------------------
/scss/piaille.scss:
--------------------------------------------------------------------------------
1 | $img-url: "https://piaille.fr/system/accounts/headers/109/268/390/733/962/322/original/3e8ce35840f9b144.jpg";
2 | @import "custom.scss";
--------------------------------------------------------------------------------