Theming and such
This commit is contained in:
parent
6c658d9680
commit
1a7157000a
@ -70,3 +70,23 @@ docker-compose.override.yml
|
|||||||
# Ignore locale files
|
# Ignore locale files
|
||||||
/app/javascript/mastodon/locales
|
/app/javascript/mastodon/locales
|
||||||
/config/locales
|
/config/locales
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
|
||||||
|
# Ignore vendored CSS reset
|
||||||
|
app/javascript/styles/mastodon/reset.scss
|
||||||
|
|
||||||
|
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
|
||||||
|
*.js
|
||||||
|
*.jsx
|
||||||
|
*.ts
|
||||||
|
*.tsx
|
||||||
|
|
||||||
|
# Ignore HTML till cleaned and included in CI
|
||||||
|
*.html
|
||||||
|
|
||||||
|
# Ignore the generated AUTHORS.md
|
||||||
|
AUTHORS.md
|
||||||
|
|
||||||
|
/Mastodon-Modern
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
@ -90,7 +90,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
const fulltext = this.getFulltextForCharacterCounting();
|
const fulltext = this.getFulltextForCharacterCounting();
|
||||||
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
||||||
|
|
||||||
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
|
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 1500 || (isOnlyWhitespace && !anyMedia));
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSubmit = (e) => {
|
handleSubmit = (e) => {
|
||||||
@ -280,7 +280,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='character-counter__wrapper'>
|
<div className='character-counter__wrapper'>
|
||||||
<CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} />
|
<CharacterCounter max={1500} text={this.getFulltextForCharacterCounting()} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
8
app/javascript/styles/modern-dark-wobbl.scss
Normal file
8
app/javascript/styles/modern-dark-wobbl.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@import 'wobbl/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
8
app/javascript/styles/modern-dark.scss
Normal file
8
app/javascript/styles/modern-dark.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@import 'mastodon/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
9
app/javascript/styles/modern-light-wobbl.scss
Normal file
9
app/javascript/styles/modern-light-wobbl.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import 'wobbl-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
9
app/javascript/styles/modern-light.scss
Normal file
9
app/javascript/styles/modern-light.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import 'mastodon-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
4640
app/javascript/styles/modern/modern.scss
Normal file
4640
app/javascript/styles/modern/modern.scss
Normal file
File diff suppressed because it is too large
Load Diff
4
app/javascript/styles/wobbl-light.scss
Normal file
4
app/javascript/styles/wobbl-light.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@import 'wobbl-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
44
app/javascript/styles/wobbl-light/variables.scss
Normal file
44
app/javascript/styles/wobbl-light/variables.scss
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Dependent colors
|
||||||
|
$black: #000000;
|
||||||
|
$white: #ffffff;
|
||||||
|
|
||||||
|
$classic-base-color: #191919;// Dark Gray
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #FF8680; // Paler red
|
||||||
|
$classic-highlight-color: #850700; // Red highlights
|
||||||
|
|
||||||
|
// Differences
|
||||||
|
$success-green: lighten(#3c754d, 8%);
|
||||||
|
|
||||||
|
$base-overlay-background: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
|
||||||
|
$ui-base-color: $classic-primary-color !default;
|
||||||
|
$ui-base-lighter-color: #b0c0cf;
|
||||||
|
$ui-primary-color: #9bcbed;
|
||||||
|
$ui-secondary-color: $classic-base-color !default;
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
$primary-text-color: $black !default;
|
||||||
|
$darker-text-color: $classic-base-color !default;
|
||||||
|
$highlight-text-color: darken($ui-highlight-color, 8%) !default;
|
||||||
|
$dark-text-color: #444b5d;
|
||||||
|
$action-button-color: #606984;
|
||||||
|
|
||||||
|
$inverted-text-color: $black !default;
|
||||||
|
$lighter-text-color: $classic-base-color !default;
|
||||||
|
$light-text-color: #444b5d;
|
||||||
|
|
||||||
|
// Newly added colors
|
||||||
|
$account-background-color: $white !default;
|
||||||
|
|
||||||
|
// Invert darkened and lightened colors
|
||||||
|
@function darken($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) + $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function lighten($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) - $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
$emojis-requiring-inversion: 'chains';
|
2
app/javascript/styles/wobbl.scss
Normal file
2
app/javascript/styles/wobbl.scss
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@import 'wobbl/variables';
|
||||||
|
@import 'application';
|
60
app/javascript/styles/wobbl/variables.scss
Normal file
60
app/javascript/styles/wobbl/variables.scss
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Commonly used web colors
|
||||||
|
$black: #000000; // Black
|
||||||
|
$white: #ffffff; // White
|
||||||
|
$success-green: #79bd9a !default; // Padua
|
||||||
|
$error-red: #df405a !default; // Cerise
|
||||||
|
$warning-red: #ff5050 !default; // Sunset Orange
|
||||||
|
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
||||||
|
|
||||||
|
$red-bookmark: $warning-red;
|
||||||
|
|
||||||
|
// Values from the classic Mastodon UI
|
||||||
|
$classic-base-color: #191919;// Dark Gray
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #FF8680; // Paler red
|
||||||
|
$classic-highlight-color: #850700; // Red highlights
|
||||||
|
|
||||||
|
// Variables for defaults in UI
|
||||||
|
$base-shadow-color: $black !default;
|
||||||
|
$base-overlay-background: $black !default;
|
||||||
|
$base-border-color: $white !default;
|
||||||
|
$simple-background-color: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
$error-value-color: $error-red !default;
|
||||||
|
|
||||||
|
// Tell UI to use selected colors
|
||||||
|
$ui-base-color: $classic-base-color !default; // Darkest
|
||||||
|
$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
|
||||||
|
$ui-primary-color: $classic-primary-color !default; // Lighter
|
||||||
|
$ui-secondary-color: $classic-secondary-color !default; // Lightest
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
// Variables for texts
|
||||||
|
$primary-text-color: $white !default;
|
||||||
|
$darker-text-color: $ui-primary-color !default;
|
||||||
|
$dark-text-color: $ui-base-lighter-color !default;
|
||||||
|
$secondary-text-color: $ui-secondary-color !default;
|
||||||
|
$highlight-text-color: lighten($ui-highlight-color, 8%) !default;
|
||||||
|
$action-button-color: $ui-base-lighter-color !default;
|
||||||
|
$passive-text-color: $gold-star !default;
|
||||||
|
$active-passive-text-color: $success-green !default;
|
||||||
|
|
||||||
|
// For texts on inverted backgrounds
|
||||||
|
$inverted-text-color: $ui-base-color !default;
|
||||||
|
$lighter-text-color: $ui-base-lighter-color !default;
|
||||||
|
$light-text-color: $ui-primary-color !default;
|
||||||
|
|
||||||
|
// Language codes that uses CJK fonts
|
||||||
|
$cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||||
|
|
||||||
|
// Variables for components
|
||||||
|
$media-modal-media-max-width: 100%;
|
||||||
|
|
||||||
|
// put margins on top and bottom of image to avoid the screen covered by image.
|
||||||
|
$media-modal-media-max-height: 80%;
|
||||||
|
|
||||||
|
$no-gap-breakpoint: 1175px;
|
||||||
|
|
||||||
|
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||||
|
$font-display: 'mastodon-font-display' !default;
|
||||||
|
$font-monospace: 'mastodon-font-monospace' !default;
|
@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||||||
|
|
||||||
attributes :domain, :title, :version, :source_url, :description,
|
attributes :domain, :title, :version, :source_url, :description,
|
||||||
:usage, :thumbnail, :languages, :configuration,
|
:usage, :thumbnail, :languages, :configuration,
|
||||||
:registrations
|
:registrations, :max_toot_chars
|
||||||
|
|
||||||
has_one :contact, serializer: ContactSerializer
|
has_one :contact, serializer: ContactSerializer
|
||||||
has_many :rules, serializer: REST::RuleSerializer
|
has_many :rules, serializer: REST::RuleSerializer
|
||||||
@ -88,6 +88,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def max_toot_chars
|
||||||
|
1500
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def registrations_enabled?
|
def registrations_enabled?
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusLengthValidator < ActiveModel::Validator
|
class StatusLengthValidator < ActiveModel::Validator
|
||||||
MAX_CHARS = 500
|
MAX_CHARS = 1500
|
||||||
URL_PLACEHOLDER_CHARS = 23
|
URL_PLACEHOLDER_CHARS = 23
|
||||||
URL_PLACEHOLDER = 'x' * 23
|
URL_PLACEHOLDER = 'x' * 23
|
||||||
|
|
||||||
|
@ -1596,8 +1596,14 @@ en:
|
|||||||
does_not_match_previous_name: does not match the previous name
|
does_not_match_previous_name: does not match the previous name
|
||||||
themes:
|
themes:
|
||||||
contrast: Mastodon (High contrast)
|
contrast: Mastodon (High contrast)
|
||||||
default: Mastodon (Dark)
|
dark: Mastodon (Dark)
|
||||||
mastodon-light: Mastodon (Light)
|
mastodon-light: Mastodon (Light)
|
||||||
|
wobbl: Mastodon (Dark - Wobbl theme)
|
||||||
|
wobbl-light: Mastodon (Light - Wobbl theme)
|
||||||
|
modern-dark: Modern (Dark)
|
||||||
|
modern-light: Modern (Light)
|
||||||
|
modern-light-wobbl: Modern (Light - Wobbl theme)
|
||||||
|
default: Modern (Dark - Wobbl theme) (Default)
|
||||||
time:
|
time:
|
||||||
formats:
|
formats:
|
||||||
default: "%b %d, %Y, %H:%M"
|
default: "%b %d, %Y, %H:%M"
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
default: styles/application.scss
|
dark: styles/application.scss
|
||||||
contrast: styles/contrast.scss
|
contrast: styles/contrast.scss
|
||||||
mastodon-light: styles/mastodon-light.scss
|
mastodon-light: styles/mastodon-light.scss
|
||||||
|
wobbl: styles/wobbl.scss
|
||||||
|
wobbl-light: styles/wobbl-light.scss
|
||||||
|
modern-dark: styles/modern-dark.scss
|
||||||
|
modern-light: styles/modern-light.scss
|
||||||
|
modern-light-wobbl: styles/modern-light-wobbl.scss
|
||||||
|
default: styles/modern-dark-wobbl.scss
|
||||||
|
11
yarn.lock
11
yarn.lock
@ -1461,6 +1461,17 @@
|
|||||||
"@types/yargs" "^17.0.8"
|
"@types/yargs" "^17.0.8"
|
||||||
chalk "^4.0.0"
|
chalk "^4.0.0"
|
||||||
|
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
"@jridgewell/gen-mapping@^0.1.0":
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996"
|
||||||
|
integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==
|
||||||
|
dependencies:
|
||||||
|
"@jridgewell/set-array" "^1.0.0"
|
||||||
|
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||||
|
|
||||||
|
>>>>>>> Stashed changes
|
||||||
"@jridgewell/gen-mapping@^0.3.2":
|
"@jridgewell/gen-mapping@^0.3.2":
|
||||||
version "0.3.2"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
|
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user