diff --git a/.gitignore b/.gitignore index 4752b1a..8045f94 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ node_modules /assets/styles/*.css.map ###> dont upload files to repo -/public/photos +/public/files diff --git a/assets/styles/main.css b/assets/styles/main.css index f0c0b51..047d795 100644 --- a/assets/styles/main.css +++ b/assets/styles/main.css @@ -1 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}@font-face{font-family:RobotoSlab-Regular;src:url("/fonts/RobotoSlab-Regular.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Medium;src:url("/fonts/RobotoSlab-Regular.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Bold;src:url("/fonts/RobotoSlab-Bold.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Black;src:url("/fonts/RobotoSlab-Black.ttf") format("opentype")}@font-face{font-family:AtomicAge-Regular;src:url("/fonts/AtomicAge-Regular.ttf") format("opentype")}@font-face{font-family:Montserrat-Regular;src:url("/fonts/Montserrat-Regular.ttf") format("opentype")}@font-face{font-family:Montserrat-Light;src:url("/fonts/Montserrat-Light.ttf") format("opentype")}@font-face{font-family:Montserrat-Italic;src:url("/fonts/Montserrat-Italic.ttf") format("opentype")}@font-face{font-family:Montserrat-Bold;src:url("/fonts/Montserrat-Bold.ttf") format("opentype")}@font-face{font-family:Montserrat-SemiBold;src:url("/fonts/Montserrat-SemiBold.ttf") format("opentype")}@font-face{font-family:Orbitron-Regular;src:url("/fonts/Orbitron-Regular.ttf") format("opentype")}@font-face{font-family:Amarante;src:url("/fonts/Amarante-Regular.ttf") format("opentype")}h1,h2,h3,h4,h5,h6{font-family:Amarante;letter-spacing:2px}h1{font-size:2rem}@media screen and (min-width: 600px){h1{font-size:3rem}}h2{font-size:1.75rem}@media screen and (min-width: 600px){h2{font-size:2.5rem}}h3{font-size:1.5rem}@media screen and (min-width: 600px){h3{font-size:2rem}}h4{font-size:1.25rem}@media screen and (min-width: 600px){h4{font-size:1.5rem}}h5{font-size:1rem}@media screen and (min-width: 600px){h5{font-size:1.25rem}}h6{font-size:1rem}@media screen and (min-width: 600px){h6{font-size:1em}}p,a,li,span{font-family:RobotoSlab-Regular;letter-spacing:1px}strong{font-family:Montserrat-Bold}em{font-family:Montserrat-Italic}u{font-family:Montserrat-SemiBold}cite,q,small{font-family:Orbitron-Regular}s{font-family:Montserrat-SemiBold}h1,h2,h3,h4,h5,h6,p,a,span,time{color:#fbfcff}.secondary.layout--v1{display:block;position:relative;padding:.5rem .5rem;background-color:#d7b94c}.secondary.layout--v1 #root{display:flex;flex-direction:column}@media(min-width: 800px){.secondary.layout--v1 #root{display:grid;grid-template-columns:25% 75%;grid-template-rows:1fr;margin:0 auto;padding:1rem 1rem}}.secondary.layout--v1 #root{gap:1rem;position:relative;width:100%;height:100%;min-height:100vh;max-width:1200px;background-color:#1f2421;box-shadow:0 0 5px 10px rgba(29,31,32,.45)}.secondary.layout--v1 #root main{padding:1rem 1rem}.secondary.layout--v1.menu-open,.secondary.layout--v1.photo-open{overflow:hidden}.secondary.layout--v1.photo-open .overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#171a21;opacity:.9}header{display:block;position:sticky;overflow:auto;width:100%;height:50px;top:0;padding-bottom:1rem;background-color:#1f2421}@media(min-width: 600px){header{height:500px}}header.open{overflow:visible}header.open .top h1{display:none}header nav.main{display:block;position:relative}@media(min-width: 600px){header nav.main{display:flex;flex-direction:column;gap:2rem}}header nav.main .top{display:flex}header nav.main .top h1{margin:0}header nav.main .top h1 a{display:block;position:relative;top:1rem;left:1rem;font-size:1.5rem;text-decoration:none;color:#1d1f20;background-color:#d7b94c;border:2px solid #d7b94c;padding:2px 2px}header nav.main .top h1 a:hover{color:#d7b94c;background-color:unset}header nav.main .top .icon.icon-menu{display:block;position:absolute;top:1rem;right:1rem;width:35px;height:35px;z-index:999;transition:right 100ms ease}@media screen and (min-width: 600px){header nav.main .top .icon.icon-menu{display:none}}header nav.main .top .icon.icon-menu:before{content:"";display:block;background-image:url("/icons/menu-grid.svg");background-size:100%;position:absolute;width:35px;height:35px}header nav.main .top .icon.icon-menu:hover{cursor:pointer}header nav.main .top .icon.icon-menu.open{right:325px}header nav.main .top .icon.icon-menu.open:before{background-image:url("/icons/menu-close.svg")}header nav.main menu{position:absolute;right:0;top:0;width:0;background-color:#d7b94c;overflow:hidden;padding:0;margin:0;transition:width 100ms ease}@media(min-width: 600px){header nav.main menu{position:relative;top:unset;right:unset;width:100%;transition:unset;background-color:unset}}header nav.main menu.open{width:300px;box-shadow:0 0 5px 10px rgba(29,31,32,.45)}header nav.main menu li{padding:1rem 2rem}header nav.main menu li a{display:block;color:#fbfcff;text-decoration:none}header nav.main menu li a:hover{text-decoration:underline}.posts .list ul{list-style:none;padding:0}.posts .list ul li{padding:1rem 0}.posts .list ul li a{color:#fbfcff;text-decoration:none;display:block}.posts .list ul li a .post-title{margin:0}.photos{display:block}.photos .albums{display:flex;flex-direction:column;width:100%}@media(min-width: 800px){.photos .albums{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto}}.photos .albums{gap:1rem;list-style:none;padding:0}.photos .albums .album{display:block;width:100%}.photos .albums .album a{display:block;position:relative;color:#fff;text-decoration:none;overflow:hidden}.photos .albums .album a img{display:block;width:100%;height:auto}.photos .albums .album a .title,.photos .albums .album a .date,.photos .albums .album a .overlay{position:absolute;visibility:visible;margin:0}.photos .albums .album a .title,.photos .albums .album a .date,.photos .albums .album a .category{z-index:2}.photos .albums .album a .title{top:1rem;left:1rem}.photos .albums .album a .date{bottom:1rem;left:1rem;font-weight:bold}.photos .albums .album a .overlay{width:100%;height:auto;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.333);z-index:1}.photos .albums .album a:hover .title,.photos .albums .album a:hover .date,.photos .albums .album a:hover .category,.photos .albums .album a:hover .overlay{visibility:hidden}.photos .albums .album a:hover img{transform:scale(1.01);transition:transform 100ms ease-in-out}.photos img{width:100%}#album .title{margin:0}#album .meta{border-bottom:5px solid #a6a695}#album .photos{display:flex;flex-direction:column;width:100%}@media(min-width: 800px){#album .photos{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto}}#album .photos{gap:1rem;list-style:none;padding:0}#album .photos .photo{width:100%;overflow:hidden}#album .photos .photo img{transition:transform 100ms ease-in-out}#album .photos .photo:hover{cursor:pointer}#album .photos .photo:hover img{transform:scale(1.01);transition:transform 100ms ease-in-out}#open-image{display:none;position:absolute;top:50%;left:0;transform:translateY(-50%);z-index:999}#open-image .close{cursor:pointer;font-size:2rem;position:absolute;right:0;top:0}#open-image img{width:100%;height:auto}#open-image #details{display:block;height:auto;padding:1rem 1rem;background-color:#a6a695}#open-image #details p{margin:0}#open-image #details #caption{font-size:1.5rem;padding-bottom:1rem}#open-image #details #location,#open-image #details #date,#open-image #details #equipment{font-size:1.25rem}#open-image.open{display:block}.posts{display:block}.posts h2,.posts h3{position:relative;margin:0;width:fit-content}.posts h2:after,.posts h3:after{content:"";display:block;width:75px;height:5px;background-color:#a6a695}.posts .list{padding-top:1rem;border-top:5px solid #d7b94c}.posts .list .post a .title{padding:.5rem 0}.posts .list .post a:hover{text-decoration:underline;text-decoration-color:#a6a695}.post{display:block}.post .title{margin:.5rem 0}.post .meta{padding-bottom:1rem;border-bottom:5px solid #a6a695}.post .meta .admin-actions{padding-bottom:1rem}.post .meta .published{font-size:1.125rem}.post .meta .category{font-size:1.125rem}.post .text p{font-size:1.25rem;line-height:1.5}.post .tags{margin-top:2rem;background-color:dimgray}.post .tags .list{display:flex;align-items:center;gap:1rem;margin:0;list-style:none;padding:.5rem .5rem}.post .tags .list p{font-size:.85rem}.post .tags .list .tag a{font-size:.85rem} +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}@font-face{font-family:RobotoSlab-Regular;src:url("/fonts/RobotoSlab-Regular.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Medium;src:url("/fonts/RobotoSlab-Regular.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Bold;src:url("/fonts/RobotoSlab-Bold.ttf") format("opentype")}@font-face{font-family:RobotoSlab-Black;src:url("/fonts/RobotoSlab-Black.ttf") format("opentype")}@font-face{font-family:AtomicAge-Regular;src:url("/fonts/AtomicAge-Regular.ttf") format("opentype")}@font-face{font-family:Montserrat-Regular;src:url("/fonts/Montserrat-Regular.ttf") format("opentype")}@font-face{font-family:Montserrat-Light;src:url("/fonts/Montserrat-Light.ttf") format("opentype")}@font-face{font-family:Montserrat-Italic;src:url("/fonts/Montserrat-Italic.ttf") format("opentype")}@font-face{font-family:Montserrat-Bold;src:url("/fonts/Montserrat-Bold.ttf") format("opentype")}@font-face{font-family:Montserrat-SemiBold;src:url("/fonts/Montserrat-SemiBold.ttf") format("opentype")}@font-face{font-family:Orbitron-Regular;src:url("/fonts/Orbitron-Regular.ttf") format("opentype")}@font-face{font-family:Amarante;src:url("/fonts/Amarante-Regular.ttf") format("opentype")}h1,h2,h3,h4,h5,h6{font-family:Amarante;letter-spacing:2px}h1{font-size:2rem}@media screen and (min-width: 600px){h1{font-size:3rem}}h2{font-size:1.75rem}@media screen and (min-width: 600px){h2{font-size:2.5rem}}h3{font-size:1.5rem}@media screen and (min-width: 600px){h3{font-size:2rem}}h4{font-size:1.25rem}@media screen and (min-width: 600px){h4{font-size:1.5rem}}h5{font-size:1rem}@media screen and (min-width: 600px){h5{font-size:1.25rem}}h6{font-size:1rem}@media screen and (min-width: 600px){h6{font-size:1em}}p,a,li,span{font-family:RobotoSlab-Regular;letter-spacing:1px}strong{font-family:Montserrat-Bold}em{font-family:Montserrat-Italic}u{font-family:Montserrat-SemiBold}cite,q,small{font-family:Orbitron-Regular}s{font-family:Montserrat-SemiBold}h1,h2,h3,h4,h5,h6,p,a,span,time{color:#fbfcff}.secondary.layout--v1{display:block;position:relative;padding:.5rem .5rem;background-color:#d7b94c}.secondary.layout--v1 #root{display:flex;flex-direction:column}@media(min-width: 800px){.secondary.layout--v1 #root{display:grid;grid-template-columns:25% 75%;grid-template-rows:1fr;margin:0 auto;padding:1rem 1rem}}.secondary.layout--v1 #root{gap:1rem;position:relative;width:100%;height:100%;min-height:100vh;max-width:1200px;background-color:#1f2421;box-shadow:0 0 5px 10px rgba(29,31,32,.45)}.secondary.layout--v1 #root main{padding:1rem 1rem}.secondary.layout--v1.menu-open,.secondary.layout--v1.photo-open{overflow:hidden}.secondary.layout--v1.photo-open .overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#171a21;opacity:.9}header{display:block;position:sticky;overflow:auto;width:100%;height:50px;top:0;padding-bottom:1rem;background-color:#1f2421}@media(min-width: 600px){header{height:500px}}header.open{overflow:visible}header.open .top h1{display:none}header nav.main{display:block;position:relative}@media(min-width: 600px){header nav.main{display:flex;flex-direction:column;gap:2rem}}header nav.main .top{display:flex}header nav.main .top h1{margin:0}header nav.main .top h1 a{display:block;position:relative;top:1rem;left:1rem;font-size:1.5rem;text-decoration:none;color:#1d1f20;background-color:#d7b94c;border:2px solid #d7b94c;padding:2px 2px}header nav.main .top h1 a:hover{color:#d7b94c;background-color:unset}header nav.main .top .icon.icon-menu{display:block;position:absolute;top:1rem;right:1rem;width:35px;height:35px;z-index:999;transition:right 100ms ease}@media screen and (min-width: 600px){header nav.main .top .icon.icon-menu{display:none}}header nav.main .top .icon.icon-menu:before{content:"";display:block;background-image:url("/icons/menu-grid.svg");background-size:100%;position:absolute;width:35px;height:35px}header nav.main .top .icon.icon-menu:hover{cursor:pointer}header nav.main .top .icon.icon-menu.open{right:325px}header nav.main .top .icon.icon-menu.open:before{background-image:url("/icons/menu-close.svg")}header nav.main menu{position:absolute;right:0;top:0;width:0;background-color:#d7b94c;overflow:hidden;padding:0;margin:0;transition:width 100ms ease}@media(min-width: 600px){header nav.main menu{position:relative;top:unset;right:unset;width:100%;transition:unset;background-color:unset}}header nav.main menu.open{width:300px;box-shadow:0 0 5px 10px rgba(29,31,32,.45)}header nav.main menu li{padding:1rem 2rem}header nav.main menu li a{display:block;color:#fbfcff;text-decoration:none}header nav.main menu li a:hover{text-decoration:underline}.posts .list ul{list-style:none;padding:0}.posts .list ul li{padding:1rem 0}.posts .list ul li a{color:#fbfcff;text-decoration:none;display:block}.posts .list ul li a .post-title{margin:0}.photos{display:block}.photos .albums{display:flex;flex-direction:column;width:100%}@media(min-width: 800px){.photos .albums{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto}}.photos .albums{gap:1rem;list-style:none;padding:0}.photos .albums .album{display:block;width:100%}.photos .albums .album a{display:block;position:relative;color:#fff;text-decoration:none;overflow:hidden}.photos .albums .album a img{display:block;width:100%;height:auto}.photos .albums .album a .title,.photos .albums .album a .date,.photos .albums .album a .overlay{position:absolute;visibility:visible;margin:0}.photos .albums .album a .title,.photos .albums .album a .date,.photos .albums .album a .category{z-index:2}.photos .albums .album a .title{top:1rem;left:1rem}.photos .albums .album a .date{bottom:1rem;left:1rem;font-weight:bold}.photos .albums .album a .overlay{width:100%;height:auto;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.333);z-index:1}.photos .albums .album a:hover .title,.photos .albums .album a:hover .date,.photos .albums .album a:hover .category,.photos .albums .album a:hover .overlay{visibility:hidden}.photos .albums .album a:hover img{transform:scale(1.01);transition:transform 100ms ease-in-out}.photos img{width:100%}#album .title{margin:0}#album .meta{border-bottom:5px solid #a6a695}#album .photos{display:flex;flex-direction:column;width:100%}@media(min-width: 800px){#album .photos{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto}}#album .photos{gap:1rem;list-style:none;padding:0}#album .photos .photo{width:100%;overflow:hidden}#album .photos .photo img{transition:transform 100ms ease-in-out}#album .photos .photo:hover{cursor:pointer}#album .photos .photo:hover img{transform:scale(1.01);transition:transform 100ms ease-in-out}#open-image{display:none;position:absolute;top:50%;left:0;transform:translateY(-50%);z-index:999}#open-image .close{cursor:pointer;font-family:AtomicAge-Regular;font-size:2rem;position:absolute;right:5px;top:0}#open-image img{width:100%;height:auto}#open-image #details{display:block;height:auto;padding:1rem 1rem;background-color:#a6a695}#open-image #details p{margin:0}#open-image #details #caption{font-size:1.5rem;padding-bottom:1rem}#open-image #details #location,#open-image #details #date,#open-image #details #equipment{font-size:1.25rem}#open-image.open{display:block}.posts{display:block}.posts h2,.posts h3{position:relative;margin:0;width:fit-content}.posts h2:after,.posts h3:after{content:"";display:block;width:75px;height:5px;background-color:#a6a695}.posts .intro{padding:1rem 0}.posts .list{padding:2rem 0;border-top:5px solid #d7b94c}.posts .list .post a .title{padding:.5rem 0}.posts .list .post a:hover{text-decoration:underline;text-decoration-color:#a6a695}.post{display:block}.post .title{margin:.5rem 0}.post .meta{padding-bottom:1rem;border-bottom:5px solid #a6a695}.post .meta .admin-actions{padding-bottom:1rem}.post .meta .published{font-size:1.125rem}.post .meta .category{font-size:1.125rem}.post .text p{font-size:1.25rem;line-height:1.5}.post .tags{margin-top:2rem;background-color:dimgray}.post .tags .list{display:flex;align-items:center;gap:1rem;margin:0;list-style:none;padding:.5rem .5rem}.post .tags .list p{font-size:.85rem}.post .tags .list .tag a{font-size:.85rem}.category .posts ul,.category .photos ul,.tag .posts ul,.tag .photos ul{list-style-type:square;color:#fbfcff}.category .posts ul li,.category .photos ul li,.tag .posts ul li,.tag .photos ul li{padding:.5rem 0} diff --git a/assets/styles/scss/front/_photos.scss b/assets/styles/scss/front/_photos.scss index d33ca2b..d2435b7 100644 --- a/assets/styles/scss/front/_photos.scss +++ b/assets/styles/scss/front/_photos.scss @@ -141,9 +141,10 @@ .close { cursor: pointer; + font-family: AtomicAge-Regular; font-size: 2rem; position: absolute; - right: 0; + right: 5px; top: 0; } diff --git a/assets/styles/scss/front/_posts.scss b/assets/styles/scss/front/_posts.scss index 4c0cb2a..0820a08 100644 --- a/assets/styles/scss/front/_posts.scss +++ b/assets/styles/scss/front/_posts.scss @@ -18,11 +18,11 @@ } } .intro { - //color: colors.$primaryWhite; + padding: 1rem 0; } .list { - padding-top: 1rem; + padding: 2rem 0; border-top: 5px solid colors.$primaryYellow; .post { diff --git a/assets/styles/scss/front/_taxonomy.scss b/assets/styles/scss/front/_taxonomy.scss new file mode 100644 index 0000000..08473a6 --- /dev/null +++ b/assets/styles/scss/front/_taxonomy.scss @@ -0,0 +1,13 @@ +@use '../shared/colors' as colors; + +.category, .tag { + .posts, .photos { + ul { + list-style-type: square; + color: colors.$primaryWhite; + li { + padding: 0.5rem 0; + } + } + } +} \ No newline at end of file diff --git a/assets/styles/scss/main.scss b/assets/styles/scss/main.scss index 3a3f7dc..155067e 100644 --- a/assets/styles/scss/main.scss +++ b/assets/styles/scss/main.scss @@ -3,7 +3,7 @@ @use './front/typography'; @use './front/layout'; @use './front/menu'; - @use './front/lists'; @use './front/photos'; -@use './front/posts'; \ No newline at end of file +@use './front/posts'; +@use './front/taxonomy'; \ No newline at end of file diff --git a/migrations/Version20260608200422.php b/migrations/Version20260608200422.php new file mode 100644 index 0000000..0b70d70 --- /dev/null +++ b/migrations/Version20260608200422.php @@ -0,0 +1,35 @@ +addSql('ALTER TABLE page ADD description TEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE photos ADD description TEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE post ADD description TEXT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE page DROP description'); + $this->addSql('ALTER TABLE photos DROP description'); + $this->addSql('ALTER TABLE post DROP description'); + } +} diff --git a/src/Controller/FrontEnd/PhotosController.php b/src/Controller/FrontEnd/PhotosController.php index 75e0231..0a057ab 100644 --- a/src/Controller/FrontEnd/PhotosController.php +++ b/src/Controller/FrontEnd/PhotosController.php @@ -24,7 +24,7 @@ final class PhotosController extends AbstractController 'title' => $photo->getTitle(), 'date' => $photo->getDate(), 'category' => $photo->getCategory()->getTitle(), - 'thumbnail' => 'photos/' . strtolower(str_replace(' ', '_', $photo->getTitle())) . '/' . $photo->getThumbnail(), + 'thumbnail' => 'files/uploads/photos/' . strtolower(str_replace(' ', '_', $photo->getTitle())) . '/' . $photo->getThumbnail(), 'url' => $photo->getUrl(), ]; } @@ -44,12 +44,15 @@ final class PhotosController extends AbstractController 'title' => $photos->getTitle(), 'category' => $photos->getCategory()->getTitle(), 'urlSafeCategory' => $photos->getCategory()->getUrlSafeTitle(), + 'tags' => $photos->getTags(), 'text' => $photos->getText(), - 'date' => $photos->getDate() + 'description' => $photos->getDescription(), + 'date' => $photos->getDate(), + 'thumbnail' => '/files/uploads/photos/' . strtolower(str_replace(' ', '_', $photos->getTitle())) . '/' . $photos->getThumbnail(), ]; foreach ($uploads as $index => $upload) { - $filePath = 'photos/' . strtolower(str_replace(' ', '_', $album['title'])) . '/' . $upload->getFile(); + $filePath = 'files/uploads/photos/' . strtolower(str_replace(' ', '_', $album['title'])) . '/' . $upload->getFile(); $album['uploads'][] = [ 'file' => $filePath, diff --git a/src/Entity/Category.php b/src/Entity/Category.php index b4862cf..29c1dba 100644 --- a/src/Entity/Category.php +++ b/src/Entity/Category.php @@ -5,6 +5,7 @@ namespace App\Entity; use App\Repository\CategoryRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Collections\Order; use Doctrine\ORM\Mapping as ORM; #[ORM\Entity(repositoryClass: CategoryRepository::class)] @@ -22,12 +23,14 @@ class Category * @var Collection */ #[ORM\OneToMany(targetEntity: Post::class, mappedBy: 'category')] + #[ORM\OrderBy(['date' => 'DESC'])] private Collection $posts; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Photos::class, mappedBy: 'category')] + #[ORM\OrderBy(['date' => 'DESC'])] private Collection $photos; public function __construct() diff --git a/src/Entity/Page.php b/src/Entity/Page.php index 42ff2c1..d974d8d 100644 --- a/src/Entity/Page.php +++ b/src/Entity/Page.php @@ -26,6 +26,9 @@ class Page #[ORM\Column] private ?bool $published = null; + #[ORM\Column(type: Types::TEXT, nullable: true)] + private ?string $description = null; + public function getId(): ?int { return $this->id; @@ -78,4 +81,16 @@ class Page return $this; } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } } diff --git a/src/Entity/Photos.php b/src/Entity/Photos.php index aa03c86..7895d66 100644 --- a/src/Entity/Photos.php +++ b/src/Entity/Photos.php @@ -46,6 +46,9 @@ class Photos #[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'photos')] private Collection $tags; + #[ORM\Column(type: Types::TEXT, nullable: true)] + private ?string $description = null; + public function __construct() { $this->uploads = new ArrayCollection(); @@ -182,4 +185,16 @@ class Photos return $this; } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } } diff --git a/src/Entity/Post.php b/src/Entity/Post.php index f2fa15d..d477c30 100644 --- a/src/Entity/Post.php +++ b/src/Entity/Post.php @@ -40,6 +40,9 @@ class Post #[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'posts')] private Collection $tags; + #[ORM\Column(type: Types::TEXT, nullable: true)] + private ?string $description = null; + public function __construct() { $this->tags = new ArrayCollection(); @@ -145,4 +148,16 @@ class Post return $this; } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): static + { + $this->description = $description; + + return $this; + } } diff --git a/src/Entity/Tag.php b/src/Entity/Tag.php index 5fda96f..f64d397 100644 --- a/src/Entity/Tag.php +++ b/src/Entity/Tag.php @@ -22,12 +22,14 @@ class Tag * @var Collection */ #[ORM\ManyToMany(targetEntity: Post::class, mappedBy: 'tags')] + #[ORM\OrderBy(['date' => 'DESC'])] private Collection $posts; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Photos::class, mappedBy: 'tags')] + #[ORM\OrderBy(['date' => 'DESC'])] private Collection $photos; public function __construct() diff --git a/src/Service/PhotoUploader.php b/src/Service/PhotoUploader.php index 91b3eda..24729cf 100644 --- a/src/Service/PhotoUploader.php +++ b/src/Service/PhotoUploader.php @@ -13,7 +13,7 @@ class PhotoUploader { ){} public function upload(UploadedFile $file, string $galleryName) : string { - $this->setTargetDirectory('photos/' . strtolower(str_replace(' ', '_', $galleryName))); + $this->setTargetDirectory('files/uploads/photos/' . strtolower(str_replace(' ', '_', $galleryName))); $originalFilename = pathInfo($file->getClientOriginalName(), PATHINFO_FILENAME); $safeFilename = $this->slugger->slug($originalFilename); $filename = $safeFilename . '.' . $file->guessExtension(); diff --git a/templates/base.html.twig b/templates/base.html.twig index df12c32..efd3612 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -20,6 +20,24 @@ {% endif %} + + + + + + + + + + + + + + + + + +
diff --git a/templates/front/category/detail.html.twig b/templates/front/category/detail.html.twig index f3b0cad..389af95 100644 --- a/templates/front/category/detail.html.twig +++ b/templates/front/category/detail.html.twig @@ -1,25 +1,33 @@ {% extends 'base.html.twig' %} -{% block title %}Categories | Alex Daniels{% endblock %} +{% block title %}{{title}} - Categories | Alex Daniels{% endblock %} + +{% block metatitle %}{{title}} - Categories | Alex Daniels {% endblock %} +{% block ogtitle %}{{title}} - Categories | Alex Daniels {% endblock %} +{% block twittertitle %}Writing and Albums that contain the category '{{title}}'{% endblock %} +{% block metadescription %}Writing and Albums that contain the category '{{title}}'{% endblock %} +{% block ogdescription %}Writing and Albums that contain the category '{{title}}'{% endblock %} +{% block twitterdescription %}Writing and Albums that contain the category '{{title}}'{% endblock %} {% block body %}
+

{{title}}

{% if posts|length %}
-

Posts

+

Posts

{% endif %} {% if photos|length %}
-

Photos

+

Photos

diff --git a/templates/front/category/index.html.twig b/templates/front/category/index.html.twig index d1c7655..3a3c62d 100644 --- a/templates/front/category/index.html.twig +++ b/templates/front/category/index.html.twig @@ -2,6 +2,13 @@ {% block title %}Categories | Alex Daniels{% endblock %} +{% block metatitle %}Categories | Alex Daniels {% endblock %} +{% block ogtitle %}Categories | Alex Daniels {% endblock %} +{% block twittertitle %}Categories used in posts and albums{% endblock %} +{% block metadescription %}Categories used in posts and albums{% endblock %} +{% block ogdescription %}Categories used in posts and albums{% endblock %} +{% block twitterdescription %}Categories used in posts and albums{% endblock %} + {% block body %}

Categories

diff --git a/templates/front/page/index.html.twig b/templates/front/page/index.html.twig index ac9f0a1..86473e1 100644 --- a/templates/front/page/index.html.twig +++ b/templates/front/page/index.html.twig @@ -2,6 +2,13 @@ {% block title %}{{page.title}} | Alex Daniels{% endblock %} +{% block metatitle %}{{page.title}} | Alex Daniels {% endblock %} +{% block ogtitle %}{{page.title}} | Alex Daniels {% endblock %} +{% block twittertitle %}{{page.title}} | Alex Daniels{% endblock %} +{% block metadescription %}{{page.description }} {% endblock %} +{% block ogdescription %}{{page.description }} {% endblock %} +{% block twitterdescription %}{{page.description }} {% endblock %} + {% block body %}

