From 8e883d7eacf8ef9e680ab008acf2c1470de42d38 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Thu, 8 Oct 2020 23:33:51 +0300
Subject: [PATCH 01/28] All sorts of BS
---
src/components/Anchor.tsx | 25 +++++++
src/components/Anchor/Anchor.tsx | 29 --------
src/components/Anchor/index.ts | 2 -
src/components/AsideSection/AsideSection.scss | 10 ---
src/components/AsideSection/AsideSection.tsx | 46 +++++++------
src/components/Checkbox/Checkbox.tsx | 5 +-
src/components/ColorDiv/ColorDiv.scss | 66 -------------------
src/components/ColorDiv/ColorDiv.tsx | 50 +++++++-------
src/components/Hero/HeroAsideItem.tsx | 56 ++++++++++++++++
.../Hero/HeroAsideItem/HeroAsideItem.scss | 36 ----------
.../Hero/HeroAsideItem/HeroAsideItem.tsx | 21 ------
src/components/Hero/HeroAsideSection.tsx | 53 +++++++++++++++
.../HeroAsideSection/HeroAsideSection.scss | 43 ------------
.../HeroAsideSection/HeroAsideSection.tsx | 22 -------
.../{HeroMainSection => }/HeroMainSection.tsx | 0
.../HeroSecondarySection.tsx | 2 +-
src/components/MainSection.tsx | 30 +++++++++
src/components/MainSection/MainSection.scss | 21 ------
src/components/MainSection/MainSection.tsx | 25 -------
src/components/MainSection/index.ts | 2 -
src/components/PageSection/PageSection.scss | 40 -----------
src/components/PageSection/PageSection.tsx | 60 ++++++++++-------
src/components/Ribbon/Ribbon.scss | 24 -------
src/components/Ribbon/Ribbon.tsx | 41 ++++++++----
src/components/TextAnchor.tsx | 30 +++++++++
src/components/TextAnchor/TextAnchor.scss | 18 -----
src/components/TextAnchor/TextAnchor.tsx | 49 --------------
src/components/TextAnchor/index.ts | 2 -
src/theme/colors.ts | 32 +++++++--
src/views/ActualPage/ActualPageView.tsx | 20 +++---
src/views/ContactsPage/ContactsPageView.tsx | 2 +-
src/views/CorporatePage/CorporatePageView.tsx | 18 ++---
src/views/EventPage/EventPageView.tsx | 32 +++++----
src/views/FreshmenPage/FreshmenPageView.tsx | 24 +++----
src/views/FrontPage/FrontPageView.tsx | 8 +--
src/views/GuildPage/GuildPageView.tsx | 8 +--
src/views/StudiesPage/StudiesPageView.tsx | 26 ++++----
37 files changed, 414 insertions(+), 564 deletions(-)
create mode 100644 src/components/Anchor.tsx
delete mode 100644 src/components/Anchor/Anchor.tsx
delete mode 100644 src/components/Anchor/index.ts
delete mode 100644 src/components/AsideSection/AsideSection.scss
delete mode 100644 src/components/ColorDiv/ColorDiv.scss
create mode 100644 src/components/Hero/HeroAsideItem.tsx
delete mode 100644 src/components/Hero/HeroAsideItem/HeroAsideItem.scss
delete mode 100644 src/components/Hero/HeroAsideItem/HeroAsideItem.tsx
create mode 100644 src/components/Hero/HeroAsideSection.tsx
delete mode 100644 src/components/Hero/HeroAsideSection/HeroAsideSection.scss
delete mode 100644 src/components/Hero/HeroAsideSection/HeroAsideSection.tsx
rename src/components/Hero/{HeroMainSection => }/HeroMainSection.tsx (100%)
rename src/components/Hero/{HeroSecondarySection => }/HeroSecondarySection.tsx (96%)
create mode 100644 src/components/MainSection.tsx
delete mode 100644 src/components/MainSection/MainSection.scss
delete mode 100644 src/components/MainSection/MainSection.tsx
delete mode 100644 src/components/MainSection/index.ts
delete mode 100644 src/components/PageSection/PageSection.scss
delete mode 100644 src/components/Ribbon/Ribbon.scss
create mode 100644 src/components/TextAnchor.tsx
delete mode 100644 src/components/TextAnchor/TextAnchor.scss
delete mode 100644 src/components/TextAnchor/TextAnchor.tsx
delete mode 100644 src/components/TextAnchor/index.ts
diff --git a/src/components/Anchor.tsx b/src/components/Anchor.tsx
new file mode 100644
index 0000000..e9ef6b4
--- /dev/null
+++ b/src/components/Anchor.tsx
@@ -0,0 +1,25 @@
+import React from "react";
+import { Link } from "react-router-dom";
+import { HashLink } from "react-router-hash-link";
+
+interface AnchorProps extends React.HTMLAttributes {
+ to: string;
+}
+
+const Anchor: React.FC = ({ to, ...props }) => {
+ if (to.startsWith("/")) {
+ return (
+
+ );
+ } else if (to.startsWith("#")) {
+ return (
+
+ );
+ }
+ else {
+ return (
+
+ );
+ }
+}
+export default Anchor;
diff --git a/src/components/Anchor/Anchor.tsx b/src/components/Anchor/Anchor.tsx
deleted file mode 100644
index 8e86b53..0000000
--- a/src/components/Anchor/Anchor.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import React from "react";
-import { Link } from "react-router-dom";
-import { HashLink } from "react-router-hash-link";
-
-export interface AnchorProps extends React.HTMLAttributes {
- to: string;
-}
-
-class Anchor extends React.Component {
- render() {
- const { children, to, ...props } = this.props;
-
- if (to.startsWith("/")) {
- return (
- {children}
- );
- } else if (to.startsWith("#")) {
- return (
- {children}
- );
- }
- else {
- return (
- {children}
- );
- }
- }
-}
-export default Anchor;
diff --git a/src/components/Anchor/index.ts b/src/components/Anchor/index.ts
deleted file mode 100644
index dcc717e..0000000
--- a/src/components/Anchor/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import Anchor from "./Anchor";
-export default Anchor;
diff --git a/src/components/AsideSection/AsideSection.scss b/src/components/AsideSection/AsideSection.scss
deleted file mode 100644
index 80f731a..0000000
--- a/src/components/AsideSection/AsideSection.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.aside-section {
- display: flex;
- flex: 1;
- flex-flow: column;
- justify-content: space-between;
- padding: 3rem 4rem;
-}
diff --git a/src/components/AsideSection/AsideSection.tsx b/src/components/AsideSection/AsideSection.tsx
index 9dce772..035a961 100644
--- a/src/components/AsideSection/AsideSection.tsx
+++ b/src/components/AsideSection/AsideSection.tsx
@@ -1,25 +1,33 @@
import React from "react";
-import "./AsideSection.scss";
-import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
+import styled from "styled-components";
+import { ColorDivProps } from "../ColorDiv/ColorDiv";
+import { ColorMapper } from "@theme/colors";
-export interface AsideSectionProps {
- className?: string;
-}
-export interface AsideSectionState { }
+type AsideSectionProps = ColorDivProps;
-class AsideSection extends React.Component {
- render() {
- const { children, className, ...props } = this.props;
- const classNames = [
- "aside-section",
- ];
- if (className) classNames.push(className);
- return (
-
- {children}
-
- );
+const Section = styled.div`
+ display: flex;
+ flex: 1;
+ flex-flow: column;
+ justify-content: space-between;
+ padding: 3rem 4rem;
+
+ color: ${(p) => p.textColor};
+ background-color: ${(p) => p.backgroundColor};
+ &:hover {
+ color: ${(p) => p.hoverColor};
+ background-color: ${(p) => p.hoverBackgroundColor};
}
-}
+`;
+
+const AsideSection: React.FC = ({ textColor, backgroundColor, hoverColor, backgroundHoverColor, ...props }) => (
+
+);
export default AsideSection;
diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx
index 451e962..d19589c 100644
--- a/src/components/Checkbox/Checkbox.tsx
+++ b/src/components/Checkbox/Checkbox.tsx
@@ -1,5 +1,6 @@
import React from "react";
import styled from "styled-components";
+import { colors } from "@theme/colors";
const Container = styled.label`
display: block;
@@ -31,7 +32,7 @@ const CustomCBoxElement = styled.span<{checked?: boolean}>`
left: 0;
height: 1em;
width: 1em;
- background-color: ${(props) => props.checked ? "#57b2df" : "#efece4"}; /* blue1 or grey2 */
+ background-color: ${(props) => props.checked ? colors.blue1 : colors.grey2};
&:focus &:before {
transition: box-shadow 150ms ease;
@@ -43,7 +44,7 @@ const CustomCBoxElement = styled.span<{checked?: boolean}>`
left: -4px;
right: -4px;
border-radius: 6px;
- border: 2px solid color(blue);
+ border: 2px solid ${colors.blue1};
}
`;
diff --git a/src/components/ColorDiv/ColorDiv.scss b/src/components/ColorDiv/ColorDiv.scss
deleted file mode 100644
index 4b4ee2d..0000000
--- a/src/components/ColorDiv/ColorDiv.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-@import "../../assets/scss/globals";
-
-.color-div {
- @mixin hoverableColor($colorName) {
- &__#{$colorName} {
- color: color($colorName);
- }
-
- &__#{$colorName}Hoverable {
- &:hover,
- &:active {
- color: hover($colorName);
- }
- }
- }
-
- @mixin backgroundColor($colorName) {
- &__background_#{$colorName} {
- background-color: color($colorName);
- }
-
- &__background_#{$colorName}Hoverable {
- &:hover,
- &:active {
- background-color: hover($colorName);
- }
- }
- }
-
- @mixin backgroundAndHoverableColor($colorName) {
- @include hoverableColor($colorName);
- @include backgroundColor($colorName);
- }
-
- @include backgroundAndHoverableColor(dark-blue);
- @include backgroundAndHoverableColor(light-blue);
- @include backgroundAndHoverableColor(white1);
- @include backgroundAndHoverableColor(black1);
- @include backgroundAndHoverableColor(grey1);
- @include backgroundAndHoverableColor(grey2);
- @include backgroundAndHoverableColor(orange1);
- @include backgroundAndHoverableColor(orange2);
- @include backgroundAndHoverableColor(blue1);
- @include backgroundAndHoverableColor(light-turquoise);
- @include backgroundAndHoverableColor(green1);
- @include backgroundAndHoverableColor(sand);
-
- &__inherit {
- color: inherit;
- }
-
- &__transparent {
- color: transparent;
- }
-
- &__inheritHoverable {
- &:hover,
- &:active {
- color: inherit;
- }
- }
-
- &__background_transparent {
- background-color: transparent;
- }
-}
\ No newline at end of file
diff --git a/src/components/ColorDiv/ColorDiv.tsx b/src/components/ColorDiv/ColorDiv.tsx
index 05a9b1c..754495b 100644
--- a/src/components/ColorDiv/ColorDiv.tsx
+++ b/src/components/ColorDiv/ColorDiv.tsx
@@ -1,34 +1,38 @@
import React from "react";
-import "./ColorDiv.scss";
-import { Colors, colorToClass, bgColorToClass, hoverColorToClass, bgHoverColorToClass } from "@theme/colors";
-import classNames from "classnames";
+import styled from "styled-components"
+import { Colors, ColorMapper } from "@theme/colors";
-export interface ColorDivProps extends React.HTMLAttributes {
+interface ColorsProps {
+ textColor?: string;
+ backgroundColor?: string;
+ hoverColor?: string;
+ hoverBackgroundColor?: string;
+}
+
+export type ColorDivProps = React.HTMLAttributes & {
textColor?: Colors;
backgroundColor?: Colors;
hoverColor?: Colors;
backgroundHoverColor?: Colors;
}
-export interface ColorDivState { }
-
-class ColorDiv extends React.Component {
- render() {
- const { children, className, textColor, backgroundColor, hoverColor, backgroundHoverColor, ...props } = this.props;
- const classes = classNames(
- className,
- colorToClass(textColor),
- bgColorToClass(backgroundColor),
- hoverColorToClass(hoverColor),
- bgHoverColorToClass(backgroundHoverColor)
- );
-
- return (
-
- {children}
-
- );
+const Div = styled.div`
+ color: ${(p) => p.textColor};
+ background-color: ${(p) => p.backgroundColor};
+ &:hover {
+ color: ${(p) => p.hoverColor};
+ background-color: ${(p) => p.hoverBackgroundColor};
}
-}
+`;
+
+const ColorDiv: React.FC = ({ textColor, backgroundColor, hoverColor, backgroundHoverColor, ...props }) => (
+
+);
export default ColorDiv;
diff --git a/src/components/Hero/HeroAsideItem.tsx b/src/components/Hero/HeroAsideItem.tsx
new file mode 100644
index 0000000..45189bb
--- /dev/null
+++ b/src/components/Hero/HeroAsideItem.tsx
@@ -0,0 +1,56 @@
+import React from "react";
+import styled from "styled-components";
+import Anchor from "../Anchor";
+import { colors } from "@theme/colors";
+
+interface HeroAsideItemProps {
+ title: string;
+ linkText: string;
+ linkHref: string;
+}
+
+const Section = styled.div`
+ max-width: 300px;
+ line-height: 16px;
+ margin-bottom: 1rem;
+
+ @media screen and (max-width: 600px - 1px) {
+ p,
+ a {
+ font-size: 16px !important;
+ line-height: 20px;
+ }
+ }
+
+ h2 {
+ text-transform: uppercase;
+ letter-spacing: 3px;
+ line-height: 20px;
+ }
+
+ p {
+ font-size: 14px;
+ line-height: 20px;
+ }
+
+ h6 {
+ color: ${colors.blue1};
+ font-weight: 600;
+ }
+
+ h6:hover {
+ color: ${colors.white};
+ }
+`;
+
+const HeroAsideItem: React.FC = ({ title, linkText, linkHref, children }) => (
+
+ {title}
+ {children}
+
+ {linkText} ›
+
+
+)
+
+export default HeroAsideItem;
diff --git a/src/components/Hero/HeroAsideItem/HeroAsideItem.scss b/src/components/Hero/HeroAsideItem/HeroAsideItem.scss
deleted file mode 100644
index 4b4b047..0000000
--- a/src/components/Hero/HeroAsideItem/HeroAsideItem.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-@import "../../../assets/scss/globals";
-
-
-.hero-aside-item {
- max-width: 300px;
- line-height: 16px;
- margin-bottom: 1rem;
-
- @media screen and (max-width: 600px - 1px) {
- p,
- a {
- font-size: 16px !important;
- line-height: 20px;
- }
- }
-
- h2 {
- text-transform: uppercase;
- letter-spacing: 3px;
- line-height: 20px;
- }
-
- p {
- font-size: 14px;
- line-height: 20px;
- }
-
- h6 {
- color: color(blue1);
- font-weight: 600;
- }
-
- h6:hover {
- color: color(white1);
- }
-}
diff --git a/src/components/Hero/HeroAsideItem/HeroAsideItem.tsx b/src/components/Hero/HeroAsideItem/HeroAsideItem.tsx
deleted file mode 100644
index a1143a9..0000000
--- a/src/components/Hero/HeroAsideItem/HeroAsideItem.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from "react";
-import "./HeroAsideItem.scss";
-import Anchor from "../../Anchor";
-
-interface HeroAsideItemProps {
- title: string;
- linkText: string;
- linkHref: string;
-}
-
-const HeroAsideItem: React.FC = ({ title, linkText, linkHref, children }) => (
-
-
{title}
-
{children}
-
- {linkText} ›
-
-
-)
-
-export default HeroAsideItem;
diff --git a/src/components/Hero/HeroAsideSection.tsx b/src/components/Hero/HeroAsideSection.tsx
new file mode 100644
index 0000000..1081bb6
--- /dev/null
+++ b/src/components/Hero/HeroAsideSection.tsx
@@ -0,0 +1,53 @@
+import React from "react";
+import styled from "styled-components";
+import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
+import { colors } from "@theme/colors";
+
+const Section = styled(ColorDiv)`
+ display: flex;
+ flex-flow: column nowrap;
+ align-items: flex-start;
+ justify-content: center;
+ flex: 4;
+
+ @media screen and (max-width: 800px - 1px) {
+ align-items: center;
+ }
+
+ text-align: left;
+ padding: 3rem 1rem 2rem;
+
+ &.dark-blue {
+ background-color: ${colors.darkBlue};
+
+ h2 {
+ color: ${colors.lightBlue};
+ }
+
+ p {
+ font-weight: 100;
+ color: ${colors.white};
+ }
+ }
+
+ &.light-turquoise {
+ background-color: ${colors.lightTurquoise};
+
+ h2,
+ p {
+ color: ${colors.darkBlue};
+ }
+ }
+
+ &.light-blue {
+ background-color: ${colors.lightBlue};
+ }
+`;
+
+const HeroAsideSection: React.FC = (props) => {
+ return (
+
+ );
+}
+
+export default HeroAsideSection;
diff --git a/src/components/Hero/HeroAsideSection/HeroAsideSection.scss b/src/components/Hero/HeroAsideSection/HeroAsideSection.scss
deleted file mode 100644
index c632179..0000000
--- a/src/components/Hero/HeroAsideSection/HeroAsideSection.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-@import "../../../assets/scss/globals";
-
-
-.hero-aside-section {
- display: flex;
- flex-flow: column nowrap;
- align-items: flex-start;
- justify-content: center;
- flex: 4;
-
- @media screen and (max-width: 800px - 1px) {
- align-items: center;
- }
-
- text-align: left;
- padding: 3rem 1rem 2rem;
-
- &.dark-blue {
- background-color: color(dark-blue);
-
- h2 {
- color: color(light-blue);
- }
-
- p {
- font-weight: 100;
- color: color(white1);
- }
- }
-
- &.light-turquoise {
- background-color: color(light-turquoise);
-
- h2,
- p {
- color: color(dark-blue);
- }
- }
-
- &.light-blue {
- background-color: color(light-blue);
- }
-}
diff --git a/src/components/Hero/HeroAsideSection/HeroAsideSection.tsx b/src/components/Hero/HeroAsideSection/HeroAsideSection.tsx
deleted file mode 100644
index 505a0db..0000000
--- a/src/components/Hero/HeroAsideSection/HeroAsideSection.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from "react";
-import "./HeroAsideSection.scss";
-import ColorDiv, { ColorDivProps } from "../../ColorDiv/ColorDiv";
-
-
-export interface HeroAsideSectionProps { }
-export interface HeroAsideSectionState { }
-
-class HeroAsideSection extends React.Component {
- render() {
- const className = "hero-aside-section";
- return (
-
-
- {this.props.children}
-
-
- );
- }
-}
-
-export default HeroAsideSection;
diff --git a/src/components/Hero/HeroMainSection/HeroMainSection.tsx b/src/components/Hero/HeroMainSection.tsx
similarity index 100%
rename from src/components/Hero/HeroMainSection/HeroMainSection.tsx
rename to src/components/Hero/HeroMainSection.tsx
diff --git a/src/components/Hero/HeroSecondarySection/HeroSecondarySection.tsx b/src/components/Hero/HeroSecondarySection.tsx
similarity index 96%
rename from src/components/Hero/HeroSecondarySection/HeroSecondarySection.tsx
rename to src/components/Hero/HeroSecondarySection.tsx
index a7234ee..ca170c4 100644
--- a/src/components/Hero/HeroSecondarySection/HeroSecondarySection.tsx
+++ b/src/components/Hero/HeroSecondarySection.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import ColorDiv from "../../ColorDiv/ColorDiv";
+import ColorDiv from "../ColorDiv/ColorDiv";
interface HeroSecondarySectionItemProps {
note?: string;
diff --git a/src/components/MainSection.tsx b/src/components/MainSection.tsx
new file mode 100644
index 0000000..729717a
--- /dev/null
+++ b/src/components/MainSection.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import styled from "styled-components";
+import ColorDiv, { ColorDivProps } from "./ColorDiv/ColorDiv";
+import { colors } from "@theme/colors";
+
+const Section = styled(ColorDiv)`
+ display: flex;
+ flex: 2;
+ flex-flow: column;
+ padding: 0 3rem;
+
+ & > h3 {
+ margin: auto;
+ }
+
+ & > h6 {
+ color: ${colors.orange1};
+ }
+
+ & > p {
+ margin-block-start: 0.5rem;
+ margin-block-end: 1rem;
+ }
+`;
+
+const MainSection: React.FC = (props) => (
+
+);
+
+export default MainSection;
diff --git a/src/components/MainSection/MainSection.scss b/src/components/MainSection/MainSection.scss
deleted file mode 100644
index ed09469..0000000
--- a/src/components/MainSection/MainSection.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-@import "../../assets/scss/globals";
-
-.main-section {
- display: flex;
- flex: 2;
- flex-flow: column;
- padding: 0 3rem;
-
- & > h3 {
- margin: auto;
- }
-
- & > h6 {
- color: color(orange1);
- }
-
- & > p {
- margin-block-start: 0.5rem;
- margin-block-end: 1rem;
- }
-}
diff --git a/src/components/MainSection/MainSection.tsx b/src/components/MainSection/MainSection.tsx
deleted file mode 100644
index a96a12a..0000000
--- a/src/components/MainSection/MainSection.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import React from "react";
-import "./MainSection.scss";
-import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
-import classNames from "classnames";
-
-export interface MainSectionProps { }
-export interface MainSectionState { }
-
-class MainSection extends React.Component {
- render() {
- const { children, className, ...props } = this.props;
- const classes = classNames(
- "main-section",
- className
- );
-
- return (
-
- {children}
-
- );
- }
-}
-
-export default MainSection;
diff --git a/src/components/MainSection/index.ts b/src/components/MainSection/index.ts
deleted file mode 100644
index 50928f2..0000000
--- a/src/components/MainSection/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import MainSection from "./MainSection";
-export default MainSection;
diff --git a/src/components/PageSection/PageSection.scss b/src/components/PageSection/PageSection.scss
deleted file mode 100644
index 99752d3..0000000
--- a/src/components/PageSection/PageSection.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.page-section {
- display: flex;
- flex-flow: row wrap;
- justify-content: space-between;
- position: relative;
-
- &.lander-hero {
- @media screen and (min-width: 800px) {
- min-height: 85vh;
- }
- }
-
- &.padded {
- padding: 2rem 1rem 2rem;
- }
-
- &:not(.card-section) {
- @media screen and (max-width: 800px - 1px) {
- flex-flow: column nowrap;
- }
- }
-
- &.center {
- justify-content: center;
- }
-
- &.bottom-border {
- &::after {
- content: "";
- position: absolute;
- bottom: 0;
- width: 98%;
- left: 1%;
- border-bottom: 1px solid rgba(color(blue1), 0.4);
- }
- }
-}
diff --git a/src/components/PageSection/PageSection.tsx b/src/components/PageSection/PageSection.tsx
index e6e7c0b..baa9b6c 100644
--- a/src/components/PageSection/PageSection.tsx
+++ b/src/components/PageSection/PageSection.tsx
@@ -1,36 +1,50 @@
import React from "react";
-import "./PageSection.scss";
+import styled from "styled-components";
import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
+import { colors } from "@theme/colors";
-export interface PageSectionProps {
+interface PageSectionProps {
center?: boolean;
bottomBorder?: boolean;
cardSection?: boolean; // does section contain a grid of cards
fullSize?: boolean;
}
-export interface PageSectionState { }
-class PageSection extends React.Component {
- render() {
- const { children, className, center, bottomBorder, cardSection, fullSize, ...props } = this.props;
- const centerClass = center ? "center" : "";
- const borderClass = bottomBorder ? "bottom-border" : "";
- const cardsClass = cardSection ? "card-section" : "";
- const nonPaddedClass = fullSize ? "" : "padded";
- const classNames = [
- "page-section",
- centerClass,
- borderClass,
- cardsClass,
- nonPaddedClass
- ];
- if (className) classNames.push(className);
- return (
-
- {children}
-
- );
+const Section = styled(ColorDiv)`
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: ${(p) => p.center ? "center" : "space-between"};
+ position: relative;
+ padding: ${(p) => p.fullSize ? 0 : "2rem 1rem 2rem"};
+
+ .lander-hero {
+ @media screen and (min-width: 800px) {
+ min-height: 85vh;
+ }
}
+
+ ${(p) => p.cardSection ? "" : `
+ @media screen and (max-width: 800px - 1px) {
+ flex-flow: column nowrap;
+ }
+ `}
+
+ ${(p) => p.bottomBorder ? `
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: 0;
+ width: 98%;
+ left: 1%;
+ border-bottom: 1px solid rgba(${colors.blue1}, 0.4);
+ }
+ ` : ""}
+`;
+
+const PageSection: React.FC = (props) => {
+ return (
+
+ );
}
export default PageSection;
diff --git a/src/components/Ribbon/Ribbon.scss b/src/components/Ribbon/Ribbon.scss
deleted file mode 100644
index f85144f..0000000
--- a/src/components/Ribbon/Ribbon.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.ribbon {
- display: flex;
- flex-flow: row nowrap;
- align-items: flex-end;
- text-align: center;
- justify-content: center;
- margin: auto;
-
- p {
- font-size: 2rem;
- font-weight: 100;
- line-height: 30px;
- margin-block-start: 0;
- margin-block-end: 0;
- }
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- align-items: center;
- }
-}
diff --git a/src/components/Ribbon/Ribbon.tsx b/src/components/Ribbon/Ribbon.tsx
index 240bb27..81f416b 100644
--- a/src/components/Ribbon/Ribbon.tsx
+++ b/src/components/Ribbon/Ribbon.tsx
@@ -1,17 +1,34 @@
-import React from "react";
-import "./Ribbon.scss";
+import styled from "styled-components";
-export interface RibbonProps {}
-export interface RibbonState {}
+const Ribbon = styled.div`
+ display: flex;
+ flex-flow: row nowrap;
+ align-items: flex-end;
+ text-align: center;
+ justify-content: center;
+ margin: auto;
-class Ribbon extends React.Component {
- render() {
- return (
-
- {this.props.children}
-
- );
+ p {
+ font-size: 2rem;
+ font-weight: 100;
+ line-height: 30px;
+ margin-block-start: 0;
+ margin-block-end: 0;
}
-}
+
+ a {
+ font-weight: 100;
+ text-decoration: none;
+ margin: 0 1rem;
+ font-size: 0.8rem;
+ text-transform: uppercase;
+ margin-top: 10px;
+ }
+
+ @media screen and (max-width: 600px - 1px) {
+ flex-flow: column nowrap;
+ align-items: center;
+ }
+`;
export default Ribbon;
diff --git a/src/components/TextAnchor.tsx b/src/components/TextAnchor.tsx
new file mode 100644
index 0000000..99e608b
--- /dev/null
+++ b/src/components/TextAnchor.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import styled from "styled-components";
+import { Colors, colorToClass, hoverColorToClass } from "@theme/colors";
+import Anchor from "./Anchor";
+import classNames from "classnames";
+
+const A = styled(Anchor)`
+ text-decoration: underline;
+ font-weight: 600;
+`;
+
+interface TextAnchorProps {
+ to: string;
+ textColor?: Colors;
+ hoverColor?: Colors;
+}
+
+const TextAnchor: React.FC = ({ children, to, textColor, hoverColor }) => {
+ const classes = classNames(
+ colorToClass(textColor),
+ hoverColorToClass(hoverColor),
+ )
+ return (
+
+ {children}
+
+ );
+}
+
+export default TextAnchor;
diff --git a/src/components/TextAnchor/TextAnchor.scss b/src/components/TextAnchor/TextAnchor.scss
deleted file mode 100644
index ad1d68d..0000000
--- a/src/components/TextAnchor/TextAnchor.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@import "../../assets/scss/globals";
-
-.text-anchor {
- text-decoration: underline;
- font-weight: 600;
-
- &__no-weight {
- font-weight: 100;
- }
-
- &__small {
- text-decoration: none;
- margin: 0 1rem;
- font-size: 0.8rem;
- text-transform: uppercase;
- margin-top: 10px;
- }
-}
diff --git a/src/components/TextAnchor/TextAnchor.tsx b/src/components/TextAnchor/TextAnchor.tsx
deleted file mode 100644
index 193fab5..0000000
--- a/src/components/TextAnchor/TextAnchor.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import React from "react";
-import "./TextAnchor.scss";
-import { Colors, colorToClass, hoverColorToClass } from "@theme/colors";
-import Anchor from "../Anchor";
-import classNames from "classnames";
-
-
-export type TextSize =
- "normal" |
- "small" |
- "large" |
- "ribbon" |
- "small-ribbon";
-
-
-const textSizeToClassName = new Map([
- ["normal", ""],
- ["small", "text-anchor__small"],
- ["large", "text-anchor__large"],
- ["small-ribbon", "text-anchor__no-weight text-anchor__small"],
- ["ribbon", "text-anchor__no-weight"],
-]);
-
-export interface TextAnchorProps {
- size?: TextSize;
- to: string;
- textColor?: Colors;
- hoverColor?: Colors;
-}
-export interface TextAnchorState { }
-
-class TextAnchor extends React.Component {
- render() {
- const { children, size, to, textColor, hoverColor } = this.props;
- const classes = classNames(
- "text-anchor",
- colorToClass(textColor),
- hoverColorToClass(hoverColor),
- textSizeToClassName.get(size)
- )
- return (
-
- {children}
-
- );
- }
-}
-
-export default TextAnchor;
diff --git a/src/components/TextAnchor/index.ts b/src/components/TextAnchor/index.ts
deleted file mode 100644
index cf2f85a..0000000
--- a/src/components/TextAnchor/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import TextAnchor from "./TextAnchor";
-export default TextAnchor;
diff --git a/src/theme/colors.ts b/src/theme/colors.ts
index 5ccd7c8..e467134 100644
--- a/src/theme/colors.ts
+++ b/src/theme/colors.ts
@@ -14,11 +14,22 @@ export type Colors =
"transparent" |
"inherit";
-
-export const colorToClass = (color: Colors): string => color ? `color-div__${color}` : undefined;
-export const bgColorToClass = (color: Colors): string => color ? `color-div__background_${color}` : undefined;
-export const hoverColorToClass = (color: Colors): string => color ? `color-div__${color}Hoverable` : undefined;
-export const bgHoverColorToClass = (color: Colors): string => color ? `color-div__background_${color}Hoverable` : undefined;
+export const ColorMapper = new Map([
+ ["dark-blue", "#002d3a"],
+ ["light-blue", "#bfdbd9"],
+ ["white1", "#fff"],
+ ["black1", "#000"],
+ ["grey1", "#d4d0c7"],
+ ["grey2", "#efece4"],
+ ["orange1", "#d57a2d"],
+ ["orange2", "#dd934e"],
+ ["blue1", "#57b2df"],
+ ["light-turquoise", "#beddeb"],
+ ["green1", "#c0dcd9"],
+ ["sand", "#fdf9d7"],
+ ["transparent", "transparent"],
+ ["inherit", "inherit"]
+]);
export const colors = {
darkBlue: "#002d3a",
@@ -32,5 +43,12 @@ export const colors = {
blue1: "#57b2df",
lightTurquoise: "#beddeb",
green1: "#c0dcd9",
- sand: "#fdf9d7"
-}
\ No newline at end of file
+ sand: "#fdf9d7",
+ transparent: "transparent",
+ inherit: "inherit"
+}
+
+export const colorToClass = (color: Colors): string => color ? `color-div__${color}` : undefined;
+export const bgColorToClass = (color: Colors): string => color ? `color-div__background_${color}` : undefined;
+export const hoverColorToClass = (color: Colors): string => color ? `color-div__${color}Hoverable` : undefined;
+export const bgHoverColorToClass = (color: Colors): string => color ? `color-div__background_${color}Hoverable` : undefined;
diff --git a/src/views/ActualPage/ActualPageView.tsx b/src/views/ActualPage/ActualPageView.tsx
index a44f3b2..c4eef99 100644
--- a/src/views/ActualPage/ActualPageView.tsx
+++ b/src/views/ActualPage/ActualPageView.tsx
@@ -1,16 +1,16 @@
import React from "react";
import "./ActualPage.scss";
import PageSection from "@components/PageSection";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection/index";
-import Ribbon from "@components/Ribbon/index";
-import TextAnchor from "@components/TextAnchor/index";
-import Button from "@components/Button/index";
+import MainSection from "@components/MainSection";
+import Ribbon from "@components/Ribbon";
+import TextAnchor from "@components/TextAnchor";
+import Button from "@components/Button";
import Accordion from "@components/Accordion";
-import HeroSecondarySection, { HeroSecondarySectionItem } from "@components/Hero/HeroSecondarySection/HeroSecondarySection";
+import HeroSecondarySection, { HeroSecondarySectionItem } from "@components/Hero/HeroSecondarySection";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
import EventCalendar from "./EventCalendar";
@@ -93,7 +93,7 @@ const ActualPageView: React.FC = ({events, feed}) => {
Kuvia tapahtumista.
-
+
Kuvagalleria ›
@@ -106,7 +106,7 @@ const ActualPageView: React.FC = ({events, feed}) => {
Sinustako kilta-aktiivi?
-
+
Tule mukaan kiltatoimintaan ›
diff --git a/src/views/ContactsPage/ContactsPageView.tsx b/src/views/ContactsPage/ContactsPageView.tsx
index daf1e3d..2c530cc 100644
--- a/src/views/ContactsPage/ContactsPageView.tsx
+++ b/src/views/ContactsPage/ContactsPageView.tsx
@@ -3,7 +3,7 @@ import "./ContactsPage.scss";
import PageSection from "@components/PageSection";
import { Occupation, Committee } from "@models/Contacts";
import CommitteeContainer from "@components/CommitteeContainer";
-import TextAnchor from "@components/TextAnchor/index";
+import TextAnchor from "@components/TextAnchor";
interface ContactsPageViewProps {
contacts: Occupation[];
diff --git a/src/views/CorporatePage/CorporatePageView.tsx b/src/views/CorporatePage/CorporatePageView.tsx
index cc55c92..1a88bdb 100644
--- a/src/views/CorporatePage/CorporatePageView.tsx
+++ b/src/views/CorporatePage/CorporatePageView.tsx
@@ -1,14 +1,14 @@
import React from "react";
import "./CorporatePage.scss";
import PageSection from "@components/PageSection";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection/index";
-import PageLink from "@components/PageLink/index";
-import Ribbon from "@components/Ribbon/index";
-import TextAnchor from "@components/TextAnchor/index";
+import MainSection from "@components/MainSection";
+import PageLink from "@components/PageLink";
+import Ribbon from "@components/Ribbon";
+import TextAnchor from "@components/TextAnchor";
const CorporatePageView: React.FC = () => (
@@ -39,7 +39,7 @@ const CorporatePageView: React.FC = () => (
Lyhyesti killasta ja sen toiminnasta
-
+
Aalto-yliopiston Sähköinsinöörikillan jäsenistöstä valmistuvat maan parhaimmat matematiikkaa ja fysiikkaa soveltavat huippuosaajat. Killan tehtävänä on pitää jäsenistään huolta ja edistää aktiivisesti jäsenten ja toimijoiden jaksamista. Killassa opitaan myös tärkeitä työelämätaitoja ammattimaisen killan johtamisen kautta.
Yhteistyömahdollisuudet
@@ -83,7 +83,7 @@ const CorporatePageView: React.FC = () => (
Mainos Sössöön?
-
+
Killan lehden mediakortin löydät täältä›
diff --git a/src/views/EventPage/EventPageView.tsx b/src/views/EventPage/EventPageView.tsx
index 0c7b439..cf6f558 100644
--- a/src/views/EventPage/EventPageView.tsx
+++ b/src/views/EventPage/EventPageView.tsx
@@ -17,27 +17,29 @@ const StyledSection = styled(MainSection)`
max-width: 1000px;
align-items: center;
- h1 {
+ & > h1 {
color: ${colors.darkBlue};
}
- img {
+ & > div > img {
+ height: auto;
width: 100%;
- min-height: 100px;
}
- .event-desc {
+ & > p {
color: ${colors.orange1};
}
-
- .event-signup-buttons {
- display: flex;
- flex-flow: row wrap;
- justify-content: center;
- }
+`;
+
+const SignupButtons = styled.div`
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: center;
`;
const Content = styled.div`
+ margin-top: 24px;
+
p {
color: ${colors.black};
}
@@ -79,15 +81,17 @@ const EventPageView: React.FC = ({ event }) => {
{event.title_fi}
-
+
{event.description_fi}
-
+
+
+
{/* We may have multiple signup forms. Generate own Button for each one */}
-
+
{event.signupForm.map(sf => (
{}}>
@@ -96,7 +100,7 @@ const EventPageView: React.FC = ({ event }) => {
)
)}
-
+
);
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index ea01504..1442ddd 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -1,15 +1,15 @@
import React from "react";
import "./FreshmenPage.scss";
-import PageSection from "@components/PageSection/index";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
-import AsideSection from "@components/AsideSection/index";
-import MainSection from "@components/MainSection/index";
-import PageLink from "@components/PageLink/index";
-import Ribbon from "@components/Ribbon/index";
-import TextAnchor from "@components/TextAnchor/index";
-import InfoBox from "@components/InfoBox/index";
+import PageSection from "@components/PageSection";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
+import AsideSection from "@components/AsideSection";
+import MainSection from "@components/MainSection";
+import PageLink from "@components/PageLink";
+import Ribbon from "@components/Ribbon";
+import TextAnchor from "@components/TextAnchor";
+import InfoBox from "@components/InfoBox";
import styled from "styled-components";
const KippariImage = styled.img`
@@ -54,7 +54,7 @@ const FreshmenPageView: React.FC = () => (
Olet tehnyt upean valinnan ottamalla askeleen matkalla, jossa sinusta ensin kehkeytyy teekkari ja myöhemmin diplomi-insinööri. Sinusta on juuri tullut tekniikan ylioppilas ja fuksi. Hieno saavutus, jota tietysti on syytä juhlia, ja tähän juhlaan paras sijainti on ehdottomasti Otaniemi. Tervetuloa!
Ensi askeleina suosittelen, että liityt teille fukseille tehdyille Telegram-kanaville. Tästä pääset tiedotuskanavalle ja tästä tutustumaan fuksikavereihin ja ISOihisi.
-
+
Matka nimeltä Teekkarius
Teekkarin matka on jokaiselle oman näköisensä. Kilta, ylioppilaskunta ja Otaniemen muut järjestöt tarjoavat varmasti jokaiselle omanlaista tekemistä ja harrastusta. Olet nyt osa Aalto-yliopiston Sähköinsinöörikiltaa ja me tulemme tukemaan sinua teekkariuden matkalla, jotta löydät juuri sinulle sopivat paikat, joissa vaikuttaa ja harrastaa. Jotta tämä onnistuisi, olemme esimerkiksi sijoittaneet sinut fuksiryhmään, johon tulet Orientaatioviikolla tutustumaan ja josta saat oman tukiryhmän uusiin seikkailuihin. Fuksiryhmääsi kuuluu myös muutama ISO. Heistä löydät lisää tietoa alempaa.
@@ -102,7 +102,7 @@ const FreshmenPageView: React.FC = () => (
Killassa tapahtuu kaikenlaista!
-
+
Seuraa killan tapahtumia
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 5ef7f0d..c0afdf6 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -7,12 +7,12 @@ import { Post } from "@models/Feed";
import PageSection from "@components/PageSection";
import PageLink from "@components/PageLink/PageLink";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
import Button from "@components/Button";
import Ribbon from "@components/Ribbon";
import SponsorReel from "@components/SponsorReel";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
import TextAnchor from "@components/TextAnchor";
interface FrontPageViewProps {
@@ -89,7 +89,7 @@ const FrontPageView: React.FC = ({ events, feed }) => (
Sössöä vuodesta 1969.
-
+
Lue opiskelijalehden viimeisin numero ›
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index bc64479..bba4dfb 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -4,9 +4,9 @@ import PageSection from "@components/PageSection";
import MainSection from "@components/MainSection";
import AsideSection from "@components/AsideSection";
import PageLink from "@components/PageLink";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
import Ribbon from "@components/Ribbon";
import InfoBox from "@components/InfoBox";
import Accordion from "@components/Accordion";
@@ -132,7 +132,7 @@ const GuildPageView: React.FC = () => (
- Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+ Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
diff --git a/src/views/StudiesPage/StudiesPageView.tsx b/src/views/StudiesPage/StudiesPageView.tsx
index 8f52937..6c319a1 100644
--- a/src/views/StudiesPage/StudiesPageView.tsx
+++ b/src/views/StudiesPage/StudiesPageView.tsx
@@ -1,14 +1,14 @@
import React from "react";
import "./StudiesPage.scss";
-import PageSection from "@components/PageSection/index";
-import HeroMainSection from "@components/Hero/HeroMainSection/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem/HeroAsideItem";
-import AsideSection from "@components/AsideSection/index";
-import MainSection from "@components/MainSection/index";
-import PageLink from "@components/PageLink/index";
-import Ribbon from "@components/Ribbon/index";
-import TextAnchor from "@components/TextAnchor/index";
+import PageSection from "@components/PageSection";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
+import AsideSection from "@components/AsideSection";
+import MainSection from "@components/MainSection";
+import PageLink from "@components/PageLink";
+import Ribbon from "@components/Ribbon";
+import TextAnchor from "@components/TextAnchor";
const StudiesPageView: React.FC = () => (
@@ -54,17 +54,17 @@ const StudiesPageView: React.FC = () => (
Emmaleena
Fuksivuoden loppupuolella aloin haaveilla oman alan hommista ja päätin laittaa kesätyöhakemuksia yrityksiin ihan laidasta laitaan. Lopulta taisin laittaa niitä jopa 50… Ei mennyt kauaa, kun Profit Softwarelta oltiin yhteydessä ja pääsin sinne haastatteluun. Ennen pitkää olikin jo kesä ja olin päässyt osaksi Profit Softwaren automaatiotraineeteamiä. Jatkoin kesän jälkeen osa-aikaisena traineenä ja seuraavana kesänä pääsinkin scrum master -roolissa ohjaamaan useita erilaisia traineeprojekteja. Ihastuin projektienhallintaan ja jatkan projekti taitojen harjoittamista töissä edelleen.
-
+
ALUMNIEN TARINOITA
SIKin alumneja löytyy vaikka mistä! Tässä muutama esimerkki erilaisista työtehtävistä ja tarinoista.
- Kurssitarjonta
+ Kurssitarjonta
- Liity jäseneksi
+ Liity jäseneksi
@@ -72,7 +72,7 @@ const StudiesPageView: React.FC = () => (
Hae opiskelemaan!
-
+
Lue lisää Aallon sivuilta
From ff9385cd47d165dda8c25462420b8288d6844fd7 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 00:13:45 +0300
Subject: [PATCH 02/28] FrontPage improvements and PageSection prop reducing
---
src/components/Divider.tsx | 10 ++
src/components/PageSection/PageSection.tsx | 39 +++--
src/components/index.tsx | 8 +
src/pages/FrontPage.tsx | 3 +-
src/views/ContactsPage/ContactsPageView.tsx | 16 +-
src/views/FrontPage/FrontPage.scss | 7 -
src/views/FrontPage/FrontPageHero.tsx | 52 ++++++
src/views/FrontPage/FrontPageView.tsx | 180 +++++++-------------
8 files changed, 167 insertions(+), 148 deletions(-)
create mode 100644 src/components/Divider.tsx
create mode 100644 src/components/index.tsx
delete mode 100644 src/views/FrontPage/FrontPage.scss
create mode 100644 src/views/FrontPage/FrontPageHero.tsx
diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx
new file mode 100644
index 0000000..797e3fc
--- /dev/null
+++ b/src/components/Divider.tsx
@@ -0,0 +1,10 @@
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+
+const Divider = styled.hr`
+ width: 98%;
+ border-color: ${colors.blue1};
+ margin: 0 auto;
+`;
+
+export default Divider;
diff --git a/src/components/PageSection/PageSection.tsx b/src/components/PageSection/PageSection.tsx
index baa9b6c..771c9c3 100644
--- a/src/components/PageSection/PageSection.tsx
+++ b/src/components/PageSection/PageSection.tsx
@@ -1,22 +1,28 @@
import React from "react";
import styled from "styled-components";
-import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
-import { colors } from "@theme/colors";
+import { ColorDivProps } from "../ColorDiv/ColorDiv";
+import { ColorMapper } from "@theme/colors";
interface PageSectionProps {
center?: boolean;
- bottomBorder?: boolean;
cardSection?: boolean; // does section contain a grid of cards
fullSize?: boolean;
}
-const Section = styled(ColorDiv)`
+const Section = styled.section`
display: flex;
flex-flow: row wrap;
justify-content: ${(p) => p.center ? "center" : "space-between"};
position: relative;
padding: ${(p) => p.fullSize ? 0 : "2rem 1rem 2rem"};
+ color: ${(p) => p.textColor};
+ background-color: ${(p) => p.backgroundColor};
+ &:hover {
+ color: ${(p) => p.hoverColor};
+ background-color: ${(p) => p.hoverBackgroundColor};
+ }
+
.lander-hero {
@media screen and (min-width: 800px) {
min-height: 85vh;
@@ -28,23 +34,16 @@ const Section = styled(ColorDiv)`
flex-flow: column nowrap;
}
`}
-
- ${(p) => p.bottomBorder ? `
- &::after {
- content: "";
- position: absolute;
- bottom: 0;
- width: 98%;
- left: 1%;
- border-bottom: 1px solid rgba(${colors.blue1}, 0.4);
- }
- ` : ""}
`;
-const PageSection: React.FC = (props) => {
- return (
-
- );
-}
+const PageSection: React.FC = ({ textColor, backgroundColor, hoverColor, backgroundHoverColor, ...props }) => (
+
+);
export default PageSection;
diff --git a/src/components/index.tsx b/src/components/index.tsx
new file mode 100644
index 0000000..84aac83
--- /dev/null
+++ b/src/components/index.tsx
@@ -0,0 +1,8 @@
+export { default as Card } from "./Card";
+export { default as PageLink } from "./PageLink";
+export { default as Button } from "./Button";
+export { default as Ribbon } from "./Ribbon";
+export { default as SponsorReel } from "./SponsorReel";
+export { default as TextAnchor } from "./TextAnchor";
+export { default as PageSection } from "./PageSection";
+export { default as Divider } from "./Divider";
\ No newline at end of file
diff --git a/src/pages/FrontPage.tsx b/src/pages/FrontPage.tsx
index 9f1917b..b32225d 100644
--- a/src/pages/FrontPage.tsx
+++ b/src/pages/FrontPage.tsx
@@ -78,8 +78,7 @@ class FrontPage extends React.Component {
const { events, feed } = this.state;
return (
<>
-
-
+
>
)
diff --git a/src/views/ContactsPage/ContactsPageView.tsx b/src/views/ContactsPage/ContactsPageView.tsx
index 2c530cc..6743ebc 100644
--- a/src/views/ContactsPage/ContactsPageView.tsx
+++ b/src/views/ContactsPage/ContactsPageView.tsx
@@ -4,12 +4,15 @@ import PageSection from "@components/PageSection";
import { Occupation, Committee } from "@models/Contacts";
import CommitteeContainer from "@components/CommitteeContainer";
import TextAnchor from "@components/TextAnchor";
+import { Divider } from "@components/index";
interface ContactsPageViewProps {
contacts: Occupation[];
committees: Committee[];
}
+
+
class ContactsPageView extends React.Component {
render() {
const { contacts, committees } = this.props;
@@ -22,7 +25,8 @@ class ContactsPageView extends React.Component {
Tämä sivu yrittää valottaa sen oikean ihmisen puhelinnumeroa ja sähköpostiosoitetta.
-
+
+
@@ -36,12 +40,16 @@ class ContactsPageView extends React.Component {
+
{committees.map((committee, index) => {
const order = committee.name_fi === "Toimikunnattomat" ? 1 : 0;
return (
-
- x.role.committee.name_fi === committee.name_fi)} />
-
+ <>
+
+ x.role.committee.name_fi === committee.name_fi)} />
+
+
+ >
)
})}
diff --git a/src/views/FrontPage/FrontPage.scss b/src/views/FrontPage/FrontPage.scss
deleted file mode 100644
index bbedfd6..0000000
--- a/src/views/FrontPage/FrontPage.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import "../../assets/scss/globals";
-
-.front-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-}
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
new file mode 100644
index 0000000..2970031
--- /dev/null
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -0,0 +1,52 @@
+import React from "react";
+import { PageSection, Button } from "@components/index";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
+
+const FrontPageHero: React.FC = () => (
+
+
+ Aalto-yliopiston Sähköinsinöörikilta
+
+ on elektroniikan ja sähkötekniikan opiskelijoiden järjestö. Kilta
+ kasaa yhteen yli 600 alansa huippua, jotka ovat avainasemassa
+ vauhdilla sähköistyvän maailmamme kehityksessä.
+
+
+ { }}>
+ Killan tehtävät ›
+
+ { }}>
+ Vastapainoa opiskelulle ›
+
+
+
+
+
+ Fuksikasvatusta, ISO-toimintaa, lorem ipsum dolor sit ja amet.
+
+
+ Oletko abi, vaihtamassa uraa tai valmistumassa?
+
+
+ Avoimet työpaikat ja excursiot. Infoa yritysten edustajille ja
+ sponsseille.
+
+
+
+);
+
+export default FrontPageHero;
\ No newline at end of file
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index c0afdf6..60f08c4 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,131 +1,81 @@
import React from "react";
-import "./FrontPage.scss";
-import Card from "@components/Card";
+import { PageSection, Card, PageLink, Button, Ribbon, SponsorReel, TextAnchor, Divider } from "@components/index";
+import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
-import PageSection from "@components/PageSection";
-
-import PageLink from "@components/PageLink/PageLink";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import Button from "@components/Button";
-import Ribbon from "@components/Ribbon";
-import SponsorReel from "@components/SponsorReel";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import TextAnchor from "@components/TextAnchor";
-
interface FrontPageViewProps {
events: Event[];
feed: Post[];
}
const FrontPageView: React.FC
= ({ events, feed }) => (
-
-
-
- Aalto-yliopiston Sähköinsinöörikilta
-
- on elektroniikan ja sähkötekniikan opiskelijoiden järjestö. Kilta
- kasaa yhteen yli 600 alansa huippua, jotka ovat avainasemassa
- vauhdilla sähköistyvän maailmamme kehityksessä.
-
-
- { }}>
- Killan tehtävät ›
-
- { }}>
- Vastapainoa opiskelulle ›
-
-
-
-
-
- Fuksikasvatusta, ISO-toimintaa, lorem ipsum dolor sit ja amet.
-
-
- Oletko abi, vaihtamassa uraa tai valmistumassa?
-
-
- Avoimet työpaikat ja excursiot. Infoa yritysten edustajille ja
- sponsseille.
-
-
-
-
- {events.map(event => (
- { }}>
- Lue lisää ›
-
- }
- />
- ))}
-
-
+ <>
+
+
+
+ {events.map(event => (
+ { }}>
+ Lue lisää ›
+
+ }
+ />
+ ))}
+
-
-
-
- Sössöä vuodesta 1969.
-
- Lue opiskelijalehden viimeisin numero ›
-
-
-
-
- {feed.map(inst => (
- { }}>
- Lue lisää ›
-
- }
- />
- ))}
-
+
+
+
+ Sössöä vuodesta 1969.
+
+ Lue opiskelijalehden viimeisin numero ›
+
+
+
+
+ {feed.map(inst => (
+ { }}>
+ Lue lisää ›
+
+ }
+ />
+ ))}
+
+
Lue tuoreimmat uutiset
-
-
+
+
Kuvia tapahtumista
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ >
)
export default FrontPageView;
From 29b913b834671282bad9901ba7fe073974df37f8 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 21:06:41 +0300
Subject: [PATCH 03/28] WIP FrontPage rewrite
---
src/components/Card/Card.tsx | 66 +++---
src/components/Divider.tsx | 3 +-
src/components/Footer/Footer.scss | 90 ---------
src/components/Footer/Footer.tsx | 145 +++++++++----
src/components/FooterMap/FooterMap.scss | 13 --
src/components/FooterMap/FooterMap.tsx | 30 +--
src/components/PageLink/PageLink.scss | 31 ---
src/components/PageLink/PageLink.tsx | 49 +++--
.../{PageSection => }/PageSection.tsx | 2 +-
src/components/PageSection/index.ts | 2 -
src/components/PageSection2.tsx | 91 +++++++++
src/components/index.tsx | 2 +-
src/index.scss | 2 +
src/theme/colors.ts | 2 +
src/views/ActualPage/EventCalendar.tsx | 7 +-
src/views/ActualPage/News.tsx | 7 +-
src/views/FrontPage/FrontPageHero.tsx | 190 ++++++++++++++----
src/views/FrontPage/FrontPageView.tsx | 84 +++++---
18 files changed, 499 insertions(+), 317 deletions(-)
delete mode 100644 src/components/Footer/Footer.scss
delete mode 100644 src/components/FooterMap/FooterMap.scss
delete mode 100644 src/components/PageLink/PageLink.scss
rename src/components/{PageSection => }/PageSection.tsx (96%)
delete mode 100644 src/components/PageSection/index.ts
create mode 100644 src/components/PageSection2.tsx
diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx
index 9f2e377..9958adf 100644
--- a/src/components/Card/Card.tsx
+++ b/src/components/Card/Card.tsx
@@ -1,53 +1,57 @@
import React from "react";
import "./Card.scss";
import Anchor from "../Anchor";
+import { Button } from "@components/index";
-export interface CardProps {
+interface CardProps {
title: string;
start_time: string;
text: string;
link?: string;
image?: string;
- button?: JSX.Element;
+ buttonText?: string;
+ buttonOnClick?: () => void;
}
-export interface CardState { }
-class Card extends React.Component {
- render() {
- const { title, text, link, image, button } = this.props;
- const options = {
- day: "numeric",
- month: "numeric",
- year: "numeric",
- hour: "numeric",
- minute: "2-digit"
- };
- const datetime = new Date(this.props.start_time).toLocaleString("fi-FI", options);
+const Card: React.FC = ({ title, text, link, image, buttonText, start_time, buttonOnClick }) => {
+ const options = {
+ day: "numeric",
+ month: "numeric",
+ year: "numeric",
+ hour: "numeric",
+ minute: "2-digit"
+ };
+ const datetime = new Date(start_time).toLocaleString("fi-FI", options);
- const imageElem = image ? (
-
- ) : null;
- if (link) {
- return (
-
- {imageElem}
- {datetime}
- {title}
- {text}
- {button}
-
- );
- }
+ const imageElem = image ? (
+
+ ) : null;
+ if (link) {
return (
-
+
{imageElem}
{datetime}
{title}
{text}
- {button}
-
+
+
+ {buttonText}
+
+
+
);
}
+ return (
+
+ {imageElem}
+
{datetime}
+
{title}
+
{text}
+
+ {buttonText}
+
+
+ );
}
export default Card;
diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx
index 797e3fc..1093cdd 100644
--- a/src/components/Divider.tsx
+++ b/src/components/Divider.tsx
@@ -3,7 +3,8 @@ import { colors } from "@theme/colors";
const Divider = styled.hr`
width: 98%;
- border-color: ${colors.blue1};
+ border: 0;
+ border-bottom: 2px solid ${colors.blue1};
margin: 0 auto;
`;
diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss
deleted file mode 100644
index 2def50a..0000000
--- a/src/components/Footer/Footer.scss
+++ /dev/null
@@ -1,90 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.footer {
- display: flex;
- flex-direction: column;
-
- &__content {
- display: flex;
- padding: 16px;
- }
-
- h4 {
- color: color(light-blue);
- padding: 1.5rem 0;
- }
-
- & a {
- color: color(white1);
- text-decoration: underline;
- padding: 0.4rem 0;
- font-size: 14px;
- }
-
- & p {
- color: color(white1);
- margin: 0;
- padding: 0.4rem 0;
- font-size: 14px;
- }
-
- &__info {
- display: flex;
- flex-direction: column;
- flex-basis: 100%;
- align-items: center;
-
- &__block {
- padding: 1rem 0;
- }
- }
-
- &__contacts {
- display: flex;
- justify-content: space-between;
- flex-flow: row nowrap;
- font-weight: 200;
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- }
- }
-
- &__text {
- display: flex;
- flex-flow: column;
- min-width: 180px;
-
- @media screen and (min-width: 600px) {
- padding-right: 3rem;
- }
- }
-
- &__links {
- display: flex;
- flex-flow: column;
-
- @media screen and (max-width: 600px - 1px) {
- margin-top: 2rem;
- }
- }
-
- &__copyright {
- display: flex;
- flex-flow: row nowrap;
- background-color: color(black1);
- text-align: center;
- justify-content: center;
- font-size: 12px;
- padding: 1rem 0;
-
- p {
- padding: 0.5rem 1rem;
- }
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- }
- }
-}
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
index c816204..059dad5 100644
--- a/src/components/Footer/Footer.tsx
+++ b/src/components/Footer/Footer.tsx
@@ -1,48 +1,115 @@
import React from "react";
-import FooterMap from "../FooterMap";
+import styled from "styled-components";
import Anchor from "../Anchor";
-import "./Footer.scss";
+import { colors } from "@theme/colors";
-export interface FooterProps { }
-export interface FooterState { }
+const StyledFooter = styled.footer`
+ display: flex;
+ flex-direction: column;
+ background-color: ${colors.darkBlue};
-class Footer extends React.Component {
- render() {
- return
-
-
-
-
-
Aalto-yliopiston Sähköinsinöörikilta ry
-
-
-
TUAS-Talo
-
Maarintie 8
-
PL 15500, 00076 Aalto
-
-
-
Y-tunnus: 1627010-1
-
sik-hallitus@list.ayy.fi
-
Yhteystiedot
-
-
-
Jäseneksi
-
Palaute
-
Arkisto
-
Materiaalipankki
-
-
-
+ a {
+ color: ${colors.white};
+ display: block;
+ text-decoration: underline;
+ padding: 0.4rem 0;
+ font-size: 14px;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+
+ p {
+ color: ${colors.white};
+ margin: 0;
+ padding: 0.4rem 0;
+ font-size: 14px;
+ }
+`;
+
+const Content = styled.div`
+ display: flex;
+ & > div {
+ flex: 2;
+ padding: 48px 0;
+
+ h4 {
+ color: ${colors.lightBlue};
+ padding: 24px 0;
+ }
+
+ & > div {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ }
+ }
+`;
+
+const CopyRight = styled.div`
+ display: flex;
+ flex-flow: row nowrap;
+ background-color: ${colors.black};
+ text-align: center;
+ justify-content: center;
+ font-size: 12px;
+ padding: 1rem 0;
+
+ p {
+ padding: 0.5rem 1rem;
+ }
+
+ @media screen and (max-width: 600px - 1px) {
+ flex-flow: column nowrap;
+ }
+`;
+
+const Map = styled.iframe`
+ border: none;
+ flex: 1;
+
+ @media screen and (max-width: 1200px - 1px) {
+ display: none;
+ }
+`;
+
+const Footer: React.FC = () => (
+
+
+
+
Aalto-yliopiston Sähköinsinöörikilta ry
+
+
+
TUAS-Talo
+
Maarintie 8
+
PL 15500, 00076 Aalto
+
+
+
Y-tunnus: 1627010-1
+
sik-hallitus@list.ayy.fi
+
Yhteystiedot
+
+
+
+
Jäseneksi
+
Palaute
+
Arkisto
+
Materiaalipankki
-
-
-
-
© Aalto-yliopiston Sähköinsinöörikilta ry
-
webmaster: sik-vtmk@list.ayy.fi
- ;
- }
-}
+
+
+
+ © Aalto-yliopiston Sähköinsinöörikilta ry
+ webmaster: sik-vtmk@list.ayy.fi
+
+
+)
export default Footer;
diff --git a/src/components/FooterMap/FooterMap.scss b/src/components/FooterMap/FooterMap.scss
deleted file mode 100644
index 09a3654..0000000
--- a/src/components/FooterMap/FooterMap.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-@import "../../assets/scss/globals";
-
-.footer-map {
- display: flex;
-
- @media screen and (max-width: 1200px - 1px) {
- display: none;
- }
-
- iframe {
- border: none;
- }
-}
diff --git a/src/components/FooterMap/FooterMap.tsx b/src/components/FooterMap/FooterMap.tsx
index bddca1a..4ede894 100644
--- a/src/components/FooterMap/FooterMap.tsx
+++ b/src/components/FooterMap/FooterMap.tsx
@@ -1,26 +1,16 @@
import React from "react";
-import "./FooterMap.scss";
+import styled from "styled-components";
-const AnyReactComponent = ({ text }) =>
{text}
;
+const IFrame = styled.iframe`
-export interface FooterMapProps {}
+`;
-export interface FooterMapState {}
-
-class FooterMap extends React.Component
{
- render() {
- return (
-
-
-
-
- );
- }
-}
+const FooterMap: React.FC = () => (
+
+)
export default FooterMap;
diff --git a/src/components/PageLink/PageLink.scss b/src/components/PageLink/PageLink.scss
deleted file mode 100644
index f8f1ba5..0000000
--- a/src/components/PageLink/PageLink.scss
+++ /dev/null
@@ -1,31 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.page-link {
- border-left-color: color(blue1);
- border-left-width: 0.8rem;
- border-left-style: solid;
- margin: 0 1rem 1rem 0;
-
- & p {
- display: flex;
- margin-block-start: 0;
- margin-block-end: 0;
- color: color(dark-blue);
- font-size: 1rem;
- text-transform: uppercase;
- letter-spacing: 1px;
- font-weight: 800;
- margin-left: 1rem;
- margin-bottom: 0.5rem;
- padding: 0;
- }
-
- & a {
- color: color(dark-blue);
- margin-left: 1rem;
- display: flex;
- text-decoration: none;
- font-weight: normal;
- }
-}
diff --git a/src/components/PageLink/PageLink.tsx b/src/components/PageLink/PageLink.tsx
index 5562210..ca69416 100644
--- a/src/components/PageLink/PageLink.tsx
+++ b/src/components/PageLink/PageLink.tsx
@@ -1,23 +1,46 @@
import React from "react";
-import "./PageLink.scss";
+import styled from "styled-components";
import TextAnchor from "../TextAnchor";
+import { colors } from "@theme/colors";
-export interface PageLinkProps {
+interface PageLinkProps {
to: string;
desc: string;
}
-export interface PageLinkState { }
-class PageLink extends React.Component {
- render() {
- const { to, desc } = this.props;
- return (
-
-
{this.props.children}
-
{desc}
-
- );
+const StyledPageLink = styled.div`
+ border-left-color: ${colors.blue1};
+ border-left-width: 0.8rem;
+ border-left-style: solid;
+ margin: 0 1rem 1rem 0;
+
+ p {
+ margin-block-start: 0;
+ margin-block-end: 0;
+ color: ${colors.darkBlue};
+ font-size: 1rem;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ font-weight: 800;
+ margin-left: 1rem;
+ margin-bottom: 0.5rem;
+ padding: 0;
}
-}
+
+ a {
+ display: block;
+ color: ${colors.darkBlue};
+ margin-left: 1rem;
+ text-decoration: none;
+ font-weight: normal;
+ }
+`;
+
+const PageLink: React.FC = ({ to, desc, children }) => (
+
+ {children}
+ {desc}
+
+);
export default PageLink;
diff --git a/src/components/PageSection/PageSection.tsx b/src/components/PageSection.tsx
similarity index 96%
rename from src/components/PageSection/PageSection.tsx
rename to src/components/PageSection.tsx
index 771c9c3..b32797e 100644
--- a/src/components/PageSection/PageSection.tsx
+++ b/src/components/PageSection.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import { ColorDivProps } from "../ColorDiv/ColorDiv";
+import { ColorDivProps } from "./ColorDiv/ColorDiv";
import { ColorMapper } from "@theme/colors";
interface PageSectionProps {
diff --git a/src/components/PageSection/index.ts b/src/components/PageSection/index.ts
deleted file mode 100644
index f3fe81c..0000000
--- a/src/components/PageSection/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import PageSection from "./PageSection";
-export default PageSection;
diff --git a/src/components/PageSection2.tsx b/src/components/PageSection2.tsx
new file mode 100644
index 0000000..b44550c
--- /dev/null
+++ b/src/components/PageSection2.tsx
@@ -0,0 +1,91 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+
+const Section = styled.section`
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: space-between;
+ position: relative;
+ padding: 2rem 1rem 2rem;
+
+ &.sectionBg-darkBlue {
+ color: ${colors.white};
+ background-color: ${colors.darkBlue};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-lightBlue {
+ color: ${colors.darkBlue};
+ background-color: ${colors.lightBlue};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-black {
+ color: ${colors.white};
+ background-color: ${colors.black};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-grey1 {
+ color: ${colors.white};
+ background-color: ${colors.grey1};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-grey2 {
+ color: ${colors.white};
+ background-color: ${colors.grey2};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-orange1 {
+ color: ${colors.white};
+ background-color: ${colors.orange1};
+ }
+
+ &.sectionBg-orange2 {
+ color: ${colors.white};
+ background-color: ${colors.orange2};
+ a:hover {
+ color: ${colors.blue1};
+ }
+ }
+
+ &.sectionBg-blue1 {
+ color: ${colors.white};
+ background-color: ${colors.blue1};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-lightTurquoise {
+ color: ${colors.darkBlue};
+ background-color: ${colors.lightTurquoise};
+ a:hover {
+ color: ${colors.white};
+ }
+ }
+
+ &.sectionBg-green1 {
+ color: ${colors.darkBlue};
+ background-color: ${colors.green1};
+ }
+`;
+
+const PageSection: React.FC = (props) => (
+
+);
+
+export default PageSection;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 84aac83..f40bb65 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -4,5 +4,5 @@ export { default as Button } from "./Button";
export { default as Ribbon } from "./Ribbon";
export { default as SponsorReel } from "./SponsorReel";
export { default as TextAnchor } from "./TextAnchor";
-export { default as PageSection } from "./PageSection";
+export { default as PageSection } from "./PageSection2";
export { default as Divider } from "./Divider";
\ No newline at end of file
diff --git a/src/index.scss b/src/index.scss
index 0820280..b5d7679 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -19,6 +19,8 @@ body {
min-height: 100vh;
display: flex;
flex-flow: column nowrap;
+ color: color(black);
+ background-color: color(white1);
}
body {
diff --git a/src/theme/colors.ts b/src/theme/colors.ts
index e467134..f34cf25 100644
--- a/src/theme/colors.ts
+++ b/src/theme/colors.ts
@@ -48,6 +48,8 @@ export const colors = {
inherit: "inherit"
}
+export type Colors2 = keyof typeof colors;
+
export const colorToClass = (color: Colors): string => color ? `color-div__${color}` : undefined;
export const bgColorToClass = (color: Colors): string => color ? `color-div__background_${color}` : undefined;
export const hoverColorToClass = (color: Colors): string => color ? `color-div__${color}Hoverable` : undefined;
diff --git a/src/views/ActualPage/EventCalendar.tsx b/src/views/ActualPage/EventCalendar.tsx
index 436c437..7ed204a 100644
--- a/src/views/ActualPage/EventCalendar.tsx
+++ b/src/views/ActualPage/EventCalendar.tsx
@@ -35,11 +35,8 @@ const EventCalendar: React.FC = ({events}) => {
start_time={e.start_time}
text={e.description_fi}
link={`/events/${e.id}`}
- button={
- { }}>
- Lue lisää ›
-
- }
+ buttonText="Lue lisää ›"
+ buttonOnClick={() => {}}
>
))}
diff --git a/src/views/ActualPage/News.tsx b/src/views/ActualPage/News.tsx
index 550eae1..40fdf04 100644
--- a/src/views/ActualPage/News.tsx
+++ b/src/views/ActualPage/News.tsx
@@ -35,11 +35,8 @@ const News: React.FC = ({feed}) => {
start_time={post.publish_time}
text={post.description_fi}
link={`/feed/${post.id}`}
- button={
- { }}>
- Lue lisää ›
-
- }
+ buttonText="Lue lisää ›"
+ buttonOnClick={() => {}}
>
))}
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index 2970031..c0b527c 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -1,52 +1,162 @@
import React from "react";
-import { PageSection, Button } from "@components/index";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
+import styled from "styled-components";
+import { PageSection } from "@components/index";
+import { colors } from "@theme/colors";
+import Anchor from "@components/Anchor";
+
+const HeroSection = styled(PageSection)`
+ padding: 0;
+ @media screen and (min-width: 800px) {
+ min-height: 85vh;
+ }
+
+ color: ${colors.white};
+ background-color: ${colors.darkBlue};
+ a:hover {
+ color: ${colors.white};
+ }
+`;
+
+const MainSection = styled.section`
+ flex: 6;
+
+ & > div {
+ margin: 15vh auto 0;
+ max-width: 600px;
+ text-align: center;
+ line-height: 1.5rem;
+
+ & > div {
+ min-width: 20%;
+ max-width: fit-content;
+ margin: auto;
+ }
+
+ h1 {
+ line-height: 40px;
+ @media screen and (max-width: 500px) {
+ font-size: 2rem;
+ }
+ }
+
+ p {
+ max-width: 400px;
+ margin: 1em auto;
+ font-weight: 100;
+ }
+ }
+`;
+
+const HeroButton = styled.button`
+ display: block;
+ width: 100%;
+ color: ${colors.blue1};
+ background-color: transparent;
+ padding: 0.8rem 2rem;
+ margin: 0.5rem;
+ font-size: 0.8rem;
+ font-weight: 800;
+ letter-spacing: .1em;
+ text-transform: uppercase;
+ border: 1px solid ${colors.lightTurquoise};
+
+ &:hover {
+ cursor: pointer;
+ }
+
+ &:active,
+ &:focus {
+ outline: none;
+ }
+`;
+
+const AsideSection = styled.aside`
+ flex: 4;
+ padding: 3rem 1rem 2rem;
+`;
+
+const AsideItem = styled.article`
+ max-width: 300px;
+ line-height: 1rem;
+ margin-bottom: 1rem;
+
+ h2 {
+ color: ${colors.lightBlue};
+ text-transform: uppercase;
+ letter-spacing: 3px;
+ line-height: 20px;
+ }
+
+ p, a {
+ color: ${colors.lightBlue};
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 20px;
+ }
+
+ a {
+ color: ${colors.blue1};
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.1rem;
+
+ &:hover {
+ color: ${colors.white};
+ }
+ }
+`;
const FrontPageHero: React.FC = () => (
-
-
- Aalto-yliopiston Sähköinsinöörikilta
-
+
+
+
+
Aalto-yliopiston Sähköinsinöörikilta
+
on elektroniikan ja sähkötekniikan opiskelijoiden järjestö. Kilta
kasaa yhteen yli 600 alansa huippua, jotka ovat avainasemassa
vauhdilla sähköistyvän maailmamme kehityksessä.
-
-
-
{ }}>
- Killan tehtävät ›
-
-
{ }}>
- Vastapainoa opiskelulle ›
-
+
+
+ { }}>
+ Killan tehtävät ›
+
+ { }}>
+ Vastapainoa opiskelulle ›
+
+
-
-
-
+
+
+
+
+ Vasta-aloittanut opiskelija
+
Fuksikasvatusta, ISO-toimintaa, lorem ipsum dolor sit ja amet.
-
-
+
+
+ Fuksit ›
+
+
+
+ Harkitsetko uraa alalla?
+
Oletko abi, vaihtamassa uraa tai valmistumassa?
-
-
- Avoimet työpaikat ja excursiot. Infoa yritysten edustajille ja
- sponsseille.
-
-
-
+
+
+ Opinnot ja ura ›
+
+
+
+ Yhteistyö yritysten kanssa
+
+ Avoimet työpaikat ja excursiot. Infoa yritysten edustajille ja sponsseille.
+
+
+ Yritysyhteistyö ›
+
+
+
+
);
export default FrontPageHero;
\ No newline at end of file
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 60f08c4..79dec8e 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,19 +1,59 @@
import React from "react";
-import { PageSection, Card, PageLink, Button, Ribbon, SponsorReel, TextAnchor, Divider } from "@components/index";
+import styled from "styled-components";
+import { PageSection, Card, PageLink, Ribbon, SponsorReel, TextAnchor, Divider } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
+import { colors } from "@theme/colors";
interface FrontPageViewProps {
events: Event[];
feed: Post[];
}
+const SponsorSection = styled(PageSection)`
+ justify-content: center;
+
+ color: ${colors.black};
+ background-color: ${colors.white};
+ a {
+ color: ${colors.blue1};
+ }
+`;
+
+const CardSection = styled(PageSection)`
+ @media screen and (max-width: 800px - 1px) {
+ flex-flow: column nowrap;
+ }
+
+ color: ${colors.black};
+ background-color: ${colors.white};
+ a {
+ color: ${colors.blue1};
+ &:hover {
+ color: ${colors.darkBlue};
+ }
+ }
+
+ h6 {
+ color: ${colors.orange1};
+ }
+`;
+
+const SössöSection = styled(PageSection)`
+ color: ${colors.white};
+ background-color: ${colors.orange1};
+
+ a:hover {
+ color: ${colors.darkBlue};
+ }
+`;
+
const FrontPageView: React.FC
= ({ events, feed }) => (
<>
-
+
{events.map(event => (
= ({ events, feed }) => (
text={event.description_fi}
link={`/events/${event.id}`}
image={event.image || event.tags[0].icon}
- button={
- { }}>
- Lue lisää ›
-
- }
+ buttonOnClick={() => {}}
+ buttonText="Lue lisää ›"
/>
))}
- Kaikki tapahtumat
+ Kaikki tapahtumat
-
-
+
+
+
Sössöä vuodesta 1969.
Lue opiskelijalehden viimeisin numero ›
-
-
+
+
+
{feed.map(inst => (
= ({ events, feed }) => (
start_time={inst.publish_time}
text={inst.description_fi}
link={`/feed/${inst.id}`}
- button={
- { }}>
- Lue lisää ›
-
- }
+ buttonOnClick={() => {}}
+ buttonText="Lue lisää ›"
/>
))}
- Lue tuoreimmat uutiset
+ Lue tuoreimmat uutiset
- Kuvia tapahtumista
+ Kuvia tapahtumista
-
-
+
+
+
-
+
>
)
From f84d8593d268a6acb69c9e5ad4205398cd8170d6 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 22:37:37 +0300
Subject: [PATCH 04/28] FrontPage rewrite, seems ok
---
src/components/Card.tsx | 119 +++++++++++++++++++++++++
src/components/Card/index.ts | 2 -
src/components/Footer/Footer.tsx | 112 +++++++++++++----------
src/pages/CommonPage.tsx | 4 +-
src/pages/admin/AdminCommonPage.scss | 1 +
src/views/ActualPage/EventCalendar.tsx | 2 +-
src/views/ActualPage/News.tsx | 2 +-
src/views/FrontPage/FrontPageHero.tsx | 7 +-
src/views/FrontPage/FrontPageView.tsx | 52 +++++++++--
9 files changed, 237 insertions(+), 64 deletions(-)
create mode 100644 src/components/Card.tsx
delete mode 100644 src/components/Card/index.ts
diff --git a/src/components/Card.tsx b/src/components/Card.tsx
new file mode 100644
index 0000000..7199742
--- /dev/null
+++ b/src/components/Card.tsx
@@ -0,0 +1,119 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+import Anchor from "@components/Anchor";
+
+interface WrappedCardProps {
+ title: string;
+ start_time: string;
+ text: string;
+ link: string;
+ image?: string;
+ imageAlt?: string;
+ buttonOnClick?: () => void;
+}
+
+interface CardProps {
+ title: string;
+ start_time: string;
+ text: string;
+ img: JSX.Element;
+ button: JSX.Element;
+}
+
+const StyledCard = styled.article`
+ color: ${colors.black};
+ margin: 1rem;
+ text-align: center;
+
+ img {
+ width: 100%;
+ max-height: 300px;
+ margin-bottom: 1rem;
+ }
+
+ p {
+ font-size: 16px;
+ text-overflow: ellipsis;
+ margin: 0 0 0.5rem;
+ font-weight: 200;
+ line-height: 22px;
+ }
+
+ p:first-of-type {
+ color: ${colors.orange1};
+ font-size: 0.9rem !important;
+ font-weight: 600 !important;
+
+ @media screen and (max-width: 1200px) {
+ margin: 0.5rem 0;
+ font-size: 16px;
+ }
+ }
+
+
+ h3 {
+ padding: 0.5rem;
+ font-size: 1.5rem;
+ font-weight: 300;
+ }
+
+ button {
+ cursor: pointer;
+
+ padding: 0.8rem 2rem;
+ margin: 0.5rem;
+ font-size: 13px;
+ background: none;
+ text-transform: uppercase;
+ background-color: ${colors.blue1};
+ color: ${colors.white};
+ font-weight: 800;
+ letter-spacing: 1.5px;
+ border: none;
+ }
+`;
+
+const Card: React.FC = ({ title, start_time, text, img, button }) => (
+
+ {img}
+ {start_time}
+ {title}
+ {text}
+ {button}
+
+);
+
+const WrappedCard: React.FC = ({ title, text, link, image, imageAlt, start_time, buttonOnClick }) => {
+ const options = {
+ day: "numeric",
+ month: "numeric",
+ year: "numeric",
+ hour: "numeric",
+ minute: "2-digit"
+ };
+ const datetime = new Date(start_time).toLocaleString("fi-FI", options);
+ const img = image ? (
+
+ ) : null;
+
+ const button = (
+
+
+ Lue lisää ›
+
+
+ );
+
+ return (
+
+ );
+}
+
+export default WrappedCard;
diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts
deleted file mode 100644
index af0084f..0000000
--- a/src/components/Card/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import Card from "./Card";
-export default Card;
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
index 059dad5..74b56b5 100644
--- a/src/components/Footer/Footer.tsx
+++ b/src/components/Footer/Footer.tsx
@@ -30,23 +30,46 @@ const StyledFooter = styled.footer`
const Content = styled.div`
display: flex;
- & > div {
- flex: 2;
+
+ & > div:first-of-type {
padding: 48px 0;
+ flex: 2 1;
- h4 {
- color: ${colors.lightBlue};
- padding: 24px 0;
- }
-
- & > div {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
+ & > * {
+ padding: 0 24px;
}
}
+
+ h4 {
+ color: ${colors.lightBlue};
+ padding: 24px 0;
+ }
`;
+const MarginSpace = styled.div`
+ max-width: 600px;
+ margin: auto;
+`;
+
+const Columns = styled.div`
+ display: flex;
+ justify-content: space-between;
+ & > div > div {
+ margin-bottom: 1rem;
+ }
+`;
+
+const Map = styled.div`
+ flex: 1;
+ @media screen and (max-width: 600px) {
+ display: none;
+ }
+ iframe {
+ border: none;
+ }
+`;
+
+
const CopyRight = styled.div`
display: flex;
flex-flow: row nowrap;
@@ -60,50 +83,47 @@ const CopyRight = styled.div`
padding: 0.5rem 1rem;
}
- @media screen and (max-width: 600px - 1px) {
+ @media screen and (max-width: 600px) {
flex-flow: column nowrap;
}
`;
-const Map = styled.iframe`
- border: none;
- flex: 1;
-
- @media screen and (max-width: 1200px - 1px) {
- display: none;
- }
-`;
-
const Footer: React.FC = () => (
-
Aalto-yliopiston Sähköinsinöörikilta ry
-
-
-
TUAS-Talo
-
Maarintie 8
-
PL 15500, 00076 Aalto
-
-
-
Y-tunnus: 1627010-1
-
sik-hallitus@list.ayy.fi
-
Yhteystiedot
-
-
-
-
Jäseneksi
-
Palaute
-
Arkisto
-
Materiaalipankki
-
-
+
+ Aalto-yliopiston Sähköinsinöörikilta ry
+
+
+
+
TUAS-Talo
+
Maarintie 8
+
PL 15500, 00076 Aalto
+
+
+
Y-tunnus: 1627010-1
+
sik-hallitus@list.ayy.fi
+
Yhteystiedot
+
+
+
+
Jäseneksi
+
Palaute
+
Arkisto
+
Materiaalipankki
+
+
+
-
+
+
+
+
© Aalto-yliopiston Sähköinsinöörikilta ry
diff --git a/src/pages/CommonPage.tsx b/src/pages/CommonPage.tsx
index fe83558..a3319b1 100644
--- a/src/pages/CommonPage.tsx
+++ b/src/pages/CommonPage.tsx
@@ -11,11 +11,11 @@ class CommonPage extends React.Component {
render() {
const Page = this.props.page;
return (
-
+ <>
-
+ >
);
}
}
diff --git a/src/pages/admin/AdminCommonPage.scss b/src/pages/admin/AdminCommonPage.scss
index 7bd080a..5d7d8ef 100644
--- a/src/pages/admin/AdminCommonPage.scss
+++ b/src/pages/admin/AdminCommonPage.scss
@@ -3,6 +3,7 @@
.admin-container {
display: flex;
+ background-color: color(dark-blue);
flex-flow: row nowrap;
justify-content: flex-start;
align-items: flex-start;
diff --git a/src/views/ActualPage/EventCalendar.tsx b/src/views/ActualPage/EventCalendar.tsx
index 7ed204a..86443cf 100644
--- a/src/views/ActualPage/EventCalendar.tsx
+++ b/src/views/ActualPage/EventCalendar.tsx
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { Event } from "@models/Event";
-import Card from "@components/Card";
+import Card from "@components/Card/Card";
import Button from "@components/Button";
import PageSection from "@components/PageSection";
diff --git a/src/views/ActualPage/News.tsx b/src/views/ActualPage/News.tsx
index 40fdf04..056d190 100644
--- a/src/views/ActualPage/News.tsx
+++ b/src/views/ActualPage/News.tsx
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { Post } from "@models/Feed";
-import Card from "@components/Card";
+import Card from "@components/Card/Card";
import Button from "@components/Button";
import PageSection from "@components/PageSection";
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index c0b527c..cf6f4d5 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -5,7 +5,7 @@ import { colors } from "@theme/colors";
import Anchor from "@components/Anchor";
const HeroSection = styled(PageSection)`
- padding: 0;
+ padding: 0 1rem;
@media screen and (min-width: 800px) {
min-height: 85vh;
}
@@ -30,6 +30,8 @@ const MainSection = styled.section`
min-width: 20%;
max-width: fit-content;
margin: auto;
+ display: flex;
+ flex-direction: column;
}
h1 {
@@ -49,7 +51,6 @@ const MainSection = styled.section`
const HeroButton = styled.button`
display: block;
- width: 100%;
color: ${colors.blue1};
background-color: transparent;
padding: 0.8rem 2rem;
@@ -72,7 +73,7 @@ const HeroButton = styled.button`
const AsideSection = styled.aside`
flex: 4;
- padding: 3rem 1rem 2rem;
+ padding: 3rem 0rem 2rem;
`;
const AsideItem = styled.article`
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 79dec8e..ce613f5 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import { PageSection, Card, PageLink, Ribbon, SponsorReel, TextAnchor, Divider } from "@components/index";
+import { PageSection, Card, PageLink, SponsorReel, Divider } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
@@ -38,12 +38,52 @@ const CardSection = styled(PageSection)`
h6 {
color: ${colors.orange1};
}
+
+ & > * {
+ width: calc(25% - 2rem);
+
+ @media screen and (min-width: 1000px) and (max-width: 1200px) {
+ width: calc(50% - 2rem);
+ margin-bottom: 2rem;
+ }
+
+ @media screen and (max-width: 1000px) {
+ width: 100%;
+ margin: 0 0 3rem 0;
+ }
+ }
`;
const SössöSection = styled(PageSection)`
color: ${colors.white};
background-color: ${colors.orange1};
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ align-items: flex-end;
+
+ @media screen and (max-width: 600px - 1px) {
+ flex-flow: column nowrap;
+ align-items: center;
+ }
+
+ h3 {
+ font-size: 1.5rem;
+ font-weight: 200;
+ margin-block-start: 0;
+ margin-block-end: 0;
+ }
+
+ a {
+ font-weight: 700;
+ text-decoration: none;
+ margin: 0.5rem 1rem 0;
+ font-size: 1rem;
+ text-transform: uppercase;
+ letter-spacing: 0.1rem;
+ }
+
a:hover {
color: ${colors.darkBlue};
}
@@ -63,7 +103,6 @@ const FrontPageView: React.FC = ({ events, feed }) => (
link={`/events/${event.id}`}
image={event.image || event.tags[0].icon}
buttonOnClick={() => {}}
- buttonText="Lue lisää ›"
/>
))}
@@ -74,12 +113,8 @@ const FrontPageView: React.FC
= ({ events, feed }) => (
-
- Sössöä vuodesta 1969.
-
- Lue opiskelijalehden viimeisin numero ›
-
-
+ Sössöä vuodesta 1969.
+ Lue opiskelijalehden viimeisin numero ›
@@ -91,7 +126,6 @@ const FrontPageView: React.FC = ({ events, feed }) => (
text={inst.description_fi}
link={`/feed/${inst.id}`}
buttonOnClick={() => {}}
- buttonText="Lue lisää ›"
/>
))}
From d7c85d46d90759c61eacc364645e3d3b406f979c Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 22:42:46 +0300
Subject: [PATCH 05/28] Split Footer content from Footer file
---
src/components/Footer/Footer.tsx | 117 ++++--------------------
src/components/Footer/FooterContent.tsx | 104 +++++++++++++++++++++
src/components/Footer/index.ts | 2 -
src/components/FooterMap/FooterMap.tsx | 16 ----
src/components/FooterMap/index.ts | 2 -
src/pages/CommonPage.tsx | 2 +-
6 files changed, 123 insertions(+), 120 deletions(-)
create mode 100644 src/components/Footer/FooterContent.tsx
delete mode 100644 src/components/Footer/index.ts
delete mode 100644 src/components/FooterMap/FooterMap.tsx
delete mode 100644 src/components/FooterMap/index.ts
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
index 74b56b5..276689e 100644
--- a/src/components/Footer/Footer.tsx
+++ b/src/components/Footer/Footer.tsx
@@ -1,12 +1,28 @@
import React from "react";
import styled from "styled-components";
-import Anchor from "../Anchor";
import { colors } from "@theme/colors";
+import FooterContent from "./FooterContent";
const StyledFooter = styled.footer`
display: flex;
flex-direction: column;
background-color: ${colors.darkBlue};
+`;
+
+const CopyRight = styled.div`
+ display: flex;
+ flex-flow: row nowrap;
+ background-color: ${colors.black};
+ text-align: center;
+ justify-content: center;
+ font-size: 12px;
+ padding: 1rem 0;
+
+ p {
+ padding: 0.5rem 1rem;
+ margin: 0;
+ font-size: 14px;
+ }
a {
color: ${colors.white};
@@ -20,69 +36,6 @@ const StyledFooter = styled.footer`
}
}
- p {
- color: ${colors.white};
- margin: 0;
- padding: 0.4rem 0;
- font-size: 14px;
- }
-`;
-
-const Content = styled.div`
- display: flex;
-
- & > div:first-of-type {
- padding: 48px 0;
- flex: 2 1;
-
- & > * {
- padding: 0 24px;
- }
- }
-
- h4 {
- color: ${colors.lightBlue};
- padding: 24px 0;
- }
-`;
-
-const MarginSpace = styled.div`
- max-width: 600px;
- margin: auto;
-`;
-
-const Columns = styled.div`
- display: flex;
- justify-content: space-between;
- & > div > div {
- margin-bottom: 1rem;
- }
-`;
-
-const Map = styled.div`
- flex: 1;
- @media screen and (max-width: 600px) {
- display: none;
- }
- iframe {
- border: none;
- }
-`;
-
-
-const CopyRight = styled.div`
- display: flex;
- flex-flow: row nowrap;
- background-color: ${colors.black};
- text-align: center;
- justify-content: center;
- font-size: 12px;
- padding: 1rem 0;
-
- p {
- padding: 0.5rem 1rem;
- }
-
@media screen and (max-width: 600px) {
flex-flow: column nowrap;
}
@@ -90,41 +43,7 @@ const CopyRight = styled.div`
const Footer: React.FC = () => (
-
-
-
- Aalto-yliopiston Sähköinsinöörikilta ry
-
-
-
-
TUAS-Talo
-
Maarintie 8
-
PL 15500, 00076 Aalto
-
-
-
Y-tunnus: 1627010-1
-
sik-hallitus@list.ayy.fi
-
Yhteystiedot
-
-
-
-
Jäseneksi
-
Palaute
-
Arkisto
-
Materiaalipankki
-
-
-
-
-
-
-
-
-
+
© Aalto-yliopiston Sähköinsinöörikilta ry
webmaster: sik-vtmk@list.ayy.fi
diff --git a/src/components/Footer/FooterContent.tsx b/src/components/Footer/FooterContent.tsx
new file mode 100644
index 0000000..370e47b
--- /dev/null
+++ b/src/components/Footer/FooterContent.tsx
@@ -0,0 +1,104 @@
+import React from "react";
+import styled from "styled-components";
+import Anchor from "../Anchor";
+import { colors } from "@theme/colors";
+
+const Content = styled.div`
+ display: flex;
+
+ & > div:first-of-type {
+ padding: 48px 0;
+ flex: 2 1;
+
+ & > * {
+ padding: 0 24px;
+ }
+ }
+
+ h4 {
+ color: ${colors.lightBlue};
+ padding: 24px 0;
+ }
+
+ a {
+ color: ${colors.white};
+ display: block;
+ text-decoration: underline;
+ padding: 0.4rem 0;
+ font-size: 14px;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+
+ p {
+ color: ${colors.white};
+ margin: 0;
+ padding: 0.4rem 0;
+ font-size: 14px;
+ }
+`;
+
+const MarginSpace = styled.div`
+ max-width: 600px;
+ margin: auto;
+`;
+
+const Columns = styled.div`
+ display: flex;
+ justify-content: space-between;
+ & > div > div {
+ margin-bottom: 1rem;
+ }
+`;
+
+const Map = styled.div`
+ flex: 1;
+ @media screen and (max-width: 600px) {
+ display: none;
+ }
+ iframe {
+ border: none;
+ }
+`;
+
+const FooterContent: React.FC = () => (
+
+
+
+ Aalto-yliopiston Sähköinsinöörikilta ry
+
+
+
+
TUAS-Talo
+
Maarintie 8
+
PL 15500, 00076 Aalto
+
+
+
Y-tunnus: 1627010-1
+
sik-hallitus@list.ayy.fi
+
Yhteystiedot
+
+
+
+
Jäseneksi
+
Palaute
+
Arkisto
+
Materiaalipankki
+
+
+
+
+
+
+
+
+
+)
+
+export default FooterContent;
diff --git a/src/components/Footer/index.ts b/src/components/Footer/index.ts
deleted file mode 100644
index ccb5e78..0000000
--- a/src/components/Footer/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import Footer from "./Footer";
-export default Footer;
diff --git a/src/components/FooterMap/FooterMap.tsx b/src/components/FooterMap/FooterMap.tsx
deleted file mode 100644
index 4ede894..0000000
--- a/src/components/FooterMap/FooterMap.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-
-const IFrame = styled.iframe`
-
-`;
-
-const FooterMap: React.FC = () => (
-
-)
-
-export default FooterMap;
diff --git a/src/components/FooterMap/index.ts b/src/components/FooterMap/index.ts
deleted file mode 100644
index dc2e662..0000000
--- a/src/components/FooterMap/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import FooterMap from "./FooterMap";
-export default FooterMap;
diff --git a/src/pages/CommonPage.tsx b/src/pages/CommonPage.tsx
index a3319b1..0cfbe76 100644
--- a/src/pages/CommonPage.tsx
+++ b/src/pages/CommonPage.tsx
@@ -1,6 +1,6 @@
import React from "react";
import Header from "@components/Header";
-import Footer from "@components/Footer";
+import Footer from "@components/Footer/Footer";
export interface CommonPageProps {
page: any;
From bcc0aac857825f4d5eb6a6e2b6153f5622f5bb6b Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 22:45:00 +0300
Subject: [PATCH 06/28] Remove useless classname from PageLinks
---
src/views/FrontPage/FrontPageView.tsx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index ce613f5..78931d3 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -105,11 +105,12 @@ const FrontPageView: React.FC = ({ events, feed }) => (
buttonOnClick={() => {}}
/>
))}
-
+
+
@@ -128,7 +129,7 @@ const FrontPageView: React.FC = ({ events, feed }) => (
buttonOnClick={() => {}}
/>
))}
-
+
Lue tuoreimmat uutiset
From 074d3fa807b8485ee611b32c0e44f048f219ccde Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 23:19:41 +0300
Subject: [PATCH 07/28] Minor FrontHero changes
---
src/components/Footer/FooterContent.tsx | 2 +-
src/theme/breakpoints.ts | 11 ++++
src/views/FrontPage/FrontPageHero.tsx | 88 +++++++++++++++----------
src/views/FrontPage/FrontPageView.tsx | 6 +-
4 files changed, 67 insertions(+), 40 deletions(-)
create mode 100644 src/theme/breakpoints.ts
diff --git a/src/components/Footer/FooterContent.tsx b/src/components/Footer/FooterContent.tsx
index 370e47b..fdf11dc 100644
--- a/src/components/Footer/FooterContent.tsx
+++ b/src/components/Footer/FooterContent.tsx
@@ -55,7 +55,7 @@ const Columns = styled.div`
const Map = styled.div`
flex: 1;
- @media screen and (max-width: 600px) {
+ @media screen and (max-width: 800px) {
display: none;
}
iframe {
diff --git a/src/theme/breakpoints.ts b/src/theme/breakpoints.ts
new file mode 100644
index 0000000..f9ceadc
--- /dev/null
+++ b/src/theme/breakpoints.ts
@@ -0,0 +1,11 @@
+const breakpointsNumber = {
+ mobile: 800
+}
+
+const breakpoints = {};
+
+Object.keys(breakpointsNumber).forEach((key) => {
+ breakpoints[key] = `${breakpointsNumber[key] }px`
+});
+
+export default breakpoints;
\ No newline at end of file
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index cf6f4d5..8bdd425 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -6,8 +6,14 @@ import Anchor from "@components/Anchor";
const HeroSection = styled(PageSection)`
padding: 0 1rem;
- @media screen and (min-width: 800px) {
- min-height: 85vh;
+ min-height: 70vh;
+
+ @media screen and (max-width: 800px) {
+ flex-direction: column;
+
+ aside {
+ margin: 48px auto;
+ }
}
color: ${colors.white};
@@ -18,7 +24,7 @@ const HeroSection = styled(PageSection)`
`;
const MainSection = styled.section`
- flex: 6;
+ flex: 8;
& > div {
margin: 15vh auto 0;
@@ -26,14 +32,6 @@ const MainSection = styled.section`
text-align: center;
line-height: 1.5rem;
- & > div {
- min-width: 20%;
- max-width: fit-content;
- margin: auto;
- display: flex;
- flex-direction: column;
- }
-
h1 {
line-height: 40px;
@media screen and (max-width: 500px) {
@@ -49,31 +47,45 @@ const MainSection = styled.section`
}
`;
-const HeroButton = styled.button`
- display: block;
- color: ${colors.blue1};
- background-color: transparent;
- padding: 0.8rem 2rem;
- margin: 0.5rem;
- font-size: 0.8rem;
- font-weight: 800;
- letter-spacing: .1em;
- text-transform: uppercase;
- border: 1px solid ${colors.lightTurquoise};
+const Buttons = styled.div`
+ min-width: 20%;
+ max-width: fit-content;
+ margin: auto;
+ display: flex;
+ flex-direction: column;
- &:hover {
- cursor: pointer;
+ a {
+ display: contents;
}
- &:active,
- &:focus {
- outline: none;
+ button {
+ color: ${colors.blue1};
+ background-color: transparent;
+ padding: 0.8rem 2rem;
+ margin: 0.5rem;
+ font-size: 0.8rem;
+ font-weight: 800;
+ letter-spacing: .1em;
+ text-transform: uppercase;
+ border: 1px solid ${colors.lightTurquoise};
+
+ &:hover {
+ cursor: pointer;
+ color: ${colors.white};
+ }
+
+ &:active,
+ &:focus {
+ outline: none;
+ }
}
`;
const AsideSection = styled.aside`
flex: 4;
- padding: 3rem 0rem 2rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
`;
const AsideItem = styled.article`
@@ -117,14 +129,18 @@ const FrontPageHero: React.FC = () => (
kasaa yhteen yli 600 alansa huippua, jotka ovat avainasemassa
vauhdilla sähköistyvän maailmamme kehityksessä.
-
- { }}>
- Killan tehtävät ›
-
- { }}>
- Vastapainoa opiskelulle ›
-
-
+
+
+ { }}>
+ Killan tehtävät ›
+
+
+
+ { }}>
+ Vastapainoa opiskelulle ›
+
+
+
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 78931d3..91c21f4 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -22,7 +22,7 @@ const SponsorSection = styled(PageSection)`
`;
const CardSection = styled(PageSection)`
- @media screen and (max-width: 800px - 1px) {
+ @media screen and (max-width: 800px) {
flex-flow: column nowrap;
}
@@ -42,12 +42,12 @@ const CardSection = styled(PageSection)`
& > * {
width: calc(25% - 2rem);
- @media screen and (min-width: 1000px) and (max-width: 1200px) {
+ @media screen and (min-width: 800px) and (max-width: 1200px) {
width: calc(50% - 2rem);
margin-bottom: 2rem;
}
- @media screen and (max-width: 1000px) {
+ @media screen and (max-width: 800px) {
width: 100%;
margin: 0 0 3rem 0;
}
From f9d7542d7b0bd99f833b9492acdbc28f87ee7e68 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Fri, 9 Oct 2020 23:38:28 +0300
Subject: [PATCH 08/28] Placeholder Hero SecondarySection
---
src/components/PageSection2.tsx | 2 +-
src/views/FrontPage/FrontPageHero.tsx | 54 ++++++++++++++++-----------
2 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/src/components/PageSection2.tsx b/src/components/PageSection2.tsx
index b44550c..cae3d03 100644
--- a/src/components/PageSection2.tsx
+++ b/src/components/PageSection2.tsx
@@ -7,7 +7,7 @@ const Section = styled.section`
flex-flow: row wrap;
justify-content: space-between;
position: relative;
- padding: 2rem 1rem 2rem;
+ padding: ${(p) => p.fullSize ? "0" : "2rem 1rem 2rem"};
&.sectionBg-darkBlue {
color: ${colors.white};
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index 8bdd425..09c303b 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -5,9 +5,12 @@ import { colors } from "@theme/colors";
import Anchor from "@components/Anchor";
const HeroSection = styled(PageSection)`
- padding: 0 1rem;
min-height: 70vh;
+ section, aside {
+ padding: 0 1rem;
+ }
+
@media screen and (max-width: 800px) {
flex-direction: column;
@@ -23,28 +26,33 @@ const HeroSection = styled(PageSection)`
}
`;
-const MainSection = styled.section`
+const MainSections = styled.div`
flex: 8;
+`;
- & > div {
- margin: 15vh auto 0;
- max-width: 600px;
- text-align: center;
- line-height: 1.5rem;
+const PrimarySection = styled.section`
+ margin: 15vh auto 0;
+ max-width: 600px;
+ text-align: center;
+ line-height: 1.5rem;
- h1 {
- line-height: 40px;
- @media screen and (max-width: 500px) {
- font-size: 2rem;
- }
- }
-
- p {
- max-width: 400px;
- margin: 1em auto;
- font-weight: 100;
+ h1 {
+ line-height: 40px;
+ @media screen and (max-width: 500px) {
+ font-size: 2rem;
}
}
+
+ p {
+ max-width: 400px;
+ margin: 1em auto;
+ font-weight: 100;
+ }
+`;
+
+const SecondarySection = styled.section`
+ background-color: blue;
+ /* height: 100%; */
`;
const Buttons = styled.div`
@@ -121,8 +129,8 @@ const AsideItem = styled.article`
const FrontPageHero: React.FC = () => (
-
-
+
+
Aalto-yliopiston Sähköinsinöörikilta
on elektroniikan ja sähkötekniikan opiskelijoiden järjestö. Kilta
@@ -141,8 +149,10 @@ const FrontPageHero: React.FC = () => (
-
-
+
+
+
+
From d37ba9c504c6353379737cdccc45aaa98f1f8093 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 01:36:41 +0300
Subject: [PATCH 09/28] Actual Page refactoring
---
src/components/PageSection2.tsx | 91 -----------
src/components/Sections/CardSection.tsx | 38 +++++
src/components/Sections/PageSection.tsx | 16 ++
src/components/Sections/SössöSection.tsx | 41 +++++
src/components/Sections/TextSection.tsx | 72 +++++++++
src/components/index.tsx | 7 +-
src/index.scss | 2 +-
src/views/ActualPage/ActualPage.scss | 16 --
src/views/ActualPage/ActualPageHero.tsx | 66 ++++++++
src/views/ActualPage/ActualPageView.tsx | 185 ++++++++---------------
src/views/ActualPage/EventCalendar.tsx | 9 +-
src/views/ActualPage/News.tsx | 9 +-
src/views/FrontPage/FrontPageView.tsx | 72 +--------
13 files changed, 316 insertions(+), 308 deletions(-)
delete mode 100644 src/components/PageSection2.tsx
create mode 100644 src/components/Sections/CardSection.tsx
create mode 100644 src/components/Sections/PageSection.tsx
create mode 100644 src/components/Sections/SössöSection.tsx
create mode 100644 src/components/Sections/TextSection.tsx
delete mode 100644 src/views/ActualPage/ActualPage.scss
create mode 100644 src/views/ActualPage/ActualPageHero.tsx
diff --git a/src/components/PageSection2.tsx b/src/components/PageSection2.tsx
deleted file mode 100644
index cae3d03..0000000
--- a/src/components/PageSection2.tsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import { colors } from "@theme/colors";
-
-const Section = styled.section`
- display: flex;
- flex-flow: row wrap;
- justify-content: space-between;
- position: relative;
- padding: ${(p) => p.fullSize ? "0" : "2rem 1rem 2rem"};
-
- &.sectionBg-darkBlue {
- color: ${colors.white};
- background-color: ${colors.darkBlue};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-lightBlue {
- color: ${colors.darkBlue};
- background-color: ${colors.lightBlue};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-black {
- color: ${colors.white};
- background-color: ${colors.black};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-grey1 {
- color: ${colors.white};
- background-color: ${colors.grey1};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-grey2 {
- color: ${colors.white};
- background-color: ${colors.grey2};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-orange1 {
- color: ${colors.white};
- background-color: ${colors.orange1};
- }
-
- &.sectionBg-orange2 {
- color: ${colors.white};
- background-color: ${colors.orange2};
- a:hover {
- color: ${colors.blue1};
- }
- }
-
- &.sectionBg-blue1 {
- color: ${colors.white};
- background-color: ${colors.blue1};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-lightTurquoise {
- color: ${colors.darkBlue};
- background-color: ${colors.lightTurquoise};
- a:hover {
- color: ${colors.white};
- }
- }
-
- &.sectionBg-green1 {
- color: ${colors.darkBlue};
- background-color: ${colors.green1};
- }
-`;
-
-const PageSection: React.FC = (props) => (
-
-);
-
-export default PageSection;
diff --git a/src/components/Sections/CardSection.tsx b/src/components/Sections/CardSection.tsx
new file mode 100644
index 0000000..ee50e4c
--- /dev/null
+++ b/src/components/Sections/CardSection.tsx
@@ -0,0 +1,38 @@
+import styled from "styled-components";
+import PageSection from "./PageSection";
+import { colors } from "@theme/colors";
+
+const CardSection = styled(PageSection)`
+ @media screen and (max-width: 800px) {
+ flex-flow: column nowrap;
+ }
+
+ color: ${colors.black};
+ background-color: ${colors.white};
+ a {
+ color: ${colors.blue1};
+ &:hover {
+ color: ${colors.darkBlue};
+ }
+ }
+
+ h6 {
+ color: ${colors.orange1};
+ }
+
+ & > * {
+ width: calc(25% - 2rem);
+
+ @media screen and (min-width: 800px) and (max-width: 1200px) {
+ width: calc(50% - 2rem);
+ margin-bottom: 2rem;
+ }
+
+ @media screen and (max-width: 800px) {
+ width: 100%;
+ margin: 0 0 3rem 0;
+ }
+ }
+`;
+
+export default CardSection;
diff --git a/src/components/Sections/PageSection.tsx b/src/components/Sections/PageSection.tsx
new file mode 100644
index 0000000..0b6093d
--- /dev/null
+++ b/src/components/Sections/PageSection.tsx
@@ -0,0 +1,16 @@
+import React from "react";
+import styled from "styled-components";
+
+const Section = styled.section`
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: space-between;
+ position: relative;
+ padding: ${(p) => p.fullSize ? "0" : "2rem 1rem 2rem"};
+`;
+
+const PageSection: React.FC = (props) => (
+
+);
+
+export default PageSection;
diff --git a/src/components/Sections/SössöSection.tsx b/src/components/Sections/SössöSection.tsx
new file mode 100644
index 0000000..2adcb37
--- /dev/null
+++ b/src/components/Sections/SössöSection.tsx
@@ -0,0 +1,41 @@
+
+import styled from "styled-components";
+import { PageSection } from "@components/index";
+import { colors } from "@theme/colors";
+
+const SössöSection = styled(PageSection)`
+ color: ${colors.white};
+ background-color: ${colors.orange1};
+
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ align-items: flex-end;
+
+ @media screen and (max-width: 600px - 1px) {
+ flex-flow: column nowrap;
+ align-items: center;
+ }
+
+ h3 {
+ font-size: 1.5rem;
+ font-weight: 200;
+ margin-block-start: 0;
+ margin-block-end: 0;
+ }
+
+ a {
+ font-weight: 700;
+ text-decoration: none;
+ margin: 0.5rem 1rem 0;
+ font-size: 1rem;
+ text-transform: uppercase;
+ letter-spacing: 0.1rem;
+ }
+
+ a:hover {
+ color: ${colors.darkBlue};
+ }
+`;
+
+export default SössöSection;
\ No newline at end of file
diff --git a/src/components/Sections/TextSection.tsx b/src/components/Sections/TextSection.tsx
new file mode 100644
index 0000000..022f94d
--- /dev/null
+++ b/src/components/Sections/TextSection.tsx
@@ -0,0 +1,72 @@
+import React from "react";
+import styled from "styled-components";
+import { PageSection } from "@components/index";
+
+const StyledSection = styled(PageSection)`
+ display: grid;
+ padding: 24px;
+
+ grid-template-columns: 1fr 2fr 1fr;
+ grid-template-rows: 1fr auto;
+ grid-template-areas:
+ "leftaside title rightaside"
+ "leftaside content rightaside";
+
+ @media screen and (max-width: 800px) {
+ grid-template-columns: 1fr;
+ grid-template-rows: 1fr auto auto auto;
+ grid-template-areas:
+ "title"
+ "content"
+ "rightaside"
+ "leftaside";
+ }
+
+ & > h1,
+ & > h2,
+ & > h3,
+ & > h4,
+ & > h5,
+ & > h6 {
+ text-align: center;
+ grid-area: title;
+ }
+
+ & > div, p {
+ grid-area: content;
+ max-width: 1000px;
+ }
+
+ & > aside {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ @media screen and (max-width: 800px) {
+ flex-direction: row;
+ justify-content: space-between;
+ max-width: unset;
+ margin-left: unset;
+ margin-top: 48px;
+
+ * {
+ flex: 1;
+ }
+ }
+ }
+
+ & > aside:first-of-type {
+ grid-area: rightaside;
+ padding-left: 24px;
+ }
+ & > aside:nth-of-type(2) {
+ grid-area: leftaside;
+ padding-right: 24px;
+ }
+`;
+
+const TextSection: React.FC = (props) => (
+
+)
+
+export default TextSection;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index f40bb65..541234c 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -4,5 +4,8 @@ export { default as Button } from "./Button";
export { default as Ribbon } from "./Ribbon";
export { default as SponsorReel } from "./SponsorReel";
export { default as TextAnchor } from "./TextAnchor";
-export { default as PageSection } from "./PageSection2";
-export { default as Divider } from "./Divider";
\ No newline at end of file
+export { default as PageSection } from "./Sections/PageSection";
+export { default as Divider } from "./Divider";
+export { default as CardSection } from "./Sections/CardSection";
+export { default as SössöSection } from "./Sections/SössöSection";
+export { default as TextSection } from "./Sections/TextSection";
diff --git a/src/index.scss b/src/index.scss
index b5d7679..3bcfec9 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -19,7 +19,7 @@ body {
min-height: 100vh;
display: flex;
flex-flow: column nowrap;
- color: color(black);
+ color: color(black1);
background-color: color(white1);
}
diff --git a/src/views/ActualPage/ActualPage.scss b/src/views/ActualPage/ActualPage.scss
deleted file mode 100644
index 582d405..0000000
--- a/src/views/ActualPage/ActualPage.scss
+++ /dev/null
@@ -1,16 +0,0 @@
-.actual-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-
- .actual-page-images {
- display: flex;
- flex-flow: row nowrap;
-
- & > img {
- max-width: calc(100% / 3);
- flex: 1 0;
- object-fit: cover;
- }
- }
-}
diff --git a/src/views/ActualPage/ActualPageHero.tsx b/src/views/ActualPage/ActualPageHero.tsx
new file mode 100644
index 0000000..f8048f0
--- /dev/null
+++ b/src/views/ActualPage/ActualPageHero.tsx
@@ -0,0 +1,66 @@
+import React from "react";
+import HeroMainSection from "@components/Hero/HeroMainSection";
+import HeroAsideSection from "@components/Hero/HeroAsideSection";
+import HeroAsideItem from "@components/Hero/HeroAsideItem";
+import HeroSecondarySection, { HeroSecondarySectionItem } from "@components/Hero/HeroSecondarySection";
+import Button from "@components/Button";
+import PageSection from "@components/PageSection";
+
+const ActualPageHero: React.FC = () => (
+
+
+ Yritystapahtumia ja vastapainoa opiskelulle
+
+ Teekkarielämä ei ole pelkkää saunomista, juhlimista ja muita huvituksia—tai no, on se sitäkin.
+
+
+ { }}>
+ Tapahtumat ›
+
+ { }}>
+ Uutiset ›
+
+
+
+
+ Killan hallitus päivystää kiltahuoneella maanantaisin klo 12.15–13.15. Tuolloin voit ostaa kiltatuotteita, kuten esim. haalarimerkkejä tai laulukirjoja.
+
+
+ Kiltapäiväkerho Kiltis kokoontuu torstaisin klo XX.XX kiltahuoneella. Lorem ipsum dolor sit amet. Lämpimästi tervetuloa kaikki SIKkiläiset ja SIK-mieliset!
+
+
+
+
+
+ Kilta järjestää jäsenilleen jos jonkinlaista projektia ja toimintaa, muun muassa:
+
+
+
+
+
+
+
+
+
+
+
+
+
+)
+
+export default ActualPageHero;
\ No newline at end of file
diff --git a/src/views/ActualPage/ActualPageView.tsx b/src/views/ActualPage/ActualPageView.tsx
index c4eef99..f5aafb6 100644
--- a/src/views/ActualPage/ActualPageView.tsx
+++ b/src/views/ActualPage/ActualPageView.tsx
@@ -1,142 +1,89 @@
import React from "react";
-import "./ActualPage.scss";
-import PageSection from "@components/PageSection";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection";
-import Ribbon from "@components/Ribbon";
-import TextAnchor from "@components/TextAnchor";
-import Button from "@components/Button";
+import styled from "styled-components";
+
import Accordion from "@components/Accordion";
-import HeroSecondarySection, { HeroSecondarySectionItem } from "@components/Hero/HeroSecondarySection";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
import EventCalendar from "./EventCalendar";
import News from "./News";
+import { Divider, SössöSection, TextSection } from "@components/index";
+import Anchor from "@components/Anchor";
+import ActualPageHero from "./ActualPageHero";
+
interface ActualPageViewProps {
events: Event[];
feed: Post[];
}
+const Gallery = styled.div`
+ display: flex;
+ flex-flow: row nowrap;
+
+ img {
+ max-width: calc(100% / 3);
+ flex: 1 0;
+ object-fit: cover;
+ }
+`;
+
const ActualPageView: React.FC = ({events, feed}) => {
return (
-
-
-
- Yritystapahtumia ja vastapainoa opiskelulle
-
- Teekkarielämä ei ole pelkkää saunomista, juhlimista ja muita huvituksia—tai no, on se sitäkin.
-
-
- { }}>
- Tapahtumat ›
-
- { }}>
- Uutiset ›
-
-
-
-
- Killan hallitus päivystää kiltahuoneella maanantaisin klo 12.15–13.15. Tuolloin voit ostaa kiltatuotteita, kuten esim. haalarimerkkejä tai laulukirjoja.
-
-
- Kiltapäiväkerho Kiltis kokoontuu torstaisin klo XX.XX kiltahuoneella. Lorem ipsum dolor sit amet. Lämpimästi tervetuloa kaikki SIKkiläiset ja SIK-mieliset!
-
-
-
-
-
- Kilta järjestää jäsenilleen jos jonkinlaista projektia ja toimintaa, muun muassa:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tapahtumat
-
-
-
-
-
- Uutiset
-
-
-
-
-
- Kuvia tapahtumista.
-
- Kuvagalleria ›
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+ Kuvia tapahtumista.
+
+ Kuvagalleria ›
+
+
+
+
-
-
-
- Sinustako kilta-aktiivi?
-
- Tule mukaan kiltatoimintaan ›
-
-
-
-
-
-
- Yritystapahtumia ja vastapainoa opiskelulle
+
+
+
+ Sinustako kilta-aktiivi?
+
+ Tule mukaan kiltatoimintaan ›
+
+
+
+
+ Yritystapahtumia ja vastapainoa opiskelulle
+
Toimintaa ylläpitää ja järjestää jaokset ja toimikunnat.
-
- Jotain elepajasta
-
-
- Jotain elepajasta
-
-
- Jotain elepajasta
-
-
- Jotain elepajasta
-
-
- Jotain elepajasta
-
-
-
-
-
+
+
+ Jotain elepajasta
+
+
+ Jotain elepajasta
+
+
+ Jotain elepajasta
+
+
+ Jotain elepajasta
+
+
+ Jotain elepajasta
+
+
+
+
+ >
);
}
diff --git a/src/views/ActualPage/EventCalendar.tsx b/src/views/ActualPage/EventCalendar.tsx
index 86443cf..74bc230 100644
--- a/src/views/ActualPage/EventCalendar.tsx
+++ b/src/views/ActualPage/EventCalendar.tsx
@@ -1,10 +1,9 @@
import React, { useState } from "react";
import { Event } from "@models/Event";
-import Card from "@components/Card/Card";
import Button from "@components/Button";
-import PageSection from "@components/PageSection";
import FilterContainer from "./FilterContainer";
+import { CardSection, Card } from "@components/index";
interface EventCalendarProps {
events: Event[];
@@ -27,7 +26,8 @@ const EventCalendar: React.FC = ({events}) => {
Valitse aika ›
*/}
-
+ Tapahtumat
+
{filteredEvents.map(e => (
= ({events}) => {
start_time={e.start_time}
text={e.description_fi}
link={`/events/${e.id}`}
- buttonText="Lue lisää ›"
buttonOnClick={() => {}}
>
))}
-
+
{ numberShown < events.length && (
{ setNumberShown(numberShown + 8) }}>
diff --git a/src/views/ActualPage/News.tsx b/src/views/ActualPage/News.tsx
index 056d190..e7d1e8b 100644
--- a/src/views/ActualPage/News.tsx
+++ b/src/views/ActualPage/News.tsx
@@ -1,10 +1,9 @@
import React, { useState } from "react";
import { Post } from "@models/Feed";
-import Card from "@components/Card/Card";
import Button from "@components/Button";
-import PageSection from "@components/PageSection";
import FilterContainer from "./FilterContainer";
+import { CardSection, Card } from "@components/index";
interface NewsProps {
feed: Post[];
@@ -27,7 +26,8 @@ const News: React.FC = ({feed}) => {
Valitse aika ›
*/}
-
+ Uutiset
+
{filteredFeed.map(post => (
= ({feed}) => {
start_time={post.publish_time}
text={post.description_fi}
link={`/feed/${post.id}`}
- buttonText="Lue lisää ›"
buttonOnClick={() => {}}
>
))}
-
+
{ numberShown < feed.length && (
{ setNumberShown(numberShown + 8) }}>
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 91c21f4..adb2e12 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,10 +1,11 @@
import React from "react";
import styled from "styled-components";
-import { PageSection, Card, PageLink, SponsorReel, Divider } from "@components/index";
+import { PageSection, Card, PageLink, SponsorReel, Divider, CardSection, SössöSection } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
import { colors } from "@theme/colors";
+import Anchor from "@components/Anchor";
interface FrontPageViewProps {
events: Event[];
@@ -21,73 +22,6 @@ const SponsorSection = styled(PageSection)`
}
`;
-const CardSection = styled(PageSection)`
- @media screen and (max-width: 800px) {
- flex-flow: column nowrap;
- }
-
- color: ${colors.black};
- background-color: ${colors.white};
- a {
- color: ${colors.blue1};
- &:hover {
- color: ${colors.darkBlue};
- }
- }
-
- h6 {
- color: ${colors.orange1};
- }
-
- & > * {
- width: calc(25% - 2rem);
-
- @media screen and (min-width: 800px) and (max-width: 1200px) {
- width: calc(50% - 2rem);
- margin-bottom: 2rem;
- }
-
- @media screen and (max-width: 800px) {
- width: 100%;
- margin: 0 0 3rem 0;
- }
- }
-`;
-
-const SössöSection = styled(PageSection)`
- color: ${colors.white};
- background-color: ${colors.orange1};
-
- display: flex;
- justify-content: center;
- text-align: center;
- align-items: flex-end;
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- align-items: center;
- }
-
- h3 {
- font-size: 1.5rem;
- font-weight: 200;
- margin-block-start: 0;
- margin-block-end: 0;
- }
-
- a {
- font-weight: 700;
- text-decoration: none;
- margin: 0.5rem 1rem 0;
- font-size: 1rem;
- text-transform: uppercase;
- letter-spacing: 0.1rem;
- }
-
- a:hover {
- color: ${colors.darkBlue};
- }
-`;
const FrontPageView: React.FC = ({ events, feed }) => (
<>
@@ -115,7 +49,7 @@ const FrontPageView: React.FC = ({ events, feed }) => (
Sössöä vuodesta 1969.
- Lue opiskelijalehden viimeisin numero ›
+ Lue opiskelijalehden viimeisin numero ›
From 9e54400a38267631924214602285caa9c622b1f0 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 01:40:31 +0300
Subject: [PATCH 10/28] Copyright text color
---
src/components/Footer/Footer.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
index 276689e..04cfabf 100644
--- a/src/components/Footer/Footer.tsx
+++ b/src/components/Footer/Footer.tsx
@@ -12,6 +12,7 @@ const StyledFooter = styled.footer`
const CopyRight = styled.div`
display: flex;
flex-flow: row nowrap;
+ color: ${colors.white};
background-color: ${colors.black};
text-align: center;
justify-content: center;
@@ -25,7 +26,6 @@ const CopyRight = styled.div`
}
a {
- color: ${colors.white};
display: block;
text-decoration: underline;
padding: 0.4rem 0;
From c267822441a2ce1bb74f3016b25ebe12384756cb Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 01:53:03 +0300
Subject: [PATCH 11/28] Remove Ribbon
---
src/components/Ribbon/Ribbon.tsx | 34 -------------------
src/components/Ribbon/index.ts | 2 --
.../{SössöSection.tsx => SossoSection.tsx} | 16 +++++----
src/components/index.tsx | 3 +-
src/views/ActualPage/ActualPageView.tsx | 10 +++---
src/views/CorporatePage/CorporatePageView.tsx | 18 +++++-----
src/views/FreshmenPage/FreshmenPageView.tsx | 20 +++++------
src/views/FrontPage/FrontPageView.tsx | 6 ++--
src/views/GuildPage/GuildPageView.tsx | 28 +++++++--------
src/views/StudiesPage/StudiesPageView.tsx | 18 +++++-----
10 files changed, 57 insertions(+), 98 deletions(-)
delete mode 100644 src/components/Ribbon/Ribbon.tsx
delete mode 100644 src/components/Ribbon/index.ts
rename src/components/Sections/{SössöSection.tsx => SossoSection.tsx} (93%)
diff --git a/src/components/Ribbon/Ribbon.tsx b/src/components/Ribbon/Ribbon.tsx
deleted file mode 100644
index 81f416b..0000000
--- a/src/components/Ribbon/Ribbon.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import styled from "styled-components";
-
-const Ribbon = styled.div`
- display: flex;
- flex-flow: row nowrap;
- align-items: flex-end;
- text-align: center;
- justify-content: center;
- margin: auto;
-
- p {
- font-size: 2rem;
- font-weight: 100;
- line-height: 30px;
- margin-block-start: 0;
- margin-block-end: 0;
- }
-
- a {
- font-weight: 100;
- text-decoration: none;
- margin: 0 1rem;
- font-size: 0.8rem;
- text-transform: uppercase;
- margin-top: 10px;
- }
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- align-items: center;
- }
-`;
-
-export default Ribbon;
diff --git a/src/components/Ribbon/index.ts b/src/components/Ribbon/index.ts
deleted file mode 100644
index 896a201..0000000
--- a/src/components/Ribbon/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import Ribbon from "./Ribbon";
-export default Ribbon;
diff --git a/src/components/Sections/SössöSection.tsx b/src/components/Sections/SossoSection.tsx
similarity index 93%
rename from src/components/Sections/SössöSection.tsx
rename to src/components/Sections/SossoSection.tsx
index 2adcb37..3bf9a24 100644
--- a/src/components/Sections/SössöSection.tsx
+++ b/src/components/Sections/SossoSection.tsx
@@ -17,14 +17,11 @@ const SössöSection = styled(PageSection)`
align-items: center;
}
- h3 {
- font-size: 1.5rem;
- font-weight: 200;
- margin-block-start: 0;
- margin-block-end: 0;
+ a {
+ text-decoration: underline;
}
- a {
+ & > a {
font-weight: 700;
text-decoration: none;
margin: 0.5rem 1rem 0;
@@ -33,6 +30,13 @@ const SössöSection = styled(PageSection)`
letter-spacing: 0.1rem;
}
+ h3, p {
+ font-size: 1.5rem;
+ font-weight: 200;
+ margin-block-start: 0;
+ margin-block-end: 0;
+ }
+
a:hover {
color: ${colors.darkBlue};
}
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 541234c..809820f 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -1,11 +1,10 @@
export { default as Card } from "./Card";
export { default as PageLink } from "./PageLink";
export { default as Button } from "./Button";
-export { default as Ribbon } from "./Ribbon";
export { default as SponsorReel } from "./SponsorReel";
export { default as TextAnchor } from "./TextAnchor";
export { default as PageSection } from "./Sections/PageSection";
export { default as Divider } from "./Divider";
export { default as CardSection } from "./Sections/CardSection";
-export { default as SössöSection } from "./Sections/SössöSection";
+export { default as SossoSection } from "./Sections/SossoSection";
export { default as TextSection } from "./Sections/TextSection";
diff --git a/src/views/ActualPage/ActualPageView.tsx b/src/views/ActualPage/ActualPageView.tsx
index f5aafb6..a0ea631 100644
--- a/src/views/ActualPage/ActualPageView.tsx
+++ b/src/views/ActualPage/ActualPageView.tsx
@@ -7,7 +7,7 @@ import { Post } from "@models/Feed";
import EventCalendar from "./EventCalendar";
import News from "./News";
-import { Divider, SössöSection, TextSection } from "@components/index";
+import { Divider, SossoSection, TextSection } from "@components/index";
import Anchor from "@components/Anchor";
import ActualPageHero from "./ActualPageHero";
@@ -38,12 +38,12 @@ const ActualPageView: React.FC = ({events, feed}) => {
-
+
Kuvia tapahtumista.
Kuvagalleria ›
-
+
@@ -51,12 +51,12 @@ const ActualPageView: React.FC = ({events, feed}) => {
-
+
Sinustako kilta-aktiivi?
Tule mukaan kiltatoimintaan ›
-
+
Yritystapahtumia ja vastapainoa opiskelulle
diff --git a/src/views/CorporatePage/CorporatePageView.tsx b/src/views/CorporatePage/CorporatePageView.tsx
index 1a88bdb..96739ce 100644
--- a/src/views/CorporatePage/CorporatePageView.tsx
+++ b/src/views/CorporatePage/CorporatePageView.tsx
@@ -7,8 +7,8 @@ import HeroAsideItem from "@components/Hero/HeroAsideItem";
import AsideSection from "@components/AsideSection";
import MainSection from "@components/MainSection";
import PageLink from "@components/PageLink";
-import Ribbon from "@components/Ribbon";
-import TextAnchor from "@components/TextAnchor";
+import { SossoSection } from "@components/index";
+import Anchor from "@components/Anchor";
const CorporatePageView: React.FC = () => (
@@ -80,14 +80,12 @@ const CorporatePageView: React.FC = () => (
-
-
- Mainos Sössöön?
-
- Killan lehden mediakortin löydät täältä›
-
-
-
+
+ Mainos Sössöön?
+
+ Killan lehden mediakortin löydät täältä›
+
+
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index 1442ddd..6ac65fb 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -1,4 +1,5 @@
import React from "react";
+import styled from "styled-components";
import "./FreshmenPage.scss";
import PageSection from "@components/PageSection";
import HeroMainSection from "@components/Hero/HeroMainSection";
@@ -7,10 +8,10 @@ import HeroAsideItem from "@components/Hero/HeroAsideItem";
import AsideSection from "@components/AsideSection";
import MainSection from "@components/MainSection";
import PageLink from "@components/PageLink";
-import Ribbon from "@components/Ribbon";
import TextAnchor from "@components/TextAnchor";
import InfoBox from "@components/InfoBox";
-import styled from "styled-components";
+import Anchor from "@components/Anchor";
+import { SossoSection } from "@components/index";
const KippariImage = styled.img`
max-width:100%;
@@ -99,14 +100,13 @@ const FreshmenPageView: React.FC = () => (
-
-
- Killassa tapahtuu kaikenlaista!
-
- Seuraa killan tapahtumia
-
-
-
+
+ Killassa tapahtuu kaikenlaista!
+
+ Seuraa killan tapahtumia
+
+
+
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index adb2e12..3430a68 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import { PageSection, Card, PageLink, SponsorReel, Divider, CardSection, SössöSection } from "@components/index";
+import { PageSection, Card, PageLink, SponsorReel, Divider, CardSection, SossoSection } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
@@ -47,10 +47,10 @@ const FrontPageView: React.FC = ({ events, feed }) => (
-
+
Sössöä vuodesta 1969.
Lue opiskelijalehden viimeisin numero ›
-
+
{feed.map(inst => (
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index bba4dfb..fb0dc9a 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -7,10 +7,11 @@ import PageLink from "@components/PageLink";
import HeroMainSection from "@components/Hero/HeroMainSection";
import HeroAsideSection from "@components/Hero/HeroAsideSection";
import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import Ribbon from "@components/Ribbon";
import InfoBox from "@components/InfoBox";
import Accordion from "@components/Accordion";
import TextAnchor from "@components/TextAnchor";
+import Anchor from "@components/Anchor";
+import { SossoSection } from "@components/index";
const GuildPageView: React.FC = () => (
@@ -99,11 +100,9 @@ const GuildPageView: React.FC = () => (
-
-
- Killan hallinto koostuu XXX henkilöstä.
-
-
+
+ Killan hallinto koostuu XXX henkilöstä.
+
@@ -130,11 +129,10 @@ const GuildPageView: React.FC = () => (
-
-
- Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
-
-
+
+
+ Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+
Miksi alkaa kilta-aktiiviksi?
@@ -200,11 +198,9 @@ const GuildPageView: React.FC = () => (
-
-
- Jäsenedut vuonna 2019
-
-
+
+ Jäsenedut vuonna 2019
+
diff --git a/src/views/StudiesPage/StudiesPageView.tsx b/src/views/StudiesPage/StudiesPageView.tsx
index 6c319a1..fe80407 100644
--- a/src/views/StudiesPage/StudiesPageView.tsx
+++ b/src/views/StudiesPage/StudiesPageView.tsx
@@ -7,8 +7,8 @@ import HeroAsideItem from "@components/Hero/HeroAsideItem";
import AsideSection from "@components/AsideSection";
import MainSection from "@components/MainSection";
import PageLink from "@components/PageLink";
-import Ribbon from "@components/Ribbon";
-import TextAnchor from "@components/TextAnchor";
+import Anchor from "@components/Anchor";
+import { SossoSection } from "@components/index";
const StudiesPageView: React.FC = () => (
@@ -69,14 +69,12 @@ const StudiesPageView: React.FC = () => (
-
-
- Hae opiskelemaan!
-
- Lue lisää Aallon sivuilta
-
-
-
+
+ Hae opiskelemaan!
+
+ Lue lisää Aallon sivuilta
+
+
From 33ae9fc06451070503ebf0fed9a6224721ec6d8d Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 01:56:51 +0300
Subject: [PATCH 12/28] Move Admin widgets to own directory
---
src/components/{ => Widgets}/Checkbox/Checkbox.tsx | 0
src/components/{ => Widgets}/Checkbox/Checkboxes.tsx | 0
.../{ => Widgets}/DatetimeWidget/DatetimeWidget.scss | 0
.../{ => Widgets}/DatetimeWidget/DatetimeWidget.tsx | 0
src/components/{ => Widgets}/DatetimeWidget/index.ts | 0
src/components/{ => Widgets}/MarkdownEditorWidget.scss | 0
src/components/{ => Widgets}/MarkdownEditorWidget.tsx | 0
src/components/{ => Widgets}/RadioButton/RadioButton.tsx | 0
.../{ => Widgets}/RadioButton/RadioButtonWidget.tsx | 0
.../SectionDividerWidget/SectionDividerWidget.scss | 0
.../SectionDividerWidget/SectionDividerWidget.tsx | 4 ++--
src/components/{ => Widgets}/SectionDividerWidget/index.ts | 0
.../{ => Widgets}/SignupQuestionsWidget/OptionsWidget.tsx | 2 +-
.../{ => Widgets}/SignupQuestionsWidget/Question.tsx | 0
.../{ => Widgets}/SignupQuestionsWidget/QuestionList.tsx | 0
.../SignupQuestionsWidget/SignupQuestionsWidget.scss | 2 +-
.../SignupQuestionsWidget/SignupQuestionsWidget.tsx | 0
.../{ => Widgets}/SignupQuestionsWidget/TypeWidget.tsx | 0
src/components/{ => Widgets}/SignupQuestionsWidget/index.ts | 0
src/models/SignupForm.ts | 2 +-
src/pages/admin/EventCreatePage.tsx | 6 +++---
src/pages/admin/FeedCreatePage.tsx | 2 +-
src/pages/admin/SignupCreatePage.tsx | 6 +++---
src/views/SignUpPage/FormUtils.tsx | 2 +-
src/views/SignUpPage/SignUpPageView.tsx | 4 ++--
25 files changed, 15 insertions(+), 15 deletions(-)
rename src/components/{ => Widgets}/Checkbox/Checkbox.tsx (100%)
rename src/components/{ => Widgets}/Checkbox/Checkboxes.tsx (100%)
rename src/components/{ => Widgets}/DatetimeWidget/DatetimeWidget.scss (100%)
rename src/components/{ => Widgets}/DatetimeWidget/DatetimeWidget.tsx (100%)
rename src/components/{ => Widgets}/DatetimeWidget/index.ts (100%)
rename src/components/{ => Widgets}/MarkdownEditorWidget.scss (100%)
rename src/components/{ => Widgets}/MarkdownEditorWidget.tsx (100%)
rename src/components/{ => Widgets}/RadioButton/RadioButton.tsx (100%)
rename src/components/{ => Widgets}/RadioButton/RadioButtonWidget.tsx (100%)
rename src/components/{ => Widgets}/SectionDividerWidget/SectionDividerWidget.scss (100%)
rename src/components/{ => Widgets}/SectionDividerWidget/SectionDividerWidget.tsx (91%)
rename src/components/{ => Widgets}/SectionDividerWidget/index.ts (100%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/OptionsWidget.tsx (98%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/Question.tsx (100%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/QuestionList.tsx (100%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/SignupQuestionsWidget.scss (91%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/SignupQuestionsWidget.tsx (100%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/TypeWidget.tsx (100%)
rename src/components/{ => Widgets}/SignupQuestionsWidget/index.ts (100%)
diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Widgets/Checkbox/Checkbox.tsx
similarity index 100%
rename from src/components/Checkbox/Checkbox.tsx
rename to src/components/Widgets/Checkbox/Checkbox.tsx
diff --git a/src/components/Checkbox/Checkboxes.tsx b/src/components/Widgets/Checkbox/Checkboxes.tsx
similarity index 100%
rename from src/components/Checkbox/Checkboxes.tsx
rename to src/components/Widgets/Checkbox/Checkboxes.tsx
diff --git a/src/components/DatetimeWidget/DatetimeWidget.scss b/src/components/Widgets/DatetimeWidget/DatetimeWidget.scss
similarity index 100%
rename from src/components/DatetimeWidget/DatetimeWidget.scss
rename to src/components/Widgets/DatetimeWidget/DatetimeWidget.scss
diff --git a/src/components/DatetimeWidget/DatetimeWidget.tsx b/src/components/Widgets/DatetimeWidget/DatetimeWidget.tsx
similarity index 100%
rename from src/components/DatetimeWidget/DatetimeWidget.tsx
rename to src/components/Widgets/DatetimeWidget/DatetimeWidget.tsx
diff --git a/src/components/DatetimeWidget/index.ts b/src/components/Widgets/DatetimeWidget/index.ts
similarity index 100%
rename from src/components/DatetimeWidget/index.ts
rename to src/components/Widgets/DatetimeWidget/index.ts
diff --git a/src/components/MarkdownEditorWidget.scss b/src/components/Widgets/MarkdownEditorWidget.scss
similarity index 100%
rename from src/components/MarkdownEditorWidget.scss
rename to src/components/Widgets/MarkdownEditorWidget.scss
diff --git a/src/components/MarkdownEditorWidget.tsx b/src/components/Widgets/MarkdownEditorWidget.tsx
similarity index 100%
rename from src/components/MarkdownEditorWidget.tsx
rename to src/components/Widgets/MarkdownEditorWidget.tsx
diff --git a/src/components/RadioButton/RadioButton.tsx b/src/components/Widgets/RadioButton/RadioButton.tsx
similarity index 100%
rename from src/components/RadioButton/RadioButton.tsx
rename to src/components/Widgets/RadioButton/RadioButton.tsx
diff --git a/src/components/RadioButton/RadioButtonWidget.tsx b/src/components/Widgets/RadioButton/RadioButtonWidget.tsx
similarity index 100%
rename from src/components/RadioButton/RadioButtonWidget.tsx
rename to src/components/Widgets/RadioButton/RadioButtonWidget.tsx
diff --git a/src/components/SectionDividerWidget/SectionDividerWidget.scss b/src/components/Widgets/SectionDividerWidget/SectionDividerWidget.scss
similarity index 100%
rename from src/components/SectionDividerWidget/SectionDividerWidget.scss
rename to src/components/Widgets/SectionDividerWidget/SectionDividerWidget.scss
diff --git a/src/components/SectionDividerWidget/SectionDividerWidget.tsx b/src/components/Widgets/SectionDividerWidget/SectionDividerWidget.tsx
similarity index 91%
rename from src/components/SectionDividerWidget/SectionDividerWidget.tsx
rename to src/components/Widgets/SectionDividerWidget/SectionDividerWidget.tsx
index 46e9c3e..9662e9d 100644
--- a/src/components/SectionDividerWidget/SectionDividerWidget.tsx
+++ b/src/components/Widgets/SectionDividerWidget/SectionDividerWidget.tsx
@@ -1,7 +1,7 @@
import React from "react";
import "./SectionDividerWidget.scss";
-import Icon from "../Icon";
-import { IconType } from "../Icon/Icon";
+import Icon from "../../Icon";
+import { IconType } from "../../Icon/Icon";
export interface SectionDividerWidgetProps {
label: string;
diff --git a/src/components/SectionDividerWidget/index.ts b/src/components/Widgets/SectionDividerWidget/index.ts
similarity index 100%
rename from src/components/SectionDividerWidget/index.ts
rename to src/components/Widgets/SectionDividerWidget/index.ts
diff --git a/src/components/SignupQuestionsWidget/OptionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx
similarity index 98%
rename from src/components/SignupQuestionsWidget/OptionsWidget.tsx
rename to src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx
index 966757a..623311a 100644
--- a/src/components/SignupQuestionsWidget/OptionsWidget.tsx
+++ b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { Question, InputProps, optionTypes, SignupQuestionError } from "./index";
-import Checkbox from "@components/Checkbox/Checkbox";
+import Checkbox from "@components/Widgets/Checkbox/Checkbox";
export interface OptionsWidgetProps {
inputProps: InputProps;
diff --git a/src/components/SignupQuestionsWidget/Question.tsx b/src/components/Widgets/SignupQuestionsWidget/Question.tsx
similarity index 100%
rename from src/components/SignupQuestionsWidget/Question.tsx
rename to src/components/Widgets/SignupQuestionsWidget/Question.tsx
diff --git a/src/components/SignupQuestionsWidget/QuestionList.tsx b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx
similarity index 100%
rename from src/components/SignupQuestionsWidget/QuestionList.tsx
rename to src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx
diff --git a/src/components/SignupQuestionsWidget/SignupQuestionsWidget.scss b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.scss
similarity index 91%
rename from src/components/SignupQuestionsWidget/SignupQuestionsWidget.scss
rename to src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.scss
index a239ce4..e82f054 100644
--- a/src/components/SignupQuestionsWidget/SignupQuestionsWidget.scss
+++ b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.scss
@@ -1,4 +1,4 @@
-@import "../../assets/scss/globals";
+@import "../../../assets/scss/globals";
.signup-questions-widget {
diff --git a/src/components/SignupQuestionsWidget/SignupQuestionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx
similarity index 100%
rename from src/components/SignupQuestionsWidget/SignupQuestionsWidget.tsx
rename to src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx
diff --git a/src/components/SignupQuestionsWidget/TypeWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/TypeWidget.tsx
similarity index 100%
rename from src/components/SignupQuestionsWidget/TypeWidget.tsx
rename to src/components/Widgets/SignupQuestionsWidget/TypeWidget.tsx
diff --git a/src/components/SignupQuestionsWidget/index.ts b/src/components/Widgets/SignupQuestionsWidget/index.ts
similarity index 100%
rename from src/components/SignupQuestionsWidget/index.ts
rename to src/components/Widgets/SignupQuestionsWidget/index.ts
diff --git a/src/models/SignupForm.ts b/src/models/SignupForm.ts
index 47667a2..923ee86 100644
--- a/src/models/SignupForm.ts
+++ b/src/models/SignupForm.ts
@@ -1,7 +1,7 @@
import axios from "axios";
import { getAuthHeader } from "@utils/auth";
const url = `${process.env.API_URL}/signupForm/`;
-import { Question } from "@components/SignupQuestionsWidget";
+import { Question } from "@components/Widgets/SignupQuestionsWidget";
export interface SignupForm {
id?: number;
diff --git a/src/pages/admin/EventCreatePage.tsx b/src/pages/admin/EventCreatePage.tsx
index 009ccd4..e588c60 100644
--- a/src/pages/admin/EventCreatePage.tsx
+++ b/src/pages/admin/EventCreatePage.tsx
@@ -5,9 +5,9 @@ import Form from "react-jsonschema-form";
import { Tag, getTags } from "@models/Tag";
import { SignupForm, getForms } from "@models/SignupForm";
import { createEvent, getEvent, updateEvent, Event } from "@models/Event";
-import DatetimeWidget from "@components/DatetimeWidget";
-import SectionDividerWidget from "@components/SectionDividerWidget";
-import MarkdownEditorWidget from "@components/MarkdownEditorWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget";
+import SectionDividerWidget from "@components/Widgets/SectionDividerWidget";
+import MarkdownEditorWidget from "@components/Widgets/MarkdownEditorWidget";
const widgets = {
datetime: DatetimeWidget,
diff --git a/src/pages/admin/FeedCreatePage.tsx b/src/pages/admin/FeedCreatePage.tsx
index 401aa85..0bf4571 100644
--- a/src/pages/admin/FeedCreatePage.tsx
+++ b/src/pages/admin/FeedCreatePage.tsx
@@ -5,7 +5,7 @@ import { isAuthenticated } from "@utils/auth";
import Form from "react-jsonschema-form";
import { Tag, getTags } from "@models/Tag";
import { createPost, getPost, updatePost } from "@models/Feed";
-import DatetimeWidget from "@components/DatetimeWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget";
const widgets = {
datetime: DatetimeWidget,
diff --git a/src/pages/admin/SignupCreatePage.tsx b/src/pages/admin/SignupCreatePage.tsx
index 96bcdd6..4c1dad9 100644
--- a/src/pages/admin/SignupCreatePage.tsx
+++ b/src/pages/admin/SignupCreatePage.tsx
@@ -4,9 +4,9 @@ import { Link } from "react-router-dom";
import "./SignupCreatePage.scss";
import Form from "react-jsonschema-form";
import { createForm, getForm, updateForm, SignupForm } from "@models/SignupForm";
-import DatetimeWidget from "@components/DatetimeWidget";
-import SignupQuestionsWidget from "@components/SignupQuestionsWidget";
-import MarkdownEditorWidget from "@components/MarkdownEditorWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget";
+import SignupQuestionsWidget from "@components/Widgets/SignupQuestionsWidget";
+import MarkdownEditorWidget from "@components/Widgets/MarkdownEditorWidget";
import { buildValidationSchema } from "@views/SignUpPage/FormUtils";
const widgets = {
diff --git a/src/views/SignUpPage/FormUtils.tsx b/src/views/SignUpPage/FormUtils.tsx
index e555ed2..5e42529 100644
--- a/src/views/SignUpPage/FormUtils.tsx
+++ b/src/views/SignUpPage/FormUtils.tsx
@@ -1,5 +1,5 @@
-import { Question } from "@components/SignupQuestionsWidget";
+import { Question } from "@components/Widgets/SignupQuestionsWidget";
import { SignupForm } from "@models/SignupForm";
import { EMAIL_REGEX } from "@utils/regexes";
import escapeRegExp from "lodash/escapeRegExp";
diff --git a/src/views/SignUpPage/SignUpPageView.tsx b/src/views/SignUpPage/SignUpPageView.tsx
index e6055bc..6ab463d 100644
--- a/src/views/SignUpPage/SignUpPageView.tsx
+++ b/src/views/SignUpPage/SignUpPageView.tsx
@@ -6,8 +6,8 @@ import { SignupForm } from "@models/SignupForm";
import { buildFormSchema, buildUISchema } from "./FormUtils";
import AsideSection from "@components/AsideSection";
import MainSection from "@components/MainSection";
-import Checkboxes from "@components/Checkbox/Checkboxes";
-import RadioButtonWidget from "@components/RadioButton/RadioButtonWidget";
+import Checkboxes from "@components/Widgets/Checkbox/Checkboxes";
+import RadioButtonWidget from "@components/Widgets/RadioButton/RadioButtonWidget";
const customWidgets = {
"radio": RadioButtonWidget,
From 88c1726fe639032a43f729adf0ddc48a7170fb72 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 02:00:50 +0300
Subject: [PATCH 13/28] Remove few index.ts
---
src/components/Widgets/DatetimeWidget/index.ts | 2 --
src/components/Widgets/SectionDividerWidget/index.ts | 2 --
src/pages/admin/EventCreatePage.tsx | 4 ++--
src/pages/admin/FeedCreatePage.tsx | 2 +-
src/pages/admin/SignupCreatePage.tsx | 2 +-
5 files changed, 4 insertions(+), 8 deletions(-)
delete mode 100644 src/components/Widgets/DatetimeWidget/index.ts
delete mode 100644 src/components/Widgets/SectionDividerWidget/index.ts
diff --git a/src/components/Widgets/DatetimeWidget/index.ts b/src/components/Widgets/DatetimeWidget/index.ts
deleted file mode 100644
index 396b80b..0000000
--- a/src/components/Widgets/DatetimeWidget/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import DatetimeWidget from "./DatetimeWidget";
-export default DatetimeWidget;
diff --git a/src/components/Widgets/SectionDividerWidget/index.ts b/src/components/Widgets/SectionDividerWidget/index.ts
deleted file mode 100644
index 27d7f9c..0000000
--- a/src/components/Widgets/SectionDividerWidget/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import SectionDividerWidget from "./SectionDividerWidget";
-export default SectionDividerWidget;
diff --git a/src/pages/admin/EventCreatePage.tsx b/src/pages/admin/EventCreatePage.tsx
index e588c60..9b3dead 100644
--- a/src/pages/admin/EventCreatePage.tsx
+++ b/src/pages/admin/EventCreatePage.tsx
@@ -5,8 +5,8 @@ import Form from "react-jsonschema-form";
import { Tag, getTags } from "@models/Tag";
import { SignupForm, getForms } from "@models/SignupForm";
import { createEvent, getEvent, updateEvent, Event } from "@models/Event";
-import DatetimeWidget from "@components/Widgets/DatetimeWidget";
-import SectionDividerWidget from "@components/Widgets/SectionDividerWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget/DatetimeWidget";
+import SectionDividerWidget from "@components/Widgets/SectionDividerWidget/SectionDividerWidget";
import MarkdownEditorWidget from "@components/Widgets/MarkdownEditorWidget";
const widgets = {
diff --git a/src/pages/admin/FeedCreatePage.tsx b/src/pages/admin/FeedCreatePage.tsx
index 0bf4571..faff74b 100644
--- a/src/pages/admin/FeedCreatePage.tsx
+++ b/src/pages/admin/FeedCreatePage.tsx
@@ -5,7 +5,7 @@ import { isAuthenticated } from "@utils/auth";
import Form from "react-jsonschema-form";
import { Tag, getTags } from "@models/Tag";
import { createPost, getPost, updatePost } from "@models/Feed";
-import DatetimeWidget from "@components/Widgets/DatetimeWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget/DatetimeWidget";
const widgets = {
datetime: DatetimeWidget,
diff --git a/src/pages/admin/SignupCreatePage.tsx b/src/pages/admin/SignupCreatePage.tsx
index 4c1dad9..77a53c1 100644
--- a/src/pages/admin/SignupCreatePage.tsx
+++ b/src/pages/admin/SignupCreatePage.tsx
@@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import "./SignupCreatePage.scss";
import Form from "react-jsonschema-form";
import { createForm, getForm, updateForm, SignupForm } from "@models/SignupForm";
-import DatetimeWidget from "@components/Widgets/DatetimeWidget";
+import DatetimeWidget from "@components/Widgets/DatetimeWidget/DatetimeWidget";
import SignupQuestionsWidget from "@components/Widgets/SignupQuestionsWidget";
import MarkdownEditorWidget from "@components/Widgets/MarkdownEditorWidget";
import { buildValidationSchema } from "@views/SignUpPage/FormUtils";
From 3fc24bcb98f04fae548fad283991feef5a9a1bb2 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 02:01:40 +0300
Subject: [PATCH 14/28] Uninstall plop
---
package-lock.json | 677 ----------------------------------
package.json | 1 -
plop-templates/component.scss | 5 -
plop-templates/component.tsx | 25 --
plop-templates/index.ts | 2 -
plop-templates/model.ts | 17 -
plop-templates/page.scss | 3 -
plop-templates/page.tsx | 21 --
plop-templates/store.ts | 13 -
9 files changed, 764 deletions(-)
delete mode 100644 plop-templates/component.scss
delete mode 100644 plop-templates/component.tsx
delete mode 100644 plop-templates/index.ts
delete mode 100644 plop-templates/model.ts
delete mode 100644 plop-templates/page.scss
delete mode 100644 plop-templates/page.tsx
delete mode 100644 plop-templates/store.ts
diff --git a/package-lock.json b/package-lock.json
index d41c72d..66c30cf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1514,12 +1514,6 @@
"integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==",
"dev": true
},
- "ansi-escapes": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
- "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
- "dev": true
- },
"ansi-html": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
@@ -1724,12 +1718,6 @@
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
"dev": true
},
- "array-each": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
- "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
- "dev": true
- },
"array-filter": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
@@ -1776,12 +1764,6 @@
"integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
"dev": true
},
- "array-slice": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
- "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
- "dev": true
- },
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
@@ -4517,32 +4499,6 @@
"supports-color": "^5.3.0"
}
},
- "change-case": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.1.0.tgz",
- "integrity": "sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==",
- "dev": true,
- "requires": {
- "camel-case": "^3.0.0",
- "constant-case": "^2.0.0",
- "dot-case": "^2.1.0",
- "header-case": "^1.0.0",
- "is-lower-case": "^1.1.0",
- "is-upper-case": "^1.1.0",
- "lower-case": "^1.1.1",
- "lower-case-first": "^1.0.0",
- "no-case": "^2.3.2",
- "param-case": "^2.1.0",
- "pascal-case": "^2.0.0",
- "path-case": "^2.1.0",
- "sentence-case": "^2.1.0",
- "snake-case": "^2.1.0",
- "swap-case": "^1.1.0",
- "title-case": "^2.1.0",
- "upper-case": "^1.1.1",
- "upper-case-first": "^1.1.0"
- }
- },
"character-entities": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz",
@@ -4704,21 +4660,6 @@
"integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==",
"dev": true
},
- "cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
- "dev": true,
- "requires": {
- "restore-cursor": "^2.0.0"
- }
- },
- "cli-spinners": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.1.0.tgz",
- "integrity": "sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA==",
- "dev": true
- },
"cli-width": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
@@ -4839,12 +4780,6 @@
}
}
},
- "clone": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
- "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
- "dev": true
- },
"clone-buffer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
@@ -4909,12 +4844,6 @@
"readable-stream": "^2.3.5"
}
},
- "co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "dev": true
- },
"coa": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz",
@@ -5175,16 +5104,6 @@
"dev": true,
"optional": true
},
- "constant-case": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz",
- "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=",
- "dev": true,
- "requires": {
- "snake-case": "^2.1.0",
- "upper-case": "^1.1.1"
- }
- },
"constants-browserify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
@@ -5856,15 +5775,6 @@
}
}
},
- "defaults": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
- "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
- "dev": true,
- "requires": {
- "clone": "^1.0.2"
- }
- },
"defer-to-connect": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
@@ -6008,16 +5918,6 @@
"randombytes": "^2.0.0"
}
},
- "dir-glob": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
- "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
- "dev": true,
- "requires": {
- "arrify": "^1.0.1",
- "path-type": "^3.0.0"
- }
- },
"dns-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
@@ -6136,15 +6036,6 @@
"integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==",
"dev": true
},
- "dot-case": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz",
- "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0"
- }
- },
"dot-prop": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
@@ -8418,54 +8309,6 @@
}
}
},
- "findup-sync": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
- "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
- "dev": true,
- "requires": {
- "detect-file": "^1.0.0",
- "is-glob": "^3.1.0",
- "micromatch": "^3.0.4",
- "resolve-dir": "^1.0.1"
- },
- "dependencies": {
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
- "dev": true
- },
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "fined": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
- "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
- "dev": true,
- "requires": {
- "expand-tilde": "^2.0.2",
- "is-plain-object": "^2.0.3",
- "object.defaults": "^1.1.0",
- "object.pick": "^1.2.0",
- "parse-filepath": "^1.0.1"
- }
- },
- "flagged-respawn": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
- "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
- "dev": true
- },
"flat-cache": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
@@ -9506,39 +9349,6 @@
"integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==",
"dev": true
},
- "handlebars": {
- "version": "4.7.6",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz",
- "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5",
- "neo-async": "^2.6.0",
- "source-map": "^0.6.1",
- "uglify-js": "^3.1.4",
- "wordwrap": "^1.0.0"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- },
- "wordwrap": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
- "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
- "dev": true
- }
- }
- },
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
@@ -9703,16 +9513,6 @@
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
- "header-case": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz",
- "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0",
- "upper-case": "^1.1.3"
- }
- },
"helmet": {
"version": "3.21.2",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-3.21.2.tgz",
@@ -10306,12 +10106,6 @@
"integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
"dev": true
},
- "ignore": {
- "version": "3.3.10",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz",
- "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
- "dev": true
- },
"image-size": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz",
@@ -10817,64 +10611,6 @@
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"dev": true
},
- "inquirer": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
- "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
- "dev": true,
- "requires": {
- "ansi-escapes": "^3.2.0",
- "chalk": "^2.4.2",
- "cli-cursor": "^2.1.0",
- "cli-width": "^2.0.0",
- "external-editor": "^3.0.3",
- "figures": "^2.0.0",
- "lodash": "^4.17.11",
- "mute-stream": "0.0.7",
- "run-async": "^2.2.0",
- "rxjs": "^6.4.0",
- "string-width": "^2.1.0",
- "strip-ansi": "^5.1.0",
- "through": "^2.3.6"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "figures": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
- "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
- "dev": true,
- "requires": {
- "escape-string-regexp": "^1.0.5"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
"internal-ip": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz",
@@ -10928,16 +10664,6 @@
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
"dev": true
},
- "is-absolute": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
- "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
- "dev": true,
- "requires": {
- "is-relative": "^1.0.0",
- "is-windows": "^1.0.1"
- }
- },
"is-absolute-url": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz",
@@ -11235,15 +10961,6 @@
"integrity": "sha512-18toSebUVF7y717dgw/Dzn6djOCqrkiDp3MhB8P6TdKyCVkbD1ZwE7Uz8Hwx6hUPTvKjbyYH9ncXT4ts4qLaSA==",
"dev": true
},
- "is-lower-case": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz",
- "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=",
- "dev": true,
- "requires": {
- "lower-case": "^1.1.0"
- }
- },
"is-natural-number": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz",
@@ -11387,15 +11104,6 @@
"integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==",
"dev": true
},
- "is-relative": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
- "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
- "dev": true,
- "requires": {
- "is-unc-path": "^1.0.0"
- }
- },
"is-retry-allowed": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
@@ -11431,24 +11139,6 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
- "is-unc-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
- "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
- "dev": true,
- "requires": {
- "unc-path-regex": "^0.1.2"
- }
- },
- "is-upper-case": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz",
- "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=",
- "dev": true,
- "requires": {
- "upper-case": "^1.1.0"
- }
- },
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
@@ -11489,15 +11179,6 @@
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
- "isbinaryfile": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz",
- "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==",
- "dev": true,
- "requires": {
- "buffer-alloc": "^1.2.0"
- }
- },
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -12023,22 +11704,6 @@
"type-check": "~0.3.2"
}
},
- "liftoff": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
- "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=",
- "dev": true,
- "requires": {
- "extend": "^3.0.0",
- "findup-sync": "^2.0.0",
- "fined": "^1.0.1",
- "flagged-respawn": "^1.0.0",
- "is-plain-object": "^2.0.4",
- "object.map": "^1.0.0",
- "rechoir": "^0.6.2",
- "resolve": "^1.1.7"
- }
- },
"linux-platform-info": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/linux-platform-info/-/linux-platform-info-0.0.3.tgz",
@@ -12125,12 +11790,6 @@
"integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==",
"dev": true
},
- "lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
- "dev": true
- },
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
@@ -12251,15 +11910,6 @@
"integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
"dev": true
},
- "lower-case-first": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz",
- "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=",
- "dev": true,
- "requires": {
- "lower-case": "^1.1.2"
- }
- },
"lowercase-keys": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
@@ -12307,15 +11957,6 @@
"pify": "^3.0.0"
}
},
- "make-iterator": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
- "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
- "dev": true,
- "requires": {
- "kind-of": "^6.0.2"
- }
- },
"mamacro": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz",
@@ -12921,12 +12562,6 @@
"integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ==",
"dev": true
},
- "mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
- "dev": true
- },
"nan": {
"version": "2.14.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
@@ -13075,57 +12710,6 @@
}
}
},
- "node-plop": {
- "version": "0.18.0",
- "resolved": "https://registry.npmjs.org/node-plop/-/node-plop-0.18.0.tgz",
- "integrity": "sha512-in7Cg3wJ/1a1NFvCoqxEuEDZDs3op8A7PghGgwmujsS93o9dZWk0HpZ8wGg4pKw2JB2KBo8xwUMOtEwBUr0sIA==",
- "dev": true,
- "requires": {
- "change-case": "^3.0.1",
- "co": "^4.6.0",
- "core-js": "^2.4.1",
- "del": "^3.0.0",
- "globby": "^8.0.0",
- "handlebars": "^4.1.0",
- "inquirer": "^6.0.0",
- "isbinaryfile": "^3.0.2",
- "lodash.get": "^4.4.2",
- "mkdirp": "^0.5.1",
- "pify": "^4.0.0",
- "resolve": "^1.2.0"
- },
- "dependencies": {
- "globby": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz",
- "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==",
- "dev": true,
- "requires": {
- "array-union": "^1.0.1",
- "dir-glob": "2.0.0",
- "fast-glob": "^2.0.2",
- "glob": "^7.1.2",
- "ignore": "^3.3.5",
- "pify": "^3.0.0",
- "slash": "^1.0.0"
- },
- "dependencies": {
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
- "dev": true
- }
- }
- },
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- }
- }
- },
"node-releases": {
"version": "1.1.39",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.39.tgz",
@@ -13499,29 +13083,6 @@
"object-keys": "^1.0.11"
}
},
- "object.defaults": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
- "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
- "dev": true,
- "requires": {
- "array-each": "^1.0.1",
- "array-slice": "^1.0.0",
- "for-own": "^1.0.0",
- "isobject": "^3.0.0"
- },
- "dependencies": {
- "for-own": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
- "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
- "dev": true,
- "requires": {
- "for-in": "^1.0.1"
- }
- }
- }
- },
"object.entries": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz",
@@ -13630,27 +13191,6 @@
"es-abstract": "^1.5.1"
}
},
- "object.map": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
- "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
- "dev": true,
- "requires": {
- "for-own": "^1.0.0",
- "make-iterator": "^1.0.0"
- },
- "dependencies": {
- "for-own": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
- "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
- "dev": true,
- "requires": {
- "for-in": "^1.0.1"
- }
- }
- }
- },
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
@@ -13774,48 +13314,6 @@
"logalot": "^2.0.0"
}
},
- "ora": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz",
- "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==",
- "dev": true,
- "requires": {
- "chalk": "^2.4.2",
- "cli-cursor": "^2.1.0",
- "cli-spinners": "^2.0.0",
- "log-symbols": "^2.2.0",
- "strip-ansi": "^5.2.0",
- "wcwidth": "^1.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
"original": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz",
@@ -14208,17 +13706,6 @@
"is-hexadecimal": "^1.0.0"
}
},
- "parse-filepath": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
- "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
- "dev": true,
- "requires": {
- "is-absolute": "^1.0.0",
- "map-cache": "^0.2.0",
- "path-root": "^0.1.1"
- }
- },
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
@@ -14279,16 +13766,6 @@
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"dev": true
},
- "pascal-case": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz",
- "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=",
- "dev": true,
- "requires": {
- "camel-case": "^3.0.0",
- "upper-case-first": "^1.1.0"
- }
- },
"pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -14301,15 +13778,6 @@
"integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
"dev": true
},
- "path-case": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz",
- "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0"
- }
- },
"path-dirname": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
@@ -14346,21 +13814,6 @@
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
"dev": true
},
- "path-root": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
- "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
- "dev": true,
- "requires": {
- "path-root-regex": "^0.1.0"
- }
- },
- "path-root-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
- "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
- "dev": true
- },
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
@@ -14474,54 +13927,6 @@
"semver-compare": "^1.0.0"
}
},
- "plop": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/plop/-/plop-2.3.0.tgz",
- "integrity": "sha512-CfTMYmfeCwlipzVcDWI6edxRwdZx47d8BRL3VSv5g+BB8JcLXaSzATkU0flG/aIVl4cxe1Y0rGkrtPjpDm7ySQ==",
- "dev": true,
- "requires": {
- "chalk": "^1.1.3",
- "interpret": "^1.2.0",
- "liftoff": "^2.5.0",
- "minimist": "^1.2.0",
- "node-plop": "~0.18.0",
- "ora": "^3.0.0",
- "v8flags": "^2.0.10"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- }
- }
- },
"pluralize": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
@@ -15857,15 +15262,6 @@
"set-immediate-shim": "^1.0.1"
}
},
- "rechoir": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
- "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
- "dev": true,
- "requires": {
- "resolve": "^1.1.6"
- }
- },
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
@@ -16434,16 +15830,6 @@
"lowercase-keys": "^1.0.0"
}
},
- "restore-cursor": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
- "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
- "dev": true,
- "requires": {
- "onetime": "^2.0.0",
- "signal-exit": "^3.0.2"
- }
- },
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
@@ -16864,16 +16250,6 @@
}
}
},
- "sentence-case": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz",
- "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0",
- "upper-case-first": "^1.1.2"
- }
- },
"serialize-javascript": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz",
@@ -17341,15 +16717,6 @@
"is-fullwidth-code-point": "^2.0.0"
}
},
- "snake-case": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz",
- "integrity": "sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0"
- }
- },
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -19031,16 +18398,6 @@
}
}
},
- "swap-case": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz",
- "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=",
- "dev": true,
- "requires": {
- "lower-case": "^1.1.1",
- "upper-case": "^1.1.1"
- }
- },
"symbol-observable": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
@@ -20222,16 +19579,6 @@
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=",
"dev": true
},
- "title-case": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz",
- "integrity": "sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=",
- "dev": true,
- "requires": {
- "no-case": "^2.2.0",
- "upper-case": "^1.0.3"
- }
- },
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -20746,12 +20093,6 @@
"through": "^2.3.8"
}
},
- "unc-path-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
- "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
- "dev": true
- },
"unherit": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.2.tgz",
@@ -21059,15 +20400,6 @@
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
"dev": true
},
- "upper-case-first": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz",
- "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=",
- "dev": true,
- "requires": {
- "upper-case": "^1.1.1"
- }
- },
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
@@ -21632,15 +20964,6 @@
"minimalistic-assert": "^1.0.0"
}
},
- "wcwidth": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
- "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
- "dev": true,
- "requires": {
- "defaults": "^1.0.3"
- }
- },
"webauth": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/webauth/-/webauth-1.1.0.tgz",
diff --git a/package.json b/package.json
index acb5ca6..7eccb62 100644
--- a/package.json
+++ b/package.json
@@ -89,7 +89,6 @@
"module-to-cdn": "3.1.2",
"morgan": "1.9.1",
"npm-run-all": "4.1.5",
- "plop": "2.3.0",
"postcss-loader": "2.1.6",
"react": "16.8.6",
"react-addons-test-utils": "15.6.2",
diff --git a/plop-templates/component.scss b/plop-templates/component.scss
deleted file mode 100644
index 127418e..0000000
--- a/plop-templates/component.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import "../../assets/scss/globals";
-
-.{{ dashCase name }} {
-
-}
diff --git a/plop-templates/component.tsx b/plop-templates/component.tsx
deleted file mode 100644
index 42b9f35..0000000
--- a/plop-templates/component.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import React from "react";
-{{#if observer}}
-import { observer } from "mobx-react";
-import {{ camelCase store_name }} from "../../stores/{{ properCase store_name }}";
-{{/if}}
-import "./{{ properCase name}}.scss";
-
-export interface {{ properCase name }}Props {}
-export interface {{ properCase name }}State {}
-
-{{#if observer}}@observer {{/if}}class {{ properCase name }} extends React.Component<{{ properCase name }}Props, {{ properCase name }}State> {
- render() {
- return (
-
- {{ titleCase name }}
-
- );
- }
-}
-
-{{#if observer}}
-export default (props) => <{{ properCase name }} {{ camelCase store_name }}={ {{ camelCase store_name }} } { ...props } />;
-{{else}}
-export default {{ properCase name }};
-{{/if}}
\ No newline at end of file
diff --git a/plop-templates/index.ts b/plop-templates/index.ts
deleted file mode 100644
index e909ea6..0000000
--- a/plop-templates/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import {{ properCase name }} from "./{{ properCase name }}";
-export default {{ properCase name }};
diff --git a/plop-templates/model.ts b/plop-templates/model.ts
deleted file mode 100644
index 62d6caa..0000000
--- a/plop-templates/model.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from "axios";
-
-const url = `${process.env.API_URL}/{{ camelCase name }}s`;
-
-export interface {{ properCase name }} {
- id: number;
-}
-
-export async function get{{ properCase name }}s(): Promise<{{ properCase name }}[]> {
- try {
- const resp = await axios.get(url);
- return resp.data;
- } catch (err) {
- console.error(err);
- throw err;
- }
-}
diff --git a/plop-templates/page.scss b/plop-templates/page.scss
deleted file mode 100644
index 2bedf49..0000000
--- a/plop-templates/page.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.{{ dashCase name }} {
-
-}
diff --git a/plop-templates/page.tsx b/plop-templates/page.tsx
deleted file mode 100644
index 5f82725..0000000
--- a/plop-templates/page.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from "react";
-import { Helmet } from "react-helmet";
-import "./{{ properCase name}}.scss";
-
-export interface {{ properCase name }}Props {}
-export interface {{ properCase name }}State {}
-
-class {{ properCase name }} extends React.Component<{{ properCase name }}Props, {{ properCase name }}State> {
- render() {
- return (
-
-
-
-
- {{ titleCase name }}
-
- );
- }
-}
-
-export default {{ properCase name }};
diff --git a/plop-templates/store.ts b/plop-templates/store.ts
deleted file mode 100644
index 1615f02..0000000
--- a/plop-templates/store.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { observable, action } from "mobx";
-import { observer } from "mobx-react";
-
-class {{ properCase name }} {
- @observable counter = 0;
-
- @action.bound
- increment() {
- this.counter += 1;
- }
-}
-
-export default new {{ properCase name }}();
From f1d3ababd4eff463af3ed66880392aef8c96bc7b Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 03:10:25 +0300
Subject: [PATCH 15/28] New Hero on ActualPage
---
src/components/NewHero/Hero.tsx | 55 +++++
src/components/NewHero/HeroAsideItem.tsx | 56 +++++
src/components/NewHero/HeroPrimaryButtons.tsx | 38 ++++
src/components/NewHero/HeroPrimarySection.tsx | 37 ++++
.../HeroSecondarySection.tsx | 33 ++-
src/components/NewHero/index.tsx | 6 +
src/views/ActualPage/ActualPageHero.tsx | 74 ++++---
src/views/FrontPage/FrontPageHero.tsx | 203 +++---------------
8 files changed, 279 insertions(+), 223 deletions(-)
create mode 100644 src/components/NewHero/Hero.tsx
create mode 100644 src/components/NewHero/HeroAsideItem.tsx
create mode 100644 src/components/NewHero/HeroPrimaryButtons.tsx
create mode 100644 src/components/NewHero/HeroPrimarySection.tsx
rename src/components/{Hero => NewHero}/HeroSecondarySection.tsx (70%)
create mode 100644 src/components/NewHero/index.tsx
diff --git a/src/components/NewHero/Hero.tsx b/src/components/NewHero/Hero.tsx
new file mode 100644
index 0000000..3005326
--- /dev/null
+++ b/src/components/NewHero/Hero.tsx
@@ -0,0 +1,55 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+
+const Container = styled.div`
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: space-between;
+ position: relative;
+ padding: 0;
+
+ min-height: 70vh;
+
+ section {
+ padding: 2rem 1rem;
+ }
+
+ aside {
+ padding: 0 2rem;
+ }
+
+ & > div {
+ flex: 8;
+ }
+
+ & > aside {
+
+ flex: 4;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ }
+
+ @media screen and (max-width: 800px) {
+ flex-direction: column;
+
+ & > aside {
+ margin: 48px auto;
+ }
+ }
+
+ color: ${colors.white};
+ background-color: ${colors.darkBlue};
+ a:hover {
+ color: ${colors.white};
+ }
+`;
+
+const Hero: React.FC = ({ children }) => (
+
+ {children}
+
+)
+
+export default Hero;
\ No newline at end of file
diff --git a/src/components/NewHero/HeroAsideItem.tsx b/src/components/NewHero/HeroAsideItem.tsx
new file mode 100644
index 0000000..821265c
--- /dev/null
+++ b/src/components/NewHero/HeroAsideItem.tsx
@@ -0,0 +1,56 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+import Anchor from "@components/Anchor";
+
+interface HeroAsideItemProps {
+ header: string;
+ text?: string;
+ link: string;
+ linkText: string;
+}
+
+const Article = styled.article`
+ max-width: 300px;
+ line-height: 1rem;
+ margin-bottom: 1rem;
+
+ h2 {
+ color: ${colors.lightBlue};
+ text-transform: uppercase;
+ letter-spacing: 3px;
+ line-height: 20px;
+ }
+
+ p, a {
+ color: ${colors.lightBlue};
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 20px;
+ }
+
+ a {
+ color: ${colors.blue1};
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.1rem;
+
+ &:hover {
+ color: ${colors.white};
+ }
+ }
+`;
+
+const HeroAsideItem: React.FC = ({ header, text, link, linkText }) => (
+
+ {header}
+ {text && (
+ {text}
+ )}
+
+ {linkText}
+
+
+)
+
+export default HeroAsideItem;
diff --git a/src/components/NewHero/HeroPrimaryButtons.tsx b/src/components/NewHero/HeroPrimaryButtons.tsx
new file mode 100644
index 0000000..627ee30
--- /dev/null
+++ b/src/components/NewHero/HeroPrimaryButtons.tsx
@@ -0,0 +1,38 @@
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+
+const Buttons = styled.div<{row?: boolean}>`
+ min-width: 20%;
+ max-width: fit-content;
+ margin: auto;
+ display: flex;
+ flex-direction: ${(p) => p.row ? "row" : "column"};
+
+ a {
+ display: contents;
+ }
+
+ button {
+ color: ${colors.blue1};
+ background-color: transparent;
+ padding: 0.8rem 2rem;
+ margin: 0.5rem;
+ font-size: 0.8rem;
+ font-weight: 800;
+ letter-spacing: .1em;
+ text-transform: uppercase;
+ border: 1px solid ${colors.lightTurquoise};
+
+ &:hover {
+ cursor: pointer;
+ color: ${colors.white};
+ }
+
+ &:active,
+ &:focus {
+ outline: none;
+ }
+ }
+`;
+
+export default Buttons;
\ No newline at end of file
diff --git a/src/components/NewHero/HeroPrimarySection.tsx b/src/components/NewHero/HeroPrimarySection.tsx
new file mode 100644
index 0000000..6cf2162
--- /dev/null
+++ b/src/components/NewHero/HeroPrimarySection.tsx
@@ -0,0 +1,37 @@
+import React from "react";
+import styled from "styled-components";
+
+interface HeroPrimarySectionProps {
+ header: string;
+ text: string;
+}
+
+const Section = styled.section`
+ margin: 10vh auto 0;
+ max-width: 600px;
+ text-align: center;
+ line-height: 1.5rem;
+
+ h1 {
+ line-height: 40px;
+ @media screen and (max-width: 500px) {
+ font-size: 2rem;
+ }
+ }
+
+ p {
+ max-width: 400px;
+ margin: 1em auto;
+ font-weight: 100;
+ }
+`;
+
+const HeroPrimarySection: React.FC = ({ header, text, children }) => (
+
+ {header}
+ {text}
+ {children}
+
+)
+
+export default HeroPrimarySection;
\ No newline at end of file
diff --git a/src/components/Hero/HeroSecondarySection.tsx b/src/components/NewHero/HeroSecondarySection.tsx
similarity index 70%
rename from src/components/Hero/HeroSecondarySection.tsx
rename to src/components/NewHero/HeroSecondarySection.tsx
index ca170c4..16dfab9 100644
--- a/src/components/Hero/HeroSecondarySection.tsx
+++ b/src/components/NewHero/HeroSecondarySection.tsx
@@ -1,10 +1,6 @@
import React from "react";
import styled from "styled-components";
-import ColorDiv from "../ColorDiv/ColorDiv";
-
-interface HeroSecondarySectionItemProps {
- note?: string;
-}
+import { colors } from "@theme/colors";
const Note = styled.span`
color: white;
@@ -25,6 +21,10 @@ const Item = styled.div`
margin: 1rem 2rem 1rem;
`;
+interface HeroSecondarySectionItemProps {
+ note?: string;
+}
+
export const HeroSecondarySectionItem: React.FC = ({note, children}) => (
-
@@ -34,14 +34,13 @@ export const HeroSecondarySectionItem: React.FC =
)
-const Container = styled(ColorDiv)`
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
+const Section = styled.section`
+ background-color: ${colors.green1};
+ color: ${colors.darkBlue};
h1 {
- padding: 1em 0;
+ padding: 1rem 0;
+ text-align: center;
}
`;
@@ -51,16 +50,16 @@ const Items = styled.div`
`;
interface HeroSecondarySectionProps {
- title: string;
+ heading: string;
}
-const HeroSecondarySection: React.FC = ({title, children}) => (
-
- {title}
+const HeroSecondarySection: React.FC = ({ heading, children }) => (
+
+
)
-export default HeroSecondarySection;
+export default HeroSecondarySection;
\ No newline at end of file
diff --git a/src/components/NewHero/index.tsx b/src/components/NewHero/index.tsx
new file mode 100644
index 0000000..1856885
--- /dev/null
+++ b/src/components/NewHero/index.tsx
@@ -0,0 +1,6 @@
+export { default as Hero } from "./Hero";
+export { default as HeroPrimarySection } from "./HeroPrimarySection";
+export { default as HeroSecondarySection } from "./HeroSecondarySection";
+export { HeroSecondarySectionItem } from "./HeroSecondarySection";
+export { default as HeroAsideItem } from "./HeroAsideItem";
+export { default as HeroPrimaryButtons } from "./HeroPrimaryButtons";
\ No newline at end of file
diff --git a/src/views/ActualPage/ActualPageHero.tsx b/src/views/ActualPage/ActualPageHero.tsx
index f8048f0..9b64c8a 100644
--- a/src/views/ActualPage/ActualPageHero.tsx
+++ b/src/views/ActualPage/ActualPageHero.tsx
@@ -1,27 +1,31 @@
import React from "react";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import HeroSecondarySection, { HeroSecondarySectionItem } from "@components/Hero/HeroSecondarySection";
-import Button from "@components/Button";
-import PageSection from "@components/PageSection";
+import { Hero, HeroPrimarySection, HeroSecondarySection, HeroSecondarySectionItem, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
+import Anchor from "@components/Anchor";
const ActualPageHero: React.FC = () => (
-
-
- Yritystapahtumia ja vastapainoa opiskelulle
-
- Teekkarielämä ei ole pelkkää saunomista, juhlimista ja muita huvituksia—tai no, on se sitäkin.
-
-
- { }}>
- Tapahtumat ›
-
- { }}>
- Uutiset ›
-
-
-
+
+
+
+
+
+ { }}>
+ Tapahtumat ›
+
+
+
+ { }}>
+ Uutiset ›
+
+
+
+
+
+
Killan hallitus päivystää kiltahuoneella maanantaisin klo 12.15–13.15. Tuolloin voit ostaa kiltatuotteita, kuten esim. haalarimerkkejä tai laulukirjoja.
@@ -29,38 +33,38 @@ const ActualPageHero: React.FC = () => (
Kiltapäiväkerho Kiltis kokoontuu torstaisin klo XX.XX kiltahuoneella. Lorem ipsum dolor sit amet. Lämpimästi tervetuloa kaikki SIKkiläiset ja SIK-mieliset!
-
-
+
+
Kilta järjestää jäsenilleen jos jonkinlaista projektia ja toimintaa, muun muassa:
-
-
+
+
)
export default ActualPageHero;
\ No newline at end of file
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index 09c303b..5669cbf 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -1,143 +1,15 @@
import React from "react";
-import styled from "styled-components";
-import { PageSection } from "@components/index";
-import { colors } from "@theme/colors";
import Anchor from "@components/Anchor";
-
-const HeroSection = styled(PageSection)`
- min-height: 70vh;
-
- section, aside {
- padding: 0 1rem;
- }
-
- @media screen and (max-width: 800px) {
- flex-direction: column;
-
- aside {
- margin: 48px auto;
- }
- }
-
- color: ${colors.white};
- background-color: ${colors.darkBlue};
- a:hover {
- color: ${colors.white};
- }
-`;
-
-const MainSections = styled.div`
- flex: 8;
-`;
-
-const PrimarySection = styled.section`
- margin: 15vh auto 0;
- max-width: 600px;
- text-align: center;
- line-height: 1.5rem;
-
- h1 {
- line-height: 40px;
- @media screen and (max-width: 500px) {
- font-size: 2rem;
- }
- }
-
- p {
- max-width: 400px;
- margin: 1em auto;
- font-weight: 100;
- }
-`;
-
-const SecondarySection = styled.section`
- background-color: blue;
- /* height: 100%; */
-`;
-
-const Buttons = styled.div`
- min-width: 20%;
- max-width: fit-content;
- margin: auto;
- display: flex;
- flex-direction: column;
-
- a {
- display: contents;
- }
-
- button {
- color: ${colors.blue1};
- background-color: transparent;
- padding: 0.8rem 2rem;
- margin: 0.5rem;
- font-size: 0.8rem;
- font-weight: 800;
- letter-spacing: .1em;
- text-transform: uppercase;
- border: 1px solid ${colors.lightTurquoise};
-
- &:hover {
- cursor: pointer;
- color: ${colors.white};
- }
-
- &:active,
- &:focus {
- outline: none;
- }
- }
-`;
-
-const AsideSection = styled.aside`
- flex: 4;
- display: flex;
- flex-direction: column;
- justify-content: center;
-`;
-
-const AsideItem = styled.article`
- max-width: 300px;
- line-height: 1rem;
- margin-bottom: 1rem;
-
- h2 {
- color: ${colors.lightBlue};
- text-transform: uppercase;
- letter-spacing: 3px;
- line-height: 20px;
- }
-
- p, a {
- color: ${colors.lightBlue};
- font-size: 14px;
- font-weight: 300;
- line-height: 20px;
- }
-
- a {
- color: ${colors.blue1};
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.1rem;
-
- &:hover {
- color: ${colors.white};
- }
- }
-`;
+import { Hero, HeroPrimarySection, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
const FrontPageHero: React.FC = () => (
-
-
-
- Aalto-yliopiston Sähköinsinöörikilta
-
- on elektroniikan ja sähkötekniikan opiskelijoiden järjestö. Kilta
- kasaa yhteen yli 600 alansa huippua, jotka ovat avainasemassa
- vauhdilla sähköistyvän maailmamme kehityksessä.
-
-
+
+
+
+
{ }}>
Killan tehtävät ›
@@ -148,42 +20,31 @@ const FrontPageHero: React.FC = () => (
Vastapainoa opiskelulle ›
-
-
-
-
-
+
+
+
-
-
- Vasta-aloittanut opiskelija
-
- Fuksikasvatusta, ISO-toimintaa, lorem ipsum dolor sit ja amet.
-
-
- Fuksit ›
-
-
-
- Harkitsetko uraa alalla?
-
- Oletko abi, vaihtamassa uraa tai valmistumassa?
-
-
- Opinnot ja ura ›
-
-
-
- Yhteistyö yritysten kanssa
-
- Avoimet työpaikat ja excursiot. Infoa yritysten edustajille ja sponsseille.
-
-
- Yritysyhteistyö ›
-
-
-
-
+
+
);
export default FrontPageHero;
\ No newline at end of file
From a04aa09e24721eae4f6a03dc9c5fcf697836b6f9 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 03:23:52 +0300
Subject: [PATCH 16/28] HeroAside
---
src/components/NewHero/Hero.tsx | 18 +---------
.../{HeroAsideItem.tsx => HeroAside.tsx} | 33 +++++++++++++++++--
src/components/NewHero/index.tsx | 3 +-
src/views/ActualPage/ActualPageHero.tsx | 6 ++--
src/views/FrontPage/FrontPageHero.tsx | 6 ++--
5 files changed, 39 insertions(+), 27 deletions(-)
rename src/components/NewHero/{HeroAsideItem.tsx => HeroAside.tsx} (56%)
diff --git a/src/components/NewHero/Hero.tsx b/src/components/NewHero/Hero.tsx
index 3005326..1c91aba 100644
--- a/src/components/NewHero/Hero.tsx
+++ b/src/components/NewHero/Hero.tsx
@@ -9,34 +9,18 @@ const Container = styled.div`
position: relative;
padding: 0;
- min-height: 70vh;
+ min-height: 80vh;
section {
padding: 2rem 1rem;
}
- aside {
- padding: 0 2rem;
- }
-
& > div {
flex: 8;
}
- & > aside {
-
- flex: 4;
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
-
@media screen and (max-width: 800px) {
flex-direction: column;
-
- & > aside {
- margin: 48px auto;
- }
}
color: ${colors.white};
diff --git a/src/components/NewHero/HeroAsideItem.tsx b/src/components/NewHero/HeroAside.tsx
similarity index 56%
rename from src/components/NewHero/HeroAsideItem.tsx
rename to src/components/NewHero/HeroAside.tsx
index 821265c..903abfe 100644
--- a/src/components/NewHero/HeroAsideItem.tsx
+++ b/src/components/NewHero/HeroAside.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import { colors } from "@theme/colors";
+import { colors, Colors2 } from "@theme/colors";
import Anchor from "@components/Anchor";
interface HeroAsideItemProps {
@@ -41,7 +41,7 @@ const Article = styled.article`
}
`;
-const HeroAsideItem: React.FC = ({ header, text, link, linkText }) => (
+export const HeroAsideItem: React.FC = ({ header, text, link, linkText }) => (
{header}
{text && (
@@ -53,4 +53,31 @@ const HeroAsideItem: React.FC = ({ header, text, link, linkT
)
-export default HeroAsideItem;
+
+interface HeroAsideProps {
+ bgColor?: Colors2;
+}
+
+// TODO: Color combos
+const Aside = styled.aside`
+ flex: 4;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ padding: 0 2rem;
+
+ background: ${(p) => p.bgColor};
+ color: ${colors.darkBlue};
+
+ @media screen and (max-width: 800px) {
+ margin: 48px auto;
+ }
+`;
+
+const HeroAside: React.FC = ({ bgColor = "inherit", children}) => (
+
+)
+
+export default HeroAside;
diff --git a/src/components/NewHero/index.tsx b/src/components/NewHero/index.tsx
index 1856885..f380770 100644
--- a/src/components/NewHero/index.tsx
+++ b/src/components/NewHero/index.tsx
@@ -2,5 +2,6 @@ export { default as Hero } from "./Hero";
export { default as HeroPrimarySection } from "./HeroPrimarySection";
export { default as HeroSecondarySection } from "./HeroSecondarySection";
export { HeroSecondarySectionItem } from "./HeroSecondarySection";
-export { default as HeroAsideItem } from "./HeroAsideItem";
+export { default as HeroAside } from "./HeroAside";
+export { HeroAsideItem as HeroAsideItem } from "./HeroAside";
export { default as HeroPrimaryButtons } from "./HeroPrimaryButtons";
\ No newline at end of file
diff --git a/src/views/ActualPage/ActualPageHero.tsx b/src/views/ActualPage/ActualPageHero.tsx
index 9b64c8a..2f4dbb6 100644
--- a/src/views/ActualPage/ActualPageHero.tsx
+++ b/src/views/ActualPage/ActualPageHero.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Hero, HeroPrimarySection, HeroSecondarySection, HeroSecondarySectionItem, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
+import { Hero, HeroPrimarySection, HeroSecondarySection, HeroSecondarySectionItem, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
import Anchor from "@components/Anchor";
const ActualPageHero: React.FC = () => (
@@ -34,7 +34,7 @@ const ActualPageHero: React.FC = () => (
-
+
)
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index 5669cbf..aefacc9 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -1,6 +1,6 @@
import React from "react";
import Anchor from "@components/Anchor";
-import { Hero, HeroPrimarySection, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
const FrontPageHero: React.FC = () => (
@@ -24,7 +24,7 @@ const FrontPageHero: React.FC = () => (
-
+
(
link="/yritysyhteistyo"
linkText="Yritysyhteistyö ›"
/>
-
+
);
From df26bffa7482168ceacad22f57ead7c9460daef4 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 03:29:59 +0300
Subject: [PATCH 17/28] Few minor fixes
---
src/components/NewHero/Hero.tsx | 2 +-
src/components/NewHero/HeroAside.tsx | 3 +--
src/components/NewHero/HeroPrimarySection.tsx | 2 +-
src/views/ActualPage/ActualPageHero.tsx | 10 +++++-----
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/components/NewHero/Hero.tsx b/src/components/NewHero/Hero.tsx
index 1c91aba..dc1f386 100644
--- a/src/components/NewHero/Hero.tsx
+++ b/src/components/NewHero/Hero.tsx
@@ -12,7 +12,7 @@ const Container = styled.div`
min-height: 80vh;
section {
- padding: 2rem 1rem;
+ padding: 2rem 6rem;
}
& > div {
diff --git a/src/components/NewHero/HeroAside.tsx b/src/components/NewHero/HeroAside.tsx
index 903abfe..1ce3c31 100644
--- a/src/components/NewHero/HeroAside.tsx
+++ b/src/components/NewHero/HeroAside.tsx
@@ -11,7 +11,6 @@ interface HeroAsideItemProps {
}
const Article = styled.article`
- max-width: 300px;
line-height: 1rem;
margin-bottom: 1rem;
@@ -64,7 +63,7 @@ const Aside = styled.aside`
display: flex;
flex-direction: column;
justify-content: center;
- padding: 0 2rem;
+ padding: 0 6rem;
background: ${(p) => p.bgColor};
color: ${colors.darkBlue};
diff --git a/src/components/NewHero/HeroPrimarySection.tsx b/src/components/NewHero/HeroPrimarySection.tsx
index 6cf2162..4c57454 100644
--- a/src/components/NewHero/HeroPrimarySection.tsx
+++ b/src/components/NewHero/HeroPrimarySection.tsx
@@ -8,7 +8,7 @@ interface HeroPrimarySectionProps {
const Section = styled.section`
margin: 10vh auto 0;
- max-width: 600px;
+ max-width: 800px;
text-align: center;
line-height: 1.5rem;
diff --git a/src/views/ActualPage/ActualPageHero.tsx b/src/views/ActualPage/ActualPageHero.tsx
index 2f4dbb6..f9546db 100644
--- a/src/views/ActualPage/ActualPageHero.tsx
+++ b/src/views/ActualPage/ActualPageHero.tsx
@@ -41,27 +41,27 @@ const ActualPageHero: React.FC = () => (
+ linkText="Elektroniikkapaja ›">
+ linkText="Urheilu ›">
+ linkText="Kulttuuri ›">
+ linkText="Yritysyhteistyö ›">
+ linkText="Ulkoiset suhteet ›">
From 1c203a9b2c71a9a819d3075835b7288150506d9e Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 03:49:34 +0300
Subject: [PATCH 18/28] SponsorReel
---
src/components/Sections/FullWidthSection.tsx | 33 +++++++++++++++
src/components/SponsorReel/SponsorReel.scss | 35 ----------------
src/components/SponsorReel/SponsorReel.tsx | 27 ------------
src/components/SponsorReel/index.ts | 2 -
src/components/index.tsx | 1 -
src/views/FrontPage/FrontPageView.tsx | 44 ++++++++++++++++----
6 files changed, 68 insertions(+), 74 deletions(-)
create mode 100644 src/components/Sections/FullWidthSection.tsx
delete mode 100644 src/components/SponsorReel/SponsorReel.scss
delete mode 100644 src/components/SponsorReel/SponsorReel.tsx
delete mode 100644 src/components/SponsorReel/index.ts
diff --git a/src/components/Sections/FullWidthSection.tsx b/src/components/Sections/FullWidthSection.tsx
new file mode 100644
index 0000000..52fa4eb
--- /dev/null
+++ b/src/components/Sections/FullWidthSection.tsx
@@ -0,0 +1,33 @@
+import React from "react";
+import styled from "styled-components";
+import { PageSection } from "@components/index";
+
+const StyledSection = styled(PageSection)`
+ display: grid;
+ padding: 24px;
+
+ grid-template-columns: 1fr auto;
+ grid-template-areas:
+ "title"
+ "content";
+
+ * {
+ grid-area: content;
+ }
+
+ & > h1,
+ & > h2,
+ & > h3,
+ & > h4,
+ & > h5,
+ & > h6 {
+ text-align: center;
+ grid-area: title;
+ }
+`;
+
+const FullWidthSection: React.FC = (props) => (
+
+)
+
+export default FullWidthSection;
diff --git a/src/components/SponsorReel/SponsorReel.scss b/src/components/SponsorReel/SponsorReel.scss
deleted file mode 100644
index 6652cef..0000000
--- a/src/components/SponsorReel/SponsorReel.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.sponsor-reel {
- text-align: center;
-
- h3 {
- text-transform: uppercase;
- letter-spacing: 2px;
- font-weight: 500;
- color: color(dark-blue);
- margin: 1rem 0 4rem;
- font-size: 14px;
-
- @media screen and (max-width: 1200px - 1px) {
- font-size: 16px;
- }
- }
-
- a {
- color: color(blue1);
- text-decoration: underline;
- }
-
- &-logos {
- display: flex;
- flex-flow: row wrap;
- justify-content: center;
- margin-bottom: 3rem;
-
- img {
- margin: 0.5rem 0.5rem;
- }
- }
-}
diff --git a/src/components/SponsorReel/SponsorReel.tsx b/src/components/SponsorReel/SponsorReel.tsx
deleted file mode 100644
index 694cc3d..0000000
--- a/src/components/SponsorReel/SponsorReel.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from "react";
-import "./SponsorReel.scss";
-import TextAnchor from "../TextAnchor";
-import Anchor from "../Anchor";
-
-export interface SponsorReelProps { }
-export interface SponsorReelState { }
-
-class SponsorReel extends React.Component {
- render() {
- return (
-
-
Yhteistyössä
-
-
Haluatko kuulla lisää yhteistyöstä kanssamme?
-
- );
- }
-}
-
-export default SponsorReel;
diff --git a/src/components/SponsorReel/index.ts b/src/components/SponsorReel/index.ts
deleted file mode 100644
index 3a66715..0000000
--- a/src/components/SponsorReel/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import SponsorReel from "./SponsorReel";
-export default SponsorReel;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 809820f..882f3b7 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -1,7 +1,6 @@
export { default as Card } from "./Card";
export { default as PageLink } from "./PageLink";
export { default as Button } from "./Button";
-export { default as SponsorReel } from "./SponsorReel";
export { default as TextAnchor } from "./TextAnchor";
export { default as PageSection } from "./Sections/PageSection";
export { default as Divider } from "./Divider";
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 3430a68..ad4cad0 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,24 +1,39 @@
import React from "react";
import styled from "styled-components";
-import { PageSection, Card, PageLink, SponsorReel, Divider, CardSection, SossoSection } from "@components/index";
+import { Card, PageLink, Divider, CardSection, SossoSection } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
import { colors } from "@theme/colors";
import Anchor from "@components/Anchor";
+import FullWidthSection from "@components/Sections/FullWidthSection";
interface FrontPageViewProps {
events: Event[];
feed: Post[];
}
-const SponsorSection = styled(PageSection)`
- justify-content: center;
+const SponsorReel = styled.div`
+ text-align: center;
+ & > div {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: center;
+ margin-top: 1rem;
+ margin-bottom: 4rem;
+
+ & > * {
+ margin: 0 1rem;
+ }
+ }
- color: ${colors.black};
- background-color: ${colors.white};
a {
color: ${colors.blue1};
+ text-decoration: underline;
+
+ &:hover {
+ text-decoration: none;
+ }
}
`;
@@ -73,10 +88,21 @@ const FrontPageView: React.FC = ({ events, feed }) => (
-
-
-
-
+
+
+
+ Yhteistyössä:
+
+
+ Haluatko kuulla lisää yhteistyöstä kanssamme?
+
+
>
)
From 5168c9f71f1dd39d67a655c50fc62149ab03654f Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 05:04:39 +0300
Subject: [PATCH 19/28] Use new section components and Hero
---
src/components/{NewHero => Hero}/Hero.tsx | 0
.../{NewHero => Hero}/HeroAside.tsx | 2 +-
src/components/Hero/HeroAsideItem.tsx | 56 ---
src/components/Hero/HeroAsideSection.tsx | 53 ---
src/components/Hero/HeroMainSection.tsx | 51 ---
.../{NewHero => Hero}/HeroPrimaryButtons.tsx | 0
.../{NewHero => Hero}/HeroPrimarySection.tsx | 6 +-
.../HeroSecondarySection.tsx | 0
src/components/{NewHero => Hero}/index.tsx | 0
src/components/MainSection.tsx | 30 --
src/views/ActualPage/ActualPageHero.tsx | 2 +-
src/views/CorporatePage/CorporatePage.scss | 5 -
src/views/CorporatePage/CorporatePageHero.tsx | 30 ++
src/views/CorporatePage/CorporatePageView.tsx | 101 ++----
src/views/EventPage/EventPageView.tsx | 56 ++-
src/views/FreshmenPage/FreshmenPage.scss | 5 -
src/views/FreshmenPage/FreshmenPageHero.tsx | 34 ++
src/views/FreshmenPage/FreshmenPageView.tsx | 97 ++---
src/views/FrontPage/FrontPageHero.tsx | 2 +-
src/views/GuildPage/GuildPage.scss | 3 -
src/views/GuildPage/GuildPageHero.tsx | 41 +++
src/views/GuildPage/GuildPageView.tsx | 336 ++++++++----------
src/views/InEnglishPage/InEnglishPage.scss | 5 -
src/views/InEnglishPage/InEnglishPageHero.tsx | 36 ++
src/views/InEnglishPage/InEnglishPageView.tsx | 19 +-
src/views/SignUpPage/SignUpPage.scss | 61 ----
src/views/SignUpPage/SignUpPageView.tsx | 91 ++++-
src/views/StudiesPage/StudiesPage.scss | 5 -
src/views/StudiesPage/StudiesPageHero.tsx | 33 ++
src/views/StudiesPage/StudiesPageView.tsx | 99 ++----
30 files changed, 536 insertions(+), 723 deletions(-)
rename src/components/{NewHero => Hero}/Hero.tsx (100%)
rename src/components/{NewHero => Hero}/HeroAside.tsx (97%)
delete mode 100644 src/components/Hero/HeroAsideItem.tsx
delete mode 100644 src/components/Hero/HeroAsideSection.tsx
delete mode 100644 src/components/Hero/HeroMainSection.tsx
rename src/components/{NewHero => Hero}/HeroPrimaryButtons.tsx (100%)
rename src/components/{NewHero => Hero}/HeroPrimarySection.tsx (91%)
rename src/components/{NewHero => Hero}/HeroSecondarySection.tsx (100%)
rename src/components/{NewHero => Hero}/index.tsx (100%)
delete mode 100644 src/components/MainSection.tsx
delete mode 100644 src/views/CorporatePage/CorporatePage.scss
create mode 100644 src/views/CorporatePage/CorporatePageHero.tsx
delete mode 100644 src/views/FreshmenPage/FreshmenPage.scss
create mode 100644 src/views/FreshmenPage/FreshmenPageHero.tsx
delete mode 100644 src/views/GuildPage/GuildPage.scss
create mode 100644 src/views/GuildPage/GuildPageHero.tsx
delete mode 100644 src/views/InEnglishPage/InEnglishPage.scss
create mode 100644 src/views/InEnglishPage/InEnglishPageHero.tsx
delete mode 100644 src/views/SignUpPage/SignUpPage.scss
delete mode 100644 src/views/StudiesPage/StudiesPage.scss
create mode 100644 src/views/StudiesPage/StudiesPageHero.tsx
diff --git a/src/components/NewHero/Hero.tsx b/src/components/Hero/Hero.tsx
similarity index 100%
rename from src/components/NewHero/Hero.tsx
rename to src/components/Hero/Hero.tsx
diff --git a/src/components/NewHero/HeroAside.tsx b/src/components/Hero/HeroAside.tsx
similarity index 97%
rename from src/components/NewHero/HeroAside.tsx
rename to src/components/Hero/HeroAside.tsx
index 1ce3c31..74392c4 100644
--- a/src/components/NewHero/HeroAside.tsx
+++ b/src/components/Hero/HeroAside.tsx
@@ -74,7 +74,7 @@ const Aside = styled.aside`
`;
const HeroAside: React.FC = ({ bgColor = "inherit", children}) => (
-
+
)
diff --git a/src/components/Hero/HeroAsideItem.tsx b/src/components/Hero/HeroAsideItem.tsx
deleted file mode 100644
index 45189bb..0000000
--- a/src/components/Hero/HeroAsideItem.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import Anchor from "../Anchor";
-import { colors } from "@theme/colors";
-
-interface HeroAsideItemProps {
- title: string;
- linkText: string;
- linkHref: string;
-}
-
-const Section = styled.div`
- max-width: 300px;
- line-height: 16px;
- margin-bottom: 1rem;
-
- @media screen and (max-width: 600px - 1px) {
- p,
- a {
- font-size: 16px !important;
- line-height: 20px;
- }
- }
-
- h2 {
- text-transform: uppercase;
- letter-spacing: 3px;
- line-height: 20px;
- }
-
- p {
- font-size: 14px;
- line-height: 20px;
- }
-
- h6 {
- color: ${colors.blue1};
- font-weight: 600;
- }
-
- h6:hover {
- color: ${colors.white};
- }
-`;
-
-const HeroAsideItem: React.FC = ({ title, linkText, linkHref, children }) => (
-
- {title}
- {children}
-
- {linkText} ›
-
-
-)
-
-export default HeroAsideItem;
diff --git a/src/components/Hero/HeroAsideSection.tsx b/src/components/Hero/HeroAsideSection.tsx
deleted file mode 100644
index 1081bb6..0000000
--- a/src/components/Hero/HeroAsideSection.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import ColorDiv, { ColorDivProps } from "../ColorDiv/ColorDiv";
-import { colors } from "@theme/colors";
-
-const Section = styled(ColorDiv)`
- display: flex;
- flex-flow: column nowrap;
- align-items: flex-start;
- justify-content: center;
- flex: 4;
-
- @media screen and (max-width: 800px - 1px) {
- align-items: center;
- }
-
- text-align: left;
- padding: 3rem 1rem 2rem;
-
- &.dark-blue {
- background-color: ${colors.darkBlue};
-
- h2 {
- color: ${colors.lightBlue};
- }
-
- p {
- font-weight: 100;
- color: ${colors.white};
- }
- }
-
- &.light-turquoise {
- background-color: ${colors.lightTurquoise};
-
- h2,
- p {
- color: ${colors.darkBlue};
- }
- }
-
- &.light-blue {
- background-color: ${colors.lightBlue};
- }
-`;
-
-const HeroAsideSection: React.FC = (props) => {
- return (
-
- );
-}
-
-export default HeroAsideSection;
diff --git a/src/components/Hero/HeroMainSection.tsx b/src/components/Hero/HeroMainSection.tsx
deleted file mode 100644
index 2d413a3..0000000
--- a/src/components/Hero/HeroMainSection.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-
-const Container = styled.div`
- display: flex;
- flex-flow: column nowrap;
- align-items: center;
- margin-top: 15vh;
- flex: 6;
- text-align: center;
- font-weight: 100;
- line-height: 24px;
-
- & > div {
- padding: 2rem 1rem 2rem;
- }
-
- h1 {
- max-width: 600px;
- line-height: 40px;
-
- @media screen and (max-width: 500px) {
- font-size: 2rem;
- }
- }
-
- p {
- max-width: 400px;
- font-weight: 100;
- }
-
- .hero-button-container {
- display: flex;
- flex-direction: column;
- min-width: 20%;
-
- &-row {
- flex-direction: row;
- }
- }
-`;
-
-const HeroMainSection: React.FC = ({children}) => {
- return (
-
- {children}
-
- );
-}
-
-export default HeroMainSection;
diff --git a/src/components/NewHero/HeroPrimaryButtons.tsx b/src/components/Hero/HeroPrimaryButtons.tsx
similarity index 100%
rename from src/components/NewHero/HeroPrimaryButtons.tsx
rename to src/components/Hero/HeroPrimaryButtons.tsx
diff --git a/src/components/NewHero/HeroPrimarySection.tsx b/src/components/Hero/HeroPrimarySection.tsx
similarity index 91%
rename from src/components/NewHero/HeroPrimarySection.tsx
rename to src/components/Hero/HeroPrimarySection.tsx
index 4c57454..994e18c 100644
--- a/src/components/NewHero/HeroPrimarySection.tsx
+++ b/src/components/Hero/HeroPrimarySection.tsx
@@ -3,7 +3,7 @@ import styled from "styled-components";
interface HeroPrimarySectionProps {
header: string;
- text: string;
+ text?: string;
}
const Section = styled.section`
@@ -29,7 +29,9 @@ const Section = styled.section`
const HeroPrimarySection: React.FC = ({ header, text, children }) => (
{header}
- {text}
+ {text && (
+ {text}
+ )}
{children}
)
diff --git a/src/components/NewHero/HeroSecondarySection.tsx b/src/components/Hero/HeroSecondarySection.tsx
similarity index 100%
rename from src/components/NewHero/HeroSecondarySection.tsx
rename to src/components/Hero/HeroSecondarySection.tsx
diff --git a/src/components/NewHero/index.tsx b/src/components/Hero/index.tsx
similarity index 100%
rename from src/components/NewHero/index.tsx
rename to src/components/Hero/index.tsx
diff --git a/src/components/MainSection.tsx b/src/components/MainSection.tsx
deleted file mode 100644
index 729717a..0000000
--- a/src/components/MainSection.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import ColorDiv, { ColorDivProps } from "./ColorDiv/ColorDiv";
-import { colors } from "@theme/colors";
-
-const Section = styled(ColorDiv)`
- display: flex;
- flex: 2;
- flex-flow: column;
- padding: 0 3rem;
-
- & > h3 {
- margin: auto;
- }
-
- & > h6 {
- color: ${colors.orange1};
- }
-
- & > p {
- margin-block-start: 0.5rem;
- margin-block-end: 1rem;
- }
-`;
-
-const MainSection: React.FC = (props) => (
-
-);
-
-export default MainSection;
diff --git a/src/views/ActualPage/ActualPageHero.tsx b/src/views/ActualPage/ActualPageHero.tsx
index f9546db..3ab2334 100644
--- a/src/views/ActualPage/ActualPageHero.tsx
+++ b/src/views/ActualPage/ActualPageHero.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Hero, HeroPrimarySection, HeroSecondarySection, HeroSecondarySectionItem, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
+import { Hero, HeroPrimarySection, HeroSecondarySection, HeroSecondarySectionItem, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/Hero";
import Anchor from "@components/Anchor";
const ActualPageHero: React.FC = () => (
diff --git a/src/views/CorporatePage/CorporatePage.scss b/src/views/CorporatePage/CorporatePage.scss
deleted file mode 100644
index 84ee338..0000000
--- a/src/views/CorporatePage/CorporatePage.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.corporate-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-}
diff --git a/src/views/CorporatePage/CorporatePageHero.tsx b/src/views/CorporatePage/CorporatePageHero.tsx
new file mode 100644
index 0000000..9ece37f
--- /dev/null
+++ b/src/views/CorporatePage/CorporatePageHero.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem } from "@components/Hero";
+
+const CorporatePageHero: React.FC = () => (
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default CorporatePageHero;
diff --git a/src/views/CorporatePage/CorporatePageView.tsx b/src/views/CorporatePage/CorporatePageView.tsx
index 96739ce..2ea18d8 100644
--- a/src/views/CorporatePage/CorporatePageView.tsx
+++ b/src/views/CorporatePage/CorporatePageView.tsx
@@ -1,49 +1,30 @@
import React from "react";
-import "./CorporatePage.scss";
-import PageSection from "@components/PageSection";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection";
+import CorporatePageHero from "./CorporatePageHero";
import PageLink from "@components/PageLink";
-import { SossoSection } from "@components/index";
+import { SossoSection, TextSection } from "@components/index";
import Anchor from "@components/Anchor";
-
const CorporatePageView: React.FC = () => (
-
-
-
- Tee yhteistyötä tulevaisuuden huippuosaajien kanssa!
-
- Aalto-yliopiston Sähköinsinöörikilta on loistava ja hyvinvoiva opiskelijayhteisö, joka vie sähkötekniikan avulla maailmaa eteenpäin. Kilta pitää jäsenistään huolta ja työelämän taitojen oppiminen onkin yksi killan tärkeistä arvoista. Siksi myös yritysyhteistyö on killalle hyvin arvokasta. Kilta järjestää paljon yhteistyötapahtumia, joissa kiltalaiset pääsevät tutustumaan yhteistyöyrityksiin ja killan tärkeänä tehtävänä on jakaa esimerkiksi työpaikkailmoituksia jäsenistölle.
-
-
-
-
-
-
-
-
-
-
-
- Lyhyesti killasta ja sen toiminnasta
-
- Aalto-yliopiston Sähköinsinöörikillan jäsenistöstä valmistuvat maan parhaimmat matematiikkaa ja fysiikkaa soveltavat huippuosaajat. Killan tehtävänä on pitää jäsenistään huolta ja edistää aktiivisesti jäsenten ja toimijoiden jaksamista. Killassa opitaan myös tärkeitä työelämätaitoja ammattimaisen killan johtamisen kautta.
-
- Yhteistyömahdollisuudet
+ <>
+
+
+ Lyhyesti killasta ja sen toiminnasta
+ Aalto-yliopiston Sähköinsinöörikillan jäsenistöstä valmistuvat maan parhaimmat matematiikkaa ja fysiikkaa soveltavat huippuosaajat. Killan tehtävänä on pitää jäsenistään huolta ja edistää aktiivisesti jäsenten ja toimijoiden jaksamista. Killassa opitaan myös tärkeitä työelämätaitoja ammattimaisen killan johtamisen kautta.
+
+
+
+ Excursiosäännöt
+
+
+ Liity jäseneksi
+
+
+
+
+
+ Yhteistyömahdollisuudet
+
Yhteistyömahdollisuuksista voi tiedustella lisää killan yrityssuhdemestarilta.
Yritysbrunssi
@@ -63,40 +44,34 @@ const CorporatePageView: React.FC = () => (
Sössö
Sössö on Sähköinsinöörikillan hauska ja rakas opiskelijalehti. Sössö on kerännyt suosiota ja kartuttanut lukijamäärää jo vuodesta 1969 asti. Sössö ilmestyy perinteisesti paperisena, mutta myös Netti-Sössössä julkaistaan jatkuvasti uusia artikkeleja. Sössö tavoittaa noin tuhat elektroniikan, sähkötekniikan ja tietoliikennetekniikan opiskelijaa sekä koko tiedekunnan henkilökunnan. Lisäksi lehti lähetetään muille opiskelijajärjestöille. Yritysten on mahdollista saada mainostilaa Sössön sivuilta.
+
- Olethan yhteydessä!
+
+
+
+ Olethan yhteydessä!
+
Yllämainituista mahdollisuuksista, sekä muista ideoista kiinnostuneena, voit olla yhteydessä Yrityssuhdemestariimme Jarnoon.
Yrityssuhdemestari
Jarno Mustonen 050 123 4567 Jarno.mustonen (ät) aalto.fi
-
-
-
-
- Excursiosäännöt
-
-
- Liity jäseneksi
-
-
-
-
+
+
+
Mainos Sössöön?
Killan lehden mediakortin löydät täältä›
-
-
-
- Työpaikkailmoitukset
- TODO: Miten listataan yritykset?
- {/* TODO: Fix links */}
+
+
+ Työpaikkailmoitukset
+
Voit saada yrityksesi työpaikkailmoituksen listalle lähettämällä sen osoitteeseen sik-yritys@list.ayy.fi
-
-
-
-
+
+
+
+ >
);
export default CorporatePageView;
diff --git a/src/views/EventPage/EventPageView.tsx b/src/views/EventPage/EventPageView.tsx
index cf6f558..4f3640f 100644
--- a/src/views/EventPage/EventPageView.tsx
+++ b/src/views/EventPage/EventPageView.tsx
@@ -5,14 +5,12 @@ import { colors } from "@theme/colors";
import { Event } from "@models/Event";
import Button from "@components/Button";
import Anchor from "@components/Anchor";
-import PageSection from "@components/PageSection";
-import MainSection from "@components/MainSection";
interface EventPageViewProps {
event?: Event;
}
-const StyledSection = styled(MainSection)`
+const StyledSection = styled.section`
margin: auto;
max-width: 1000px;
align-items: center;
@@ -76,33 +74,31 @@ const Content = styled.div`
const EventPageView: React.FC = ({ event }) => {
if (!event) return Loading
return (
-
-
-
- {event.title_fi}
-
-
- {event.description_fi}
-
-
-
-
-
-
-
- {/* We may have multiple signup forms. Generate own Button for each one */}
-
- {event.signupForm.map(sf => (
-
- {}}>
- {sf.title_fi}
-
-
- )
- )}
-
-
-
+
+
+ {event.title_fi}
+
+
+ {event.description_fi}
+
+
+
+
+
+
+
+ {/* We may have multiple signup forms. Generate own Button for each one */}
+
+ {event.signupForm.map(sf => (
+
+ {}}>
+ {sf.title_fi}
+
+
+ )
+ )}
+
+
);
}
export default EventPageView;
diff --git a/src/views/FreshmenPage/FreshmenPage.scss b/src/views/FreshmenPage/FreshmenPage.scss
deleted file mode 100644
index b189a40..0000000
--- a/src/views/FreshmenPage/FreshmenPage.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.freshmen-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-}
diff --git a/src/views/FreshmenPage/FreshmenPageHero.tsx b/src/views/FreshmenPage/FreshmenPageHero.tsx
new file mode 100644
index 0000000..902a666
--- /dev/null
+++ b/src/views/FreshmenPage/FreshmenPageHero.tsx
@@ -0,0 +1,34 @@
+import React from "react";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem } from "@components/Hero";
+
+const FreshmenPageHero: React.FC = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default FreshmenPageHero;
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index 6ac65fb..08cc97a 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -1,60 +1,23 @@
import React from "react";
import styled from "styled-components";
-import "./FreshmenPage.scss";
-import PageSection from "@components/PageSection";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
-import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection";
+import FreshmenPageHero from "./FreshmenPageHero";
import PageLink from "@components/PageLink";
-import TextAnchor from "@components/TextAnchor";
import InfoBox from "@components/InfoBox";
import Anchor from "@components/Anchor";
-import { SossoSection } from "@components/index";
+import { SossoSection, TextSection } from "@components/index";
const KippariImage = styled.img`
-max-width:100%;
-
+ max-width:100%;
`
const FreshmenPageView: React.FC = () => (
-
-
-
- Tervetuloa opiskelemaan Otaniemeen!
-
- Me olemme Emmaleena ja Jonna, sinun Fuksikapteenisi. Päätehtävämme on huolehtia fuksivuodestasi Aalto-yliopiston Sähköinsinöörikillassa.
-
- Tämä on fuksien oma etusivu ja olemmekin keränneet tänne kaikki tärkeimmät tiedot, joita fuksivuotenasi tarvitset. Tietysti kannattaa katsoa myös yleisiä sivuja, sillä tänne ei mahdu kaikki, mitä killassa tapahtuu.
-
-
-
-
-
-
-
-
-
-
-
-
- Onnittelut hyvästä opiskeluvalinnasta
-
+ <>
+
+
+ Onnittelut hyvästä opiskeluvalinnasta
+
Olet tehnyt upean valinnan ottamalla askeleen matkalla, jossa sinusta ensin kehkeytyy teekkari ja myöhemmin diplomi-insinööri. Sinusta on juuri tullut tekniikan ylioppilas ja fuksi. Hieno saavutus, jota tietysti on syytä juhlia, ja tähän juhlaan paras sijainti on ehdottomasti Otaniemi. Tervetuloa!
-
Ensi askeleina suosittelen, että liityt teille fukseille tehdyille Telegram-kanaville. Tästä pääset tiedotuskanavalle ja tästä tutustumaan fuksikavereihin ja ISOihisi.
+
Ensi askeleina suosittelen, että liityt teille fukseille tehdyille Telegram-kanaville. Tästä pääset tiedotuskanavalle ja tästä tutustumaan fuksikavereihin ja ISOihisi.
Matka nimeltä Teekkarius
Teekkarin matka on jokaiselle oman näköisensä. Kilta, ylioppilaskunta ja Otaniemen muut järjestöt tarjoavat varmasti jokaiselle omanlaista tekemistä ja harrastusta. Olet nyt osa Aalto-yliopiston Sähköinsinöörikiltaa ja me tulemme tukemaan sinua teekkariuden matkalla, jotta löydät juuri sinulle sopivat paikat, joissa vaikuttaa ja harrastaa. Jotta tämä onnistuisi, olemme esimerkiksi sijoittaneet sinut fuksiryhmään, johon tulet Orientaatioviikolla tutustumaan ja josta saat oman tukiryhmän uusiin seikkailuihin. Fuksiryhmääsi kuuluu myös muutama ISO. Heistä löydät lisää tietoa alempaa.
@@ -71,35 +34,29 @@ const FreshmenPageView: React.FC = () => (
Jonna
0504327695 jonna.tammikivi (ät) aalto.fi
-
-
-
+
+
- Fuksikipparit tavoitat
+ Fuksikipparit tavoitat
- Liity jäseneksi
+ Liity jäseneksi
- Fuksipisteohje
+ Fuksipisteohje
Telegram?
-
- Telegram on pikaviestinpalvelu, jota käytetään otaniemessä paljon. Hieman samanlainen kuin Whatsapp, mutta ominaisuuksiltaan paremmaksi todettu. Lisätietoja: https://telegram.org/faq
-
-
- SIK:n fukseilla on oma Telegram-ryhmä, jonne pääset liitymään tästä.
-
-
+ Telegram on pikaviestinpalvelu, jota käytetään otaniemessä paljon. Hieman samanlainen kuin Whatsapp, mutta ominaisuuksiltaan paremmaksi todettu. Lisätietoja: https://telegram.org/faq
+ SIK:n fukseilla on oma Telegram-ryhmä, jonne pääset liitymään tästä.
-
-
+
+
Killassa tapahtuu kaikenlaista!
@@ -107,22 +64,16 @@ const FreshmenPageView: React.FC = () => (
-
-
-
- Isoryhmät
+
+ Isoryhmät
+
SIK:n fuksit nauttivat hurmaavien ISOhenkilöidensä opastuksesta ja hellästä huolenpidosta somissa ja omissa fuksiryhmissään.
-
ISOt ovat hiukan vanhempia opiskelijoita ja kiltalaisia, joiden tehtävänä on olla tukenasi fuksivuoden ajan. Ensimmäisenä päivänä teidät jaetaan noin kymmenen hengen fuksiryhmiin ja jokaiseen ryhmään kuuluu kolmesta viiteen ISOa, joista yksi toimii opintoISOna. ISOilta voit kysyä mitä vain opiskeluun ja opiskelijaelämään liittyen. Vaikka he eivät tietäisi vastausta, he luultavimmin osaavat auttaa sinua vastausten löytämisessä.
-
Kuten sanottu ISOt tukevat sinua koko fuksivuoden ajan, mutta eniten tulet näkemään heitä Orientaatioviikolla, jolloin he kulkevat fuksiryhmäsi kanssa ympäri Otaniemeä ja avaavat ovia teekkariuden saloihin. He auttavat sinua myös löytämään opintojen aloittamiseen tarvittavat asiat ja tukevat esimerkiksi lukujärjestyksen tekemisessä ja kirjastokortin, sekä matkakortin ja opiskelijakortin hankkimisessa.
-
ISOT ovat myös kutsuttuna fuksivuotesi ensimmäiseen tapahtumaan, eli Varaslähtöön. Tule tutustumaan heihin sinne!
-
-
-
-
-
+
+
+ >
);
export default FreshmenPageView;
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index aefacc9..59fbb23 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -1,6 +1,6 @@
import React from "react";
import Anchor from "@components/Anchor";
-import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/NewHero";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem, HeroPrimaryButtons } from "@components/Hero";
const FrontPageHero: React.FC = () => (
diff --git a/src/views/GuildPage/GuildPage.scss b/src/views/GuildPage/GuildPage.scss
deleted file mode 100644
index ca644f9..0000000
--- a/src/views/GuildPage/GuildPage.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.guild-page {
- width: inherit;
-}
diff --git a/src/views/GuildPage/GuildPageHero.tsx b/src/views/GuildPage/GuildPageHero.tsx
new file mode 100644
index 0000000..79ed8a4
--- /dev/null
+++ b/src/views/GuildPage/GuildPageHero.tsx
@@ -0,0 +1,41 @@
+import React from "react";
+import Anchor from "@components/Anchor";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem } from "@components/Hero";
+
+const GuildPageHero: React.FC = () => (
+
+
+
+ Vapaa-ajan jäsenpalvelujen lisäksi killan tehtävänä on edistää jäsentensä opintoja , tarjota uraohjausta ja fuksikasvatusta . Jokaiselle jäsenelle löytyy varmasti jotakin—kaukomaita, opiskelijalehti Sössöä , ja kiltaaktiivina pääset kartuttamaan kokemusta, josta on hyötyä myös työelämässä.
+ Arvot estrumquias doluptatur aut quam fugiti cus debit landisciis eatemperes eumquibus di blat que sim etus idis dolut labor ad magnat.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default GuildPageHero;
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index fb0dc9a..148c555 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -1,225 +1,169 @@
import React from "react";
-import "./GuildPage.scss";
-import PageSection from "@components/PageSection";
-import MainSection from "@components/MainSection";
import AsideSection from "@components/AsideSection";
import PageLink from "@components/PageLink";
-import HeroMainSection from "@components/Hero/HeroMainSection";
-import HeroAsideSection from "@components/Hero/HeroAsideSection";
-import HeroAsideItem from "@components/Hero/HeroAsideItem";
import InfoBox from "@components/InfoBox";
import Accordion from "@components/Accordion";
import TextAnchor from "@components/TextAnchor";
import Anchor from "@components/Anchor";
-import { SossoSection } from "@components/index";
+import { SossoSection, TextSection } from "@components/index";
+import GuildPageHero from "./GuildPageHero";
const GuildPageView: React.FC = () => (
-
-
-
-
- Kilta koostuu sähkötekniikan ja elektroniikan (ELEC) tutkinto-ohjelmissa opiskelevista opiskelijoista
- Vapaa-ajan jäsenpalvelujen lisäksi killan tehtävänä on edistää jäsentensä opintoja , tarjota uraohjausta ja fuksikasvatusta . Jokaiselle jäsenelle löytyy varmasti jotakin—kaukomaita, opiskelijalehti Sössöä , ja kiltaaktiivina pääset kartuttamaan kokemusta, josta on hyötyä myös työelämässä.
- Arvot estrumquias doluptatur aut quam fugiti cus debit landisciis eatemperes eumquibus di blat que sim etus idis dolut labor ad magnat.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Killan tehtävät ja tarina
- Kilta tukee jäsentensä hyvinvointia ja tarjoaa vastapainoa opiskelulle. Kilta järjestää esimerkiksi urheilutapahtumia, kulttuurielämyksiä ja näiden lisäksi sitsejä ja saunailtoja. Valinnanvaraa on, joten tapahtumakalenterin aktiivisella seuraamisella saattaa olla hyvinkin miellyttäviä seuraamuksia. Voit myös itse järjestää mieleisesi tapahtuman killan tukemana, tai ehdottaa sitä killan toimitsijoille.
+ <>
+
- Yhteistyössä korkeakoulun kanssa, kilta kehittää opetusta . Kilta on mukana kurssien kehittämisessä, valvoo kiltalaisten etua korkeakoulussa ja tuo korkeakoulun henkilöstöä lähemmäs kiltalaisia. Kilta avaa oven yritysmaailmaan järjestämällä yritysten kanssa excursioita, saunailtoja ja yritystapahtumia. Lisäksi killan kautta kuulee ensimmäisten joukossa uusista avoimista työpaikoista. Killalla on Otaniemen mukavin kiltahuone , jossa voi käydä hengähtämässä luentojen välillä, hakea apua vaikeisiin tehtäviin tai järjestää vaikka leffailtoja. Tämän lisäksi killalla on myös haastavampaan elektroniikkaharrasteluun sopivat tilat.
+
+ Killan tehtävät ja tarina
+
+
Kilta tukee jäsentensä hyvinvointia ja tarjoaa vastapainoa opiskelulle. Kilta järjestää esimerkiksi urheilutapahtumia, kulttuurielämyksiä ja näiden lisäksi sitsejä ja saunailtoja. Valinnanvaraa on, joten tapahtumakalenterin aktiivisella seuraamisella saattaa olla hyvinkin miellyttäviä seuraamuksia. Voit myös itse järjestää mieleisesi tapahtuman killan tukemana, tai ehdottaa sitä killan toimitsijoille.
-
Takana lähes satavuotinen historia
+
Yhteistyössä korkeakoulun kanssa, kilta kehittää opetusta . Kilta on mukana kurssien kehittämisessä, valvoo kiltalaisten etua korkeakoulussa ja tuo korkeakoulun henkilöstöä lähemmäs kiltalaisia. Kilta avaa oven yritysmaailmaan järjestämällä yritysten kanssa excursioita, saunailtoja ja yritystapahtumia. Lisäksi killan kautta kuulee ensimmäisten joukossa uusista avoimista työpaikoista. Killalla on Otaniemen mukavin kiltahuone , jossa voi käydä hengähtämässä luentojen välillä, hakea apua vaikeisiin tehtäviin tai järjestää vaikka leffailtoja. Tämän lisäksi killalla on myös haastavampaan elektroniikkaharrasteluun sopivat tilat.
-
Vaikka kilta onkin ajan hermolla, on sillä takana lähes satavuotinen historia.
- Sähköinsinööriklubin tuore puheenjohtaja lausahti klubin ensimmäisessä
- varsinaisessa kokouksessa 16. helmikuuta 1921: “Koska klubi nyt ensi kerran
- kokoontuu, niin pyydän lausua toivomuksena, että klubin jäsenillä aina tulisi
- olemaan hauskaa, että toverielämä kukoistaisi ja että myös sähkötekniikkaa
- klubissa harrastettaisiin.”.
+
Takana lähes satavuotinen historia
-
Vaikka ajat ovat muuttuneet, klubi on muuttunut killaksi ja jäsenmäärä kasvanut
- alkuajoista valtavasti, ohjaavat nämä kolme asiaa edelleen killan toimintaa. Vaikka
- pitkästä historiasta kannattaa olla ylpeä, ei sitä tarvitse kokea taakkana. Uutta
- historiaa luodaan koko ajan ja tässä on meillä kaikilla mahdollista olla mukana. Ole
- aktiivinen, ota asioista selvää ja osallistu kaikkeen mahdolliseen. Tulet varmasti
- yllättymään kaikesta siitä mitä täältä keskuudestamme löytyy.
+
Vaikka kilta onkin ajan hermolla, on sillä takana lähes satavuotinen historia.
+ Sähköinsinööriklubin tuore puheenjohtaja lausahti klubin ensimmäisessä
+ varsinaisessa kokouksessa 16. helmikuuta 1921: “Koska klubi nyt ensi kerran
+ kokoontuu, niin pyydän lausua toivomuksena, että klubin jäsenillä aina tulisi
+ olemaan hauskaa, että toverielämä kukoistaisi ja että myös sähkötekniikkaa
+ klubissa harrastettaisiin.”.
-
Meitä teekkareita on todella moneen lähtöön
+
Vaikka ajat ovat muuttuneet, klubi on muuttunut killaksi ja jäsenmäärä kasvanut
+ alkuajoista valtavasti, ohjaavat nämä kolme asiaa edelleen killan toimintaa. Vaikka
+ pitkästä historiasta kannattaa olla ylpeä, ei sitä tarvitse kokea taakkana. Uutta
+ historiaa luodaan koko ajan ja tässä on meillä kaikilla mahdollista olla mukana. Ole
+ aktiivinen, ota asioista selvää ja osallistu kaikkeen mahdolliseen. Tulet varmasti
+ yllättymään kaikesta siitä mitä täältä keskuudestamme löytyy.
-
Minkäänlaista perus- tai ihanneteekkaria ei ole olemassa, vaan paras teekkariuden
- määritelmä kuuluukin: “teekkarius on kaikkea sitä, mitä teekkarit tekevät”. Yksi asia
- meitä kaikkia kuitenkin yhdistää. Opiskelemme jotain tekniikkaan liittyvää täällä
- Aalto-yliopistossa.
- Teekkariutta on vaikkapa toimiminen killoissa tai jossain AYY:n lukuisista
- yhdistyksistä . Teekkariutta on yhtä lailla SIK:n tapahtumien järjestäminen tai niihin osallistuminen kuin vaikkapa laulaminen Polyteknikkojen Kuorossa tai sukeltaminen Polyteknikkojen sukelluskerho Kuplassa. Kaikille varmasti löytyy jotain itseä kiinnostavaa.
+
Meitä teekkareita on todella moneen lähtöön
-
Teekkareilla, varsinkin otaniemeläisillä, on pitkä ja vahva historia. Siihen kannattaa
- tutustua, jotta saa jonkinlaisen kuvan siitä vahvasta teekkarihengestä, joka
- meillä täällä opinahjossamme vallitsee ja on vallinnut koko sen historian ajan.
- Teekkariuteen kuuluu olennaisena osana mukautuminen ajan vaatimuksiin. Jos asiat
- tehtäisiin aina vanhaa toistaen, ei voitaisi enää edes puhua teekkariudesta.
-
-
-
-
- Yliopiston jäsenedut
-
-
- Liity jäseneksi
-
-
-
-
- Herrasmies- tai herrasnaisuus kuuluu olennaisena osana teekkariuteen. Hyvät käytöstavat on syytä aina pitää mielessä, liikuttiin sitten puku päällä excuilla tai sitseillä tai haalarit päällä Tukholman illassa.
-
-
-
-
-
- Killan hallinto koostuu XXX henkilöstä.
-
-
-
-
- Organisaatio
+ Minkäänlaista perus- tai ihanneteekkaria ei ole olemassa, vaan paras teekkariuden
+ määritelmä kuuluukin: “teekkarius on kaikkea sitä, mitä teekkarit tekevät”. Yksi asia
+ meitä kaikkia kuitenkin yhdistää. Opiskelemme jotain tekniikkaan liittyvää täällä
+ Aalto-yliopistossa.
+ Teekkariutta on vaikkapa toimiminen killoissa tai jossain AYY:n lukuisista
+ yhdistyksistä . Teekkariutta on yhtä lailla SIK:n tapahtumien järjestäminen tai niihin osallistuminen kuin vaikkapa laulaminen Polyteknikkojen Kuorossa tai sukeltaminen Polyteknikkojen sukelluskerho Kuplassa. Kaikille varmasti löytyy jotain itseä kiinnostavaa.
- Sähköinsinöörikillassa toimeenpanovaltaa käyttää 3–13 kiltalaisen muodostama hallitus apunaan lukuisa määrä toimihenkilöitä. Hallituksen ja toimihenkilöt valitsee killan valtuusto , joka myös valvoo näiden toimintaa. Käytännössä valtuusto valitsee vaalikokouksessaan ensin uuden puheenjohtajan ja jää 1–2 viikon mittaiselle kokoustauolle. Tauon jälkeen puheenjohtaja esittelee valtuustolle ehdotuksensa hallitukseksi ja toimihenkilöiksi, ja valtuusto joko hyväksyy tai hylkää ehdotuksen noin tunnin kestävän kysely- ja esittelytuokion jälkeen. Hallituksen kuulumiset lorem.
-
- Valtuuston toimintaa
-
- Killan valtuusto valitaan marraskuussa pidettävillä vaaleilla yhdeksi vuodeksi kerrallaan. Vaaleissa ovat vaalikelpoisia ja äänioikeutettuja kaikki SIK:n varsinaiset jäsenet. Uuden valtuuston toiminta alkaa varsin pian valitsemisen jälkeen vaalikokouksessa, jossa todetaan uusi kokoonpano, valitaan puhemiehistö, killan hallituksen puheenjohtaja ja muut hallituksen jäsenet, toimihenkilöt, toimikuntien puheenjohtajat sekä tilintarkastajat. Toinen sääntömääräinen valtuuston kokous on helmikuinen vuosikokous, jossa käsitellään mm. edellisen vuoden toimintakertomus ja tilinpäätös, sekä kuluvan vuoden toimintasuunnitelma ja budjetti. Lisäksi valtuusto pitää tarpeelliseksi katsomanssa määrän kokouksia pitkin vuotta. Pöytäkirjat ja muut dokumentit lorem ipsum.
-
- Hallituksen toimintaa
- Jokaisella hallituksen jäsenellä on oma vastuualueensa, jota hän hoitaa yhdessä mahdollisen toimikuntansa kanssa. Puheenjohtajan tehtävä on pitää langat käsissään, ja olla perillä kaikesta, mitä killassa tapahtuu. Hallitus tekee päätökset ja sopii menettelytavat viikottaisessa kokouksessaan. Hallitus on vastuussa kaikesta killan näkyvästä ja näkymättömästä toiminnasta, ja se on myös oikea osoite, jos joku asia vaivaa mieltä, tai mielessä on parannusehdotus mihin tahansa asiaan.
-
-
-
-
-
- Vuoden 2019 hallinto
-
-
- Dolor sit amet
-
-
-
-
-
-
- Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
-
-
-
- Miksi alkaa kilta-aktiiviksi?
-
- Näitä töitä tehdessä saa väkisinkin paljon uusia kavereita ja oppii monia palkallisessa työelämässä tarpeellisia taitoja. Eikä laajasta tuttavapiiristä ja monista kontakteista varmasti haittaa ole tulevaa työuraakaan ajatellen. Rahallista tai materiaalista hyötyä kiltatoiminnasta ei saa, eikä kukaan killan toimintaan mukaan tuleva sitä pyrikään tavoittelemaan. Mikä tärkeintä, kiltatoiminta on kivaa!
-
-
- » Uusia ystäviä, samanhenkistä seuraa
-
-
- » Loistava mahdollisuus kokeilla omia kykyjään
-
-
- » Voit kokeilla ja oppia jotain sellaista, mitä et ikinä aikaisemmin ole tehnyt
-
-
-
- Runsaasti erilaisia tehtäviä
-
- Killassa on todella monenlaisia tehtäviä. Olitpa koodaaja, urheilija tai ammattimainen juhlija, killasta löytyy tekemistä juuri sinulle. Toimikunnissa sitoudut toimintaan vuodeksi kerrallaan. Jaostoiminta mahdollistaa kiltatoiminnan kokeilun pienemmässä mittakaavassa. Tehtäväkuvaukset lorem ipsum dolor sit amet alla. Jos ei löydy sopivaa lorem ipsum dolor sit amet, voit perustaa myös oman.
-
-
- » Haluatko valtuustoon , hallitukseen tai toimariksi ?
-
-
- » Toimihenkilönä pääset edistämään opintoja
-
-
- » Lorem ipsum
-
-
+
Teekkareilla, varsinkin otaniemeläisillä, on pitkä ja vahva historia. Siihen kannattaa
+ tutustua, jotta saa jonkinlaisen kuvan siitä vahvasta teekkarihengestä, joka
+ meillä täällä opinahjossamme vallitsee ja on vallinnut koko sen historian ajan.
+ Teekkariuteen kuuluu olennaisena osana mukautuminen ajan vaatimuksiin. Jos asiat
+ tehtäisiin aina vanhaa toistaen, ei voitaisi enää edes puhua teekkariudesta.
-
-
-
-
Sähkötekniikan korkeakoulun toimikunnat
-
+
+
+
+ Yliopiston jäsenedut
+
+
+ Liity jäseneksi
+
+
+
+
+ Herrasmies- tai herrasnaisuus kuuluu olennaisena osana teekkariuteen. Hyvät käytöstavat on syytä aina pitää mielessä, liikuttiin sitten puku päällä excuilla tai sitseillä tai haalarit päällä Tukholman illassa.
+
+
+
+
+
+
+ Killan hallinto koostuu XXX henkilöstä.
+
+
+
+ Organisaatio
+
+
Sähköinsinöörikillassa toimeenpanovaltaa käyttää 3–13 kiltalaisen muodostama hallitus apunaan lukuisa määrä toimihenkilöitä. Hallituksen ja toimihenkilöt valitsee killan valtuusto , joka myös valvoo näiden toimintaa. Käytännössä valtuusto valitsee vaalikokouksessaan ensin uuden puheenjohtajan ja jää 1–2 viikon mittaiselle kokoustauolle. Tauon jälkeen puheenjohtaja esittelee valtuustolle ehdotuksensa hallitukseksi ja toimihenkilöiksi, ja valtuusto joko hyväksyy tai hylkää ehdotuksen noin tunnin kestävän kysely- ja esittelytuokion jälkeen. Hallituksen kuulumiset lorem.
+
+
Valtuuston toimintaa
+
+
Killan valtuusto valitaan marraskuussa pidettävillä vaaleilla yhdeksi vuodeksi kerrallaan. Vaaleissa ovat vaalikelpoisia ja äänioikeutettuja kaikki SIK:n varsinaiset jäsenet. Uuden valtuuston toiminta alkaa varsin pian valitsemisen jälkeen vaalikokouksessa, jossa todetaan uusi kokoonpano, valitaan puhemiehistö, killan hallituksen puheenjohtaja ja muut hallituksen jäsenet, toimihenkilöt, toimikuntien puheenjohtajat sekä tilintarkastajat. Toinen sääntömääräinen valtuuston kokous on helmikuinen vuosikokous, jossa käsitellään mm. edellisen vuoden toimintakertomus ja tilinpäätös, sekä kuluvan vuoden toimintasuunnitelma ja budjetti. Lisäksi valtuusto pitää tarpeelliseksi katsomanssa määrän kokouksia pitkin vuotta. Pöytäkirjat ja muut dokumentit lorem ipsum.
+
+
Hallituksen toimintaa
+
Jokaisella hallituksen jäsenellä on oma vastuualueensa, jota hän hoitaa yhdessä mahdollisen toimikuntansa kanssa. Puheenjohtajan tehtävä on pitää langat käsissään, ja olla perillä kaikesta, mitä killassa tapahtuu. Hallitus tekee päätökset ja sopii menettelytavat viikottaisessa kokouksessaan. Hallitus on vastuussa kaikesta killan näkyvästä ja näkymättömästä toiminnasta, ja se on myös oikea osoite, jos joku asia vaivaa mieltä, tai mielessä on parannusehdotus mihin tahansa asiaan.
+
+
+
+
+
Vuoden 2019 hallinto
+
Dolor sit amet
+
+
+
+
+
+
+ Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+
+
+
+
+ Miksi alkaa kilta-aktiiviksi?
+ Näitä töitä tehdessä saa väkisinkin paljon uusia kavereita ja oppii monia palkallisessa työelämässä tarpeellisia taitoja. Eikä laajasta tuttavapiiristä ja monista kontakteista varmasti haittaa ole tulevaa työuraakaan ajatellen. Rahallista tai materiaalista hyötyä kiltatoiminnasta ei saa, eikä kukaan killan toimintaan mukaan tuleva sitä pyrikään tavoittelemaan. Mikä tärkeintä, kiltatoiminta on kivaa!
+ » Uusia ystäviä, samanhenkistä seuraa
+ » Loistava mahdollisuus kokeilla omia kykyjään
+ » Voit kokeilla ja oppia jotain sellaista, mitä et ikinä aikaisemmin ole tehnyt
+
+
+
+ Runsaasti erilaisia tehtäviä
+ Killassa on todella monenlaisia tehtäviä. Olitpa koodaaja, urheilija tai ammattimainen juhlija, killasta löytyy tekemistä juuri sinulle. Toimikunnissa sitoudut toimintaan vuodeksi kerrallaan. Jaostoiminta mahdollistaa kiltatoiminnan kokeilun pienemmässä mittakaavassa. Tehtäväkuvaukset lorem ipsum dolor sit amet alla. Jos ei löydy sopivaa lorem ipsum dolor sit amet, voit perustaa myös oman.
+ » Haluatko valtuustoon , hallitukseen tai toimariksi ?
+ » Toimihenkilönä pääset edistämään opintoja
+ » Lorem ipsum
+
+
+
+
+
+
Sähkötekniikan korkeakoulun toimikunnat
+
Ylioppilaskunnalla on edustus suuressa osassa Aalto-yliopiston tiedekuntia. Elektroniikan, tietoliikenteen ja automaation tiedekunnan toimikuntiin eli hallopedeihin opiskelijavalinna EST- ja TLT-tutkinto-ohjelmien osalta tehdään osin ylioppilaskunnan edustajistossa Sähköinsinöörikillan esityksestä ja osin Sähköinsinöörikillassa.
-
-
-
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed rhoncus feugiat ante. Nam eget venenatis dui. Morbi purus dui, cursus at velit id, placerat scelerisque turpis. Nulla a mauris odio. Nulla at tempor mi. Maecenas et sapien eu lorem interdum luctus. Proin interdum, tortor eget tempor tristique, massa arcu suscipit ipsum, sit amet lacinia erat lorem sit amet ipsum. Praesent dictum odio auctor odio sodales pharetra. Quisque accumsan iaculis diam, a laoreet odio aliquet eu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In hac habitasse platea dictumst. Pellentesque at hendrerit mi. Morbi at lacus finibus, pharetra urna sed, molestie tellus. Duis fermentum sodales leo. Nullam varius, massa in convallis sagittis, mi felis lacinia ipsum, viverra rhoncus nibh ipsum vel mi. Pellentesque ornare hendrerit malesuada.
Suspendisse porta diam in massa suscipit congue. Nulla facilisi. Nulla egestas tempus arcu, vitae ultrices risus rhoncus ac. Ut porta orci neque, vel fermentum turpis fermentum in. Curabitur condimentum, mi in tristique pulvinar, mauris nibh bibendum neque, quis tincidunt purus eros quis dolor. Aliquam imperdiet nibh ac quam iaculis, at ullamcorper diam ultricies. Vestibulum egestas consequat justo non vehicula. Nam non egestas tellus.
Praesent vel auctor ligula. Phasellus faucibus vulputate erat, non fringilla sem ultrices non. In vitae elit sit amet nisl interdum ultrices nec in ligula. Ut et turpis risus. Sed mattis varius nisl, in euismod diam fringilla ac. Nunc sed eros augue. Donec sit amet quam ex. Integer luctus nulla at est rutrum, a commodo est dapibus. Maecenas sagittis scelerisque blandit. Morbi congue tortor eros, sit amet vestibulum dolor tempor vitae. In pretium tellus at velit porttitor, vitae rutrum lacus suscipit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam bibendum ultricies metus, nec placerat urna efficitur auctor. Morbi non purus magna. Ut at ex nec nunc dictum ultricies.
Mauris volutpat nec sem sed malesuada. Sed eu scelerisque libero. Phasellus at mauris in ligula congue interdum et sit amet ante. Sed vestibulum, sem non congue molestie, quam massa euismod sem, non porta sem mauris vitae justo. Donec et fringilla tortor. Cras sed purus eget ante elementum mattis. Nunc elit nunc, volutpat sed congue ac, varius a ligula. Aenean sit amet laoreet dolor. Aenean finibus iaculis diam, quis lacinia nisi semper id. Phasellus eu nulla sed risus accumsan finibus. Nulla vel ante id mi vulputate ultrices. Cras finibus elementum tortor, at fringilla arcu facilisis ut. Cras vitae lectus pretium, posuere risus venenatis, congue metus. Phasellus vel dapibus felis.
Maecenas tincidunt orci nulla. Sed maximus tellus nec lorem dignissim aliquet. Maecenas tincidunt dolor sed est laoreet, nec suscipit augue dictum. Vivamus venenatis rutrum molestie. Vestibulum in maximus leo. Duis a euismod nulla. Aenean luctus sodales quam, ut fringilla elit bibendum in. Ut in purus sit amet libero hendrerit hendrerit ac eget nisl. In ac mauris at felis suscipit scelerisque eu eget erat. Fusce accumsan tempus mauris, porta sagittis odio venenatis ac. Integer mollis nulla in velit dignissim imperdiet. Nunc ac magna ullamcorper, pretium mauris et, semper enim. Morbi aliquet accumsan turpis id rutrum. Donec purus tellus, pellentesque non nunc ac, ornare scelerisque ex.
-
-
-
-
-
-
-
-
-
-
Jaokset—kokeile kiltatoimintaa vapaammin
-
+
+
+
+
+
+
+
+
+
+
Jaokset—kokeile kiltatoimintaa vapaammin
+
Kiinnostaako kiltatoiminta, mutta vuoden kestävä sitoutuminen pelottaa? Jaokset mahdollistavat kiltatoiminnan kokeilemisen pienemmässä mittakaavassa. Jaokset toimivat varsin vapaamuotoisesti, mutta siltikin hyvässä hengessä. Mikäli Sinulla olisi hyvä idea, mitä kilta voisi jaosmaisesti toteuttaa, voit myös perustaa oman jaoksen.
-
-
-
-
-
- Jäsenedut vuonna 2019
-
-
-
-
- Aalto-yliopiston tarjoamat monenlaiset edut
-
- Sen lisäksi että kilta tarjoaa jäsenilleen palveluja ja aktiviteetteja, Aalto-yliopisto tarjoaa lorem ipsum dolor sit amet.
-
-
- » Download.aalto.fi Täältä voit ladata yliopiston tarjoamia ohjelmia ilmaiseksi.
-
-
-
-
- Jäseneksi liittyminen on helppoa, hauskaa ja hyödyllistä 8 € jäsenmaksulla pääset nauttimaan kaikista jäseneduista.
-
-
-
-
-
+
+
+
+
+
+ Jäsenedut vuonna 2019
+
+
+
+ Aalto-yliopiston tarjoamat monenlaiset edut
+
+
Sen lisäksi että kilta tarjoaa jäsenilleen palveluja ja aktiviteetteja, Aalto-yliopisto tarjoaa lorem ipsum dolor sit amet.
+
» Download.aalto.fi Täältä voit ladata yliopiston tarjoamia ohjelmia ilmaiseksi.
+
+
+
+ Jäseneksi liittyminen on helppoa, hauskaa ja hyödyllistä 8 € jäsenmaksulla pääset nauttimaan kaikista jäseneduista.
+
+
+
+ >
);
export default GuildPageView;
diff --git a/src/views/InEnglishPage/InEnglishPage.scss b/src/views/InEnglishPage/InEnglishPage.scss
deleted file mode 100644
index 78efa16..0000000
--- a/src/views/InEnglishPage/InEnglishPage.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.in-english-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-}
diff --git a/src/views/InEnglishPage/InEnglishPageHero.tsx b/src/views/InEnglishPage/InEnglishPageHero.tsx
new file mode 100644
index 0000000..ac31ca1
--- /dev/null
+++ b/src/views/InEnglishPage/InEnglishPageHero.tsx
@@ -0,0 +1,36 @@
+import React from "react";
+import { Hero, HeroPrimarySection, HeroAside, HeroAsideItem } from "@components/Hero";
+
+const InEnglishPageHero: React.FC = () => (
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default InEnglishPageHero;
diff --git a/src/views/InEnglishPage/InEnglishPageView.tsx b/src/views/InEnglishPage/InEnglishPageView.tsx
index 66a93a3..6d06695 100644
--- a/src/views/InEnglishPage/InEnglishPageView.tsx
+++ b/src/views/InEnglishPage/InEnglishPageView.tsx
@@ -1,10 +1,21 @@
import React from "react";
-import "./InEnglishPage.scss";
+import { TextSection } from "@components/index";
+import InEnglishPageHero from "./InEnglishPageHero";
const InEnglishPageView: React.FC = () => (
-
- In English Page
-
+ <>
+
+
+
+ Hey hey heyy
+
+
+
+ >
);
export default InEnglishPageView;
diff --git a/src/views/SignUpPage/SignUpPage.scss b/src/views/SignUpPage/SignUpPage.scss
deleted file mode 100644
index 402bd34..0000000
--- a/src/views/SignUpPage/SignUpPage.scss
+++ /dev/null
@@ -1,61 +0,0 @@
-@import "../../assets/scss/globals";
-@import "../../components//Button/Button.scss";
-
-.sign-up-page {
- flex: 1 0 auto;
-
- .sign-up-statusmessage {
- color: color(orange1);
- }
-
- .sign-up-list {
- justify-content: start;
- li {
- padding-bottom: 0.3rem;
- }
-
- .reserved {
- color: color(blue1);
- }
- }
-
- .sign-up-form {
- legend {
- display: none;
- }
-
- & > div:last-child {
- display: flex;
- justify-content: center;
-
- button[type="submit"] {
- @extend .button;
- @extend .filled;
- }
- }
-
- fieldset {
- border: none;
- padding: 0;
- margin: 1rem 0;
-
- .form-group {
- padding-bottom: 0.5rem;
-
- & > label {
- margin: 0.5rem 0;
- font-weight: 600;
- display: block;
- }
- }
-
- input[type="text"], input[type="email"], input[type="number"] {
- display: block;
- height: 48px;
- width: 100%;
- font-size: 1.5rem;
- padding: 0 16px;
- }
- }
- }
-}
diff --git a/src/views/SignUpPage/SignUpPageView.tsx b/src/views/SignUpPage/SignUpPageView.tsx
index 6ab463d..4020853 100644
--- a/src/views/SignUpPage/SignUpPageView.tsx
+++ b/src/views/SignUpPage/SignUpPageView.tsx
@@ -1,13 +1,12 @@
import React from "react";
+import styled from "styled-components";
import Form, { IChangeEvent, ISubmitEvent, ErrorSchema } from "react-jsonschema-form";
-import "./SignUpPage.scss";
-import PageSection from "@components/PageSection";
import { SignupForm } from "@models/SignupForm";
import { buildFormSchema, buildUISchema } from "./FormUtils";
-import AsideSection from "@components/AsideSection";
-import MainSection from "@components/MainSection";
import Checkboxes from "@components/Widgets/Checkbox/Checkboxes";
import RadioButtonWidget from "@components/Widgets/RadioButton/RadioButtonWidget";
+import { TextSection } from "@components/index";
+import { colors } from "@theme/colors";
const customWidgets = {
"radio": RadioButtonWidget,
@@ -37,6 +36,65 @@ const renderList = (signUpForm: SignupForm) => {
)
}
+const StyledSection = styled(TextSection)`
+
+ & > div {
+ & > span {
+ color: ${colors.orange1};
+ }
+ }
+
+ & > aside {
+ justify-content: start;
+ li {
+ padding-bottom: 0.3rem;
+ }
+
+ .reserved {
+ color: color(blue1);
+ }
+ }
+
+ form {
+ legend {
+ display: none;
+ }
+
+ & > div:last-child {
+ display: flex;
+ justify-content: center;
+
+ button[type="submit"] {
+ color: blue;
+ }
+ }
+ }
+
+ fieldset {
+ border: none;
+ padding: 0;
+ margin: 1rem 0;
+
+ .form-group {
+ padding-bottom: 0.5rem;
+
+ & > label {
+ margin: 0.5rem 0;
+ font-weight: 600;
+ display: block;
+ }
+ }
+
+ input[type="text"], input[type="email"], input[type="number"] {
+ display: block;
+ height: 48px;
+ width: 100%;
+ font-size: 1.5rem;
+ padding: 0 16px;
+ }
+ }
+`;
+
const SignUpPageView: React.FC
= ({
signUpForm,
formData,
@@ -51,9 +109,6 @@ const SignUpPageView: React.FC = ({
return (
<>
-
- {signUpForm.title_fi}
-
-
+
Kilta järjestää jäsenilleen jos jonkinlaista projektia ja toimintaa, muun muassa:
diff --git a/src/views/ContactsPage/ContactsPage.scss b/src/views/ContactsPage/ContactsPage.scss
deleted file mode 100644
index 3c8525d..0000000
--- a/src/views/ContactsPage/ContactsPage.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import "../../assets/scss/globals";
-
-.contacts-page {
- display: flex;
- flex-flow: column wrap;
- justify-content: flex-start;
-}
diff --git a/src/views/ContactsPage/ContactsPageView.tsx b/src/views/ContactsPage/ContactsPageView.tsx
index 6743ebc..c076f7a 100644
--- a/src/views/ContactsPage/ContactsPageView.tsx
+++ b/src/views/ContactsPage/ContactsPageView.tsx
@@ -1,10 +1,8 @@
import React from "react";
-import "./ContactsPage.scss";
-import PageSection from "@components/PageSection";
import { Occupation, Committee } from "@models/Contacts";
import CommitteeContainer from "@components/CommitteeContainer";
import TextAnchor from "@components/TextAnchor";
-import { Divider } from "@components/index";
+import { Divider, TextSection } from "@components/index";
interface ContactsPageViewProps {
contacts: Occupation[];
@@ -18,15 +16,15 @@ class ContactsPageView extends React.Component {
const { contacts, committees } = this.props;
const board = contacts.filter(x => x.role.is_board);
return (
-
-
+ <>
+
Asiaa olisi, mutta kehen ottaa yhteyttä?
Tämä sivu yrittää valottaa sen oikean ihmisen puhelinnumeroa ja sähköpostiosoitetta.
-
+
-
+
@@ -39,20 +37,20 @@ class ContactsPageView extends React.Component {
-
+
{committees.map((committee, index) => {
- const order = committee.name_fi === "Toimikunnattomat" ? 1 : 0;
+ // const order = committee.name_fi === "Toimikunnattomat" ? 1 : 0;
return (
<>
-
+
x.role.committee.name_fi === committee.name_fi)} />
-
+
>
)
})}
-
+ >
);
}
}
diff --git a/src/views/FrontPage/FrontPageHero.tsx b/src/views/FrontPage/FrontPageHero.tsx
index 59fbb23..2ce877d 100644
--- a/src/views/FrontPage/FrontPageHero.tsx
+++ b/src/views/FrontPage/FrontPageHero.tsx
@@ -24,7 +24,7 @@ const FrontPageHero: React.FC = () => (
-
+
(
-
+
(
<>
@@ -94,36 +104,40 @@ const GuildPageView: React.FC = () => (
-
- Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+ Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+
+
+
+
Miksi alkaa kilta-aktiiviksi?
+
Näitä töitä tehdessä saa väkisinkin paljon uusia kavereita ja oppii monia palkallisessa työelämässä tarpeellisia taitoja. Eikä laajasta tuttavapiiristä ja monista kontakteista varmasti haittaa ole tulevaa työuraakaan ajatellen. Rahallista tai materiaalista hyötyä kiltatoiminnasta ei saa, eikä kukaan killan toimintaan mukaan tuleva sitä pyrikään tavoittelemaan. Mikä tärkeintä, kiltatoiminta on kivaa!
+
+ » Uusia ystäviä, samanhenkistä seuraa
+ » Loistava mahdollisuus kokeilla omia kykyjään
+ » Voit kokeilla ja oppia jotain sellaista, mitä et ikinä aikaisemmin ole tehnyt
+
+
+
+
+
+
Runsaasti erilaisia tehtäviä
+
Killassa on todella monenlaisia tehtäviä. Olitpa koodaaja, urheilija tai ammattimainen juhlija, killasta löytyy tekemistä juuri sinulle. Toimikunnissa sitoudut toimintaan vuodeksi kerrallaan. Jaostoiminta mahdollistaa kiltatoiminnan kokeilun pienemmässä mittakaavassa. Tehtäväkuvaukset lorem ipsum dolor sit amet alla. Jos ei löydy sopivaa lorem ipsum dolor sit amet, voit perustaa myös oman.
+
+ » Haluatko valtuustoon , hallitukseen tai toimariksi ?
+ » Toimihenkilönä pääset edistämään opintoja
+ » Lorem ipsum
+
+
+
+
+
-
- Miksi alkaa kilta-aktiiviksi?
- Näitä töitä tehdessä saa väkisinkin paljon uusia kavereita ja oppii monia palkallisessa työelämässä tarpeellisia taitoja. Eikä laajasta tuttavapiiristä ja monista kontakteista varmasti haittaa ole tulevaa työuraakaan ajatellen. Rahallista tai materiaalista hyötyä kiltatoiminnasta ei saa, eikä kukaan killan toimintaan mukaan tuleva sitä pyrikään tavoittelemaan. Mikä tärkeintä, kiltatoiminta on kivaa!
- » Uusia ystäviä, samanhenkistä seuraa
- » Loistava mahdollisuus kokeilla omia kykyjään
- » Voit kokeilla ja oppia jotain sellaista, mitä et ikinä aikaisemmin ole tehnyt
-
-
-
- Runsaasti erilaisia tehtäviä
- Killassa on todella monenlaisia tehtäviä. Olitpa koodaaja, urheilija tai ammattimainen juhlija, killasta löytyy tekemistä juuri sinulle. Toimikunnissa sitoudut toimintaan vuodeksi kerrallaan. Jaostoiminta mahdollistaa kiltatoiminnan kokeilun pienemmässä mittakaavassa. Tehtäväkuvaukset lorem ipsum dolor sit amet alla. Jos ei löydy sopivaa lorem ipsum dolor sit amet, voit perustaa myös oman.
- » Haluatko valtuustoon , hallitukseen tai toimariksi ?
- » Toimihenkilönä pääset edistämään opintoja
- » Lorem ipsum
-
-
-
-
+ Sähkötekniikan korkeakoulun toimikunnat
-
Sähkötekniikan korkeakoulun toimikunnat
- Ylioppilaskunnalla on edustus suuressa osassa Aalto-yliopiston tiedekuntia. Elektroniikan, tietoliikenteen ja automaation tiedekunnan toimikuntiin eli hallopedeihin opiskelijavalinna EST- ja TLT-tutkinto-ohjelmien osalta tehdään osin ylioppilaskunnan edustajistossa Sähköinsinöörikillan esityksestä ja osin Sähköinsinöörikillassa.
+ Ylioppilaskunnalla on edustus suuressa osassa Aalto-yliopiston tiedekuntia. Elektroniikan, tietoliikenteen ja automaation tiedekunnan toimikuntiin eli hallopedeihin opiskelijavalinna EST- ja TLT-tutkinto-ohjelmien osalta tehdään osin ylioppilaskunnan edustajistossa Sähköinsinöörikillan esityksestä ja osin Sähköinsinöörikillassa.
-
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed rhoncus feugiat ante. Nam eget venenatis dui. Morbi purus dui, cursus at velit id, placerat scelerisque turpis. Nulla a mauris odio. Nulla at tempor mi. Maecenas et sapien eu lorem interdum luctus. Proin interdum, tortor eget tempor tristique, massa arcu suscipit ipsum, sit amet lacinia erat lorem sit amet ipsum. Praesent dictum odio auctor odio sodales pharetra. Quisque accumsan iaculis diam, a laoreet odio aliquet eu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In hac habitasse platea dictumst. Pellentesque at hendrerit mi. Morbi at lacus finibus, pharetra urna sed, molestie tellus. Duis fermentum sodales leo. Nullam varius, massa in convallis sagittis, mi felis lacinia ipsum, viverra rhoncus nibh ipsum vel mi. Pellentesque ornare hendrerit malesuada.
@@ -137,15 +151,13 @@ const GuildPageView: React.FC = () => (
-
-
-
-
Jaokset—kokeile kiltatoimintaa vapaammin
-
- Kiinnostaako kiltatoiminta, mutta vuoden kestävä sitoutuminen pelottaa? Jaokset mahdollistavat kiltatoiminnan kokeilemisen pienemmässä mittakaavassa. Jaokset toimivat varsin vapaamuotoisesti, mutta siltikin hyvässä hengessä. Mikäli Sinulla olisi hyvä idea, mitä kilta voisi jaosmaisesti toteuttaa, voit myös perustaa oman jaoksen.
-
-
-
+
+
+ Jaokset—kokeile kiltatoimintaa vapaammin
+
+ Kiinnostaako kiltatoiminta, mutta vuoden kestävä sitoutuminen pelottaa? Jaokset mahdollistavat kiltatoiminnan kokeilemisen pienemmässä mittakaavassa. Jaokset toimivat varsin vapaamuotoisesti, mutta siltikin hyvässä hengessä. Mikäli Sinulla olisi hyvä idea, mitä kilta voisi jaosmaisesti toteuttaa, voit myös perustaa oman jaoksen.
+
+
Jäsenedut vuonna 2019
diff --git a/src/views/InEnglishPage/InEnglishPageHero.tsx b/src/views/InEnglishPage/InEnglishPageHero.tsx
index ac31ca1..976d122 100644
--- a/src/views/InEnglishPage/InEnglishPageHero.tsx
+++ b/src/views/InEnglishPage/InEnglishPageHero.tsx
@@ -10,7 +10,7 @@ const InEnglishPageHero: React.FC = () => (
/>
-
+
(
/>
-
+
Date: Sat, 10 Oct 2020 18:00:23 +0300
Subject: [PATCH 21/28] TS fix, Hero styles
---
src/components/Hero/Hero.tsx | 12 +++++++++++-
src/components/Hero/HeroAside.tsx | 7 -------
src/components/Hero/HeroPrimaryButtons.tsx | 1 +
src/views/SignUpPage/SignUpPageView.tsx | 8 ++++----
4 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/components/Hero/Hero.tsx b/src/components/Hero/Hero.tsx
index dc1f386..8ab2dc9 100644
--- a/src/components/Hero/Hero.tsx
+++ b/src/components/Hero/Hero.tsx
@@ -9,10 +9,20 @@ const Container = styled.div`
position: relative;
padding: 0;
- min-height: 80vh;
+ min-height: 75vh;
section {
padding: 2rem 6rem;
+ @media screen and (max-width: 800px) {
+ padding: 1rem;
+ }
+ }
+
+ aside {
+ padding: 0 6rem;
+ @media screen and (max-width: 800px) {
+ padding: 2rem 1rem;
+ }
}
& > div {
diff --git a/src/components/Hero/HeroAside.tsx b/src/components/Hero/HeroAside.tsx
index 0dbdb28..1944ce1 100644
--- a/src/components/Hero/HeroAside.tsx
+++ b/src/components/Hero/HeroAside.tsx
@@ -42,8 +42,6 @@ const Aside = styled.aside<{ colors: string }>`
display: flex;
flex-direction: column;
justify-content: center;
- padding: 0 6rem;
-
h2 {
text-transform: uppercase;
@@ -69,11 +67,6 @@ const Aside = styled.aside<{ colors: string }>`
text-decoration: none;
letter-spacing: 0.1rem;
}
-
-
- @media screen and (max-width: 800px) {
- margin: 48px auto;
- }
`;
const textColors = (bgColor: Colors) => {
diff --git a/src/components/Hero/HeroPrimaryButtons.tsx b/src/components/Hero/HeroPrimaryButtons.tsx
index 627ee30..d05b9e7 100644
--- a/src/components/Hero/HeroPrimaryButtons.tsx
+++ b/src/components/Hero/HeroPrimaryButtons.tsx
@@ -10,6 +10,7 @@ const Buttons = styled.div<{row?: boolean}>`
a {
display: contents;
+ text-decoration: none;
}
button {
diff --git a/src/views/SignUpPage/SignUpPageView.tsx b/src/views/SignUpPage/SignUpPageView.tsx
index 4020853..530a79d 100644
--- a/src/views/SignUpPage/SignUpPageView.tsx
+++ b/src/views/SignUpPage/SignUpPageView.tsx
@@ -122,15 +122,15 @@ const SignUpPageView: React.FC = ({
);
}
- const form = signUpForm !== null
- ? renderForm()
- : <>Loading...>;
+ const form = signUpForm ? renderForm() : <>Loading...>;
const signups = signUpForm && signUpForm.signups ? renderList(signUpForm) : null;
return (
- {signUpForm?.title_fi || ""}
+ {signUpForm && (
+ signUpForm.title_fi
+ )}
From 6531fd1daa5e5cfb86f0a9f3b29e175db38b7b0d Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 18:13:28 +0300
Subject: [PATCH 22/28] Clean up components
---
src/components/Accordion.tsx | 99 +++++++++++++++++++
src/components/Accordion/Accordion.scss | 59 -----------
src/components/Accordion/Accordion.tsx | 50 ----------
src/components/Accordion/index.ts | 2 +-
src/components/Card/Card.scss | 93 -----------------
src/components/Card/Card.tsx | 57 -----------
src/components/DropDownBox.tsx | 36 +++++++
src/components/DropDownBox/DropDownBox.scss | 17 ----
src/components/DropDownBox/DropDownBox.tsx | 27 -----
src/components/DropDownBox/index.ts | 2 -
src/components/InfoBox.tsx | 15 +++
src/components/InfoBox/InfoBox.scss | 6 --
src/components/InfoBox/InfoBox.tsx | 22 -----
src/components/InfoBox/index.ts | 2 -
.../NavbarDropdownLink/NavbarDropdownLink.tsx | 2 +-
src/components/Navigation/Navigation.scss | 1 +
src/components/index.tsx | 2 +
src/views/FreshmenPage/FreshmenPageView.tsx | 3 +-
src/views/GuildPage/GuildPageView.tsx | 4 +-
19 files changed, 157 insertions(+), 342 deletions(-)
create mode 100644 src/components/Accordion.tsx
delete mode 100644 src/components/Accordion/Accordion.scss
delete mode 100644 src/components/Accordion/Accordion.tsx
delete mode 100644 src/components/Card/Card.scss
delete mode 100644 src/components/Card/Card.tsx
create mode 100644 src/components/DropDownBox.tsx
delete mode 100644 src/components/DropDownBox/DropDownBox.scss
delete mode 100644 src/components/DropDownBox/DropDownBox.tsx
delete mode 100644 src/components/DropDownBox/index.ts
create mode 100644 src/components/InfoBox.tsx
delete mode 100644 src/components/InfoBox/InfoBox.scss
delete mode 100644 src/components/InfoBox/InfoBox.tsx
delete mode 100644 src/components/InfoBox/index.ts
diff --git a/src/components/Accordion.tsx b/src/components/Accordion.tsx
new file mode 100644
index 0000000..c1091ef
--- /dev/null
+++ b/src/components/Accordion.tsx
@@ -0,0 +1,99 @@
+import React from "react";
+import styled from "styled-components";
+import AccordionIcon from "./AccordionIcon";
+import { colors } from "@theme/colors";
+
+const Container = styled.div`
+ margin: 0.2em;
+ padding: 0.2em;
+ display: flex;
+ flex-flow: column nowrap;
+ border-style: solid;
+ border-color: ${colors.lightTurquoise};
+ border-width: 1px;
+
+ button {
+ display: flex;
+ flex-flow: row nowrap;
+ background-color: ${colors.white};
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: none;
+ }
+
+ h5 {
+ display: flex;
+ flex: 1;
+ text-align: center;
+ padding-left: 1em;
+ color: ${colors.blue1};
+ font-size: 1.125rem;
+ margin: auto;
+ }
+
+ & > div {
+ overflow: hidden;
+ }
+`;
+
+const Panel = styled.div<{visible?: boolean}>`
+ margin-top: ${(p) => p.visible ? "0" : "-100%"};
+
+ display: flex;
+ max-height: 15rem;
+ transition: margin-top 400ms ease-in-out;
+
+ div {
+ min-width: 40px;
+ max-width: 40px;
+ margin: 0.6em;
+ }
+
+ p {
+ padding-left: 1em;
+ margin: auto;
+ }
+`;
+
+export interface AccordionProps {
+ title: string;
+}
+export interface AccordionState {
+ isOpen: boolean;
+}
+
+class Accordion extends React.Component {
+ constructor(props: AccordionProps) {
+ super(props);
+ this.state = {
+ isOpen: false,
+ };
+ }
+
+ handleClick() {
+ this.setState((prevState) => ({
+ isOpen: !prevState.isOpen,
+ }));
+ }
+
+ render() {
+ const { isOpen } = this.state;
+ return (
+
+ this.handleClick()}>
+
+ {this.props.title}
+
+
+
+ {this.props.children}
+
+
+
+ );
+ }
+}
+
+export default Accordion;
diff --git a/src/components/Accordion/Accordion.scss b/src/components/Accordion/Accordion.scss
deleted file mode 100644
index f2e9e51..0000000
--- a/src/components/Accordion/Accordion.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.accordion {
- margin: 0.2em;
- padding: 0.2em;
- display: flex;
- flex-flow: column nowrap;
- border-style: solid;
- border-color: color(light-turquoise);
- border-width: 1px;
-
- &__desc {
- display: flex;
- margin-top: -100%;
- max-height: 15rem;
- -webkit-transition: margin-top 400ms ease-in-out;
- -webkit-transform: margin-top 400ms ease-in-out;
- -moz-transform: margin-top 400ms ease-in-out;
- -o-transform: margin-top 400ms ease-in-out;
- transition: margin-top 400ms ease-in-out;
-
- &.open {
- margin-top: 0;
- }
-
- div {
- min-width: 40px;
- max-width: 40px;
- margin: 0.6em;
- }
-
- p {
- padding-left: 1em;
- margin: auto;
- }
- }
-
- button {
- display: flex;
- flex-flow: row nowrap;
- background-color: color(white1);
- width: 100%;
- margin: 0;
- padding: 0;
- border: 0;
- outline: none;
- }
-
- h5 {
- display: flex;
- flex: 1;
- text-align: center;
- padding-left: 1em;
- color: color(blue1);
- font-size: 1.125rem;
- margin: auto;
- }
-}
diff --git a/src/components/Accordion/Accordion.tsx b/src/components/Accordion/Accordion.tsx
deleted file mode 100644
index 49dcbda..0000000
--- a/src/components/Accordion/Accordion.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from "react";
-import "./Accordion.scss";
-import AccordionIcon from "../AccordionIcon";
-
-export interface AccordionProps {
- title: string;
-}
-export interface AccordionState {
- isOpen: boolean;
-}
-
-interface DescriptionProps {
- visible: boolean;
-}
-
-const Description: React.SFC = (props) => (
- {props.children}
-);
-
-class Accordion extends React.Component {
- constructor(props: AccordionProps) {
- super(props);
- this.state = {
- isOpen: false,
- };
- }
-
- handleClick() {
- this.setState((prevState) => ({
- isOpen: !prevState.isOpen,
- }));
- }
-
- render() {
- const { isOpen } = this.state;
- return (
-
-
this.handleClick()}>
-
- {this.props.title}
-
-
- {this.props.children}
-
-
- );
- }
-}
-
-export default Accordion;
diff --git a/src/components/Accordion/index.ts b/src/components/Accordion/index.ts
index f653ec7..6f6532e 100644
--- a/src/components/Accordion/index.ts
+++ b/src/components/Accordion/index.ts
@@ -1,2 +1,2 @@
-import Accordion from "./Accordion";
+import Accordion from "../Accordion";
export default Accordion;
diff --git a/src/components/Card/Card.scss b/src/components/Card/Card.scss
deleted file mode 100644
index ef6d16e..0000000
--- a/src/components/Card/Card.scss
+++ /dev/null
@@ -1,93 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.card {
- background-color: color(white1);
- color: color(dark-blue);
- white-space: wrap;
- margin: 1rem 1rem;
- display: flex;
- flex-flow: column nowrap;
- justify-content: flex-start;
- width: calc(25% - 2rem);
-
- @media screen and (min-width: 1000px) and (max-width: 1200px - 1px) {
- width: calc(50% - 2rem);
- margin-bottom: 2rem;
- }
-
- @media screen and (max-width: 1000px - 1px) {
- width: 100%;
- margin-bottom: 3rem;
- margin-left: 0;
- margin-right: 0;
- }
-
- &__title {
- padding: 0.5rem;
- margin-bottom: 0.5rem;
- display: flex;
- justify-content: center;
- font-size: 1.5rem;
- text-align: center;
- font-weight: 300;
- color: color(black1);
- }
-
- &__image {
- width: 100%;
- height: 300px;
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center center;
- margin-bottom: 1rem;
-
- @media screen and (min-width: 1200px) {
- height: 15vw;
- }
-
- @media screen and (max-width: 1200px - 1px) {
- height: 35vh;
- }
- }
-
- &__button {
- display: flex;
- justify-content: center;
-
- button {
- height: 100%;
- }
- }
-
- &__text {
- display: flex;
- justify-content: center;
- text-align: center;
- text-overflow: ellipsis;
- font-size: 16px;
- margin: 0 0 0.5rem;
- font-weight: 200;
- line-height: 22px;
- color: color(black1);
-
- @media screen and (max-width: 1200px - 1px) {
- margin: 0.5rem 0;
- font-size: 16px;
- }
- }
-
- &__datetime {
- color: color(orange1);
- display: flex;
- justify-content: center;
- text-align: center;
- font-size: 0.9rem;
- font-weight: 600;
-
- @media screen and (max-width: 1200px - 1px) {
- margin: 0.5rem 0;
- font-size: 16px;
- }
- }
-}
diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx
deleted file mode 100644
index 9958adf..0000000
--- a/src/components/Card/Card.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import React from "react";
-import "./Card.scss";
-import Anchor from "../Anchor";
-import { Button } from "@components/index";
-
-interface CardProps {
- title: string;
- start_time: string;
- text: string;
- link?: string;
- image?: string;
- buttonText?: string;
- buttonOnClick?: () => void;
-}
-
-const Card: React.FC = ({ title, text, link, image, buttonText, start_time, buttonOnClick }) => {
- const options = {
- day: "numeric",
- month: "numeric",
- year: "numeric",
- hour: "numeric",
- minute: "2-digit"
- };
- const datetime = new Date(start_time).toLocaleString("fi-FI", options);
-
- const imageElem = image ? (
-
- ) : null;
- if (link) {
- return (
-
- {imageElem}
- {datetime}
- {title}
- {text}
-
-
- {buttonText}
-
-
-
- );
- }
- return (
-
- {imageElem}
-
{datetime}
-
{title}
-
{text}
-
- {buttonText}
-
-
- );
-}
-
-export default Card;
diff --git a/src/components/DropDownBox.tsx b/src/components/DropDownBox.tsx
new file mode 100644
index 0000000..f27eb1b
--- /dev/null
+++ b/src/components/DropDownBox.tsx
@@ -0,0 +1,36 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+
+interface DropDownBoxProps {
+ onMouseEnter: () => void;
+ onMouseLeave: () => void;
+ visible: boolean;
+}
+
+const Box = styled.div`
+ background-color: ${colors.white};
+ margin-top: 0.8rem;
+ position: absolute;
+ left: 0;
+ top: 30px;
+ z-index: 20;
+
+ a {
+ text-decoration: underline;
+ color: ${colors.darkBlue} !important;
+ text-transform: uppercase;
+ }
+`;
+
+const DropDownBox: React.FC = ({ children, onMouseEnter, onMouseLeave, visible }) => (
+
+ {children}
+
+);
+
+export default DropDownBox;
diff --git a/src/components/DropDownBox/DropDownBox.scss b/src/components/DropDownBox/DropDownBox.scss
deleted file mode 100644
index fa14622..0000000
--- a/src/components/DropDownBox/DropDownBox.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.drop-down-box {
- background-color: color(white1);
- margin-top: 0.8rem;
- position: absolute;
- left: 0;
- top: 30px;
- z-index: 20;
-
- &,
- & a {
- color: color(dark-blue) !important;
- text-transform: uppercase;
- }
-}
diff --git a/src/components/DropDownBox/DropDownBox.tsx b/src/components/DropDownBox/DropDownBox.tsx
deleted file mode 100644
index 572b1f3..0000000
--- a/src/components/DropDownBox/DropDownBox.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from "react";
-import "./DropDownBox.scss";
-
-export interface DropDownBoxProps {
- onMouseEnter: () => void;
- onMouseLeave: () => void;
- visible: boolean;
-}
-export interface DropDownBoxState {}
-
-class DropDownBox extends React.Component {
- render() {
- const { children, onMouseEnter, onMouseLeave, visible } = this.props;
- return (
-
- {children}
-
- );
- }
-}
-
-export default DropDownBox;
diff --git a/src/components/DropDownBox/index.ts b/src/components/DropDownBox/index.ts
deleted file mode 100644
index 64e87ea..0000000
--- a/src/components/DropDownBox/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import DropDownBox from "./DropDownBox";
-export default DropDownBox;
diff --git a/src/components/InfoBox.tsx b/src/components/InfoBox.tsx
new file mode 100644
index 0000000..2126318
--- /dev/null
+++ b/src/components/InfoBox.tsx
@@ -0,0 +1,15 @@
+import React from "react";
+import styled from "styled-components";
+
+const Box = styled.div`
+ justify-content: flex-end;
+ text-align: center;
+`;
+
+const InfoBox: React.FC = ({ children }) => (
+
+ {children}
+
+)
+
+export default InfoBox;
diff --git a/src/components/InfoBox/InfoBox.scss b/src/components/InfoBox/InfoBox.scss
deleted file mode 100644
index 63d25b6..0000000
--- a/src/components/InfoBox/InfoBox.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-@import "../../assets/scss/globals";
-
-.info-box {
- justify-content: flex-end;
- text-align: center;
-}
diff --git a/src/components/InfoBox/InfoBox.tsx b/src/components/InfoBox/InfoBox.tsx
deleted file mode 100644
index 7f9f844..0000000
--- a/src/components/InfoBox/InfoBox.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from "react";
-import "./InfoBox.scss";
-
-export interface InfoBoxProps {}
-export interface InfoBoxState {}
-
-class InfoBox extends React.Component {
- constructor(props: InfoBoxProps) {
- super(props);
- }
-
- render() {
- const { children } = this.props;
- return (
-
- {children}
-
- );
- }
-}
-
-export default InfoBox;
diff --git a/src/components/InfoBox/index.ts b/src/components/InfoBox/index.ts
deleted file mode 100644
index df5a48f..0000000
--- a/src/components/InfoBox/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import InfoBox from "./InfoBox";
-export default InfoBox;
diff --git a/src/components/NavbarDropdownLink/NavbarDropdownLink.tsx b/src/components/NavbarDropdownLink/NavbarDropdownLink.tsx
index c29df71..c374185 100644
--- a/src/components/NavbarDropdownLink/NavbarDropdownLink.tsx
+++ b/src/components/NavbarDropdownLink/NavbarDropdownLink.tsx
@@ -1,6 +1,6 @@
import React from "react";
import "./NavbarDropdownLink.scss";
-import DropDownBox from "../DropDownBox/DropDownBox";
+import DropDownBox from "../DropDownBox";
import Anchor from "../Anchor";
export interface NavbarDropdownLinkProps {
diff --git a/src/components/Navigation/Navigation.scss b/src/components/Navigation/Navigation.scss
index f9b7cc9..134e6da 100644
--- a/src/components/Navigation/Navigation.scss
+++ b/src/components/Navigation/Navigation.scss
@@ -7,6 +7,7 @@ $border-width: 2px;
.navigation-mobile-menu {
a,
a:-webkit-any-link {
+ text-decoration: none;
fill: color(light-blue);
color: color(light-blue);
}
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 882f3b7..67c7a1f 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -7,3 +7,5 @@ export { default as Divider } from "./Divider";
export { default as CardSection } from "./Sections/CardSection";
export { default as SossoSection } from "./Sections/SossoSection";
export { default as TextSection } from "./Sections/TextSection";
+export { default as InfoBox } from "./InfoBox";
+export { default as Accordion } from "./Accordion";
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index 08cc97a..cd40a3a 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -2,9 +2,8 @@ import React from "react";
import styled from "styled-components";
import FreshmenPageHero from "./FreshmenPageHero";
import PageLink from "@components/PageLink";
-import InfoBox from "@components/InfoBox";
import Anchor from "@components/Anchor";
-import { SossoSection, TextSection } from "@components/index";
+import { SossoSection, TextSection, InfoBox } from "@components/index";
const KippariImage = styled.img`
max-width:100%;
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index 6afecbf..47c0f02 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -1,11 +1,9 @@
import React from "react";
import styled from "styled-components";
import PageLink from "@components/PageLink";
-import InfoBox from "@components/InfoBox";
-import Accordion from "@components/Accordion";
import TextAnchor from "@components/TextAnchor";
import Anchor from "@components/Anchor";
-import { SossoSection, TextSection } from "@components/index";
+import { SossoSection, TextSection, InfoBox, Accordion } from "@components/index";
import GuildPageHero from "./GuildPageHero";
import FullWidthSection from "@components/Sections/FullWidthSection";
From 07f2255427e22e0d371094da0983ee9deebf2ed1 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 19:42:12 +0300
Subject: [PATCH 23/28] Call To Action sections and colors
---
src/components/Sections/CTASection.tsx | 104 ++++++++++++++++++
src/components/Sections/SossoSection.tsx | 45 --------
src/components/Sections/TextSection.tsx | 3 +-
src/components/index.tsx | 2 +-
src/views/ActualPage/ActualPageView.tsx | 34 +++---
src/views/CorporatePage/CorporatePageView.tsx | 16 +--
src/views/FreshmenPage/FreshmenPageView.tsx | 15 +--
src/views/FrontPage/FrontPageView.tsx | 13 ++-
src/views/GuildPage/GuildPageView.tsx | 18 ++-
src/views/StudiesPage/StudiesPageView.tsx | 15 +--
10 files changed, 163 insertions(+), 102 deletions(-)
create mode 100644 src/components/Sections/CTASection.tsx
delete mode 100644 src/components/Sections/SossoSection.tsx
diff --git a/src/components/Sections/CTASection.tsx b/src/components/Sections/CTASection.tsx
new file mode 100644
index 0000000..5ba27c0
--- /dev/null
+++ b/src/components/Sections/CTASection.tsx
@@ -0,0 +1,104 @@
+
+import React from "react";
+import styled from "styled-components";
+import { colors } from "@theme/colors";
+import Anchor from "@components/Anchor";
+
+const Section = styled.section<{ colors: string }>`
+ ${(p) => p.colors}
+
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ align-items: baseline;
+ padding: 2rem 0;
+
+ flex-direction: row;
+ @media screen and (max-width: 600px) {
+ flex-direction: column;
+ }
+
+ a {
+ color: inherit;
+ }
+
+ & > a {
+ font-weight: 700;
+ text-decoration: none;
+ margin: 0.5rem 1rem 0;
+ font-size: 1rem;
+ text-transform: uppercase;
+ letter-spacing: 0.1rem;
+ }
+
+ & > h1 {
+ a {
+ text-decoration: underline;
+ }
+ a:hover {
+ text-decoration: none;
+ }
+ }
+`;
+
+type Colors = "orange1" | "lightBlue" | "darkBlue" | "blue1" | "lightTurquoise";
+
+interface CTASectionProps {
+ bgColor?: Colors;
+ link?: string;
+ linkText?: string;
+}
+
+const textColors = (bgColor: Colors) => {
+ switch(bgColor) {
+ case "orange1": return `
+color: ${colors.white};
+background-color: ${colors[bgColor]};
+a:hover {
+ color: ${colors.darkBlue};
+}
+`;
+
+ case "darkBlue": return `
+background-color: ${colors[bgColor]};
+color: ${colors.white};
+ `;
+
+ case "lightBlue": return `
+background-color: ${colors[bgColor]};
+color: ${colors.darkBlue};
+a:hover {
+ color: ${colors.white};
+}
+ `;
+
+ case "lightTurquoise": return `
+background-color: ${colors[bgColor]};
+color: ${colors.darkBlue};
+a:hover {
+ color: ${colors.white};
+}
+ `;
+ case "blue1": return `
+background-color: ${colors[bgColor]};
+color: ${colors.white};
+a:hover {
+ color: ${colors.darkBlue};
+}
+ `;
+ default: return ""
+ }
+}
+
+const CTASection: React.FC = ({ bgColor = "orange1", link, linkText, children }) => (
+
+ {children}
+ {link && (
+
+ {linkText}
+
+ )}
+
+);
+
+export default CTASection;
\ No newline at end of file
diff --git a/src/components/Sections/SossoSection.tsx b/src/components/Sections/SossoSection.tsx
deleted file mode 100644
index 3bf9a24..0000000
--- a/src/components/Sections/SossoSection.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-
-import styled from "styled-components";
-import { PageSection } from "@components/index";
-import { colors } from "@theme/colors";
-
-const SössöSection = styled(PageSection)`
- color: ${colors.white};
- background-color: ${colors.orange1};
-
- display: flex;
- justify-content: center;
- text-align: center;
- align-items: flex-end;
-
- @media screen and (max-width: 600px - 1px) {
- flex-flow: column nowrap;
- align-items: center;
- }
-
- a {
- text-decoration: underline;
- }
-
- & > a {
- font-weight: 700;
- text-decoration: none;
- margin: 0.5rem 1rem 0;
- font-size: 1rem;
- text-transform: uppercase;
- letter-spacing: 0.1rem;
- }
-
- h3, p {
- font-size: 1.5rem;
- font-weight: 200;
- margin-block-start: 0;
- margin-block-end: 0;
- }
-
- a:hover {
- color: ${colors.darkBlue};
- }
-`;
-
-export default SössöSection;
\ No newline at end of file
diff --git a/src/components/Sections/TextSection.tsx b/src/components/Sections/TextSection.tsx
index 022f94d..df0dab9 100644
--- a/src/components/Sections/TextSection.tsx
+++ b/src/components/Sections/TextSection.tsx
@@ -1,8 +1,7 @@
import React from "react";
import styled from "styled-components";
-import { PageSection } from "@components/index";
-const StyledSection = styled(PageSection)`
+const StyledSection = styled.section`
display: grid;
padding: 24px;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 67c7a1f..190dc7f 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -5,7 +5,7 @@ export { default as TextAnchor } from "./TextAnchor";
export { default as PageSection } from "./Sections/PageSection";
export { default as Divider } from "./Divider";
export { default as CardSection } from "./Sections/CardSection";
-export { default as SossoSection } from "./Sections/SossoSection";
+export { default as CTASection } from "./Sections/CTASection";
export { default as TextSection } from "./Sections/TextSection";
export { default as InfoBox } from "./InfoBox";
export { default as Accordion } from "./Accordion";
diff --git a/src/views/ActualPage/ActualPageView.tsx b/src/views/ActualPage/ActualPageView.tsx
index a0ea631..8e59127 100644
--- a/src/views/ActualPage/ActualPageView.tsx
+++ b/src/views/ActualPage/ActualPageView.tsx
@@ -1,15 +1,13 @@
import React from "react";
import styled from "styled-components";
-
-import Accordion from "@components/Accordion";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
+
+import { Divider, CTASection, TextSection, Accordion } from "@components/index";
+import ActualPageHero from "./ActualPageHero";
import EventCalendar from "./EventCalendar";
import News from "./News";
-import { Divider, SossoSection, TextSection } from "@components/index";
-import Anchor from "@components/Anchor";
-import ActualPageHero from "./ActualPageHero";
interface ActualPageViewProps {
events: Event[];
@@ -38,12 +36,13 @@ const ActualPageView: React.FC = ({events, feed}) => {
-
- Kuvia tapahtumista.
-
- Kuvagalleria ›
-
-
+
+ Kuvia tapahtumista.
+
@@ -51,12 +50,13 @@ const ActualPageView: React.FC = ({events, feed}) => {
-
- Sinustako kilta-aktiivi?
-
- Tule mukaan kiltatoimintaan ›
-
-
+
+ Sinustako kilta-aktiivi?
+
Yritystapahtumia ja vastapainoa opiskelulle
diff --git a/src/views/CorporatePage/CorporatePageView.tsx b/src/views/CorporatePage/CorporatePageView.tsx
index 2ea18d8..34e3e92 100644
--- a/src/views/CorporatePage/CorporatePageView.tsx
+++ b/src/views/CorporatePage/CorporatePageView.tsx
@@ -1,8 +1,7 @@
import React from "react";
import CorporatePageHero from "./CorporatePageHero";
import PageLink from "@components/PageLink";
-import { SossoSection, TextSection } from "@components/index";
-import Anchor from "@components/Anchor";
+import { CTASection, TextSection } from "@components/index";
const CorporatePageView: React.FC = () => (
<>
@@ -57,12 +56,13 @@ const CorporatePageView: React.FC = () => (
-
- Mainos Sössöön?
-
- Killan lehden mediakortin löydät täältä›
-
-
+
+ Mainos Sössöön?
+
Työpaikkailmoitukset
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index cd40a3a..fc4cc80 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -3,7 +3,7 @@ import styled from "styled-components";
import FreshmenPageHero from "./FreshmenPageHero";
import PageLink from "@components/PageLink";
import Anchor from "@components/Anchor";
-import { SossoSection, TextSection, InfoBox } from "@components/index";
+import { CTASection, TextSection, InfoBox } from "@components/index";
const KippariImage = styled.img`
max-width:100%;
@@ -56,12 +56,13 @@ const FreshmenPageView: React.FC = () => (
-
- Killassa tapahtuu kaikenlaista!
-
- Seuraa killan tapahtumia
-
-
+
+ Killassa tapahtuu kaikenlaista!
+
Isoryhmät
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index ad4cad0..281ceb2 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import { Card, PageLink, Divider, CardSection, SossoSection } from "@components/index";
+import { Card, PageLink, Divider, CardSection, CTASection } from "@components/index";
import FrontPageHero from "./FrontPageHero";
import { Event } from "@models/Event";
import { Post } from "@models/Feed";
@@ -62,10 +62,13 @@ const FrontPageView: React.FC = ({ events, feed }) => (
-
- Sössöä vuodesta 1969.
- Lue opiskelijalehden viimeisin numero ›
-
+
+ Sössöä vuodesta 1969.
+
{feed.map(inst => (
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index 47c0f02..32b27c2 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -3,7 +3,7 @@ import styled from "styled-components";
import PageLink from "@components/PageLink";
import TextAnchor from "@components/TextAnchor";
import Anchor from "@components/Anchor";
-import { SossoSection, TextSection, InfoBox, Accordion } from "@components/index";
+import { CTASection, TextSection, InfoBox, Accordion } from "@components/index";
import GuildPageHero from "./GuildPageHero";
import FullWidthSection from "@components/Sections/FullWidthSection";
@@ -76,9 +76,9 @@ const GuildPageView: React.FC = () => (
-
- Killan hallinto koostuu XXX henkilöstä.
-
+
+ Killan hallinto koostuu XXX henkilöstä.
+
Organisaatio
@@ -101,9 +101,9 @@ const GuildPageView: React.FC = () => (
-
- Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
-
+
+ Kiltatoimintaa järjestää ja ylläpitää kilta-aktiivit, toimikunnat ja jaokset .
+
@@ -157,9 +157,7 @@ const GuildPageView: React.FC = () => (
-
- Jäsenedut vuonna 2019
-
+ Jäsenedut vuonna 2019
Aalto-yliopiston tarjoamat monenlaiset edut
diff --git a/src/views/StudiesPage/StudiesPageView.tsx b/src/views/StudiesPage/StudiesPageView.tsx
index 3c6db86..22ab147 100644
--- a/src/views/StudiesPage/StudiesPageView.tsx
+++ b/src/views/StudiesPage/StudiesPageView.tsx
@@ -1,7 +1,7 @@
import React from "react";
import PageLink from "@components/PageLink";
import Anchor from "@components/Anchor";
-import { SossoSection, TextSection } from "@components/index";
+import { CTASection, TextSection } from "@components/index";
import StudiesPageHero from "./StudiesPageHero";
const StudiesPageView: React.FC = () => (
@@ -45,12 +45,13 @@ const StudiesPageView: React.FC = () => (
-
- Hae opiskelemaan!
-
- Lue lisää Aallon sivuilta
-
-
+
+ Hae opiskelemaan!
+
Yliopiston järjestelmiä
From b4c5c8f8088aafe29f4558f78a392db8743e2126 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 20:07:24 +0300
Subject: [PATCH 24/28] CardSections
---
src/components/PageLink/PageLink.tsx | 6 ++++-
src/components/Sections/CardSection.tsx | 25 +++++++++---------
src/components/Sections/FullWidthSection.tsx | 3 +--
src/components/Sections/PageSection.tsx | 16 ------------
src/components/index.tsx | 2 +-
src/views/ActualPage/EventCalendar.tsx | 27 +++++++++++---------
src/views/ActualPage/News.tsx | 26 ++++++++++---------
src/views/FrontPage/FrontPageView.tsx | 8 +++---
8 files changed, 52 insertions(+), 61 deletions(-)
delete mode 100644 src/components/Sections/PageSection.tsx
diff --git a/src/components/PageLink/PageLink.tsx b/src/components/PageLink/PageLink.tsx
index ca69416..3a445fb 100644
--- a/src/components/PageLink/PageLink.tsx
+++ b/src/components/PageLink/PageLink.tsx
@@ -29,10 +29,14 @@ const StyledPageLink = styled.div`
a {
display: block;
- color: ${colors.darkBlue};
margin-left: 1rem;
text-decoration: none;
font-weight: normal;
+
+ color: ${colors.blue1};
+ &:hover {
+ color: ${colors.darkBlue};
+ }
}
`;
diff --git a/src/components/Sections/CardSection.tsx b/src/components/Sections/CardSection.tsx
index ee50e4c..ac32fc7 100644
--- a/src/components/Sections/CardSection.tsx
+++ b/src/components/Sections/CardSection.tsx
@@ -1,23 +1,22 @@
import styled from "styled-components";
-import PageSection from "./PageSection";
import { colors } from "@theme/colors";
-const CardSection = styled(PageSection)`
+const CardSection = styled.section`
+
+ h6 {
+ color: ${colors.orange1};
+ }
+
+ display: flex;
+ flex-flow: row wrap;
+ padding: 2rem 1rem;
+
@media screen and (max-width: 800px) {
flex-flow: column nowrap;
}
- color: ${colors.black};
- background-color: ${colors.white};
- a {
- color: ${colors.blue1};
- &:hover {
- color: ${colors.darkBlue};
- }
- }
-
- h6 {
- color: ${colors.orange1};
+ & > aside {
+ margin-left: auto;
}
& > * {
diff --git a/src/components/Sections/FullWidthSection.tsx b/src/components/Sections/FullWidthSection.tsx
index 52fa4eb..effd10a 100644
--- a/src/components/Sections/FullWidthSection.tsx
+++ b/src/components/Sections/FullWidthSection.tsx
@@ -1,8 +1,7 @@
import React from "react";
import styled from "styled-components";
-import { PageSection } from "@components/index";
-const StyledSection = styled(PageSection)`
+const StyledSection = styled.section`
display: grid;
padding: 24px;
diff --git a/src/components/Sections/PageSection.tsx b/src/components/Sections/PageSection.tsx
deleted file mode 100644
index 0b6093d..0000000
--- a/src/components/Sections/PageSection.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-
-const Section = styled.section`
- display: flex;
- flex-flow: row wrap;
- justify-content: space-between;
- position: relative;
- padding: ${(p) => p.fullSize ? "0" : "2rem 1rem 2rem"};
-`;
-
-const PageSection: React.FC = (props) => (
-
-);
-
-export default PageSection;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 190dc7f..2bf19f6 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -2,10 +2,10 @@ export { default as Card } from "./Card";
export { default as PageLink } from "./PageLink";
export { default as Button } from "./Button";
export { default as TextAnchor } from "./TextAnchor";
-export { default as PageSection } from "./Sections/PageSection";
export { default as Divider } from "./Divider";
export { default as CardSection } from "./Sections/CardSection";
export { default as CTASection } from "./Sections/CTASection";
export { default as TextSection } from "./Sections/TextSection";
+export { default as FullWidthSection } from "./Sections/FullWidthSection";
export { default as InfoBox } from "./InfoBox";
export { default as Accordion } from "./Accordion";
diff --git a/src/views/ActualPage/EventCalendar.tsx b/src/views/ActualPage/EventCalendar.tsx
index 74bc230..b6da06c 100644
--- a/src/views/ActualPage/EventCalendar.tsx
+++ b/src/views/ActualPage/EventCalendar.tsx
@@ -3,7 +3,7 @@ import { Event } from "@models/Event";
import Button from "@components/Button";
import FilterContainer from "./FilterContainer";
-import { CardSection, Card } from "@components/index";
+import { CardSection, Card, FullWidthSection } from "@components/index";
interface EventCalendarProps {
events: Event[];
@@ -14,19 +14,22 @@ const EventCalendar: React.FC = ({events}) => {
const [numberShown, setNumberShown] = useState(8);
const filteredEvents = events.slice(0, numberShown);
return (
- <>
- {/*
- { setFilter(0) }} selected={filterSelected === 0}>
+
+
+ Tapahtumat
+
+ { setFilter(0) }} selected={filterSelected === 0}>
Näytä kaikki
-
- { setFilter(1) }} selected={filterSelected === 1}>
+
+ { setFilter(1) }} selected={filterSelected === 1}>
Järjestä aihettain ›
-
- { setFilter(2) }} selected={filterSelected === 2}>
+
+ { setFilter(2) }} selected={filterSelected === 2}>
Valitse aika ›
-
- */}
- Tapahtumat
+
+
+
+
{filteredEvents.map(e => (
= ({events}) => {
)}
- >
+
)
}
diff --git a/src/views/ActualPage/News.tsx b/src/views/ActualPage/News.tsx
index e7d1e8b..2f73e44 100644
--- a/src/views/ActualPage/News.tsx
+++ b/src/views/ActualPage/News.tsx
@@ -3,7 +3,7 @@ import { Post } from "@models/Feed";
import Button from "@components/Button";
import FilterContainer from "./FilterContainer";
-import { CardSection, Card } from "@components/index";
+import { CardSection, Card, FullWidthSection } from "@components/index";
interface NewsProps {
feed: Post[];
@@ -14,19 +14,21 @@ const News: React.FC = ({feed}) => {
const [numberShown, setNumberShown] = useState(8);
const filteredFeed = feed.slice(0, numberShown);
return (
- <>
- {/*
- { setFilter(0) }} selected={filterSelected === 0}>
+
+
+ Uutiset
+
+ { setFilter(0) }} selected={filterSelected === 0}>
Näytä kaikki
-
- { setFilter(1) }} selected={filterSelected === 1}>
+
+ { setFilter(1) }} selected={filterSelected === 1}>
Järjestä aihettain ›
-
- { setFilter(2) }} selected={filterSelected === 2}>
+
+ { setFilter(2) }} selected={filterSelected === 2}>
Valitse aika ›
-
- */}
- Uutiset
+
+
+
{filteredFeed.map(post => (
= ({feed}) => {
)}
- >
+
)
}
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx
index 281ceb2..f0cab20 100644
--- a/src/views/FrontPage/FrontPageView.tsx
+++ b/src/views/FrontPage/FrontPageView.tsx
@@ -54,11 +54,11 @@ const FrontPageView: React.FC = ({ events, feed }) => (
buttonOnClick={() => {}}
/>
))}
-
+
@@ -81,14 +81,14 @@ const FrontPageView: React.FC = ({ events, feed }) => (
buttonOnClick={() => {}}
/>
))}
-
+
Lue tuoreimmat uutiset
Kuvia tapahtumista
-
+
From 92936dcc0c13bda2a08c7e97e9210855eb7e40a7 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 20:30:41 +0300
Subject: [PATCH 25/28] Few color fixes
---
src/components/Sections/TextSection.tsx | 9 ++++++++-
src/index.scss | 18 ++++++++---------
src/views/GuildPage/GuildPageView.tsx | 27 ++++++++++++++++++++-----
3 files changed, 39 insertions(+), 15 deletions(-)
diff --git a/src/components/Sections/TextSection.tsx b/src/components/Sections/TextSection.tsx
index df0dab9..5d3894c 100644
--- a/src/components/Sections/TextSection.tsx
+++ b/src/components/Sections/TextSection.tsx
@@ -1,5 +1,6 @@
import React from "react";
import styled from "styled-components";
+import { colors } from "@theme/colors";
const StyledSection = styled.section`
display: grid;
@@ -8,7 +9,7 @@ const StyledSection = styled.section`
grid-template-columns: 1fr 2fr 1fr;
grid-template-rows: 1fr auto;
grid-template-areas:
- "leftaside title rightaside"
+ "title title title"
"leftaside content rightaside";
@media screen and (max-width: 800px) {
@@ -21,6 +22,10 @@ const StyledSection = styled.section`
"leftaside";
}
+ h6 {
+ color: ${colors.orange1};
+ }
+
& > h1,
& > h2,
& > h3,
@@ -31,9 +36,11 @@ const StyledSection = styled.section`
grid-area: title;
}
+
& > div, p {
grid-area: content;
max-width: 1000px;
+
}
& > aside {
diff --git a/src/index.scss b/src/index.scss
index d3068f2..a05f45d 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -31,7 +31,7 @@ p {
font-size: 1.2rem;
font-weight: 300;
- .lg {
+ &.large {
font-size: 2rem;
}
}
@@ -42,7 +42,7 @@ h1 {
margin-block-start: 0;
margin-block-end: 0;
- .lg {
+ &.large {
font-size: 2.75rem;
}
}
@@ -55,7 +55,7 @@ h2 {
margin-block-end: 0;
text-transform: uppercase;
- .lg {
+ &.large {
font-size: 2rem;
}
}
@@ -66,8 +66,8 @@ h3 {
margin-block-start: 0;
margin-block-end: 0;
- .lg {
- font-size: 2.3rem;
+ &.large {
+ font-size: 2rem;
}
}
@@ -79,7 +79,7 @@ h4 {
margin-block-end: 0;
text-transform: uppercase;
- .lg {
+ &.large {
font-size: 2rem;
}
}
@@ -90,7 +90,7 @@ h5 {
margin-block-start: 0;
margin-block-end: 0;
- .lg {
+ &.large {
font-size: 2.3rem;
}
}
@@ -103,7 +103,7 @@ h6 {
margin-block-end: 0;
text-transform: uppercase;
- .lg {
+ &.large {
font-size: 2rem;
}
}
@@ -113,7 +113,7 @@ li {
font-size: 1.2rem;
font-weight: 600;
- .lg {
+ &.large {
font-size: 2rem;
}
}
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index 32b27c2..0c5592b 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -6,11 +6,28 @@ import Anchor from "@components/Anchor";
import { CTASection, TextSection, InfoBox, Accordion } from "@components/index";
import GuildPageHero from "./GuildPageHero";
import FullWidthSection from "@components/Sections/FullWidthSection";
+import { colors } from "@theme/colors";
const Column = styled.div`
display: flex;
flex-direction: row;
+ a {
+ color: inherit;
+ }
+
+ section:first-of-type {
+ background-color: ${colors.lightTurquoise};
+ }
+
+ section:last-of-type {
+ background-color: ${colors.lightBlue};
+ p {
+ a {
+ font-weight: normal;
+ }
+ }
+ }
ul {
list-style: none;
}
@@ -21,7 +38,7 @@ const GuildPageView: React.FC = () => (
- Killan tehtävät ja tarina
+ Killan tehtävät ja tarina
Kilta tukee jäsentensä hyvinvointia ja tarjoaa vastapainoa opiskelulle. Kilta järjestää esimerkiksi urheilutapahtumia, kulttuurielämyksiä ja näiden lisäksi sitsejä ja saunailtoja. Valinnanvaraa on, joten tapahtumakalenterin aktiivisella seuraamisella saattaa olla hyvinkin miellyttäviä seuraamuksia. Voit myös itse järjestää mieleisesi tapahtuman killan tukemana, tai ehdottaa sitä killan toimitsijoille.
@@ -81,7 +98,7 @@ const GuildPageView: React.FC = () => (
- Organisaatio
+ Organisaatio
Sähköinsinöörikillassa toimeenpanovaltaa käyttää 3–13 kiltalaisen muodostama hallitus apunaan lukuisa määrä toimihenkilöitä. Hallituksen ja toimihenkilöt valitsee killan valtuusto , joka myös valvoo näiden toimintaa. Käytännössä valtuusto valitsee vaalikokouksessaan ensin uuden puheenjohtajan ja jää 1–2 viikon mittaiselle kokoustauolle. Tauon jälkeen puheenjohtaja esittelee valtuustolle ehdotuksensa hallitukseksi ja toimihenkilöiksi, ja valtuusto joko hyväksyy tai hylkää ehdotuksen noin tunnin kestävän kysely- ja esittelytuokion jälkeen. Hallituksen kuulumiset lorem.
@@ -131,7 +148,7 @@ const GuildPageView: React.FC = () => (
- Sähkötekniikan korkeakoulun toimikunnat
+ Sähkötekniikan korkeakoulun toimikunnat
Ylioppilaskunnalla on edustus suuressa osassa Aalto-yliopiston tiedekuntia. Elektroniikan, tietoliikenteen ja automaation tiedekunnan toimikuntiin eli hallopedeihin opiskelijavalinna EST- ja TLT-tutkinto-ohjelmien osalta tehdään osin ylioppilaskunnan edustajistossa Sähköinsinöörikillan esityksestä ja osin Sähköinsinöörikillassa.
@@ -151,7 +168,7 @@ const GuildPageView: React.FC = () => (
- Jaokset—kokeile kiltatoimintaa vapaammin
+ Jaokset—kokeile kiltatoimintaa vapaammin
Kiinnostaako kiltatoiminta, mutta vuoden kestävä sitoutuminen pelottaa? Jaokset mahdollistavat kiltatoiminnan kokeilemisen pienemmässä mittakaavassa. Jaokset toimivat varsin vapaamuotoisesti, mutta siltikin hyvässä hengessä. Mikäli Sinulla olisi hyvä idea, mitä kilta voisi jaosmaisesti toteuttaa, voit myös perustaa oman jaoksen.
@@ -160,7 +177,7 @@ const GuildPageView: React.FC = () => (
Jäsenedut vuonna 2019
- Aalto-yliopiston tarjoamat monenlaiset edut
+ Aalto-yliopiston tarjoamat monenlaiset edut
Sen lisäksi että kilta tarjoaa jäsenilleen palveluja ja aktiviteetteja, Aalto-yliopisto tarjoaa lorem ipsum dolor sit amet.
» Download.aalto.fi Täältä voit ladata yliopiston tarjoamia ohjelmia ilmaiseksi.
From 5aaa9ba98307ea1af3a75bcefe3929fe8fa6658d Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 20:44:12 +0300
Subject: [PATCH 26/28] Update lodash
---
package-lock.json | 66 +++++++++++++++++++++++++----------------------
package.json | 2 +-
2 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 66c30cf..afe5c7f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1403,9 +1403,9 @@
}
},
"acorn": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
- "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+ "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
"dev": true
},
"acorn-hammerhead": {
@@ -6036,15 +6036,6 @@
"integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==",
"dev": true
},
- "dot-prop": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
- "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
- "dev": true,
- "requires": {
- "is-obj": "^1.0.0"
- }
- },
"dotenv": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz",
@@ -6145,9 +6136,9 @@
"dev": true
},
"elliptic": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz",
- "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==",
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
+ "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
"dev": true,
"requires": {
"bn.js": "^4.4.0",
@@ -11769,9 +11760,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
},
"lodash-id": {
"version": "0.14.0",
@@ -12648,12 +12639,6 @@
"semver": "^5.4.1"
}
},
- "node-forge": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
- "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==",
- "dev": true
- },
"node-libs-browser": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
@@ -16144,12 +16129,20 @@
"dev": true
},
"selfsigned": {
- "version": "1.10.7",
- "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz",
- "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==",
+ "version": "1.10.8",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz",
+ "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==",
"dev": true,
"requires": {
- "node-forge": "0.9.0"
+ "node-forge": "^0.10.0"
+ },
+ "dependencies": {
+ "node-forge": {
+ "version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
+ "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
+ "dev": true
+ }
}
},
"semver": {
@@ -18069,6 +18062,17 @@
"dot-prop": "^4.1.1",
"indexes-of": "^1.0.1",
"uniq": "^1.0.1"
+ },
+ "dependencies": {
+ "dot-prop": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
+ "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
+ "dev": true,
+ "requires": {
+ "is-obj": "^1.0.0"
+ }
+ }
}
},
"postcss-value-parser": {
@@ -18474,9 +18478,9 @@
},
"dependencies": {
"bl": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz",
- "integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.1.tgz",
+ "integrity": "sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ==",
"dev": true,
"requires": {
"readable-stream": "^3.0.1"
diff --git a/package.json b/package.json
index 7eccb62..d362599 100644
--- a/package.json
+++ b/package.json
@@ -123,7 +123,7 @@
"classnames": "2.2.6",
"date-fns": "2.0.0-alpha.27",
"js-cookie": "2.2.0",
- "lodash": "4.17.15",
+ "lodash": "4.17.20",
"mobx": "5.9.4",
"mobx-react": "5.4.4",
"normalize.css": "8.0.1",
From 00889436379b095cc73f854d1fffcaa073ed38e2 Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 20:59:24 +0300
Subject: [PATCH 27/28] Clean up and component moving
---
src/components/{ => Accordion}/Accordion.tsx | 0
src/components/Accordion/AccordionIcon.tsx | 36 +++++++++++++++++++
src/components/Accordion/index.ts | 2 --
.../AccordionIcon/AccordionIcon.scss | 29 ---------------
.../AccordionIcon/AccordionIcon.tsx | 20 -----------
src/components/AccordionIcon/index.ts | 2 --
src/components/{JsonLD => }/JsonLD.tsx | 0
src/components/JsonLD/index.ts | 2 --
src/components/{PageLink => }/PageLink.tsx | 2 +-
src/components/PageLink/index.ts | 2 --
src/components/index.tsx | 2 +-
src/views/CorporatePage/CorporatePageView.tsx | 3 +-
src/views/FreshmenPage/FreshmenPageView.tsx | 3 +-
src/views/GuildPage/GuildPageView.tsx | 3 +-
src/views/StudiesPage/StudiesPageView.tsx | 4 +--
15 files changed, 42 insertions(+), 68 deletions(-)
rename src/components/{ => Accordion}/Accordion.tsx (100%)
create mode 100644 src/components/Accordion/AccordionIcon.tsx
delete mode 100644 src/components/Accordion/index.ts
delete mode 100644 src/components/AccordionIcon/AccordionIcon.scss
delete mode 100644 src/components/AccordionIcon/AccordionIcon.tsx
delete mode 100644 src/components/AccordionIcon/index.ts
rename src/components/{JsonLD => }/JsonLD.tsx (100%)
delete mode 100644 src/components/JsonLD/index.ts
rename src/components/{PageLink => }/PageLink.tsx (96%)
delete mode 100644 src/components/PageLink/index.ts
diff --git a/src/components/Accordion.tsx b/src/components/Accordion/Accordion.tsx
similarity index 100%
rename from src/components/Accordion.tsx
rename to src/components/Accordion/Accordion.tsx
diff --git a/src/components/Accordion/AccordionIcon.tsx b/src/components/Accordion/AccordionIcon.tsx
new file mode 100644
index 0000000..25d5e4c
--- /dev/null
+++ b/src/components/Accordion/AccordionIcon.tsx
@@ -0,0 +1,36 @@
+import React from "react";
+import styled from "styled-components";
+import { colors } from "../../theme/colors";
+
+interface AccordionIconProps {
+ open: boolean;
+}
+
+const Icon = styled.div`
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: ${(p) => p.open ? colors.orange1 : colors.blue1};
+ color: ${colors.white};
+ min-width: 40px;
+ max-width: 40px;
+ min-height: 40px;
+ max-height: 40px;
+ margin: 0.2em;
+ font-size: 40px;
+
+ ${(p) => p.open && (`
+ span {
+ transform: rotate(45deg);
+ }
+ `)}
+
+`;
+
+const AccordionIcon: React.FC = ({ open } ) => (
+
+ +
+
+);
+
+export default AccordionIcon;
diff --git a/src/components/Accordion/index.ts b/src/components/Accordion/index.ts
deleted file mode 100644
index 6f6532e..0000000
--- a/src/components/Accordion/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import Accordion from "../Accordion";
-export default Accordion;
diff --git a/src/components/AccordionIcon/AccordionIcon.scss b/src/components/AccordionIcon/AccordionIcon.scss
deleted file mode 100644
index 7933042..0000000
--- a/src/components/AccordionIcon/AccordionIcon.scss
+++ /dev/null
@@ -1,29 +0,0 @@
-@import "../../assets/scss/globals";
-
-
-.accordion-icon {
- display: flex;
- background-color: color(blue1);
- color: color(white1);
- align-items: center;
- justify-content: center;
- min-width: 40px;
- max-width: 40px;
- min-height: 40px;
- max-height: 40px;
- margin: 0.2em;
- font-size: 40px;
-
- &.open {
- background-color: color(orange1);
- }
-}
-
-.accordion-text {
- &.open {
- -webkit-transform: rotate(45deg);
- -moz-transform: rotate(45deg);
- -o-transform: rotate(45deg);
- transform: rotate(45deg);
- }
-}
diff --git a/src/components/AccordionIcon/AccordionIcon.tsx b/src/components/AccordionIcon/AccordionIcon.tsx
deleted file mode 100644
index 753a7ad..0000000
--- a/src/components/AccordionIcon/AccordionIcon.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from "react";
-import "./AccordionIcon.scss";
-
-export interface AccordionIconProps {
- open: boolean;
-}
-export interface AccordionIconState {}
-
-class AccordionIcon extends React.Component {
- render() {
- const { open } = this.props;
- return (
-
- );
- }
-}
-
-export default AccordionIcon;
diff --git a/src/components/AccordionIcon/index.ts b/src/components/AccordionIcon/index.ts
deleted file mode 100644
index bc97054..0000000
--- a/src/components/AccordionIcon/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import AccordionIcon from "./AccordionIcon";
-export default AccordionIcon;
diff --git a/src/components/JsonLD/JsonLD.tsx b/src/components/JsonLD.tsx
similarity index 100%
rename from src/components/JsonLD/JsonLD.tsx
rename to src/components/JsonLD.tsx
diff --git a/src/components/JsonLD/index.ts b/src/components/JsonLD/index.ts
deleted file mode 100644
index e9b2e76..0000000
--- a/src/components/JsonLD/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import JsonLD from "./JsonLD";
-export default JsonLD;
diff --git a/src/components/PageLink/PageLink.tsx b/src/components/PageLink.tsx
similarity index 96%
rename from src/components/PageLink/PageLink.tsx
rename to src/components/PageLink.tsx
index 3a445fb..306d0f1 100644
--- a/src/components/PageLink/PageLink.tsx
+++ b/src/components/PageLink.tsx
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
-import TextAnchor from "../TextAnchor";
+import TextAnchor from "./TextAnchor";
import { colors } from "@theme/colors";
interface PageLinkProps {
diff --git a/src/components/PageLink/index.ts b/src/components/PageLink/index.ts
deleted file mode 100644
index 118b0a5..0000000
--- a/src/components/PageLink/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import PageLink from "./PageLink";
-export default PageLink;
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 2bf19f6..3538c91 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -8,4 +8,4 @@ export { default as CTASection } from "./Sections/CTASection";
export { default as TextSection } from "./Sections/TextSection";
export { default as FullWidthSection } from "./Sections/FullWidthSection";
export { default as InfoBox } from "./InfoBox";
-export { default as Accordion } from "./Accordion";
+export { default as Accordion } from "./Accordion/Accordion";
diff --git a/src/views/CorporatePage/CorporatePageView.tsx b/src/views/CorporatePage/CorporatePageView.tsx
index 34e3e92..797bca7 100644
--- a/src/views/CorporatePage/CorporatePageView.tsx
+++ b/src/views/CorporatePage/CorporatePageView.tsx
@@ -1,7 +1,6 @@
import React from "react";
import CorporatePageHero from "./CorporatePageHero";
-import PageLink from "@components/PageLink";
-import { CTASection, TextSection } from "@components/index";
+import { CTASection, TextSection, PageLink } from "@components/index";
const CorporatePageView: React.FC = () => (
<>
diff --git a/src/views/FreshmenPage/FreshmenPageView.tsx b/src/views/FreshmenPage/FreshmenPageView.tsx
index fc4cc80..9795e05 100644
--- a/src/views/FreshmenPage/FreshmenPageView.tsx
+++ b/src/views/FreshmenPage/FreshmenPageView.tsx
@@ -1,9 +1,8 @@
import React from "react";
import styled from "styled-components";
import FreshmenPageHero from "./FreshmenPageHero";
-import PageLink from "@components/PageLink";
import Anchor from "@components/Anchor";
-import { CTASection, TextSection, InfoBox } from "@components/index";
+import { CTASection, TextSection, InfoBox, PageLink } from "@components/index";
const KippariImage = styled.img`
max-width:100%;
diff --git a/src/views/GuildPage/GuildPageView.tsx b/src/views/GuildPage/GuildPageView.tsx
index 0c5592b..99129c6 100644
--- a/src/views/GuildPage/GuildPageView.tsx
+++ b/src/views/GuildPage/GuildPageView.tsx
@@ -1,9 +1,8 @@
import React from "react";
import styled from "styled-components";
-import PageLink from "@components/PageLink";
import TextAnchor from "@components/TextAnchor";
import Anchor from "@components/Anchor";
-import { CTASection, TextSection, InfoBox, Accordion } from "@components/index";
+import { CTASection, TextSection, InfoBox, Accordion, PageLink } from "@components/index";
import GuildPageHero from "./GuildPageHero";
import FullWidthSection from "@components/Sections/FullWidthSection";
import { colors } from "@theme/colors";
diff --git a/src/views/StudiesPage/StudiesPageView.tsx b/src/views/StudiesPage/StudiesPageView.tsx
index 22ab147..ab41073 100644
--- a/src/views/StudiesPage/StudiesPageView.tsx
+++ b/src/views/StudiesPage/StudiesPageView.tsx
@@ -1,7 +1,5 @@
import React from "react";
-import PageLink from "@components/PageLink";
-import Anchor from "@components/Anchor";
-import { CTASection, TextSection } from "@components/index";
+import { CTASection, TextSection, PageLink } from "@components/index";
import StudiesPageHero from "./StudiesPageHero";
const StudiesPageView: React.FC = () => (
From b12f6526880000cb682300c343bc3cfb84ad232b Mon Sep 17 00:00:00 2001
From: Aarni Halinen
Date: Sat, 10 Oct 2020 21:16:24 +0300
Subject: [PATCH 28/28] Fix mobile TextSection aside
---
src/components/Sections/TextSection.tsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/components/Sections/TextSection.tsx b/src/components/Sections/TextSection.tsx
index 5d3894c..5d8af42 100644
--- a/src/components/Sections/TextSection.tsx
+++ b/src/components/Sections/TextSection.tsx
@@ -49,8 +49,7 @@ const StyledSection = styled.section`
justify-content: space-between;
@media screen and (max-width: 800px) {
- flex-direction: row;
- justify-content: space-between;
+ align-items: center;
max-width: unset;
margin-left: unset;
margin-top: 48px;
@@ -64,10 +63,16 @@ const StyledSection = styled.section`
& > aside:first-of-type {
grid-area: rightaside;
padding-left: 24px;
+ @media screen and (max-width: 800px) {
+ padding-left: 0;
+ }
}
& > aside:nth-of-type(2) {
grid-area: leftaside;
padding-right: 24px;
+ @media screen and (max-width: 800px) {
+ padding-left: 0;
+ }
}
`;