|
FROM node:18 |
|
|
|
|
|
RUN git clone https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git |
|
WORKDIR "ChatGPT-Next-Web" |
|
|
|
|
|
RUN echo '@import "./animation.scss"; |
|
@import "./window.scss"; |
|
|
|
@mixin light { |
|
--theme: light; |
|
--white: |
|
--black: |
|
--gray: |
|
--primary: |
|
--second: |
|
--hover-color: |
|
--bar-color: rgba(0,0,0,.1); |
|
--theme-color: var(--gray); |
|
--shadow: 50px 50px 100px 10px rgba(0,0,0,.1); |
|
--card-shadow: 0px 2px 4px 0px rgba(0,0,0,.05); |
|
--border-in-light: 1px solid |
|
--sidebar-sub-title: rgba(38,47,156,.5); |
|
} |
|
|
|
@mixin dark { |
|
--theme: dark; |
|
--white: |
|
--black: |
|
--gray: |
|
--primary: |
|
--second: |
|
--hover-color: |
|
--bar-color: rgba(255, 255, 255, 0.1); |
|
--border-in-light: 1px solid rgba(255, 255, 255, 0.192); |
|
--theme-color: var(--gray); |
|
|
|
div:not(.no-dark) > svg { |
|
filter: invert(0.5); |
|
} |
|
} |
|
|
|
.light { |
|
@include light; |
|
} |
|
|
|
.dark { |
|
@include dark; |
|
} |
|
|
|
.mask { |
|
filter: invert(0.8); |
|
} |
|
|
|
:root { |
|
@include light; |
|
|
|
--window-width: 90vw; |
|
--window-height: 90vh; |
|
--sidebar-width: 300px; |
|
--window-content-width: calc(100% - var(--sidebar-width)); |
|
--message-max-width: 80%; |
|
--full-height: 100%; |
|
} |
|
|
|
@media only screen and (max-width: 600px) { |
|
:root { |
|
--window-width: 100vw; |
|
--window-height: var(--full-height); |
|
--sidebar-width: 100vw; |
|
--window-content-width: var(--window-width); |
|
--message-max-width: 100%; |
|
} |
|
|
|
.no-mobile { |
|
display: none; |
|
} |
|
} |
|
|
|
@media (prefers-color-scheme: dark) { |
|
:root { |
|
@include dark; |
|
} |
|
}' > /tmp/new_globals.scss |
|
|
|
|
|
RUN sed -n '/html {/,$p' app/styles/globals.scss >> /tmp/new_globals.scss |
|
|
|
|
|
RUN cp app/styles/globals.scss app/styles/globals.scss.backup && \ |
|
cp /tmp/new_globals.scss app/styles/globals.scss |
|
|
|
|
|
RUN npm i |
|
RUN npm run build |
|
|
|
EXPOSE 3000 |
|
CMD ["npm", "run", "start"] |