diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..442f172 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,4 @@ +galleries +plugins +responsiv-flat +logs diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..83ede7b --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,3 @@ +FROM aspendigital/octobercms:latest +RUN usermod -u 1000 www-data +RUN usermod -G staff www-data diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..43180bc --- /dev/null +++ b/server/README.md @@ -0,0 +1,18 @@ +## Notes +**DO NOT** forget to create the directories before running docker-compose the +first time otherwise they'll be created with `root` permissions and cause +everything to go to shit. + +## For a persistemt database + +```bash +# create empty database file on host +mkdir storage +touch storage/database.sqlite + +# start container +docker-compose up -d + +# provision database +docker-compose exec web php artisan october:up +``` diff --git a/server/docker-compose.yml b/server/docker-compose.yml new file mode 100644 index 0000000..87af341 --- /dev/null +++ b/server/docker-compose.yml @@ -0,0 +1,35 @@ +# Reference - https://docs.docker.com/compose/compose-file/ +version: '2.2' +services: + web: + # image: aspendigital/octobercms:latest + build: . + image: octobercms + restart: always + ports: + - 127.0.0.1:8101:80 + environment: + - ENABLE_CRON=true + - APP_DEBUG=true + # - CMS_ACTIVE_THEME=starter + # - CMS_BACKEND_SKIN=AspenDigital\Backend\Skins\Admin + - INIT_PLUGINS=true + # - TZ=${TZ:-America/Denver} + volumes: + # A local `.env` is not required but expected if you wish to pass secrets + # to the config - see README.md + # - ./.env:/var/www/html/.env + + - ./plugins:/var/www/html/plugins + - ./storage/app:/var/www/html/storage/app + - ./storage/logs:/var/www/html/storage/logs + + # need to create database.sqlite on filesystem before running for the + # first time - touch storage/database.sqlite + # and also poulate it - see README.md + - ./storage/database.sqlite:/var/www/html/storage/database.sqlite + + # Mounting the entire `themes` folder can cause performance issues in + # Docker for Mac + # https://docs.docker.com/compose/compose-file/#caching-options-for-volume-mounts-docker-for-mac + - ./themes:/var/www/html/themes diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..18a1e41 --- /dev/null +++ b/server/package.json @@ -0,0 +1,3 @@ +{ + "dependencies": {} +} diff --git a/server/storage/database.sqlite b/server/storage/database.sqlite new file mode 100644 index 0000000..8b81227 Binary files /dev/null and b/server/storage/database.sqlite differ diff --git a/server/themes/marc-leopold-api/pages/about.htm b/server/themes/marc-leopold-api/pages/about.htm new file mode 100644 index 0000000..07cc949 --- /dev/null +++ b/server/themes/marc-leopold-api/pages/about.htm @@ -0,0 +1,12 @@ +title = "About" +url = "/api/v1/about" +is_hidden = 0 +contentType = "json" +force_show = 0 +== +{ + "success": true, + "title": "About Me", + "imageUrl": "", + "body": "
\r\n\"As a photographic artist, my creative pursuit is to escape the attempts to categorize, characterize, compartmentalize, explain, or limit my photographic expression. It is always pleasing to see how observers respond with delight to the ultimate visualizations of my quest. My fondest wish is to pursue my life as a photographer, unbridled and always with a resolve to improve and be the best I can, with a constant yearning to be better.\"<\/p>\r\n <\/blockquote>\r\n
\r\n
- I imagine myself peering from behind a photographer's blind, always observing, but rarely participating.<\/li>\r\n
- I have an ephemeral sensation of being a camouflaged moth on a tree.<\/li>\r\n
- I imagine seeing my life from that perspective, that tree, as a solitary instant in eternity.<\/li>\r\n
- Preserving life's moments and sharing them, makes the most, I think, of my photographic proclivity.<\/li>\r\n
- I get great satisfaction from the responses viewers have to these images of my perceived realities.<\/li>\r\n
- As an artist and photographer, this is my mantra.<\/li>\r\n
- I am convinced that my creative potential escapes the propensity to categorize, characterize, compartmentalize, explain, or limit my photographic expression.<\/li>\r\n
- I will succeed in a career as a photographer, and I always resolve to improve, and be the best I can; however, I want to be much better than that.<\/li>\r\n <\/ul>\r\n
The Essence of the Image<\/h2>\r\n
The photographer Marc Leopold was born in Chicago, Illinois in 1964. He credits his artistry in photography to the benevolence of renowned mentors, and to his own constant search for the resources, intricacies and techniques that capture the essence of the image.<\/p>\r\n
While Marc's work tends toward nature and representational photography, he also uses his talents in both formal and commercial situations. He works, there, to achieve the same essence that he strives for when shooting nature.<\/p>\r\n
Marc's images are in many private collections and corporate and educational institutions. They have also appeared in a number of publications. His photographs appear in several books, including 'Two Weeks the Raven Sings', by David Reston, and in 'Once we Talk', by Jayne deVeres.<\/p>\r\n
Marc has also published in a wide variety of magazines and newspapers, including The International Review of Irish American Art, Erik Tweeds' Two Worlds Magazine, EVE Magazine, Parfolio, Essence, The Chicago Tribune, Chicago Derry News, Business News Today, and One Day Journal.<\/p>\r\n
In addition to this media exposure, Marc has exhibited at The Chicago College of Art, The Irish American Museum in Detroit, The Sur Dez Gallery in San Antonio, Phoenix City Gallery in Arizona, Wellner Department stores nationwide, Torren Gallery in California, and The Tide Gallery in Boston, and elsewhere.<\/p>\r\n
Marc's artistic philosophy is based on his ability to capture a fleeting moment, a solitary instant in eternity, where he feels almost transparent, like a camouflaged moth in the midst of a lush green forest, defining for posterity through his photography an elusive moment in life, captured to share with others.<\/p>\r\n" +} \ No newline at end of file diff --git a/server/themes/marc-leopold-api/pages/albums.htm b/server/themes/marc-leopold-api/pages/albums.htm new file mode 100644 index 0000000..615c2e1 --- /dev/null +++ b/server/themes/marc-leopold-api/pages/albums.htm @@ -0,0 +1,46 @@ +title = "Galleries" +url = "/api/v1/galleries" +is_hidden = 0 +contentType = "json" +force_show = 0 + +[albumList] +albumPage = "album" +thumbMode = "auto" +thumbWidth = 640 +thumbHeight = 480 +albumsOnPage = 12 +== +{ + "success": true, + "title": "My Galleries", + "galleries": [ + {% for album in albumList.albums %} { + "id": {{ album.id }}, + "title": "{{ album.title }}", + "url": "{{ album.url }}", + "featuredImage": "{{ album.latestPhoto.thumb }}", + "created": "{{ album.created_at|date('M d, Y') }}", + "count": {{ album.photo_count }}, + "images": [ + {% for photo in album.photos %} { + "id": {{ photo.id }}, + "thumbUrl": "{{ photo.image.thumb(600,400,{'mode': 'crop'}) }}", + "url": "{{ photo.image.path }}", + "sort_order": "{{ photo.image.sort_order }}" + }{% if not loop.last %},{% endif %} {% endfor %} + ] + }{% if not loop.last %},{% endif %} {% endfor %} + ] + + {% if albumList.lastPage > 1 %} + {% if albumList.currentPage > 1 %} + "next": {{ this.page.baseFileName|page }}?page={{ albumList.currentPage-1 }}" + {% endif %} + + {% if albumList.lastPage > albumList.currentPage %} + "prev": "{{ this.page.baseFileName|page }}?page={{ albumList.currentPage+1 }}" + {% endif %} + {% endif %} + +} \ No newline at end of file diff --git a/server/themes/marc-leopold-api/pages/api-home.htm b/server/themes/marc-leopold-api/pages/api-home.htm new file mode 100644 index 0000000..26f52b4 --- /dev/null +++ b/server/themes/marc-leopold-api/pages/api-home.htm @@ -0,0 +1,46 @@ +title = "API Home" +url = "/api/v1/home" +is_hidden = 0 +contentType = "json" +force_show = 0 + +[builderList imgList] +modelClass = "Studiovx\Marcleopold\Models\IndexImage" +scope = "-" +scopeValue = "{{ :scope }}" +displayColumn = "image" +noRecordsMessage = "No records found" +detailsPage = "-" +detailsUrlParameter = "id" +pageNumber = "{{ :page }}" + +[builderList tagList] +modelClass = "Studiovx\Marcleopold\Models\IndexTagline" +scope = "-" +scopeValue = "{{ :scope }}" +displayColumn = "text" +noRecordsMessage = "No records found" +detailsPage = "-" +detailsUrlParameter = "id" +pageNumber = "{{ :page }}" +== +{% set records = imgList.records %} +{% set displayColumn = imgList.displayColumn %} +{% set noRecordsMessage = imgList.noRecordsMessage %} +{% set detailsPage = imgList.detailsPage %} +{% set detailsKeyColumn = imgList.detailsKeyColumn %} +{% set detailsUrlParameter = imgList.detailsUrlParameter %} +{ + "success": true, + "bgImages": + [{% for record in records %}"{{ attribute(record, displayColumn)|media }}"{% if not loop.last %},{% endif %}{% endfor %}], +{% set records = tagList.records %} +{% set displayColumn = tagList.displayColumn %} +{% set noRecordsMessage = tagList.noRecordsMessage %} +{% set detailsPage = tagList.detailsPage %} +{% set detailsKeyColumn = tagList.detailsKeyColumn %} +{% set detailsUrlParameter = tagList.detailsUrlParameter %} + + "taglines": + [{% for record in records %}{"sort_order": {{ record.sort_order }}, "text": "{{ attribute(record, displayColumn) }}"}{% if not loop.last %},{% endif %}{% endfor %}] +} \ No newline at end of file diff --git a/server/themes/marc-leopold-api/pages/navigation.htm b/server/themes/marc-leopold-api/pages/navigation.htm new file mode 100644 index 0000000..e61a82d --- /dev/null +++ b/server/themes/marc-leopold-api/pages/navigation.htm @@ -0,0 +1,22 @@ +title = "Navigation" +url = "/api/v1/navigation" +is_hidden = 0 +contentType = "json" +force_show = 0 +== +{ + "success": true, + "siteNav": [ + { "to": "/", "text": "Home", "bgImgUrl": "/img/devices--bw.jpg"}, + { "to": "/galleries", "text": "Galleries", "bgImgUrl": "/img/photo-box--bw.jpg" }, + { "to": "/services", "text": "Services", "bgImgUrl": "/img/camera--bw.jpg" }, + { "to": "/about", "text": "About Me", "bgImgUrl": "/img/silhouette--dark.jpg" }, + { "to": "/contact", "text": "Contact Me", "bgImgUrl": "/img/mail--bw.jpg" } + ], + "socialNav": [ + { "to": "https://www.instagram.com", "text": "Instagram", "icon": "instagram" }, + { "to": "https://www.facebook.com", "text": "Facebook", "icon": "facebook" }, + { "to": "https://twitter.com", "text": "Twitter", "icon": "twitter" }, + { "to": "https://uk.linkedin.com", "text": "LinkedIn", "icon": "linkedin" } + ] +} diff --git a/server/themes/marc-leopold-api/pages/page.htm b/server/themes/marc-leopold-api/pages/page.htm new file mode 100644 index 0000000..3cc7cfa --- /dev/null +++ b/server/themes/marc-leopold-api/pages/page.htm @@ -0,0 +1,24 @@ +title = "Page" +url = "/api/v1/page/:slug" +is_hidden = 0 +contentType = "json" +force_show = 0 + +[builderDetails] +modelClass = "Studiovx\Marcleopold\Models\Pages" +identifierValue = "{{ :slug }}" +modelKeyColumn = "slug" +displayColumn = "title" +notFoundMessage = "Record not found" +== +{% set record = builderDetails.record %} +{% set displayColumn = builderDetails.displayColumn %} +{% set notFoundMessage = builderDetails.notFoundMessage %} + +{% if record %}{ + "success": true, + "title": "{{ attribute(record, displayColumn) }}", + "imageUrl": "{{ record.featured_image|media }}" +}{% else %} + { "success": false } +{% endif %} diff --git a/server/themes/marc-leopold-api/pages/services.htm b/server/themes/marc-leopold-api/pages/services.htm new file mode 100644 index 0000000..93589a2 --- /dev/null +++ b/server/themes/marc-leopold-api/pages/services.htm @@ -0,0 +1,36 @@ +title = "Services" +url = "/api/v1/services" +is_hidden = 0 +contentType = "json" +force_show = 0 + +[builderList] +modelClass = "Studiovx\Marcleopold\Models\Services" +scope = "-" +scopeValue = "{{ :scope }}" +displayColumn = "title" +noRecordsMessage = "No records found" +detailsPage = "-" +detailsUrlParameter = "id" +pageNumber = "{{ :page }}" +sortColumn = "sort_order" +sortDirection = "asc" +== +{% set records = builderList.records %} +{% set displayColumn = builderList.displayColumn %} +{% set noRecordsMessage = builderList.noRecordsMessage %} +{% set detailsPage = builderList.detailsPage %} +{% set detailsKeyColumn = builderList.detailsKeyColumn %} +{% set detailsUrlParameter = builderList.detailsUrlParameter %} + +{ + "success": true, + "services": [ + {% for record in records %}{ + "heading": "{{ attribute(record, displayColumn) }}", + "html": "{{ record.description|raw }}", + "imageUrl": "{%if record.featured %}{{ record.featured|media }}{% endif %}", + "backgroundImageUrl": "{{ record.featured|mediathumb_resize("width", 800, 70) }}", + "linkUrl": "{{ record.service_url }}" + }{% if not loop.last %},{% endif %}{% endfor %} +]} \ No newline at end of file diff --git a/server/themes/marc-leopold-api/theme.yaml b/server/themes/marc-leopold-api/theme.yaml new file mode 100644 index 0000000..8581c9f --- /dev/null +++ b/server/themes/marc-leopold-api/theme.yaml @@ -0,0 +1,5 @@ +name: 'Marc Leopold API' +description: '' +author: '' +homepage: '' +code: '' diff --git a/server/yarn.lock b/server/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/server/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +