Skip to content

Commit

Permalink
Merge pull request #242 from mmmnmnm/#241-membership-page
Browse files Browse the repository at this point in the history
#241 membership page
  • Loading branch information
baxgas authored Feb 23, 2022
2 parents b9e2733 + cebeaf7 commit 3f8da2b
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 65 deletions.
2 changes: 1 addition & 1 deletion app/assets/css/globalstyles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions app/assets/css/globalstyles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ body {
@apply mx-auto;
}

h1 {
h1, .h1 {
font-size: 3rem;
@media (max-width: $mobile-width) {
font-size: 2.4rem;
}
font-weight: 600;
line-height: 1.2em;
}
h2 {
h2, .h2 {
font-size: 2.5rem;
@media (max-width: $mobile-width) {
font-size: 2.1rem;
Expand All @@ -93,7 +93,7 @@ h2 {
line-height: 1.2em;
margin: 1rem 0;
}
h3 {
h3, .h3 {
font-size: 2rem;
@media (max-width: $mobile-width) {
font-size: 1.8rem;
Expand All @@ -102,7 +102,7 @@ h3 {
line-height: 1.2em;
margin: 1rem 0;
}
h4 {
h4, .h4 {
font-size: 1.5rem;
@media (max-width: $mobile-width) {
font-size: 1.3rem;
Expand All @@ -111,7 +111,7 @@ h4 {
line-height: 1.4em;
}

h5 {
h5, .h5 {
font-size: 1.25rem;
@media (max-width: $mobile-width) {
font-size: 1.2rem;
Expand Down Expand Up @@ -151,7 +151,7 @@ span.moresign {
}

.show-description {
h3 {
h1, h3 {
margin-top: 0;
}
}
Expand Down Expand Up @@ -222,7 +222,7 @@ span.moresign {
border-radius: 2rem;
}

h2.title-block {
.title-block {
font-size: 2rem;
@media (max-width: $mobile-width) {
font-size: 1.8rem;
Expand Down
6 changes: 3 additions & 3 deletions app/components/HeaderBare.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<header class="flex-row-reverse items-center px-4 py-4 bg-white md:flex md:flex-row">
<header class="flex flex-row items-center px-4 py-4 bg-white ">
<div class="items-center md:flex">
<div class="block mr-4 cursor-pointer" @click="$router.push('/')">
<img src="@/assets/img/lahmacun-logo.png" alt="" class="w-24 logo">
</div>
</div>
<h2>
<div class="h2">
Lahmacun radio
</h2>
</div>
</header>
</template>

Expand Down
6 changes: 3 additions & 3 deletions app/components/HeaderBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<header class="flex-row-reverse items-center justify-between px-4 py-2 bg-white md:flex md:flex-row">
<div class="flex items-center mb-4 xsm:mb-0 xsm:overflow-hidden">
<div class="block mr-4 cursor-pointer" @click="$router.push('/')">
<h1 class="main-title">
<div class="main-title">
Lahmacun Radio
</h1>
</div>
<img src="@/assets/img/lahma_logo_1.svg" alt="Lahmacun Radio" class="w-24 logo">
</div>
<div class="mt-2 xsm:my-4 md:mr-8">
Expand Down Expand Up @@ -107,7 +107,7 @@ export default {
header {
justify-content: space-between;
align-content: center;
h1.main-title {
.main-title {
text-indent: -99em;
font-size: 0.1px;
}
Expand Down
14 changes: 11 additions & 3 deletions app/components/SubTitle.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<template>
<div>
<h2 class="title-block">
<h1 v-if="maintitle" class="title-block">
{{ title }}
</h1>
<h2 v-else class="title-block">
<NuxtLink v-if="url" :to="url">
{{title}}
{{ title }}
</NuxtLink>
<span v-else>{{title}}</span>
<span v-else>{{ title }}</span>
</h2>
</div>
</template>
Expand All @@ -21,6 +24,11 @@ export default {
type: String,
required: false,
default: null
},
maintitle: {
type: Boolean,
required: false,
deafult: false
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/components/news/Full.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
</div>
</div>
<div id="news-content">
<h2 class="mt-0 font-bold">
<h1 class="mt-0 font-bold h2">
{{ htmlDecoder(news.title.rendered) }}
</h2>
</h1>
<p class="mb-4 news-time">
{{ $moment(news.date).format('yyyy. MMMM Do.') }}
</p>
Expand Down
4 changes: 2 additions & 2 deletions app/components/news/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</div>
<div class="news-infos">
<div class="p-8 news-info-details">
<h5 class="pb-2 text-2xl font-bold">
<h1 class="pb-2 text-2xl font-bold">
<nuxt-link :to="'/news/' + news.slug">
{{ htmlDecoder(news.title.rendered) }}
</nuxt-link>
</h5>
</h1>
<div v-sanitize="[ sanitizeOptions, truncatedNews ]" />
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const newsURL = contentApiURL + '/posts?categories=5&per_page=12'
export const aboutUsURL = contentApiURL + '/pages/228'
export const impressumURL = contentApiURL + '/pages/3075'
export const donateURL = contentApiURL + '/pages/2'
export const membershipURL = contentApiURL + '/pages/1425'
export const favouriteRadiosURL = contentApiURL + '/pages/2875'
export const callForShowsURL = contentApiURL + '/pages/3077'
export const lahmaBaseURL = contentApiURL + '/pages/3079'
Expand Down
2 changes: 1 addition & 1 deletion app/layouts/bare.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

<script>
export default {
name: 'Bare'
name: 'BareLayout'
}
</script>
2 changes: 1 addition & 1 deletion app/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="flex flex-col min-h-screen" :class="{ 'pb-12': arcsiVisible }">
<HeaderBlock />
<nuxt class="flex-grow pb-12" />
<nuxt class="flex-grow pb-12 min-h-64" />
<FooterHome v-if="$route.name === 'index'" />
<FooterBottom v-else />
<BottomArcsiPlayer />
Expand Down
41 changes: 23 additions & 18 deletions app/layouts/error.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<template>
<div>
<h3 class="title-block">
Error page
</h3>
<div class="container pt-8 text-center error-page">
<h1 v-if="error.statusCode === 404">
Page not found
</h1>
<h1 v-else-if="error.statusCode === 500">
{{ error.message || 'Server error' }}
</h1>
<h1 v-else>
An error occurred
</h1>
<NuxtLink to="/">
<img src="@/assets/img/lahmacun-logo.png" alt="" class="h-48 py-8 mx-auto">
<SubTitle title="Error page" />
<NuxtLink to="/">
<img src="@/assets/img/lahma_citrom_transparent.png" alt="" class="w-full pt-8 mx-auto md:w-80">
<div class="container pt-8 text-center error-page">
<h1 v-if="error.statusCode === 404">
Page {{ $route && `"${$route.path}"` }} not found
</h1>
<h1 v-else-if="error.statusCode === 500">
{{ error.message || 'Server error' }}
</h1>
<h1 v-else>
An error occurred
</h1>
Try the Home page
</NuxtLink>
</div>
</div>
</NuxtLink>
</div>
</template>

Expand All @@ -34,7 +32,11 @@ export default {
mounted () {
if (this.isClient) {
this.tryReloadInterval = setInterval(() => {
window.location.reload()
if (this.error.statusCode !== 404) {
window.location.reload()
} else {
window.location.href = '/'
}
}, 30000)
}
},
Expand All @@ -48,5 +50,8 @@ export default {
.error-page {
background: $lahma-pink;
@apply flex flex-col align-middle justify-items-center;
h1 {
@apply text-4xl mb-2;
}
}
</style>
2 changes: 1 addition & 1 deletion app/pages/archive.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<SubTitle title="Lahmacun Archive" />
<SubTitle title="Lahmacun Archive" :maintitle="true" />
<div class="container mt-8">
<!-- no search for now, is buggy
<div v-if="defaultEpisodes" class="flex justify-between">
Expand Down
6 changes: 2 additions & 4 deletions app/pages/donate.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<template>
<div>
<h2 class="title-block">
Lahmacun Donate
</h2>
<SubTitle title="Lahmacun Donate" :maintitle="true" />
<div class="container my-8">
<div v-if="$fetchState.pending" class="center">
Loading...
Expand Down Expand Up @@ -75,7 +73,7 @@ export default {
if (!this.donateContent?.content?.rendered) {
return 'No content'
}
return this.donateContent.content.rendered.replaceAll('target="_top"', 'target="_blank"')
return this.donateContent.content.rendered.replace(/target="_top"/g, 'target="_blank"')
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions app/pages/impressum.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<template>
<div>
<h2 class="title-block">
Lahmacun Impressum
</h2>
<SubTitle title="Lahmacun Impressum" :maintitle="true" />
<div id="about-page-content" class="container mt-8">
<div v-if="$fetchState.pending" class="py-8 center w-100">
Loading...
Expand All @@ -11,10 +9,10 @@
Some error happened...
</div>
<div v-if="impressum" class="md:flex">
<div v-if="impressumFeaturedImage" class="md:mr-8 mb-4 md:mb-0 min-w-1/2 lg:min-w-1/3 md:w-1/2 lg:w-1/3">
<div v-if="impressumFeaturedImage" class="mb-4 md:mr-8 md:mb-0 min-w-1/2 lg:min-w-1/3 md:w-1/2 lg:w-1/3">
<img :src="impressumFeaturedImage.source_url" alt="Lahmacun Impressum">
</div>
<div v-sanitize="[ sanitizeOptions, impressumResults]" />
<div v-sanitize="[ sanitizeOptions, impressumResults]" class="text-content" />
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 3f8da2b

Please sign in to comment.