Skip to content
Snippets Groups Projects
Commit 6b55e13a authored by Tuukka Turu's avatar Tuukka Turu Committed by Ekaterina Kondareva
Browse files

introduction tweaks

parent a3d2fa5a
No related branches found
No related tags found
No related merge requests found
...@@ -317,6 +317,7 @@ export namespace Components { ...@@ -317,6 +317,7 @@ export namespace Components {
} }
interface HyIngress {} interface HyIngress {}
interface HyIntroduction { interface HyIntroduction {
headerstyle: string;
imageUrl?: string; imageUrl?: string;
reversed: boolean; reversed: boolean;
scLabel?: string; scLabel?: string;
...@@ -1245,6 +1246,7 @@ declare namespace LocalJSX { ...@@ -1245,6 +1246,7 @@ declare namespace LocalJSX {
} }
interface HyIngress {} interface HyIngress {}
interface HyIntroduction { interface HyIntroduction {
headerstyle?: string;
imageUrl?: string; imageUrl?: string;
reversed?: boolean; reversed?: boolean;
scLabel?: string; scLabel?: string;
......
...@@ -101,6 +101,11 @@ h2.hy-heading__landingsection { ...@@ -101,6 +101,11 @@ h2.hy-heading__landingsection {
@include font-size(40px, 40px); @include font-size(40px, 40px);
letter-spacing: -1.25px; letter-spacing: -1.25px;
} }
@include breakpoint($wide) {
// H2 for front page and landing page, Medium size
@include font-size(40px, 40px);
letter-spacing: -1.25px;
}
} }
// Applied when there is a sidebar // Applied when there is a sidebar
...@@ -121,6 +126,16 @@ h2.hy-heading__landingsection { ...@@ -121,6 +126,16 @@ h2.hy-heading__landingsection {
letter-spacing: -1.6px; letter-spacing: -1.6px;
} }
} }
h2.hy-heading__introduction {
padding: 24px 0 12px;
@include breakpoint($narrow) {
padding: 2rem 0 1rem;
}
@include breakpoint($wide) {
padding: 0 0 1rem;
}
}
} }
// Applied when there is NO sidebar // Applied when there is NO sidebar
...@@ -141,6 +156,17 @@ h2.hy-heading__landingsection { ...@@ -141,6 +156,17 @@ h2.hy-heading__landingsection {
letter-spacing: -1.8px; letter-spacing: -1.8px;
} }
} }
h2.hy-heading__introduction {
@include breakpoint($extrawide) {
// h2 font large
padding: 0 0 1rem;
}
@include breakpoint($overwide) {
// h2 font x-large
padding: 0 0 20px;
}
}
} }
// h3 on landing pages use the same fonts as h2 on content pages; no line; no caps // h3 on landing pages use the same fonts as h2 on content pages; no line; no caps
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
} }
@include breakpoint($overwide) { @include breakpoint($overwide) {
padding: 80px 0 80px 0; padding: 80px 0 80px 32px;
} }
&__blue { &__blue {
...@@ -99,13 +99,10 @@ ...@@ -99,13 +99,10 @@
} }
.hy-introduction__link { .hy-introduction__link {
//background: var(--grayscale-white);
background: var(--brand-main-active); background: var(--brand-main-active);
//color: var(--brand-main-light);
color: var(--grayscale-white); color: var(--grayscale-white);
&__icon svg { &__icon svg {
//fill: var(--brand-main-light);
fill: var(--grayscale-white); fill: var(--grayscale-white);
} }
} }
...@@ -226,14 +223,19 @@ ...@@ -226,14 +223,19 @@
letter-spacing: -0.1px; letter-spacing: -0.1px;
margin-bottom: 28px; margin-bottom: 28px;
@include breakpoint($medium) { @include breakpoint($narrow) {
@include font-size(18px, 28px); @include font-size(18px, 28px);
margin-bottom: 38px;
} }
@include breakpoint($wide) { @include breakpoint($wide) {
@include font-size(20px, 32px); @include font-size(18px, 28px);
margin-bottom: 48px; margin-bottom: 32px;
}
@include breakpoint($extrawide) {
margin-bottom: 32px;
}
@include breakpoint($overwide) {
margin-bottom: 40px;
} }
} }
...@@ -242,7 +244,6 @@ ...@@ -242,7 +244,6 @@
letter-spacing: -0.5px; letter-spacing: -0.5px;
background-color: var(--brand-main-light); background-color: var(--brand-main-light);
border: 2px solid var(--grayscale-white);
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
box-sizing: border-box; box-sizing: border-box;
color: var(--grayscale-white); color: var(--grayscale-white);
...@@ -255,10 +256,10 @@ ...@@ -255,10 +256,10 @@
position: relative; position: relative;
text-decoration: none; text-decoration: none;
@include breakpoint($narrow) { @include breakpoint($medium) {
@include font-size(16px, 20px); @include font-size(16px, 20px);
letter-spacing: -0.6px; letter-spacing: -0.6px;
padding: 14px 62px 14px 16px; padding: 15px 62px 15px 16px;
} }
@include breakpoint($wide) { @include breakpoint($wide) {
...@@ -283,3 +284,17 @@ ...@@ -283,3 +284,17 @@
} }
} }
} }
// Desktop screens without side nav bar.
.hy-introduction.large {
.hy-introduction__description {
@include breakpoint($extrawide) {
//font Ingress Large
margin-bottom: 40px;
}
@include breakpoint($overwide) {
//font Ingress Large
margin-bottom: 40px;
}
}
}
import {Component, Host, h, Prop} from '@stencil/core'; import {Component, Element, Host, h, Prop} from '@stencil/core';
import {IntroductionBgColors, HeadingVarians, HeadingSectionVariants} from '../../utils/utils'; import {IntroductionBgColors, HeadingVarians, HeadingSectionVariants} from '../../utils/utils';
@Component({ @Component({
...@@ -15,10 +15,22 @@ export class HyIntroduction { ...@@ -15,10 +15,22 @@ export class HyIntroduction {
@Prop() scLabel?: string; @Prop() scLabel?: string;
@Prop() urlTitle?: string; @Prop() urlTitle?: string;
@Prop() imageUrl?: string; @Prop() imageUrl?: string;
@Prop() headerstyle: string = 'common';
@Element() el: HTMLElement;
componentDidLoad() {
let hyMainDiv = this.el.closest('.hy-main');
if (hyMainDiv) {
if (!hyMainDiv.classList.contains('with-sidebar')) {
this.headerstyle = 'large';
}
}
}
render() { render() {
const classAttributes = [ const classAttributes = [
'hy-introduction', 'hy-introduction',
this.headerstyle,
this.reversed && this.variant == null ? 'hy-introduction--reversed' : '', this.reversed && this.variant == null ? 'hy-introduction--reversed' : '',
this.variant this.variant
? `hy-introduction--with-bg hy-introduction--with-bg__${this.variant}` ? `hy-introduction--with-bg hy-introduction--with-bg__${this.variant}`
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
| Property | Attribute | Description | Type | Default | | Property | Attribute | Description | Type | Default |
| ----------------- | ------------------ | ----------- | ------------------- | ----------- | | ----------------- | ------------------ | ----------- | ------------------- | ----------- |
| `headerstyle` | `headerstyle` | | `string` | `'common'` |
| `imageUrl` | `image-url` | | `string` | `undefined` | | `imageUrl` | `image-url` | | `string` | `undefined` |
| `reversed` | `reversed` | | `boolean` | `false` | | `reversed` | `reversed` | | `boolean` | `false` |
| `scLabel` | `sc-label` | | `string` | `undefined` | | `scLabel` | `sc-label` | | `string` | `undefined` |
......
...@@ -37,7 +37,10 @@ ...@@ -37,7 +37,10 @@
} }
.layout-sidebar-first { .layout-sidebar-first {
display: none;
@include breakpoint($extrawide) { @include breakpoint($extrawide) {
display: block;
border-right: 2px dotted var(--grayscale-medium); border-right: 2px dotted var(--grayscale-medium);
max-width: 320px; max-width: 320px;
order: 1; order: 1;
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
</hy-menu-level-container> </hy-menu-level-container>
</hy-menu> </hy-menu>
</hy-site-header> </hy-site-header>
<hy-main has-sidebar="true"> <hy-main has-sidebar="false">
<div class="layout-content"> <div class="layout-content">
<hy-hero <hy-hero
color-variant="blue" color-variant="blue"
...@@ -186,78 +186,45 @@ ...@@ -186,78 +186,45 @@
sc-label="List of conferences" sc-label="List of conferences"
> >
</hy-banner> </hy-banner>
<hy-video <hy-introduction
video-title="Youtube test embed" text-title="This is an introduction"
video-description="Video description for giving more context to what the user is viewing (eg. if the video is part of a lecture series, or a series of speeches). Can include links and probably needs to have a character limit." text-description="Highly cited researchers at the University of Helsinki, Centres of Excellence selected by the Academy of Finland and projects funded by the European Research Council."
context-label="Youtube test" url="https://www.google.com"
views="123" url-title="Check this link"
views-label="Views" sc-label="label for link"
duration="1:23" ></hy-introduction>
duration-label="Duration" <hy-introduction
date-added="28.10.2020" variant="blue"
date-added-label="Added" text-title="This is an introduction"
play-button-visible text-description="Highly cited researchers at the University of Helsinki, Centres of Excellence selected by the Academy of Finland and projects funded by the European Research Council."
context-label-visible url="https://www.google.com"
play-button-label="Play video" url-title="Check this link"
preview-image-url="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/kukkataedit_ja_-sedaet-6_0.jpg" sc-label="label for link"
> image-url="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/kukkataedit_ja_-sedaet-6_0.jpg"
<iframe ></hy-introduction>
slot="video" <hy-introduction
src="https://www.youtube.com/embed/Bsycp5I2Vy8?width=&height=&theme=dark&autoplay=0&vq=hd720&rel=0&showinfo=1&modestbranding=0&iv_load_policy=1&controls=1&autohide=2&wmode=opaque" variant="black"
frameborder="0" text-title="This is an introduction"
></iframe> text-description="Highly cited researchers at the University of Helsinki, Centres of Excellence selected by the Academy of Finland and projects funded by the European Research Council."
</hy-video> url="https://www.google.com"
<hy-video url-title="Check this link"
horizontal sc-label="label for link"
video-title="Youtube test embed" image-url="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/kukkataedit_ja_-sedaet-6_0.jpg"
video-description="Video description for giving more context to what the user is viewing (eg. if the video is part of a lecture series, or a series of speeches). Can include links and probably needs to have a character limit." ></hy-introduction>
context-label="Youtube test" <hy-introduction
views="123" reversed
views-label="Views" text-title="This is an introduction"
duration="1:23" text-description="Highly cited researchers at the University of Helsinki, Centres of Excellence selected by the Academy of Finland and projects funded by the European Research Council."
context-label-visible url="https://www.google.com"
duration-label="Duration" url-title="Check this link"
date-added="28.10.2020" sc-label="label for link"
date-added-label="Added" image-url="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/kukkataedit_ja_-sedaet-6_0.jpg"
> ></hy-introduction>
<iframe
slot="video"
src="https://www.youtube.com/embed/Bsycp5I2Vy8?width=&height=&theme=dark&autoplay=0&vq=hd720&rel=0&showinfo=1&modestbranding=0&iv_load_policy=1&controls=1&autohide=2&wmode=opaque"
frameborder="0"
></iframe>
</hy-video>
<hy-video
context-label="Youtube test"
play-button-visible
context-label-visible
play-button-label="Play video"
link-to-video="https://www.google.com"
preview-image-url="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/kukkataedit_ja_-sedaet-6_0.jpg"
>
</hy-video>
<hy-video>
<iframe
slot="video"
src="https://www.youtube.com/embed/Bsycp5I2Vy8?width=&height=&theme=dark&autoplay=0&vq=hd720&rel=0&showinfo=1&modestbranding=0&iv_load_policy=1&controls=1&autohide=2&wmode=opaque"
frameborder="0"
></iframe>
</hy-video>
<hy-accordion-container accordionid="example-accordion">
<hy-accordion-item accordiontitle="This is a accordion item 1">
<hy-paragraph-text>Accordion content</hy-paragraph-text>
</hy-accordion-item>
<hy-accordion-item accordiontitle="This is a accordion item 2">
<hy-paragraph-text>Accordion content</hy-paragraph-text>
</hy-accordion-item>
<hy-accordion-item accordiontitle="This is a accordion item 3">
<hy-paragraph-text>Accordion content</hy-paragraph-text>
</hy-accordion-item>
</hy-accordion-container>
</div> </div>
<div class="layout-sidebar-first" role="complementary"> <!-- <aside class="layout-sidebar-first" role="complementary">
THIS IS SIDEBAR THIS IS SIDEBAR
</div> </aside> -->
</hy-main> </hy-main>
<hy-footer> <hy-footer>
<hy-footer-action updated-text="Updated on 14.10.2020" up-button-label="Up"></hy-footer-action> <hy-footer-action updated-text="Updated on 14.10.2020" up-button-label="Up"></hy-footer-action>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment