open in c3nav link for embed

This commit is contained in:
Laura Klünder 2018-12-23 17:36:30 +01:00
parent 30135c4ef0
commit 1b228f3eb2
3 changed files with 29 additions and 14 deletions

View file

@ -244,24 +244,38 @@ main.account form {
background: url('../../img/loader.gif'); background: url('../../img/loader.gif');
} }
.embed-link {
z-index: 2;
background-color: $color-header-background;
color: $color-header-primary;
}
#embed-logo { #embed-logo {
font-size: 3rem; font-size: 3rem;
line-height: 100%; line-height: 100%;
font-weight: 300; font-weight: 300;
z-index: 2;
position: absolute; position: absolute;
color: $color-secondary; top: 0;
top: 10px; left: 0;
left: 10px; padding: 0 10px 0 0;
opacity: 0.4;
letter-spacing: -.1rem; letter-spacing: -.1rem;
color: $color-header-primary;
}
#embed-logo span {
display:inline-block;
padding: 10px 0 10px 10px;
} }
#embed-logo:hover { #embed-logo:hover {
opacity: 1; display:inline-block;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3), }
1px -1px 1px rgba(255, 255, 255, 0.3), #embed-open {
-1px 1px 1px rgba(255, 255, 255, 0.3), position: absolute;
-1px -1px 1px rgba(255, 255, 255, 0.3); top: 0;
right: 0;
padding: 10px;
color: $color-header-text;
}
#embed-open:hover {
color: $color-header-text-hover;
} }
main:not([data-view^=route]) #origin-input, main:not([data-view^=route]) #origin-input,

View file

@ -587,10 +587,10 @@ c3nav = {
if (!replace && c3nav._equal_states(old_state, state)) return; if (!replace && c3nav._equal_states(old_state, state)) return;
var url = c3nav._build_state_url(state, c3nav.embed), var url = c3nav._build_state_url(state, c3nav.embed),
embed_logo = $('#embed-logo'); embed_link = $('.embed-link');
if (embed_logo.length) { if (embed_link.length) {
embed_logo.attr('href', c3nav._build_state_url(state)); embed_link.attr('href', c3nav._build_state_url(state));
} }
c3nav.state = state; c3nav.state = state;

View file

@ -145,7 +145,8 @@
</div> </div>
</section> </section>
{% else %} {% else %}
<a id="embed-logo" target="_blank">c3nav</a> <a id="embed-logo" class="embed-link" target="_blank">{% if header_logo %}<img src="{% static header_logo %}">{% else %}<span>c3nav</span>{% endif %}</a>
<a id="embed-open" class="embed-link" target="_blank">{% trans 'open in c3nav' %}</a>
<section id="popup-buttons"></section> <section id="popup-buttons"></section>
<section id="search"> <section id="search">
<input type="hidden" id="origin-input"> <input type="hidden" id="origin-input">