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');
}
.embed-link {
z-index: 2;
background-color: $color-header-background;
color: $color-header-primary;
}
#embed-logo {
font-size: 3rem;
line-height: 100%;
font-weight: 300;
z-index: 2;
position: absolute;
color: $color-secondary;
top: 10px;
left: 10px;
opacity: 0.4;
top: 0;
left: 0;
padding: 0 10px 0 0;
letter-spacing: -.1rem;
color: $color-header-primary;
}
#embed-logo span {
display:inline-block;
padding: 10px 0 10px 10px;
}
#embed-logo:hover {
opacity: 1;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3),
1px -1px 1px rgba(255, 255, 255, 0.3),
-1px 1px 1px rgba(255, 255, 255, 0.3),
-1px -1px 1px rgba(255, 255, 255, 0.3);
display:inline-block;
}
#embed-open {
position: absolute;
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,

View file

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

View file

@ -145,7 +145,8 @@
</div>
</section>
{% 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="search">
<input type="hidden" id="origin-input">