{{page.title}}

diff --git a/templates/front/photos/detail.html.twig b/templates/front/photos/detail.html.twig index 555b0a5..cf38a84 100644 --- a/templates/front/photos/detail.html.twig +++ b/templates/front/photos/detail.html.twig @@ -2,6 +2,15 @@ {% block title %}{{photos['title']}} - Photography | Alex Daniels{% endblock %} +{% block metatitle %}{{photos['title']}} | Alex Daniels {% endblock %} +{% block ogtitle %}{{photos['title']}} | Alex Daniels {% endblock %} +{% block twittertitle %}{{photos['title']}} | Alex Daniels{% endblock %} +{% block metadescription %}{{photos['description']}} {% endblock %} +{% block ogdescription %}{{photos['description']}} {% endblock %} +{% block twitterdescription %}{{photos['description'] }} {% endblock %} +{% block ogimage %}{{ photos['thumbnail']}}{% endblock %} +{% block twitterimage %}{{ photos['thumbnail']}}{% endblock %} + {% block body %}

{{photos['title']}}

diff --git a/templates/front/photos/index.html.twig b/templates/front/photos/index.html.twig index 1d4e611..85d9d5d 100644 --- a/templates/front/photos/index.html.twig +++ b/templates/front/photos/index.html.twig @@ -2,6 +2,15 @@ {% block title %}Photography | Alex Daniels{% endblock %} +{% block metatitle %}Photography | Alex Daniels {% endblock %} +{% block ogtitle %}Photography | Alex Daniels {% endblock %} +{% block twittertitle %}Photography | Alex Daniels{% endblock %} +{% block metadescription %}Photo Albums of things I find neat{% endblock %} +{% block ogdescription %}Photo Albums of things I find neat{% endblock %} +{% block twitterdescription %}Photo Albums of things I find neat{% endblock %} +{# {% block ogimage %}{{ photos['thumbnail']}}{% endblock %} +{% block twitterimage %}{{ photos['thumbnail']}}{% endblock %} #} + {% block body %}

Photography

diff --git a/templates/front/post/detail.html.twig b/templates/front/post/detail.html.twig index 4504ab9..ee4acd5 100644 --- a/templates/front/post/detail.html.twig +++ b/templates/front/post/detail.html.twig @@ -1,6 +1,12 @@ {% extends 'base.html.twig' %} -{% block title %}{{post.title}} - Writing | Alex Daniels{% endblock %} +{% block title %} {{post.title}} - Writing | Alex Daniels{% endblock %} + +{% block metatitle %}{{post.title}} - Writing | Alex Daniels {% endblock %} +{% block twittertitle %}{{post.title}} - Writing | Alex Daniels{% endblock %} +{% block metadescription %}{{post.description }} {% endblock %} +{% block ogdescription %}{{post.description }} {% endblock %} +{% block twitterdescription %}{{post.description }} {% endblock %} {% block body %}
diff --git a/templates/front/post/index.html.twig b/templates/front/post/index.html.twig index 8176baf..5fb8032 100644 --- a/templates/front/post/index.html.twig +++ b/templates/front/post/index.html.twig @@ -2,6 +2,13 @@ {% block title %}Writing | Alex Daniels{% endblock %} +{% block metatitle %}Writing | Alex Daniels {% endblock %} +{% block ogtitle %}Writing | Alex Daniels {% endblock %} +{% block twittertitle %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %} +{% block metadescription %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %} +{% block ogdescription %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %} +{% block twitterdescription %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %} + {% block body %}

Writing

diff --git a/templates/front/tag/detail.html.twig b/templates/front/tag/detail.html.twig index c33c1f5..b17ae1f 100644 --- a/templates/front/tag/detail.html.twig +++ b/templates/front/tag/detail.html.twig @@ -1,25 +1,35 @@ {% extends 'base.html.twig' %} -{% block title %}Tags | Alex Daniels{% endblock %} +{% block title %}{{title}} - Tags | Alex Daniels{% endblock %} + + +{% block metatitle %}{{title}} - Tags | Alex Daniels {% endblock %} +{% block ogtitle %}{{title}} - Tags | Alex Daniels {% endblock %} +{% block twittertitle %}Writing and Albums that contain the tag '{{title}}'{% endblock %} +{% block metadescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %} +{% block ogdescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %} +{% block twitterdescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %} + {% block body %}
+

{{title}}

{% if posts|length %}
-

Posts

+

Posts

{% endif %} {% if photos|length %}
-

Photos

+

Photos

diff --git a/templates/front/tag/index.html.twig b/templates/front/tag/index.html.twig index 4ad9621..ed8e71a 100644 --- a/templates/front/tag/index.html.twig +++ b/templates/front/tag/index.html.twig @@ -2,6 +2,13 @@ {% block title %}Tags | Alex Daniels{% endblock %} +{% block metatitle %}Tags | Alex Daniels {% endblock %} +{% block ogtitle %}Tags | Alex Daniels {% endblock %} +{% block twittertitle %}Tags used in posts and albums{% endblock %} +{% block metadescription %}Tags used in posts and albums{% endblock %} +{% block ogdescription %}Tags used in posts and albums{% endblock %} +{% block twitterdescription %}Tags used in posts and albums{% endblock %} + {% block body %}

Tags

diff --git a/templates/home.html.twig b/templates/home.html.twig index bdfd94d..7fe8a1e 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -20,6 +20,24 @@ {% endif %} + + + + + + + + + + {# #} + + + + + + + {# #} +