├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── SECURITY.md
├── deploy
├── README.md
└── deploy
└── www.phantom
├── .browserlistrc
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── favicon.png
├── font
│ ├── opensans-bold.woff2
│ └── opensans-regular.woff2
├── img
│ ├── card-temporary.png
│ └── posts.png
├── index.html
└── theme
│ ├── banana
│ ├── banner.png
│ ├── readme.md
│ ├── style.css
│ └── theme.json
│ ├── dark
│ ├── banner.png
│ ├── style.css
│ └── theme.json
│ ├── light
│ ├── banner.png
│ ├── style.css
│ └── theme.json
│ ├── shared
│ ├── default.css
│ ├── main.js
│ ├── template.html
│ ├── theme.json
│ └── vue.js
│ └── zen
│ ├── banner.png
│ ├── i18n
│ ├── en_GB.json
│ └── es_ES.json
│ ├── script.js
│ ├── style.css
│ ├── template.html
│ └── theme.json
├── src
├── App.vue
├── component
│ ├── DocumentEdit.vue
│ ├── DocumentList.vue
│ ├── Foot.vue
│ ├── Hamburger.vue
│ ├── HomeMenu.vue
│ ├── ImageGallery.vue
│ ├── LanguageSelector.vue
│ ├── Loader.vue
│ ├── Logo.vue
│ ├── Modal.vue
│ ├── PageTitleWithActions.vue
│ └── Sidebar.vue
├── i18n
│ ├── en_GB.js
│ ├── es_ES.js
│ └── nl_NL.js
├── main.js
├── router.js
├── service
│ ├── log
│ │ └── logger.js
│ ├── markdown
│ │ ├── canonical.js
│ │ └── formatter.js
│ ├── plugin
│ │ └── phantom.js
│ ├── safe
│ │ ├── api.js
│ │ ├── cache
│ │ │ └── cache.js
│ │ ├── lib
│ │ │ ├── auth.js
│ │ │ ├── files.js
│ │ │ └── nrs.js
│ │ ├── mock
│ │ │ └── safe.js
│ │ └── promise.js
│ └── theme
│ │ ├── importer.js
│ │ ├── readme.md
│ │ └── theme.js
└── view
│ ├── About.vue
│ ├── Dashboard.vue
│ ├── Dev
│ └── Log.vue
│ ├── Docs
│ ├── Home.vue
│ └── Wrapper.vue
│ ├── DomainCreate.vue
│ ├── Domains.vue
│ ├── Home.vue
│ ├── PageEdit.vue
│ ├── Pages.vue
│ ├── PostEdit.vue
│ ├── Posts.vue
│ ├── Theme.vue
│ └── Themes.vue
└── vue.config.js
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Give us information about unexpected behaviour in the Phantom web app
4 | title: "[BUG] "
5 | labels: bug
6 | assignees: SAFEShane
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):** / delete if not applicable
27 | - OS: [e.g. iOS]
28 | - SAFE Browser Version [e.g. 1.16.0-alpha2]
29 |
30 | **Smartphone (please complete the following information):** / delete if not applicable
31 | - Device: [e.g. iPhone6]
32 | - OS: [e.g. iOS8.1]
33 | - SAFE Browser Version [e.g. 1.16.0-alpha2]
34 |
35 | **Additional context**
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[FEATURE]"
5 | labels: enhancement
6 | assignees: SAFEShane
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Dependencies**
20 | A list of external dependencies which could hamper this feature, for instance: an outstanding RFC for SAFE browser features, or any libraries we may need to install.
21 |
22 | **Additional context**
23 | Add any other context or screenshots about the feature request here.
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | www.phantom/node_modules/
2 | www.phantom/dist/
3 |
4 | # local env files
5 | www.phantom/.env.local
6 |
7 | # Log files
8 | www.phantom/npm-debug.log*
9 | www.phantom/yarn-debug.log*
10 | www.phantom/yarn-error.log*
11 |
12 | # Editor directories and files
13 | .idea
14 | .vscode
15 | *.suo
16 | *.ntvs*
17 | *.njsproj
18 | *.sln
19 | *.sw?
20 |
21 | # MAC OS directory information
22 | .DS_Store
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at shane@helldritch.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | We accept all contributions in the form of pull requests targeted at the master branch. When creating a pull request please include a link to the issue it resolves or implements.
4 |
5 | ### Dependencies
6 |
7 | With regards to the Phantom application, we have as few dependencies as possible. If there is a package which provides some functionality, ask yourself if you could implement it yourself more tersely. Unless it is something _fundamental_ like a routing library, we generally want to create it ourselves.
8 |
9 | With regards to the outputted websites, we have zero dependencies, and zero additional dependencies will be tolerated.
10 |
11 | Development only dependencies are welcome, since they only impact the local `node_modules` directory.
12 |
13 | #### Why? Isn't this just "not invented here" syndrome?
14 |
15 | No, it's because the final size of our distributed files is incredibly important. Download speed / download size / the file count can hugely impact performance on the SAFE network. A dependency might only add 3KB of size to the distributed files, but if we can implement it in 2.6KB, you bet your ass we're going to reinvent the wheel.
16 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # Phantom contributors
2 |
3 | * Shane Armstrong
4 | * Creator of Phantom
5 |
6 | * Digipl
7 | * Translated Phantom to es_ES
8 | * [SAFE Network Forum page](https://safenetforum.org/u/digipl)
9 |
10 | * Sam1 / Isntism
11 | * Translated Phantom to nl_NL
12 | * [SAFE Network forum page for sam1](https://safenetforum.org/u/sam1)
13 | * [SAFE Network forum page for isntism](https://safenetforum.org/u/isntism)
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 SAFE Publishing
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Phantom
2 |
3 | A publishing tool enabling users of the SAFE Network to easily manage websites. Phantom is designed to live entirely within the SAFE network, allowing users to create and manage websites and blogs without ever being exposed to the clearnet.
4 |
5 | This project is MIT licensed, feel free to deploy your own version of Phantom to a SAFE network public name (The SAFE version of DNS) you own if you want a customised Phantom platform.
6 |
7 | 
8 |
9 | ### Development
10 |
11 | Check the [www.phantom](https://github.com/SAFEPublishing/Phantom/tree/master/www.phantom) directory for information about development.
12 |
13 | ### Deployment
14 |
15 | Check the [Deploy](https://github.com/SAFEPublishing/Phantom/tree/master/deploy) directory for information about deploying.
16 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | Use this section to tell people about which versions of your project are
6 | currently being supported with security updates.
7 |
8 | | Version | Supported |
9 | | ------- | ------------------ |
10 | | 0.x.x | :white_check_mark: |
11 |
12 | ## Reporting a Vulnerability
13 |
14 | When reporting a vulnerability which effects any of the following:
15 |
16 | * Privacy of end users
17 | * Security of end users
18 | * Access to secure assets (documents, etc, which are owned by the app)
19 |
20 | Please send your report directly to shane@helldritch.com, and I will create an issue. You will receive full (public) credit for the vulnerability once the patch hits production and all major public versions of Phantom are updated.
21 |
22 | If your vulnerability doesn't effect any of those key issues, please create a standard issue within this repository in Github. _If the issue doesn't effect any of those key issues, but you feel the severity is such that it needs to be patched before it is made public, you can still contact us directly via email at your discretion._
23 |
24 | We will never mock, ignore or otherwise mistreat you for taking an issue seriously, even if we don't feel it warranted secret disclosure. Ultimately, the security and privacy of our users is our prime concern.
25 |
26 | ## Responsible disclosure policy
27 |
28 | Please note that in the event of a CVE or other issue which effects the security of Phantom (or any Phantom plugins created by the SAFEPublishing group), users of the effected application will be notified within 24 hours of discovery.
29 |
30 | The following chain of events will happen, in order:
31 |
32 | 1. We will diagnose the vulnerability within 24 hours and attempt to provide a fix.
33 | 2. If we are able to provide a fix, we will first update the `safe://phantom` application, then publicise the vulnerability on our SAFE Forum page, and the Phantom blog located at `safe://phantomblog`
34 | 3. If we are unable to provide a fix, we will publicize the vulnerability on our SAFE Forum page, and the Phantom blog located at `safe://phantomblog`, along with mitigation strategies and a timeline for the fix.
--------------------------------------------------------------------------------
/deploy/README.md:
--------------------------------------------------------------------------------
1 | # Deployment
2 |
3 | This directory is geared for this projects own internal use, but can be co-opted for other uses if required.
4 |
5 | ### Dependencies
6 |
7 | _The versions listed here are the current versions we use internally, we don't provide any guarantee for deployment to work on any earlier on later versions._
8 |
9 | * [safe_vault _(v0.20.1)_](https://github.com/maidsafe/safe_vault/releases/tag/0.20.1)
10 | * [safe_cli _(v0.8.1)_](https://github.com/maidsafe/safe-api/releases/tag/0.8.1)
11 |
12 | All dependencies must be in the system $PATH, such that the binaries are directly accessible, E.G. `shane@example:~/ safe ...`
13 |
14 | ### Deployment
15 |
16 | To deploy the project to a new public name, run the following command (in a bash environment), replacing `$PUBLIC_NAME` with your desired public name:
17 |
18 | `./deploy $PUBLIC_NAME --create`
19 |
20 | If you are deploying to an existing public name, use the following:
21 |
22 | `./deploy $PUBLIC_NAME`
--------------------------------------------------------------------------------
/deploy/deploy:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | DEPLOYDIR="../www.phantom/dist/"
4 | HELPSTRING="--help"
5 | if [[ "$1" == "$HELPSTRING" ]]
6 | then
7 | echo "To deploy the project to a new public name, run the following command (in a bash environment), replacing \$PUBLIC_NAME with your desired public name:"
8 | echo ""
9 | echo " ./deploy \$PUBLIC_NAME --create"
10 | echo ""
11 | echo "If you are deploying to an existing public name, use the following:"
12 | echo ""
13 | echo " ./deploy \$PUBLIC_NAME";
14 | exit 0
15 | fi
16 |
17 | if [ -z "$1" ]
18 | then
19 | echo "Error: a valid safenet NRS public name must be passed as the first parameter"
20 | exit 2
21 | fi
22 |
23 | (cd ../www.phantom; npm run build)
24 |
25 | if [[ ! -d "$DEPLOYDIR" ]]
26 | then
27 | echo "$DEPLOYDIR does not exist on your filesystem."
28 | fi
29 |
30 | CREATESTRING="--create"
31 | if [[ "$2" == "$CREATESTRING" ]]
32 | then
33 | PUTRESULT=`safe files put "$DEPLOYDIR" "safe://$1" --recursive`
34 | SAFEPATH="$(echo "$PUTRESULT" | grep -oE "at: \"safe:\/\/[a-zA-Z0-9]+" | grep -oE "safe:\/\/.*")"
35 | safe nrs create "$1" -l "$SAFEPATH?v=0" && echo "Deployment complete" || echo "Unable to create NRS, NRS may already exist, try re-running this without the --create argument" && exit 1
36 | else
37 | echo "$DEPLOYDIR"
38 | safe files sync "$DEPLOYDIR" "safe://$1" --update-nrs --recursive
39 | fi
--------------------------------------------------------------------------------
/www.phantom/.browserlistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 |
--------------------------------------------------------------------------------
/www.phantom/README.md:
--------------------------------------------------------------------------------
1 | # Phantom
2 |
3 | ### Dependencies
4 |
5 | The following _global_ NPM dependencies are required:
6 |
7 | * @vue/cli@4.0.3
8 |
9 | _Dependencies may be installed using the following command:_
10 |
11 | ```
12 | npm install -g @vue/cli
13 | ```
14 |
15 | ### Installation
16 |
17 | After installing the dependencies above, run the following command within this directory:
18 |
19 | ```
20 | npm install
21 | ```
22 |
23 | ### Development
24 |
25 | Run the following command within this directory:
26 |
27 | ```
28 | npm run serve
29 | ```
30 |
31 | Then in your browser proceed to `http://localhost:5000` and you will see a development-only mocked version of Phantom.
32 |
33 | ### Deployment
34 |
35 | Check the [Deploy](https://github.com/SAFEPublishing/Phantom/tree/master/deploy) directory for information about deploying. The deployment tool handles the NPM production builds.
--------------------------------------------------------------------------------
/www.phantom/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ],
5 | plugins: [
6 | "@babel/plugin-syntax-dynamic-import"
7 | ]
8 | };
9 |
--------------------------------------------------------------------------------
/www.phantom/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "phantom",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve --mode development",
7 | "build": "vue-cli-service build"
8 | },
9 | "dependencies": {
10 | "core-js": "^3.6.4",
11 | "highlight.js": "^9.18.1",
12 | "vue": "^2.6.11",
13 | "vue-router": "^3.1.6"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "^4.2.3",
17 | "@vue/cli-service": "^4.2.3",
18 | "babel-plugin-syntax-dynamic-import": "^6.18.0",
19 | "node-sass": "^4.13.0",
20 | "sass-loader": "^8.0.2",
21 | "uglifyjs-webpack-plugin": "^2.2.0",
22 | "vue-loader": "^15.9.0",
23 | "vue-template-compiler": "^2.6.11"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/www.phantom/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/www.phantom/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/favicon.png
--------------------------------------------------------------------------------
/www.phantom/public/font/opensans-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/font/opensans-bold.woff2
--------------------------------------------------------------------------------
/www.phantom/public/font/opensans-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/font/opensans-regular.woff2
--------------------------------------------------------------------------------
/www.phantom/public/img/card-temporary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/img/card-temporary.png
--------------------------------------------------------------------------------
/www.phantom/public/img/posts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/img/posts.png
--------------------------------------------------------------------------------
/www.phantom/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Phantom: Publishing tools for the SAFE network
8 |
41 |
42 |
43 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/www.phantom/public/theme/banana/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/theme/banana/banner.png
--------------------------------------------------------------------------------
/www.phantom/public/theme/banana/readme.md:
--------------------------------------------------------------------------------
1 | #### Banana
2 |
3 | This is a test theme created by the developers for testing the theme linting tool. This is not supposed to be used in production, but technically there is nothing stopping you from doing so. Have fun.
--------------------------------------------------------------------------------
/www.phantom/public/theme/banana/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: yellow;
3 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/banana/theme.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "/theme/shared/theme.json",
3 | "name": "Banana",
4 | "description": "A theme the developers are using to test the theme import linter",
5 | "banner": "/theme/banana/banner.png",
6 | "styles": [
7 | "/theme/banana/style.css"
8 | ]
9 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/dark/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/theme/dark/banner.png
--------------------------------------------------------------------------------
/www.phantom/public/theme/dark/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #2a3b5d;
3 | }
4 |
5 | .menu a {
6 | color: #fff;
7 | }
8 |
9 | .posts a {
10 | color: #fff;
11 | }
12 |
13 | .posts .title {
14 | color: #5392d4;
15 | }
16 |
17 | .post {
18 | color: #fff;
19 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/dark/theme.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "/theme/shared/theme.json",
3 | "name": "Dark",
4 | "description": "A simple, dark theme. For those of us who prefer the lights dimmed.",
5 | "banner": "/theme/dark/banner.png",
6 | "styles": [
7 | "/theme/dark/style.css"
8 | ]
9 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/light/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SAFEPublishing/Phantom/19252fbb39d35716b3d8992724d016f6128452ed/www.phantom/public/theme/light/banner.png
--------------------------------------------------------------------------------
/www.phantom/public/theme/light/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #fff;
3 | }
4 |
5 | .menu a {
6 | color: #000;
7 | }
8 |
9 | .posts a {
10 | color: #000;
11 | }
12 |
13 | .posts .title {
14 | color: #5392d4;
15 | }
16 |
17 | .post {
18 | color: #000;
19 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/light/theme.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "/theme/shared/theme.json",
3 | "name": "Light",
4 | "description": "A simple, white theme. Enough to get you started with a SAFE blog of your own!",
5 | "banner": "/theme/light/banner.png",
6 | "styles": [
7 | "/theme/light/style.css"
8 | ]
9 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/shared/default.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body, html {
6 | padding: 0;
7 | margin: 0;
8 | }
9 |
10 | body {
11 | font-family: sans-serif;
12 | }
13 |
14 | .root {
15 | width: 100%;
16 | padding: 40px;
17 | margin: 0 auto;
18 | max-width: 600px;
19 | }
20 |
21 | .menu .logo {
22 | text-transform: uppercase;
23 | font-weight: bold;
24 | font-size: 32px;
25 | }
26 |
27 | .menu a {
28 | display: inline-block;
29 | vertical-align: top;
30 | margin-top: 10px;
31 | text-decoration: none;
32 | font-weight: bold;
33 | opacity: .7;
34 | }
35 |
36 | .posts {
37 | padding-top: 40px;
38 | }
39 |
40 | .posts a {
41 | display: block;
42 | margin-bottom: 40px;
43 | text-decoration: none;
44 | }
45 |
46 | .posts .title {
47 | font-size: 24px;
48 | font-weight: bold;
49 | }
50 |
51 | .posts p {
52 | line-height: 22px;
53 | }
54 |
55 | .post {
56 | padding-top: 20px;
57 | }
58 |
59 | .posts img, .post img {
60 | max-width: 100%;
61 | }
--------------------------------------------------------------------------------
/www.phantom/public/theme/shared/main.js:
--------------------------------------------------------------------------------
1 | Vue.use(VueRouter);
2 |
3 | window.routes = [{
4 | path: "/",
5 | component: Vue.component("home", { template: "#postList" })
6 | }];
7 |
8 | var types = ['post', 'page'];
9 | for (var t = 0; t < types.length; t++) {
10 | var typeData = types[t] + 's';
11 |
12 | for (var i = 0; i < window[typeData].length; i++) {
13 | window.routes.push({
14 | path: window[typeData][i].path,
15 | component: Vue.component(window[typeData][i].path, {
16 | template: '