Skip to content

Commit 209a814

Browse files
committed
Fix styels
1 parent e059564 commit 209a814

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

services/app/apps/codebattle/assets/js/widgets/components/InvitesContainer.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useDispatch, useSelector } from 'react-redux';
88

99
import { unfollowUser, followUser } from '@/middlewares/Main';
1010

11+
import fightSvg from '../../../static/images/fight.svg';
1112
import i18n from '../../i18n';
1213
import { initInvites } from '../middlewares/Invite';
1314
import initPresence from '../middlewares/Main';
@@ -117,7 +118,7 @@ function InvitesContainer() {
117118
<img
118119
ref={ref}
119120
alt="invites"
120-
src="/assets/images/fight.svg"
121+
src={fightSvg}
121122
style={{ width: '46px', height: '46px' }}
122123
/>
123124
{followId && (

services/app/apps/codebattle/lib/codebattle_web/templates/layout/external.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
<link
4545
phx-track-static
4646
rel="stylesheet"
47-
href={Routes.static_path(@conn, "/assets/external.css")}
47+
href={CodebattleWeb.Vite.asset_path("external.css")}
4848
/>
4949
<script
5050
defer
5151
phx-track-static
5252
type="text/javascript"
53-
src={Routes.static_path(@conn, "/assets/external.js")}
53+
src={CodebattleWeb.Vite.asset_path("external.js")}
5454
>
5555
</script>
5656
</head>

services/app/apps/codebattle/vite.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ const input = {
6262
landing: path.resolve(__dirname, "assets/js/landing.js"),
6363
external: path.resolve(__dirname, "assets/js/external.js"),
6464
styles: path.resolve(__dirname, "assets/css/style.scss"),
65-
// Note: landing.css and external.css use the same styles as app.css
66-
// Templates should reference app.css instead
65+
landingStyles: path.resolve(__dirname, "assets/css/landing.scss"),
66+
externalStyles: path.resolve(__dirname, "assets/css/external.scss"),
6767
// broadcast_editor: path.resolve(__dirname, "assets/js/widgets/pages/broadcast-editor/index.js"),
6868
// stream: path.resolve(__dirname, "assets/js/widgets/pages/broadcast-editor/stream.js"),
6969
};
@@ -110,6 +110,14 @@ export default defineConfig(({ command, mode }) => ({
110110
if (assetInfo.name === 'styles.css') {
111111
return 'app.css';
112112
}
113+
// Rename landingStyles.css to landing.css
114+
if (assetInfo.name === 'landingStyles.css') {
115+
return 'landing.css';
116+
}
117+
// Rename externalStyles.css to external.css
118+
if (assetInfo.name === 'externalStyles.css') {
119+
return 'external.css';
120+
}
113121
// Add hash to images for cache busting in production
114122
if (/\.(png|jpe?g|gif|svg|webp|ico)$/i.test(assetInfo.name)) {
115123
return "[name]-[hash].[ext]";

0 commit comments

Comments
 (0)