Skip to content
Open
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
22 changes: 11 additions & 11 deletions frontend/src/components/Pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Home = () => {
return (
<React.Fragment>

<marquee style={{ padding: '10px', borderRadius: '10px', width: '80%', margin: 'auto', textAlign: 'center' }}>
<marquee style={{ display: 'block', padding: '10px', borderRadius: '10px', width: '80%', margin: 'auto', textAlign: 'center' }}>
<Typography variant='h6' align='center' component='h4' style={{ margin: '20px', padding: '25px', color: '#6e45e2', fontFamily: 'Arial, sans-serif' }}>
🚀 After migrating to Vercel, our application now has separate UI and server deployments for PRODUCTION, while still maintaining server-side rendering locally for DEVELOPMENT. 🚀
</Typography>
Expand All @@ -96,7 +96,7 @@ const Home = () => {
id="theme"
options={themes}
value={theme}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
if (newValue != null)
setTheme(newValue)
Expand All @@ -113,7 +113,7 @@ const Home = () => {
if (newValue != null)
setLayout(newValue)
}}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
renderInput={(params) => <TextField {...params} label="Layout" variant="outlined" />}
/>
</Grid>
Expand All @@ -126,7 +126,7 @@ const Home = () => {
if (newValue != null)
setAnimation(newValue)
}}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
renderInput={(params) => <TextField {...params} label="Animation" variant="outlined" />}
/>

Expand All @@ -137,7 +137,7 @@ const Home = () => {
id="font"
options={fonts}
value={font}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
if (newValue != null)
setFont(newValue)
Expand All @@ -151,7 +151,7 @@ const Home = () => {
id="font-color"
options={colorValues}
value={fontColor}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
setFontColor(newValue)
}}
Expand All @@ -163,7 +163,7 @@ const Home = () => {
id="bg-color"
options={colorValues}
value={bgColor}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
setBgColor(newValue)
}}
Expand All @@ -182,7 +182,7 @@ const Home = () => {
id="border-color"
options={colorValues}
value={borderColor}
style={{ width: 300 }}
style={{margin: '0 auto'}}
onChange={(_event, newValue) => {
setBorderColor(newValue)
}}
Expand All @@ -196,7 +196,7 @@ const Home = () => {
id="quote-type"
options={quoteTypes}
value={quoteType}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
if (newValue != null)
setQuoteType(newValue)
Expand All @@ -210,7 +210,7 @@ const Home = () => {
id="bg-source"
options={['unsplash']}
value={bgSource}
style={{ width: 300, margin: '0 auto' }}
style={{margin: '0 auto' }}
onChange={(_event, newValue) => {
setBgSource(newValue);
}}
Expand All @@ -223,7 +223,7 @@ const Home = () => {
label="Unsplash query"
variant="outlined"
value={unsplashQuery}
style={{ width: 300, margin: '0 auto' }}
style={{ width: '100%' }}
onChange={(event) => setUnsplashQuery(event.target.value)}
onKeyDown={(e) => e.key === "Enter" && setQueryKeyEnter(true)}
disabled={bgSource !== 'unsplash'}
Expand Down
2 changes: 1 addition & 1 deletion src/api/services/quotesService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Template = require("../../models/Template");
const getValidUrl = require("../../utils/validateUrl");
const quoteFromCategory = require('../../../customQuotes/category.json');

getQuoteIndex = (apiResponseLength, quoteType) => {
const getQuoteIndex = (apiResponseLength, quoteType) => {
// Determine the quote index
let today = new Date();
let epoch = new Date(today.getFullYear(), today.getMonth(), today.getDate()).getTime() / 1000
Expand Down
10 changes: 8 additions & 2 deletions src/layouts/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ const layouts = {
},
churchill: {
style: (template) => {

//if background image is provided the titlebackground should be transparent and it should be moved down a bit so it isn't crossing through the borders
const titleBackground = template.bgImage ? 'transparent' : 'var(--bg-color)';
const titleTopPosition = template.bgImage ? '10px' : '-12px';


return `* {
box-sizing: border-box;
}
Expand All @@ -139,12 +145,12 @@ const layouts = {
.title-container {
position: absolute;
width: 100%;
top: -12px;
top: ${titleTopPosition};
z-index: 1;
}

.title-container span {
background: var(--bg-color);
background: ${titleBackground};
background-size: 600px;
background-repeat: no-repeat;
background-position: center;
Expand Down