diff --git a/README.md b/README.md index 43133af..a78ec2f 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,20 @@ The page is built with Angular. ## Changing links -To change the links, edit the `constants.ts` file in the `src/assets` folder. +To change the links, edit [config.ts](./config.ts) in the root directory. +- `amountForumPostsHome` is the number of forum posts to show on the startpage. +- `amountForumPostsSettings` is the number of forum posts to show on the settings page. - `contactLinks` is a list of links to contact pages. +- `defaultSettings` is the default settings for the page. +- `logos` and `logoList` control the logos shown above the search input. - `serviceLinks` is a list of links to our web services. - `SearchEngine` and `searchEngineMappings` to add or remove search engines from the list. -- `defaultSettings` is the default settings for the page. -- `amountForumPostsHome` is the number of forum posts to show on the startpage. -- `amountForumPostsSettings` is the number of forum posts to show on the settings page. - `wallpapers` is a list of wallpapers to show on the settings page. `name` will be shown in the settings, `url` maybe a local file relative to the `public` folder or a link to an image. -- `jokesApiUrl` is the Url used to query the jokes API [v2.jokeapi.dev](https://v2.jokeapi.dev/). You can customize the - jokes shown when visiting the site. +Additionally, +[jokes.ts](./src/app/jokes/jokes.ts) contains the list of excuses/jokes that will be shown on the main page. ## Get the tools To get started with this workspace, you need to install the following tools: @@ -42,6 +43,8 @@ To run the dev server for your app, use: pnpm serve ``` +Visit [http://localhost:4200](http://localhost:4200) to see the app with live reload. + To create a production bundle: ```sh diff --git a/config.ts b/config.ts index 479cd19..ae8da24 100644 --- a/config.ts +++ b/config.ts @@ -1,6 +1,6 @@ -import { DefaultSettings, SearchEngineList, StartpageTheme, WallpaperList } from "./src/app/types" +import { DefaultSettings, LogoList, SearchEngineList, StartpageTheme, WallpaperList } from "./src/app/types" -const isProd = true +const isProd = false export const GARUDA_FORUM_URL = isProd ? "https://forum.garudalinux.org" : "http://localhost:8010/proxy" // These are the items inside the menu. @@ -192,6 +192,8 @@ export const searchEngineMappings: SearchEngineList = [ // These are the settings defaults used export const defaultSettings: DefaultSettings = { jokesEnabled: true, + logo: "logos/violet-orange.png", + logoUrl: "", searchEngine: "searxng-privau" as SearchEngine, searchEngineName: "Custom", searchEngineUrl: "Set a custom search engine URL (omit %s)", @@ -228,3 +230,21 @@ export const wallpapers: WallpaperList = [ // Don't delete export const c = "nft5zX8CPAL4TW" + +// List for logo shown on the main page. Needs to have a fitting file in the public/logos folder. +export const logos: LogoList = [ + { name: "Black Metal", url: "logos/black-metal.png" }, + { name: "Blue Metal", url: "logos/blue-metal.png" }, + { name: "Blue", url: "logos/blue.png" }, + { name: "Dr460nized", url: "logos/dr460nized.png" }, + { name: "Green", url: "logos/green.png" }, + { name: "Metal", url: "logos/metal.png" }, + { name: "Orange", url: "logos/orange.png" }, + { name: "Petrol", url: "logos/petrol.png" }, + { name: "Pink", url: "logos/pink.png" }, + { name: "Red", url: "logos/red.png" }, + { name: "Solid", url: "logos/solid.png" }, + { name: "Violet Orange", url: "logos/violet-orange.png" }, + { name: "Custom", url: "custom" }, +] +export const defaultLogo = "logos/violet-orange.png" diff --git a/public/logos/black-metal.png b/public/logos/black-metal.png new file mode 100644 index 0000000..1b92b06 Binary files /dev/null and b/public/logos/black-metal.png differ diff --git a/public/logos/blue-metal.png b/public/logos/blue-metal.png new file mode 100644 index 0000000..b93347a Binary files /dev/null and b/public/logos/blue-metal.png differ diff --git a/public/logos/blue.png b/public/logos/blue.png new file mode 100644 index 0000000..2bacd8d Binary files /dev/null and b/public/logos/blue.png differ diff --git a/public/logos/dr460nized.png b/public/logos/dr460nized.png new file mode 100644 index 0000000..9ee6526 Binary files /dev/null and b/public/logos/dr460nized.png differ diff --git a/public/logos/green.png b/public/logos/green.png new file mode 100644 index 0000000..a3f6a2b Binary files /dev/null and b/public/logos/green.png differ diff --git a/public/logos/metal.png b/public/logos/metal.png new file mode 100644 index 0000000..307d9db Binary files /dev/null and b/public/logos/metal.png differ diff --git a/public/logos/orange.png b/public/logos/orange.png new file mode 100644 index 0000000..1af977c Binary files /dev/null and b/public/logos/orange.png differ diff --git a/public/logos/petrol.png b/public/logos/petrol.png new file mode 100644 index 0000000..b2a505d Binary files /dev/null and b/public/logos/petrol.png differ diff --git a/public/logos/pink.png b/public/logos/pink.png new file mode 100644 index 0000000..9454896 Binary files /dev/null and b/public/logos/pink.png differ diff --git a/public/logos/red.png b/public/logos/red.png new file mode 100644 index 0000000..c5a08f0 Binary files /dev/null and b/public/logos/red.png differ diff --git a/public/logos/solid.png b/public/logos/solid.png new file mode 100644 index 0000000..cb9bfd3 Binary files /dev/null and b/public/logos/solid.png differ diff --git a/public/logos/violet-orange.png b/public/logos/violet-orange.png new file mode 100644 index 0000000..3a39521 Binary files /dev/null and b/public/logos/violet-orange.png differ diff --git a/public/logos/violet.png b/public/logos/violet.png new file mode 100644 index 0000000..80a3f2e Binary files /dev/null and b/public/logos/violet.png differ diff --git a/public/logos/whitish-pink.png b/public/logos/whitish-pink.png new file mode 100644 index 0000000..6c88707 Binary files /dev/null and b/public/logos/whitish-pink.png differ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index cb8aa86..f096e9f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,12 +1,12 @@ -import { isPlatformBrowser } from '@angular/common'; -import { Component, ElementRef, Inject, OnInit, PLATFORM_ID, Renderer2 } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { initFlowbite } from 'flowbite'; -import { AppService } from './app.service'; -import { loadTheme } from './functions'; -import { MenubarComponent } from './menubar/menubar.component'; -import { RedirectGuard } from './redirect/redirect.guard'; -import { StartpageSettings } from './types'; +import { isPlatformBrowser } from "@angular/common" +import { Component, ElementRef, Inject, OnInit, PLATFORM_ID, Renderer2 } from "@angular/core" +import { RouterModule } from "@angular/router" +import { initFlowbite } from "flowbite" +import { AppService } from "./app.service" +import { loadTheme } from "./functions" +import { MenubarComponent } from "./menubar/menubar.component" +import { RedirectGuard } from "./redirect/redirect.guard" +import { StartpageSettings } from "./types" @Component({ standalone: true, diff --git a/src/app/app.service.ts b/src/app/app.service.ts index 76b58bf..5162ba8 100644 --- a/src/app/app.service.ts +++ b/src/app/app.service.ts @@ -1,7 +1,7 @@ -import { ElementRef, Injectable, Renderer2 } from '@angular/core'; -import { BehaviorSubject } from 'rxjs'; -import { defaultSettings } from '../../config'; -import { StartpageSettings } from './types'; +import { ElementRef, Injectable, Renderer2 } from "@angular/core" +import { BehaviorSubject } from "rxjs" +import { defaultSettings } from "../../config" +import { StartpageSettings } from "./types" @Injectable({ providedIn: "root", diff --git a/src/app/menubar/menubar.component.ts b/src/app/menubar/menubar.component.ts index 83cc853..8e3ed54 100644 --- a/src/app/menubar/menubar.component.ts +++ b/src/app/menubar/menubar.component.ts @@ -1,10 +1,10 @@ -import { NgClass, NgStyle } from '@angular/common'; -import { Component, ViewChild } from '@angular/core'; -import { RouterLink } from '@angular/router'; -import { menubarItems } from '../../../config'; -import { AppService } from '../app.service'; -import { ThemeToggleComponent } from '../theme-toggle/theme-toggle.component'; -import { MenuBarItems } from '../types'; +import { NgClass, NgStyle } from "@angular/common" +import { Component, ViewChild } from "@angular/core" +import { RouterLink } from "@angular/router" +import { menubarItems } from "../../../config" +import { AppService } from "../app.service" +import { ThemeToggleComponent } from "../theme-toggle/theme-toggle.component" +import { MenuBarItems } from "../types" @Component({ selector: "app-menubar", diff --git a/src/app/search/search.component.html b/src/app/search/search.component.html index 8c070ac..6a3d2f4 100644 --- a/src/app/search/search.component.html +++ b/src/app/search/search.component.html @@ -1,5 +1,5 @@