Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

How do we enable default iOS theme in browser? #25

Open
rlam3 opened this issue May 16, 2018 · 1 comment
Open

How do we enable default iOS theme in browser? #25

rlam3 opened this issue May 16, 2018 · 1 comment

Comments

@rlam3
Copy link

rlam3 commented May 16, 2018

How do we enable default iOS theme in browser?

@ceeyang
Copy link

ceeyang commented Sep 5, 2018

@rlam3

add this code to your App.vue:

/// Default ios theme
let theme = 'ios';
if (document.location.search.indexOf('theme=') >= 0) {
  theme = document.location.search.split('theme=')[1].split('&')[0];
}

like this:

<template>
    <!-- App -->
    <f7-app :params="f7params">
        <f7-statusbar></f7-statusbar>
        <f7-panel left cover>
            <f7-view url="/panel-left/" links-view=".view-main" />
        </f7-panel>
        <f7-view url="/" :main="true" class="ios-edges"></f7-view>
    </f7-app>
</template>
<script>
// Import Routes...
import routes from './routes.js'

/// Default ios theme
let theme = 'ios';
if (document.location.search.indexOf('theme=') >= 0) {
  theme = document.location.search.split('theme=')[1].split('&')[0];
}


export default {
    data() {
        return {
            f7params: {
                theme,
                routes,
                id: 'io.framework7.testapp',
            }
        }
    }
}
</script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants