Skip to content

Commit

Permalink
[#7] Removed hamburger btn
Browse files Browse the repository at this point in the history
  • Loading branch information
qtsky89 committed Mar 13, 2023
1 parent 27dcf2e commit 1166697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
4 changes: 2 additions & 2 deletions tblog_django/tblog_app/views/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _object_to_tag(self, tags: List[Tag]) -> List[str]:
ret[i] = tag.name
return ret

def get(self, *args, **kwargs):
def get(self, request: HttpRequest, **kwargs):
try:
if kwargs['pk'] == '':
data = [model_to_dict(obj) for obj in Post.objects.all().order_by('-created_date')]
Expand All @@ -35,7 +35,7 @@ def get(self, *args, **kwargs):
logger.error(e, exc_info=True)
return JsonResponse({'message': '', 'data': []}, status=Status.INTERNAL_SERVER_ERROR)

def post(self, request: HttpRequest, *args, **kwargs):
def post(self, request: HttpRequest, **kwargs):
try:
if kwargs['pk'] != '':
raise Exception('pk should be empty')
Expand Down
36 changes: 2 additions & 34 deletions tblog_quasar/src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,22 @@
<q-layout view="hHh lpr lFr">
<q-header reveal class="bg-grey-2 text-black">
<q-toolbar>
<q-btn
flat
dense
round
icon="menu"
aria-label="Menu"
@click="toggleLeftDrawer"
/>
<q-toolbar-title>
<router-link class="main-link" to="/">Test</router-link>
<q-toolbar-title class="q-ml-lg">
<router-link class="main-link" to="/">Wonhee's Tech Blog</router-link>
</q-toolbar-title>
<ControlDropdown />
</q-toolbar>
</q-header>

<q-drawer v-model="leftDrawerOpen" side="left" bordered overlay>
<q-list>
<EssentialLink
v-for="link in essentialLinks"
:key="link.title"
v-bind="link"
/>
</q-list>
</q-drawer>

<q-page-container>
<router-view />
</q-page-container>
</q-layout>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import EssentialLink from 'components/EssentialLink.vue'
import ControlDropdown from 'components/ControlDropdown.vue'
const essentialLinks = [
{
title: 'Docs',
caption: 'quasar.dev',
icon: 'school',
link: 'https://quasar.dev',
},
]
const leftDrawerOpen = ref(false)
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value
}
</script>

<style scoped>
Expand Down

0 comments on commit 1166697

Please sign in to comment.