Skip to content

Commit

Permalink
refactor: moved less files to appropriate components
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-zelger committed Feb 15, 2024
1 parent 4140b1f commit 8a26303
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 22 deletions.
13 changes: 7 additions & 6 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'
import styled from '@emotion/styled';
import i18n from './../i18n';
import styled from '@emotion/styled'
import i18n from './../i18n'
import {Link, useLocation, useNavigate} from 'react-router-dom'
import {SectionT} from '../pages/section/components/Section';
import client from '../client';
import FooterSvg from './FooterSvg';
import PbsLogoSvg from './PbsLogoSvg';
import {SectionT} from '../pages/section/components/Section'
import client from '../client'
import FooterSvg from './FooterSvg'
import PbsLogoSvg from './PbsLogoSvg'
import './footer.less'


const Button = styled.button`
Expand Down
3 changes: 2 additions & 1 deletion src/components/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, {useEffect, useState} from 'react'
import {useTranslation} from "react-i18next";
import {useTranslation} from "react-i18next"
import './loading.less'

type Props = {
isLoading?: boolean
Expand Down
1 change: 1 addition & 0 deletions src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {CalendarPageT} from '../pages/calendar/CalendarPage'
import {useTranslation} from "react-i18next";
import {StartPageT} from '../pages/home/HomePage';
import {faBars, faCalendarDays, faHome, faSearch} from "@fortawesome/free-solid-svg-icons";
import './nav.less'

type Props = {
startPage: StartPageT
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions src/styles/loading.less → src/components/loading.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "../style";

.loading-container {
display: flex;
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions src/styles/nav.less → src/components/nav.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "../style";

nav.header-nav {
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createRoot} from 'react-dom/client';
import './index.less';
import './style.less';
import App from './App';
import React from 'react';

Expand Down
13 changes: 7 additions & 6 deletions src/pages/calendar/CalendarPage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, {useEffect} from 'react'
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import Markdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import {LinkComponent} from '../../helper/MarkdownComponents';
import CalendarForm from './components/CalendarForm';
import {IconT} from '../section/components/Section';
import {faCalendarDays} from "@fortawesome/free-solid-svg-icons";
import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import {LinkComponent} from '../../helper/MarkdownComponents'
import CalendarForm from './components/CalendarForm'
import {IconT} from '../section/components/Section'
import {faCalendarDays} from "@fortawesome/free-solid-svg-icons"
import './calendar.less'

export type CalendarPageT = {
title: string
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/pages/search/SearchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import searchPageDE from "../../data/search-page/de.json"
import searchPageFR from "../../data/search-page/fr.json"
import searchPageIT from "../../data/search-page/it.json"
import {SectionT} from "../section/components/Section"
import {faSearch} from "@fortawesome/free-solid-svg-icons";
import {faSearch} from "@fortawesome/free-solid-svg-icons"
import './search.less'

type Props = {
sections: SectionT[]
Expand Down
2 changes: 2 additions & 0 deletions src/styles/search.less → src/pages/search/search.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "../../style.less";

.search-results {
display: flex;
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions src/pages/section/components/Chapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import remarkGfm from 'remark-gfm'
import {LinkComponent} from '../../../helper/MarkdownComponents'
import {IconT, SectionT} from './Section'
import Target from './Target'
import './chapter.less'

export type Role = {
rolle: string
Expand Down
1 change: 1 addition & 0 deletions src/pages/section/components/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import {LinkComponent} from '../../../helper/MarkdownComponents'
import Chapter, {ChapterT} from './Chapter'
import './section.less'

export type SectionT = {
chapters: ChapterT[]
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions src/index.less → src/style.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
@import './fonts/fonts.css';
@import './styles/section.less';
@import './styles/chapter.less';
@import './styles/nav.less';
@import './styles/calendar.less';
@import './styles/footer.less';
@import './styles/loading.less';
@import './styles/search.less';

@color-primary: #521d3a;
@color-primary-light: #8c3c4f;
Expand Down

0 comments on commit 8a26303

Please sign in to comment.