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

[WIP] Prototype icons #132

Open
wants to merge 3 commits 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions config.toml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ ignoreFiles = ["README.md$"]
[[menu.main]]
parent = "Biology"
url = "/proteins/"
name = "Proteins and Virion"
name = "🝪 Proteins and Virion"
weight = 1

[[menu.main]]
parent = "Biology"
url = "/targets/"
name = "Target Modalities"
name = "🞜 Target Modalities"
weight = 2


Expand All @@ -47,19 +47,19 @@ ignoreFiles = ["README.md$"]
[[menu.main]]
parent = "Viral/Host Structural Data"
url = "/structures"
name = "Structures"
name = "Structures"
weight = 1

[[menu.main]]
parent = "Viral/Host Structural Data"
url = "/models"
name = "Models"
name = "Models"
weight = 2

[[menu.main]]
parent = "Viral/Host Structural Data"
url = "/simulations"
name = "Simulations"
name = "Simulations"
weight = 2

[[menu.main]]
Expand All @@ -71,7 +71,7 @@ ignoreFiles = ["README.md$"]
[[menu.main]]
parent = "Therapeutics"
url = "/therapeutics"
name = "All Therapeutics"
name = "💊 All Therapeutics"
weight = 1

[[menu.main]]
Expand Down
2 changes: 1 addition & 1 deletion themes/minimal/layouts/models/single.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h3 align="left" class="anchor" id="{{ .name | anchorize }}"><b><a href='{{index
{{ end }}
{{ end }}
{{ if $localScratch.Get "has_content" }}
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{$t_map.name}}</a></u></h3>
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{ partial "target_icon" }} {{$t_map.name}}</a></u></h3>
<!-- Finally Models -->
{{ range sort $.Site.Data.models "rating" "desc" }}
{{ $protein := $localScratch.Get "protein" }}
Expand Down
4 changes: 2 additions & 2 deletions themes/minimal/layouts/partials/model-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h5 align="center">{{ .model.creator }}</h5>
<h5 align="left"><b>Represented Proteins: </b>
{{ range $pname := .model.proteins }}
{{ $plink := print ($localScratch.Get "context").Site.BaseURL "/proteins/#" ( $pname | anchorize) }}
<a href="{{ $plink }}"><kbd class="bg-primary" style="">{{ $pname }}</kbd></a>
<a href="{{ $plink }}"><kbd class="bg-primary" style="">{{ partial "protein_icon" }} {{ $pname }}</kbd></a>
{{ end }}
</h5>

