Skip to content

Commit 42cd448

Browse files
committed
feat: upgrade header css to core-styles v2
1 parent 72462cf commit 42cd448

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

Diff for: client/src/styles/core-styles-v2.header.css

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.s-header {
2+
--global-font-size--medium: 14px;
3+
--global-font-family: "Benton Sans", "Roboto", sans-serif;
4+
}
5+
/* to make size of certain elements in Portal and CMS */
6+
/* FAQ: Bootstrap uses rem, but rem differs between Portal and CMS */
7+
/* - to match header height */
8+
.s-header .nav-link {
9+
padding-block: 5px;
10+
}
11+
/* - to match portal nav size */
12+
.s-header .dropdown-menu {
13+
padding-block: 5px;
14+
}
15+
.s-header .dropdown-item {
16+
padding-block: 2.5px;
17+
padding-inline: 15px;
18+
}
19+

Diff for: client/vite.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import fs from 'fs';
77
// https://vitejs.dev/config/
88
export default defineConfig({
99
base: '/core/static/',
10+
publicDir: 'public',
1011
css: { preprocessorOptions: { scss: { charset: false, api: 'modern' } } },
1112
plugins: [
1213
{
@@ -22,6 +23,7 @@ export default defineConfig({
2223
hooks: resolve(__dirname, 'src/hooks'),
2324
utils: resolve(__dirname, 'src/utils'),
2425
styles: resolve(__dirname, 'src/styles'),
26+
public: resolve(__dirname, 'src/public'),
2527
},
2628
},
2729

Diff for: server/conf/docker/docker-compose-dev.all.debug.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
version: "3.8"
55
services:
66
cms:
7-
image: taccwma/core-cms:ff737a3
7+
image: taccwma/core-cms:latest
88
volumes:
99
- ../cms/secrets.py:/code/taccsite_cms/secrets.py
1010
- ../cms/uwsgi/uwsgi.ini:/code/uwsgi.ini

Diff for: server/portal/templates/base.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
{% endif %}
1616
<link rel="canonical" href="{{request.get_full_path}}">
1717
<base href="/">
18+
<!-- Header CSS (from CMS) -->
19+
<link rel="stylesheet" href="/static/site_cms/css/build/core-styles.theme.default.css">
20+
<link rel="stylesheet" href="/static/site_cms/css/build/core-styles.header.css">
21+
<!-- Header CSS (from Portal) -->
22+
{% if DEBUG %}
23+
<link rel="stylesheet" href="http://localhost:3000/core/static/src/styles/core-styles-v2.header.css">
24+
{% else %}
25+
<link rel="stylesheet" href="/core/static/src/styles/core-styles-v2.header.css">
26+
{% endif %}
1827
{% block head_extra %}{% endblock %}
19-
<!-- Core CSS -->
20-
<link id="css-site-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
21-
<link id="css-site-header" rel="stylesheet" href="/static/site_cms/css/build/site.header.css" />
2228
{% if settings.PORTAL_CSS_FILENAMES|length %}
2329
<!-- Project CSS -->
2430
{% for stylesheet in settings.PORTAL_CSS_FILENAMES %}

0 commit comments

Comments
 (0)