Skip to content

Commit

Permalink
Add footer and polish look&feel at the different screen resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
blokhin committed Jul 9, 2024
1 parent a13dd10 commit 1422f62
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Currently uses [cifplayer](https://github.com/tilde-lab/cifplayer) and data from
paper](https://github.com/google-deepmind/materials_discovery).
The physical properties prediction is done dynamically by [MPDS ML server](https://mpds.io/ml).

![2023-12-10-001838_1095x878_scrot](https://github.com/ml-evs/this-material-does-not-exist/assets/7916000/678ba7ec-d929-438e-8637-3dad5bf26493)
![GNome_d582d1239f_screenshot](https://github.com/mpds-io/this-material-does-not-exist/main/d582d1239f.png)


## Build

The `cifplayer` is powered by `$mol` framework. Note that, unlike many other frontend frameworks, `$mol` provides the same single environment for all its projects, under the standard namespace scheme. That is, all your `$mol`-based code lives inside the same directory `$MOL_HOME`. So if you don't have `$MOL_HOME` yet, please create it and navigate there:
The `cifplayer` is powered by `$mol` framework. Note that, unlike many other frontend frameworks, `$mol` provides the same single environment for all its projects, under the standard namespace scheme. That is, all your `$mol`-based code lives inside the same directory `$MOL_HOME`. So if you don't have `$MOL_HOME` yet, please create it and navigate there

```bash
mkdir $MOL_HOME && cd $MOL_HOME
Expand Down
7 changes: 6 additions & 1 deletion app/app.view.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@media all and (max-width: 900px) {
@media all and (max-width: 850px) {
[optimade_tmdne_app_param_mae], [optimade_tmdne_app_param_name] { display: none; }
[optimade_tmdne_app_acks] { display: none; }
}

@media all and (max-height: 650px) {
[optimade_tmdne_app_prediction] { display: none; }
}
15 changes: 12 additions & 3 deletions app/app.view.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ namespace $.$$ {
justify: {
content: 'center',
},
font: {
size: '1.2rem',
},
},

Prediction: {
Expand Down Expand Up @@ -113,7 +116,7 @@ namespace $.$$ {
},
width: '24rem',
position: 'absolute',
bottom: '4rem',
bottom: '5.3rem',

pointerEvents: 'none',
transition: 'opacity 0.2s',
Expand All @@ -123,18 +126,24 @@ namespace $.$$ {
opacity: 0,
},
},
zIndex: 1,
},

Hint_no: {
pointerEvents: 'auto',
color: '#ff6666',
zIndex: 10,
},

Hint_yes: {
pointerEvents: 'auto',
color: $mol_theme.current,
zIndex: 10,
},

Acks: {
font: {
size: '0.7rem',
},
zIndex: 0,
},

} )
Expand Down
24 changes: 23 additions & 1 deletion app/app.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $optimade_tmdne_app $mol_view
<= Param_name* $mol_paragraph
title <= param_name* \
<= Param_symbol* $mol_html_view
minimal_height <= param_min_height 24
minimal_height <= param_min_height 22
html <= param_symbol* \
\=
<= Param_value* $mol_view
Expand Down Expand Up @@ -70,3 +70,25 @@ $optimade_tmdne_app $mol_view
swiped_to? <=> swiped_to*? \
swipe_to_right => swipe_to_right*
swipe_to_left => swipe_to_left*
<= Acks $mol_view
sub /
<= Acks_a $mol_link
uri \https://www.optimade.org
sub /
\Powered by Optimade
<= Acks_b $mol_link
uri \https://github.com/tilde-lab/cifplayer
sub /
\and cifplayer
<= Acks_c $mol_link
uri \https://github.com/google-deepmind/materials_discovery
sub /
\using the GNome dataset
<= Acks_d $mol_link
uri \https://github.com/ml-evs/this-material-does-not-exist
sub /
\developed on GitHub
<= Acks_e $mol_link
uri \https://thispersondoesnotexist.com
sub /
\and inspired by...
5 changes: 3 additions & 2 deletions card/card.view.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace $.$$ {
position: 'fixed',
left: '50%',
transform: 'translateX(-50%)',
bottom: 0,
bottom: '1.6rem',
zIndex: 2,

// position: 'relative',
// left: 0,
Expand All @@ -28,7 +29,7 @@ namespace $.$$ {
background: {
color: $mol_theme.back,
},
transform: 'translateY(110%)',
transform: 'translateY(125%)',
transition: 'transform 0.7s',
'[loaded]': {
'true': {
Expand Down
2 changes: 1 addition & 1 deletion card/card.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $optimade_tmdne_card $optimade_tmdne_swipe
card_position <= card_position \
sub /
<= Name $mol_html_view
minimal_height 24
minimal_height 22
html <= name \
<= Question $mol_paragraph
title \Do you think it's synthesizable?
Expand Down
Binary file added d582d1239f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1422f62

Please sign in to comment.