Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KB-85 Main and other static pages #335

Merged
merged 10 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
CAMPUS_API_BASE_PATH=https://dev-api.campus.cloud.kpi.ua
COOKIE_DOMAIN=localhost
NEXT_PUBLIC_KBIS_URL=https://kbis.kpi.ua/
NEXT_PUBLIC_RECAPTCHA_KEY=6LeMy30qAAAAAIC6KUhNfReP-Us5wkrkp3FLfOgl
NEXT_PUBLIC_RECAPTCHA_KEY=6LeMy30qAAAAAIC6KUhNfReP-Us5wkrkp3FLfOgl
NEXT_PUBLIC_USER_MANUAL_URL=https://do4rt9wur3t6m.cloudfront.net/campus-user-manual.pdf
NEXT_PUBLIC_ADDRESS_URL=https://goo.gl/maps/ij4s8vuHPpLB92ZFA
NEXT_PUBLIC_GITHUB_URL=https://github.com/kpi-ua
NEXT_PUBLIC_FACEBOOK_URL=https://www.facebook.com/kpiuaofficial
NEXT_PUBLIC_INSTAGRAM_URL=https://www.instagram.com/kpiuaofficial
NEXT_PUBLIC_LINKEDIN_URL=https://www.linkedin.com/company/kpiuaofficial
NEXT_PUBLIC_TWITTER_URL=https://x.com/kpiuaofficial
NEXT_PUBLIC_CODE_OF_HONOR=https://kpi.ua/code
NEXT_PUBLIC_INTERNAL_REGULATIONS=https://kpi.ua/admin-rule
NEXT_PUBLIC_EDUCATIONAL_ORGANIZATION_REGULATION=https://kpi.ua/regulations
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
13 changes: 13 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NEXT_PUBLIC_KBIS_URL=https://kbis.kpi.ua/
NEXT_PUBLIC_RECAPTCHA_KEY=6LeMy30qAAAAAIC6KUhNfReP-Us5wkrkp3FLfOgl
NEXT_PUBLIC_USER_MANUAL_URL=https://do4rt9wur3t6m.cloudfront.net/campus-user-manual.pdf
NEXT_PUBLIC_ADDRESS_URL=https://goo.gl/maps/ij4s8vuHPpLB92ZFA
NEXT_PUBLIC_GITHUB_URL=https://github.com/kpi-ua
NEXT_PUBLIC_FACEBOOK_URL=https://www.facebook.com/kpiuaofficial
NEXT_PUBLIC_INSTAGRAM_URL=https://www.instagram.com/kpiuaofficial
NEXT_PUBLIC_LINKEDIN_URL=https://www.linkedin.com/company/kpiuaofficial
NEXT_PUBLIC_TWITTER_URL=https://x.com/kpiuaofficial
NEXT_PUBLIC_CODE_OF_HONOR=https://kpi.ua/code
NEXT_PUBLIC_INTERNAL_REGULATIONS=https://kpi.ua/admin-rule
NEXT_PUBLIC_EDUCATIONAL_ORGANIZATION_REGULATION=https://kpi.ua/regulations
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next", "prettier"]
}
9 changes: 7 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"singleQuote": true,
"trailingComma": "all"
"singleQuote": true,
"trailingComma": "all",
"semi": true,
"tabWidth": 2,
"jsxSingleQuote": false,
"printWidth": 120,
"plugins": ["prettier-plugin-tailwindcss"]
}
20 changes: 12 additions & 8 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ const nextConfig = {
{
protocol: 'https',
hostname: 'api.campus.kpi.ua',
}
},
{
protocol: 'https',
hostname: 'dev-ecampus.cloud.kpi.ua',
},
],
},
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find(rule => rule.test?.test?.('.svg'));
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/ // *.svg?url
resourceQuery: /url/, // *.svg?url
},
// Convert all other *.svg imports to React components
{
Expand All @@ -42,11 +46,11 @@ const nextConfig = {
},
},
},
]
}
}
}
}
],
},
},
},
},
);

// Modify the file loader rule to ignore *.svg, since we have it handled now.
Expand Down
Loading