Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-1108: Add new Häive color-theme

## [1.59.8] - 2025-03-03

- TMS-1109: Change ContentColumns & CallToAction TextArea fields to Wysiwyg
Expand Down
4 changes: 4 additions & 0 deletions assets/assets_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="stylesheet" href="dist/theme_kokemus.css" title="kokemus" />
<link rel="stylesheet" href="dist/theme_neutraali.css" title="neutraali" />
<link rel="stylesheet" href="dist/theme_mustavalkoinen.css" title="mustavalkoinen" />
<link rel="stylesheet" href="dist/theme_haive.css" title="haive" />

<style>
#switcher {
Expand Down Expand Up @@ -81,6 +82,9 @@ <h2>Theme options</h2>
<li>
<button rel="mustavalkoinen" class="switcher button is-primary">Musta-valkoinen</button>
</li>
<li>
<button rel="haive" class="switcher button is-primary">Häive</button>
</li>
</ul>

<hr>
Expand Down
2 changes: 2 additions & 0 deletions assets/scripts/theme-haive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './main.js';
import '../styles/theme-haive.scss';
60 changes: 60 additions & 0 deletions assets/styles/theme-haive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@import "themes/includes";





// TODO: Linkit ja ikonit paahde-värillä ( #e8b455 )


$primary: #f8de79;
$primary-invert: $color-black;
$primary-light: bulmaLighten(#f2ac58, 10);
$primary-light-invert: $color-black;
$primary-dark: bulmaDarken(#f2ac58, 20);
$primary-dark-invert: $color-black;

$secondary: #F9ECD4;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$secondary: #F9ECD4;
$secondary: #f9ecd4;

$secondary-invert: $color-black;
$secondary-light: bulmaLighten($secondary, 10);
$secondary-light-invert: $color-black;
$secondary-dark: bulmaDarken($secondary, 10);
$secondary-dark-invert: $color-black;

$light: $primary-light;
$light-invert: $primary-light-invert;
$dark: $primary-dark;
$dark-invert: $primary-dark-invert;
$divider: $color-vaalean-harmaa;
$divider-invert: $color-tumma-harmaa;

$text: $black;
$link: $primary-dark;

$accent: $primary-dark;
$accent-light: #f2ac58;

$colors-palette-primary: ($primary, $primary-invert, $primary-dark, $primary-light);
$colors-palette-secondary: ($secondary, $secondary-invert, $secondary-dark, $secondary-light);

$colors: (
"primary": $colors-palette-primary,
"secondary": $colors-palette-secondary,
"white": ($color-white, $color-black),
"black": ($color-black, $color-white),
"accent": ($primary, $primary-invert),
);

$button-colors: (
"primary": ($primary, $color-white, $text, $text),
"secondary": ($secondary, $secondary-invert, $color-white, $color-black),
);

$navbar-colors: (
"primary": $colors-palette-primary
);

$color-background-primary-light--opaque-light: $secondary;

@import "main";
@import "themes/theme-haive-overrides";
258 changes: 258 additions & 0 deletions assets/styles/themes/_theme-haive-overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
.site-header {
&__logo-image {
> a {
&:focus {
outline-color: $black;
}
}
}
}

.icon {
&.is-primary {
fill: $accent !important;
}
}

.lang-nav--horizontal {
a {
color: $primary-invert !important;

&:hover,
&:focus {
color: $primary-invert !important;
background-color: $primary !important;
}
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}

.language-nav {
.dropdown-trigger {
.button {
color: $black !important;
border-color: $black !important;

.icon {
fill: $black !important;
}
}
}
}

.icon-links .icon-links {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onko tämä oikein? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jännä toteutus kieltämättä, tää on tullut toisesta aiemman väriteeman override-tiedoston kopsauksesta. Mutta toimiihan tuo kai, ja osuu oikeaan elementtiin kun tossa seuraavalla rivillä on &__item {, eli sama kuin .icon-links .icon-links__item {

&__item {
> a.is-primary.is-outlined {
color: $black !important;
border-color: $black !important;
}

.icon {
fill: $primary !important;
background-color: $black !important;
}
}
}

.search-item {
&__title {
> a {
&:hover,
&:focus {
color: lighten($black, 25%);
}
}
}

&__meta-item {
> a {
&:hover,
&:focus {
color: darken($primary, 70%) !important;
}
}
}
}

.logo-wall {
&__link {
outline-color: $black !important;
}
}

.share-links {
a {
&:hover,
&:focus {
.icon {
fill: $primary !important;
}
}
}
}

.gform_wrapper {
.button,
button {
color: $black !important;
background-color: transparent !important;
border-color: $black !important;

&:hover,
&:focus {
color: $black !important;
background-color: $primary !important;
border-color: $black !important;
}
}
}

.subpages {
&__items {
a {
&.has-background-image {
color: $white !important;

&:hover,
&:focus {
color: $white !important;
}
}

&.has-background-primary {
&:hover,
&:focus {
color: $white !important;

.icon {
fill: $white !important;
}
}
}
}
}
}

.events {
&__item-inner {
> .button.is-primary {
color: $black !important;
border-color: $black !important;

&:hover,
&:focus {
color: $black !important;
}
}
}
}

.search-form {
&__button {
color: $black !important;

.icon {
fill: $black !important;
}
}
}

.events {
&__more-link {
color: $black;

.icon {
fill: $black;
}
}
}

.accordion {
&__row {
border-color: $black !important;
}

&__close-all,
&__open-all,
&__icon-text {
color: $primary-invert !important;
}

&__close-all,
&__open-all,
&__title-button {
.icon {
fill: $primary-invert !important;
}
}
}

.notice-banner {
&.has-background-secondary {
.icon {
fill: $black !important;
}
}
}

.link-list {
&__links {
a {
color: $black !important;

.icon {
fill: $black !important;
}
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}
}

.grid {
&__item {
.button {
&,
&:hover,
&:focus {
background-color: $primary-invert !important;
color: $color-white !important;
border-color: $primary-invert !important;
}

&:hover,
&:focus {
text-decoration: underline !important;
}
}
}
}

.materials {
.has-border-secondary {
border-color: $black;
}

.button.is-primary {
color: $black !important;
border-color: $black !important;
}
}

.related-posts {
&__item {
.button {
&,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&,

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pitää olla, kun nuo tyylit on tarkotettu hoveriin, focukseen ja normaaliin ulkoasuun

&:hover,
&:focus {
background-color: $primary-invert !important;
color: $color-white !important;
border-color: $primary-invert !important;
}

&:hover,
&:focus {
text-decoration: underline !important;
}
}
}
}
1 change: 1 addition & 0 deletions lib/ACF/Fields/Settings/ThemeColorTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class ThemeColorTab extends \Geniem\ACF\Field\Tab {
'kokemus' => 'Kokemus (Vaalean vihreä)',
'neutraali' => 'Neutraali (Vaalea, neutraali värimalli, jossa korkea kontrasti)',
'mustavalkoinen' => 'Musta-valkoinen',
'haive' => 'Häive (vaaleankeltainen)',
];

/**
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const entryPoints = {
theme_kokemus: [ `${ wpThemePath }/assets/scripts/theme-kokemus.js` ],
theme_neutraali: [ `${ wpThemePath }/assets/scripts/theme-neutraali.js` ],
theme_mustavalkoinen: [ `${ wpThemePath }/assets/scripts/theme-mustavalkoinen.js` ],
theme_haive: [ `${ wpThemePath }/assets/scripts/theme-haive.js` ],
};

// All loaders to use on assets.
Expand Down
Loading