Jump to anchor inside details tag and refactor tablet styles

This commit is contained in:
squidfunk 2020-02-18 15:39:36 +01:00
parent b2654777b8
commit dee75ccfbb
10 changed files with 56 additions and 33 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.c16ffcea.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.4bee132b.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.c16ffcea.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.4bee132b.min.js.map",
"assets/javascripts/worker/packer.js": "assets/javascripts/worker/packer.c14659e8.min.js", "assets/javascripts/worker/packer.js": "assets/javascripts/worker/packer.c14659e8.min.js",
"assets/javascripts/worker/packer.js.map": "assets/javascripts/worker/packer.c14659e8.min.js.map", "assets/javascripts/worker/packer.js.map": "assets/javascripts/worker/packer.c14659e8.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.0a5433f7.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.0a5433f7.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.0a5433f7.min.js.map", "assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.0a5433f7.min.js.map",
"assets/stylesheets/app-palette.scss": "assets/stylesheets/app-palette.3f90c815.min.css", "assets/stylesheets/app-palette.scss": "assets/stylesheets/app-palette.3f90c815.min.css",
"assets/stylesheets/app.scss": "assets/stylesheets/app.37150387.min.css" "assets/stylesheets/app.scss": "assets/stylesheets/app.f26f5fbb.min.css"
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/app.37150387.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/app.f26f5fbb.min.css' | url }}">
{% if palette.primary or palette.accent %} {% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/app-palette.3f90c815.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/app-palette.3f90c815.min.css' | url }}">
{% endif %} {% endif %}
@ -190,7 +190,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/bundle.c16ffcea.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.4bee132b.min.js' | url }}"></script>
<script id="__lang" type="application/json"> <script id="__lang" type="application/json">
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [

View File

@ -277,6 +277,28 @@ export function initialize(config: unknown) {
) )
.subscribe() .subscribe()
// TODO: patch details!
/* Open details after anchor jump */
merge(hash$, of(location.hash)) // getLocationHash
.subscribe(hash => {
const el = getElement(hash)
console.log("jump to", hash)
if (typeof el !== "undefined") {
const parent = el.closest("details")
if (parent && !parent.open) { // only if it is not open!
parent.open = true
/* Hack: force reload for repositioning */ // TODO. what happens here!?
location.hash = "" // reset
requestAnimationFrame(() => {
location.hash = hash // tslint:disable-line
})
// TODO: setLocationHash() + forceLocationHashChange
}
}
})
// Scroll lock // Scroll lock
const toggle$ = useToggle("search") const toggle$ = useToggle("search")
combineLatest([ combineLatest([
@ -300,6 +322,8 @@ export function initialize(config: unknown) {
) )
.subscribe() .subscribe()
/* ----------------------------------------------------------------------- */
// General keyboard handlers // General keyboard handlers
keyboard$ keyboard$
.pipe( .pipe(

View File

@ -419,12 +419,11 @@ kbd {
// Data tables // Data tables
table:not([class]) { table:not([class]) {
@include z-depth(2);
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
border-radius: px2rem(2px); border-radius: px2rem(2px);
font-size: ms(-1); font-size: ms(-1);
box-shadow: inset 0 0 0 px2rem(1px) $md-color-black--lightest;
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;