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

allow mounting changed themes into docker container #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
!config-example.yaml
!dist/mark.min.js
!dist/*.min.js
!dist/*.png
!dist/theme/*.png
!dist/theme/*.css
!Makefile
!package-lock.json
!package.json
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/dist/*.html
/node_modules/
!/dist/*.min.js
.idea/
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ The full list of supported data sources:
### Using Docker

1. Download and customize [`config.yaml`](https://github.com/duolingo/metasearch/raw/master/config.yaml)
1. In the local directory that contains `config.yaml`, run `docker run -p 3000:3000 -v "$PWD:/data" duolingo/metasearch`
2. In the local directory that contains `config.yaml`, run `docker run -p 3000:3000 -v "$PWD:/data" duolingo/metasearch`

#### Theming

1. In order to customize the theme, place the [`theme`](https://github.com/duolingo/metasearch/tree/master/dist/theme)
directory in a local folder
2. Customize the contents of the theme folder
3. mount the `theme` folder in the docker container: `docker run -p 3000:3000 -v "$PWD:/code/dist/theme" ...`

### Using Git, Make, and Node.js

Expand Down
File renamed without changes
6 changes: 6 additions & 0 deletions dist/theme/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* apply style customizations in this file */
/* */
/* e.g. to change the primary text color: */
/*:root {*/
/* --primary-text-color: red;*/
/*}*/
File renamed without changes
3 changes: 2 additions & 1 deletion src/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
gtag("config", "<%= metasearch.TRACKING_ID %>");
</script>
<% } %>
<link href="/favicon.png" rel="shortcut icon" type="image/x-icon" />
<link href="/theme/favicon.png" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="/styles.css" />
<link rel="stylesheet" type="text/css" href="/theme/theme.css" />
<script src="/mark.min.js" type="text/javascript"></script>
<script src="/react.production.min.js" type="text/javascript"></script>
<script src="/react-dom.production.min.js" type="text/javascript"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ mark {
}

.submit {
background: url(/favicon.png) no-repeat 10px center;
background: url(/theme/favicon.png) no-repeat 10px center;
background-size: 20px;
border: 2px solid var(--border-color);
border-left: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Settings = ({
)
: null}
<a href="javascript:;" onClick={onToggleTheme} title="Toggle dark theme">
<img src="/theme.png" />
<img src="/theme/theme.png" />
</a>
</div>
);
Expand Down