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

Add a component for #app-content #337

Merged
merged 1 commit into from
Apr 8, 2019
Merged
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
31 changes: 31 additions & 0 deletions src/components/AppContent/AppContent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
- @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @author Christoph Wurst <christoph@winzerhof-wurst.at>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template>
<div id="app-content">
<slot />
</div>
</template>

<script>
export default {}
</script>
24 changes: 24 additions & 0 deletions src/components/AppContent/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import AppContent from './AppContent'

export default AppContent
export { AppContent }
11 changes: 1 addition & 10 deletions src/components/Content/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
<template>
<div id="content" :class="'app-' + appName">
<slot name="navigation" />
<div v-if="$slots['content'] !== undefined"
id="app-content"
:class="contentClass">
<slot name="content" />
</div>
<slot name="content" />
<slot />
<div v-if="$slots['sidebar'] !== undefined"
id="app-sidebar">
Expand All @@ -42,11 +38,6 @@ export default {
appName: {
type: String,
required: true
},
contentClass: {
type: [String, Array, Object],
required: false,
default: ''
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,29 @@
*/

import Action from './Action'
import Content from './Content'
import AppContent from './AppContent'
import AppNavigation from './AppNavigation'
import AppNavigationItem from './AppNavigationItem'
import AppNavigationNew from './AppNavigationNew'
import AppNavigationSettings from './AppNavigationSettings'
import AppNavigationSpacer from './AppNavigationSpacer'
import Avatar from './Avatar'
import Content from './Content'
import DatetimePicker from './DatetimePicker'
import Modal from './Modal'
import Multiselect from './Multiselect'
import PopoverMenu from './PopoverMenu'

export {
Action,
Content,
AppContent,
AppNavigation,
AppNavigationItem,
AppNavigationNew,
AppNavigationSettings,
AppNavigationSpacer,
Avatar,
Content,
DatetimePicker,
Modal,
Multiselect,
Expand Down