Expand Down Expand Up @@ -71,7 +71,7 @@ <h5 align="left"><b>Simulations:</b></h5>
{{ $anchor := print ( $sim.title | anchorize) "-" ( $.protein | anchorize) "-" ( $.target | anchorize) }}
<h5 align="left">
<p>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $anchor }}'><kbd class="alert-secondary">{{ $sim.title }}</kbd></a>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $anchor }}'><kbd class="alert-secondary">{{ partial "simulation_icon" }} {{ $sim.title }}</kbd></a>
{{ partial "general-marker" $sim }}
</p>
</h5>
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/models_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4 changes: 2 additions & 2 deletions themes/minimal/layouts/partials/protein-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h5 align="left">
{{ $anchor := print ( $model.name | anchorize) "-" ( $.protein.protein | anchorize) "-" ( $target | anchorize) }}
{{ $model_url := print $.context.Site.BaseURL "/models/#" $anchor }}
<a href='{{ $model_url }}'>
<kbd class="alert-info">{{ $model.name | title }}{{partial "stars" $model.rating}}</kbd>
<kbd class="alert-info">{{ partial "models_icon" }} {{ $model.name | title }}{{partial "stars" $model.rating}}</kbd>
</a>
{{ partial "general-marker" $model }}
</p>
Expand All @@ -99,7 +99,7 @@ <h5 align="left">
{{ if and (in .proteins $.protein.protein) (lt ($localScratch.Get "postedSim") 2) }}
<!-- TODO: Map the anchor to *a* target instead of just the protein heade-->
<p>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $.protein.name | anchorize }}'><kbd class="alert-secondary">{{ $sim.title}}</kbd></a>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $.protein.name | anchorize }}'><kbd class="alert-secondary">{{ partial "simulation_icon" }} {{ $sim.title}}</kbd></a>
{{ partial "general-marker" $sim }}
<!-- Add to the counter -->
{{ $localScratch.Set "postedSim" (add ($localScratch.Get "postedSim") 1 )}}
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/protein_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
🝪
8 changes: 4 additions & 4 deletions themes/minimal/layouts/partials/simulation-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h5 align="left">
<h5 align="left">
<b>Trajectory:</b>
{{ if .simulation.trajectory }}
<a href="{{ .simulation.trajectory }}"><kbd class="alert-secondary">Get Trajectory ({{.simulation.size}})</kbd></a>
<a href="{{ .simulation.trajectory }}"><kbd class="alert-secondary">{{ partial "trajectory_icon" }} Get Trajectory ({{.simulation.size}})</kbd></a>
{{ else }}
---
{{ end }}
Expand All @@ -87,7 +87,7 @@ <h5 align="left">
<h5 align="left">
<b>Represented Proteins:</b>
{{ range .simulation.proteins }}
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ . }}</kbd></a>
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ partial "protein_icon" }} {{ . }}</kbd></a>
{{ else }}
---
{{ end }}
Expand All @@ -98,7 +98,7 @@ <h5 align="left">
<b>Represented Structures:</b>
{{ range .simulation.structures }}
{{ $anchor := print ( . | upper | anchorize) "-" ( $.protein | anchorize) }}
<a href='{{ $.context.Site.BaseURL }}/structures/#{{ $anchor }}'><kbd class="alert-danger">{{.}}</kbd></a>
<a href='{{ $.context.Site.BaseURL }}/structures/#{{ $anchor }}'><kbd class="alert-danger">{{ partial "structure_icon" }} {{.}}</kbd></a>
{{ else }}
---
{{ end }}
Expand All @@ -112,7 +112,7 @@ <h5 align="left">
{{ range $mname, $mdata := $.context.Site.Data.models }}
{{ if eq $model $mname }}
{{ $anchor := print ( $mdata.name | anchorize) "-" ( $.protein | anchorize) "-" ( $.target | anchorize) }}
<a href='{{ $.context.Site.BaseURL }}/models/#{{ $anchor }}'><kbd class="alert-info">{{ $mdata.name}}</kbd></a>
<a href='{{ $.context.Site.BaseURL }}/models/#{{ $anchor }}'><kbd class="alert-info">{{ partial "models_icon" }} {{ $mdata.name}}</kbd></a>
{{ end }}
{{ end }}
{{ else }}
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/simulation_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8 changes: 4 additions & 4 deletions themes/minimal/layouts/partials/structure-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h5 align="left">
{{ $anchor := print ( $model.name | anchorize) "-" ( $.protein | anchorize) "-" ( $.target | anchorize) }}
{{ $model_url := print $.context.Site.BaseURL "/models/#" $anchor }}
<a href='{{ $model_url }}'>
<kbd>{{ $model.name | title }}{{partial "stars" $model.rating}}</kbd>
<kbd>{{ partial "models_icon" }} {{ $model.name | title }}{{partial "stars" $model.rating}}</kbd>
</a>
{{ partial "general-marker" $model }}
</p>
Expand All @@ -129,15 +129,15 @@ <h5 align="left">
<p>-->
{{ $targets := partial "ensure-slice" .structure.targets }}
{{ range $targets }}
<a href='{{ (index ($localScratch.Get "target_map") .).link }}'><kbd class="item-tag">{{ (index ($localScratch.Get "target_map") .).name | title }}</kbd></a>
<a href='{{ (index ($localScratch.Get "target_map") .).link }}'><kbd class="item-tag">{{ partial "target_icon" }} {{ (index ($localScratch.Get "target_map") .).name | title }}</kbd></a>
{{ end }}
<!--</p>-->
</h5>

<h5 align="left"><b>Related Proteins:</b>
{{ $proteins := partial "ensure-slice" .structure.proteins }}
{{ range $proteins }}
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ . }}</kbd></a>
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ partial "protein_icon" }} {{ . }}</kbd></a>
{{ end }}
</h5>

Expand All @@ -149,7 +149,7 @@ <h5 align="left"><b>Top Simulations:</b><a href='{{ $.context.Site.BaseURL }}/si
{{ if and ($sin) (lt ($localScratch.Get "postedSim") 2) }}
{{ $anchor := print ( $sim.title | anchorize) "-" ( $.protein | anchorize) "-" ( $.target | anchorize) }}
<h5 align="left"><p>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $anchor }}'><kbd class="alert-secondary">{{ $sim.title }}</kbd></a>
<a href='{{ $localScratch.Get "BaseURL" }}/simulations/#{{ $anchor }}'><kbd class="alert-secondary">{{ partial "simulation_icon" }} {{ $sim.title }}</kbd></a>
{{ partial "general-marker" $sim }}
</p></h5>
<!-- Add to the counter -->
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/structure_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4 changes: 2 additions & 2 deletions themes/minimal/layouts/partials/target-entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h4 class="anchor" id="{{.context.name | anchorize }}"><b>{{ .context.name }}</b
<!-- tag links to proteins involves in this target -->
<h5 align="left"><b>Proteins affected:</b>
{{ range .context.proteins }}
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ . }}</kbd></a>
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ partial "protein_icon" }} {{ . }}</kbd></a>
{{ end }}
</h5>

Expand All @@ -30,7 +30,7 @@ <h5 align="left"><b>Potential therapeutic modalities:</b><!--</h5>
<h5 align="left">-->
{{ range .context.therapeutic_modalities }}
<!-- NOTE: hyperlinks do not correctly link up to the right anchor point yet -->
<a href='{{ index ($localScratch.Get "thera_map") . }}'><kbd class="alert-success">{{ . | title }}</kbd></a>
<a href='{{ index ($localScratch.Get "thera_map") . }}'><kbd class="alert-success">{{ partial "therapeutics_icon" }} {{ . | title }}</kbd></a>
{{ end }}
<!--</h5>-->
</div>
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/target_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
🞜
4 changes: 2 additions & 2 deletions themes/minimal/layouts/partials/therapeutics-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h5 align="left"><b>Read more about it:</b>
<h5 align="left"><b>Targeting Modalities:</b>

{{ range $localScratch.Get "iter" }}
<a href='{{ (index ($localScratch.Get "target_map") .).link }}'><kbd class="item-tag">{{ . | title}}</kbd></a>
<a href='{{ (index ($localScratch.Get "target_map") .).link }}'><kbd class="item-tag">{{ partial "target_icon" }} {{ . | title}}</kbd></a>
{{ end }}
</h5>
{{ end }}
Expand All @@ -60,7 +60,7 @@ <h5 align="left"><b>Targeting Modalities:</b>
<h5 align="left"><b>Known Protein Interactions:</b>

{{ range $localScratch.Get "iter" }}
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ . }}</kbd></a>
<a href='{{ index ($localScratch.Get "protein_map") . }}'><kbd class="bg-primary">{{ partial "protein_icon" }} {{ . }}</kbd></a>
{{ end }}
</h5>
{{ end }}
Expand Down
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/therapeutics_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
💊
1 change: 1 addition & 0 deletions themes/minimal/layouts/partials/trajectory_icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2 changes: 1 addition & 1 deletion themes/minimal/layouts/simulations/single.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3 align="left" class="anchor" id="{{ .name | anchorize }}"><b><a href='{{index
{{ end }}

{{ if $localScratch.Get "has_content" }}
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{$t_map.name}}</a></u></h3>
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{ partial "target_icon" }} {{$t_map.name}}</a></u></h3>
<!-- Finally Simulations -->
{{ range sort $.Site.Data.simulations "rating" "desc" }}
{{ $protein := $localScratch.Get "protein" }}
Expand Down
2 changes: 1 addition & 1 deletion themes/minimal/layouts/structures/single.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h3 align="left" class="anchor" id="{{ .name | anchorize }}"><b><a href='{{index
{{ end }}
{{ end }}
{{ if $localScratch.Get "has_content" }}
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{$t_map.name}}</a></u></h3>
<h3 align="left"><u><a style="color:black;" href='{{ $t_map.link }}'>{{ partial "target_icon" }} {{$t_map.name}}</a></u></h3>
<!-- Finally Structures -->
{{ range sort $.Site.Data.structures "rating" "desc" }}
{{ $protein := $localScratch.Get "protein" }}
Expand Down