customizations

This commit is contained in:
parent ee119fdea7
commit d0c986997d
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
7 changed files with 360 additions and 212 deletions

225
pom.xml

@ -1,93 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-sample-theme</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sass.version>1.54.4</sass.version>
<atlantafx.version>1.0.0</atlantafx.version>
<scss.inputDir>${project.basedir}/src</scss.inputDir>
<css.outputDir>${project.basedir}/dist</css.outputDir>
</properties>
<dependencies>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-styles</artifactId>
<version>${atlantafx.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- unpack SASS sources from atlantafx-styles jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-styles</artifactId>
<version>${atlantafx.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- build custom theme -->
<plugin>
<groupId>us.hebi.sass</groupId>
<artifactId>sass-cli-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<args>
<arg>${scss.inputDir}/sample-theme.scss:${css.outputDir}/sample-theme.css</arg>
<arg>--no-source-map</arg>
</args>
</configuration>
<executions>
<execution>
<id>run-sass</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>watch</id>
<properties>
<sass.watch>true</sass.watch>
</properties>
</profile>
</profiles>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>sh.tablet</groupId>
<artifactId>atlantafx-turquoise-theme</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sass.version>1.54.4</sass.version>
<atlantafx.version>2.0.1</atlantafx.version>
<scss.inputDir>${project.basedir}/src</scss.inputDir>
<css.outputDir>${project.basedir}/src/main/resources/sh/tablet/theme/turquoise</css.outputDir>
</properties>
<dependencies>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-styles</artifactId>
<version>${atlantafx.version}</version>
</dependency>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-base</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- unpack SASS sources from atlantafx-styles jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-styles</artifactId>
<version>${atlantafx.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- build custom theme -->
<plugin>
<groupId>us.hebi.sass</groupId>
<artifactId>sass-cli-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>run-sass</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<args>
<arg>${scss.inputDir}/style.scss:${css.outputDir}/turquoise-light.css</arg>
<arg>--no-source-map</arg>
</args>
</configuration>
</execution>
<execution>
<id>run-sass-dark</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<args>
<arg>${scss.inputDir}/style-dark.scss:${css.outputDir}/turquoise-dark.css</arg>
<arg>--no-source-map</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>watch</id>
<properties>
<sass.watch>true</sass.watch>
</properties>
</profile>
</profiles>
<repositories>
<repository>
<id>gitea</id>
<url>https://git.tablet.sh/api/packages/tablet/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://git.tablet.sh/api/packages/tablet/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://git.tablet.sh/api/packages/tablet/maven</url>
</snapshotRepository>
</distributionManagement>
</project>

8
src/common.scss Normal file

@ -0,0 +1,8 @@
@use "../target/atlantafx/styles/general";
@use "scale";
@forward "../target/atlantafx/styles/components/data" with (
$color-cell-bg-selected: scale.$accent-5,
$color-cell-fg-selected: scale.$dark
);
// modify individual control settings
@use "../target/atlantafx/styles/components";

@ -0,0 +1,30 @@
package sh.tablet.theme.turquoise;
import atlantafx.base.theme.Theme;
import org.jetbrains.annotations.Nullable;
public class TurquoiseDark implements Theme {
@Override
public String getName() {
return "Tablet's Turquoise but it's dark";
}
@Override
public String getUserAgentStylesheet() {
return "/sh/tablet/theme/turquoise/turquoise-dark.css";
}
@Override
public @Nullable String getUserAgentStylesheetBSS() {
return "";
}
@Override
public boolean isDarkMode() {
return true;
}
@Override
public boolean isDefault() {
return Theme.super.isDefault();
}
}

@ -0,0 +1,30 @@
package sh.tablet.theme.turquoise;
import atlantafx.base.theme.Theme;
import org.jetbrains.annotations.Nullable;
public class TurquoiseLight implements Theme {
@Override
public String getName() {
return "Tablet's Turquoise";
}
@Override
public String getUserAgentStylesheet() {
return "/sh/tablet/theme/turquoise/turquoise-light.css";
}
@Override
public @Nullable String getUserAgentStylesheetBSS() {
return "";
}
@Override
public boolean isDarkMode() {
return false;
}
@Override
public boolean isDefault() {
return Theme.super.isDefault();
}
}

56
src/scale.scss Normal file

@ -0,0 +1,56 @@
@forward "../target/atlantafx/styles/settings/color-scale" with (
$dark: black,
$light: white,
$base-0: #f7f7f7,
$base-1: #f1f1f1,
$base-2: #eeeeee,
$base-3: #e0e0e0,
$base-4: #bdbdbd,
$base-5: #9e9e9e,
$base-6: #757575,
$base-7: #616161,
$base-8: #424242,
$base-9: #212121,
$accent-0: #1c5b55,
$accent-1: #2A9388,
$accent-2: #2FA69A,
$accent-3: #35BAAC,
$accent-4: #3BCDBE,
$accent-5: #40E0D0,
$accent-6: #4CE8D8,
$accent-7: #59F0E0,
$accent-8: #66F7E9,
$accent-9: #74FFF1,
$success-0: #005A29,
$success-1: #056B33,
$success-2: #0B7C3E,
$success-3: #138D4A,
$success-4: #1D9E57,
$success-5: #28AF64,
$success-6: #34C073,
$success-7: #42D182,
$success-8: #52E292,
$success-9: #63F3A3,
$warning-0: #806600,
$warning-1: #8E7105,
$warning-2: #9C7C0B,
$warning-3: #AA8813,
$warning-4: #B8931B,
$warning-5: #C79F24,
$warning-6: #D5AB2E,
$warning-7: #E3B739,
$warning-8: #F1C346,
$warning-9: #FFCF53,
$danger-0: #fce4ec,
$danger-1: #f8bbd0,
$danger-2: #f48fb1,
$danger-3: #f06292,
$danger-4: #ec407a,
$danger-5: #e91e63,
$danger-6: #d81b60,
$danger-7: #c2185b,
$danger-8: #ad1457,
$danger-9: #880e4f
);

48
src/style-dark.scss Normal file

@ -0,0 +1,48 @@
@use "sass:color";
@use "./scale" as scale;
@forward "../target/atlantafx/styles/settings/color-vars" with (
$fg-default: scale.$base-1,
$fg-muted: scale.$base-3,
$fg-subtle: scale.$base-4,
$fg-onEmphasis: scale.$light,
$canvas-default: scale.$base-9,
$canvas-overlay: scale.$base-9,
$canvas-inset: scale.$dark,
$canvas-subtle: scale.$base-8,
$border-default: scale.$base-6,
$border-muted: scale.$base-7,
$border-subtle: scale.$base-9,
$shadow-default: scale.$dark,
$neutral-emphasisPlus: scale.$base-4,
$neutral-emphasis: scale.$base-4,
$neutral-muted: color.change(scale.$base-4, $alpha: 0.4),
$neutral-subtle: color.change(scale.$base-4, $alpha: 0.1),
$accent-fg: scale.$accent-3,
$accent-emphasis: scale.$accent-5,
$accent-muted: color.change(scale.$accent-4, $alpha: 0.4),
$accent-subtle: color.change(scale.$accent-4, $alpha: 0.15),
$success-fg: scale.$success-3,
$success-emphasis: scale.$success-5,
$success-muted: color.change(scale.$success-4, $alpha: 0.4),
$success-subtle: color.change(scale.$success-4, $alpha: 0.15),
$warning-fg: scale.$warning-3,
$warning-emphasis: scale.$warning-5,
$warning-muted: color.change(scale.$warning-4, $alpha: 0.4),
$warning-subtle: color.change(scale.$warning-4, $alpha: 0.15),
$danger-fg: scale.$danger-4,
$danger-emphasis: scale.$danger-5,
$danger-muted: color.change(scale.$danger-4, $alpha: 0.4),
$danger-subtle: color.change(scale.$danger-4, $alpha: 0.15)
);
@forward "../target/atlantafx/styles/settings/config" with (
$darkMode: false
);
@use "common";

@ -1,119 +1,56 @@
@use "sass:color";
/* Based on Material color palette */
// modify color scale
@forward "../target/atlantafx/styles/settings/color-scale" with (
$dark: black,
$light: white,
$base-0: #f7f7f7,
$base-1: #f1f1f1,
$base-2: #eeeeee,
$base-3: #e0e0e0,
$base-4: #bdbdbd,
$base-5: #9e9e9e,
$base-6: #757575,
$base-7: #616161,
$base-8: #424242,
$base-9: #212121,
$accent-0: #e8eaf6,
$accent-1: #c5cae9,
$accent-2: #9fa8da,
$accent-3: #7986cb,
$accent-4: #5c6bc0,
$accent-5: #3f51b5,
$accent-6: #3949ab,
$accent-7: #303f9f,
$accent-8: #283593,
$accent-9: #1a237e,
$success-0: #e0f2f1,
$success-1: #b2dfdb,
$success-2: #80cbc4,
$success-3: #4db6ac,
$success-4: #26a69a,
$success-5: #009688,
$success-6: #00897b,
$success-7: #00796b,
$success-8: #00695c,
$success-9: #004d40,
$warning-0: #fbe9e7,
$warning-1: #ffccbc,
$warning-2: #ffab91,
$warning-3: #ff8a65,
$warning-4: #ff7043,
$warning-5: #ff5722,
$warning-6: #f4511e,
$warning-7: #e64a19,
$warning-8: #d84315,
$warning-9: #bf360c,
$danger-0: #fce4ec,
$danger-1: #f8bbd0,
$danger-2: #f48fb1,
$danger-3: #f06292,
$danger-4: #ec407a,
$danger-5: #e91e63,
$danger-6: #d81b60,
$danger-7: #c2185b,
$danger-8: #ad1457,
$danger-9: #880e4f
);
@use "../target/atlantafx/styles/settings/color-scale" as scale;
// modify functional colors
@forward "../target/atlantafx/styles/settings/color-vars" with (
$fg-default: scale.$base-8,
$fg-muted: scale.$base-7,
$fg-subtle: scale.$base-6,
$fg-onEmphasis: scale.$light,
$canvas-default: scale.$light,
$canvas-overlay: scale.$light,
$canvas-inset: scale.$base-1,
$canvas-subtle: scale.$base-0,
$border-default: color.change(scale.$base-4, $alpha: 0.7),
$border-muted: scale.$base-3,
$border-subtle: scale.$base-2,
$neutral-emphasisPlus: scale.$base-8,
$neutral-emphasis: scale.$base-7,
$neutral-muted: scale.$base-5,
$neutral-subtle: scale.$base-2,
$accent-fg: scale.$accent-5,
$accent-emphasis: scale.$accent-5,
$accent-muted: color.change(scale.$accent-4, $alpha: 0.3),
$accent-subtle: color.change(scale.$accent-4, $alpha: 0.15),
$success-fg: scale.$success-7,
$success-emphasis: scale.$success-6,
$success-muted: color.change(scale.$success-4, $alpha: 0.3),
$success-subtle: color.change(scale.$success-4, $alpha: 0.1),
$warning-fg: scale.$warning-7,
$warning-emphasis: scale.$warning-7,
$warning-muted: color.change(scale.$warning-5, $alpha: 0.3),
$warning-subtle: color.change(scale.$warning-5, $alpha: 0.1),
$danger-fg: scale.$danger-7,
$danger-emphasis: scale.$danger-7,
$danger-muted: color.change(scale.$danger-4, $alpha: 0.3),
$danger-subtle: color.change(scale.$danger-4, $alpha: 0.1)
);
// modify global config
@forward "../target/atlantafx/styles/settings/config" with (
$darkMode: false
);
@use "../target/atlantafx/styles/general";
// modify individual control settings
@use "../target/atlantafx/styles/components";
@use "sass:color";
/* Based on Material color palette */
// modify color scale
@use "scale" as scale;
// modify functional colors
@forward "../target/atlantafx/styles/settings/color-vars" with (
$fg-default: scale.$base-8,
$fg-muted: scale.$base-7,
$fg-subtle: scale.$base-6,
$fg-onEmphasis: scale.$light,
$canvas-default: scale.$light,
$canvas-overlay: scale.$light,
$canvas-inset: scale.$base-1,
$canvas-subtle: scale.$base-0,
$border-default: color.change(scale.$base-4, $alpha: 0.7),
$border-muted: scale.$base-3,
$border-subtle: scale.$base-2,
$neutral-emphasisPlus: scale.$base-8,
$neutral-emphasis: scale.$base-7,
$neutral-muted: scale.$base-5,
$neutral-subtle: scale.$base-2,
$accent-fg: scale.$accent-5,
$accent-emphasis: scale.$accent-5,
$accent-muted: color.change(scale.$accent-4, $alpha: 0.3),
$accent-subtle: color.change(scale.$accent-4, $alpha: 0.15),
$success-fg: scale.$success-7,
$success-emphasis: scale.$success-6,
$success-muted: color.change(scale.$success-4, $alpha: 0.3),
$success-subtle: color.change(scale.$success-4, $alpha: 0.1),
$warning-fg: scale.$warning-7,
$warning-emphasis: scale.$warning-7,
$warning-muted: color.change(scale.$warning-5, $alpha: 0.3),
$warning-subtle: color.change(scale.$warning-5, $alpha: 0.1),
$danger-fg: scale.$danger-7,
$danger-emphasis: scale.$danger-7,
$danger-muted: color.change(scale.$danger-4, $alpha: 0.3),
$danger-subtle: color.change(scale.$danger-4, $alpha: 0.1)
);
// modify global config
@forward "../target/atlantafx/styles/settings/config" with (
$darkMode: false
);
@use "common";