Skip to content

Commit

Permalink
feat: add timeline demo page (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
BirnadinErick authored Aug 26, 2024
2 parents 1c9daee + df0ccd5 commit 6c16e97
Show file tree
Hide file tree
Showing 7 changed files with 508 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/v1/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ini_set("display_errors", 0);
ini_set("log_errors", "On");

define("DEBUG", true);
define("DEBUG", false);

function error_handler(int $errno, string $errstr, string $errfile, int $errll)
{
Expand Down
51 changes: 51 additions & 0 deletions fend-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

> [email protected] build /home/b/spc-175
> astro build

11:55:54 AM [content] Unsupported file types found. Prefix with an underscore (`_`) to ignore:
- config.ts.bak
11:55:54 AM [content] Types generated 78ms
11:55:54 AM [build] output target: static
11:55:54 AM [build] Collecting build info...
11:55:54 AM [build] Completed in 524ms.
11:55:54 AM [build] Building static entrypoints...
11:55:58 AM [build] Completed in 4.15s.

building client
Completed in 1.80s.


generating static routes
▶ src/pages/index.astro
└─ /index.html (+25ms)
▶ src/pages/175-timeline.astro
└─ /175-timeline/index.html (+9ms)
▶ src/pages/facilities.astro
└─ /facilities/index.html (+9ms)
▶ src/pages/projects/index.astro
└─ /projects/index.html (+16ms)
▶ src/pages/projects/detail.astro
└─ /projects/detail/index.html (+19ms)
▶ src/pages/projects/new.astro
└─ /projects/new/index.html (+18ms)
▶ src/pages/gallery.astro
└─ /gallery/index.html (+7ms)
▶ src/pages/author/index.astro
└─ /author/index.html (+12ms)
▶ src/pages/author/new-blog.astro
└─ /author/new-blog/index.html (+10ms)
▶ src/pages/author/edit.astro
└─ /author/edit/index.html (+4ms)
▶ src/pages/author/new.astro
└─ /author/new/index.html (+5ms)
▶ src/pages/blogs/index.astro
└─ /blogs/index.html (+9ms)
▶ src/pages/blogs/entry.astro
└─ /blogs/entry/index.html (+9ms)
▶ src/pages/auth/activate.astro
└─ /auth/activate/index.html (+13ms)
▶ src/pages/auth/signin.astro
└─ /auth/signin/index.html (+11ms)
▶ src/pages/auth/login.astro
└─ /auth/login/index.html (+7ms)
▶ src/pages/[...slug].astro
8 changes: 8 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {},
}
}
7 changes: 4 additions & 3 deletions src/components/home/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "@fontsource/space-grotesk/400.css";
import PrimaryCTA from "@components/common/PrimaryCTA.astro";
import SecondaryCTA from "@components/common/SecondaryCTA.astro";
import { get_app_route } from "../../config/global";
---

<section
Expand All @@ -17,8 +18,8 @@ import SecondaryCTA from "@components/common/SecondaryCTA.astro";
</h2>

<div class="mt-8 space-y-4">
<PrimaryCTA text="how we feast it." url="/" />
<SecondaryCTA text="learn about our 175 years" url="/" />
<PrimaryCTA text="how we feast it." url={get_app_route("175-timeline")} />
<SecondaryCTA text="learn about our 175 years" url="/alma-mater/history-of-the-college" />
</div>
</section>

Expand All @@ -33,7 +34,7 @@ import SecondaryCTA from "@components/common/SecondaryCTA.astro";
</h1>

<div class="mt-8 lg:mt-12 space-y-4 xl:absolute xl:bottom-0 xl:right-0">
<PrimaryCTA text="how we feast it." url="/" />
<PrimaryCTA text="how we feast it." url="/175-timeline" />
</div>
</div>
</section>
Expand Down
11 changes: 9 additions & 2 deletions src/config/global.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
const DEBUG = true;
const DEBUG = false;

let API = "";
let APP = "";
if (DEBUG) {
API = "http://localhost:2004/api/v1/index.php";
APP = "http://localhost:2007";
} else {
API = "https://www.spcjaffna-beta.org/api/v1/index.php";
APP = "https://www.spcjaffna-beta.org/";
}

function get_app_route(route: string) {
return APP + route;
}

function get_api_route(route: string) {
Expand Down Expand Up @@ -117,4 +124,4 @@ const EDITOR_DEMO_DATA = {
"version": "2.29.1"
};

export { get_api_route, EDITOR_DEMO_DATA };
export { get_api_route, get_app_route, EDITOR_DEMO_DATA };
35 changes: 35 additions & 0 deletions src/config/timeline-events.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
interface Event {
date: string;
title: string;
cover: string;
}

const TIMELINE_EVENTS: Array<Event> = [
{
date: "1850",
title: "Inaguration of the College",
cover: "https://cdn.jsdelivr.net/gh/BirnadinErick/spc-cdn@master/about-st-pst-placeholder.webp"
},
{
date: "2000",
title: "2000 year",
cover: "https://cdn.jsdelivr.net/gh/BirnadinErick/spc-cdn@master/forest.webp"
}, {
date: "2009",
title: "something happened",
cover: "https://cdn.jsdelivr.net/gh/BirnadinErick/spc-cdn@master/hands.webp"
}, {
date: "2019",
title: "another thing happened",
cover: "https://unsplash.com/photos/NV5_g30gPfE/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8Q0R3dXdYSkFiRXd8fHx8fDJ8fDE3MjQ2NTk5NzV8&force=true"
}, {
date: "2020",
title: "Covid-19 happened",
cover: "https://unsplash.com/photos/w9KEokhajKw/download?ixid=M3wxMjA3fDB8MXxzZWFyY2h8Mnx8Y29yb25hfGVufDB8fHx8MTcyNDY2NDI4MXww&force=true"
}, {
date: "2025",
title: "175 Annivesery will happen, i guess",
cover: "https://unsplash.com/photos/KH8sFmJhKEI/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8Q0R3dXdYSkFiRXd8fHx8fDJ8fDE3MjQ2NTk5NzV8&force=true"
}];

export default TIMELINE_EVENTS;
Loading

0 comments on commit 6c16e97

Please sign in to comment.