Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dinsen committed Jan 5, 2020
0 parents commit 19e3f4a
Show file tree
Hide file tree
Showing 11 changed files with 583 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Brian Dinsen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "BrianPublishTheme",
products: [
.library(
name: "BrianPublishTheme",
targets: ["BrianPublishTheme"]),
],
dependencies: [
.package(url: "https://github.com/johnsundell/publish.git", from: "0.2.0")
],
targets: [
.target(
name: "BrianPublishTheme",
dependencies: ["Publish"]),
]
)
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Brian theme for Publish

A [Publish](https://github.com/johnsundell/publish) theme available to any Publish website.

## Installation

To install it into your [Publish](https://github.com/johnsundell/publish) package, add it as a dependency within your `Package.swift` manifest:

```swift
let package = Package(
...
dependencies: [
...
.package(url: "https://github.com/dinsen/brianpublishtheme", from: "0.1.0")
],
targets: [
.target(
...
dependencies: [
...
"BrianPublishTheme"
]
)
]
...
)
```

For more information on how to use the Swift Package Manager, check out [this article](https://www.swiftbysundell.com/articles/managing-dependencies-using-the-swift-package-manager), or [its official documentation](https://github.com/apple/swift-package-manager/tree/master/Documentation).

## Usage

The theme can then be used within any publishing pipeline like this:

```swift
import BrianPublishTheme
...
try Brian().publish(withTheme: .brian)
```
218 changes: 218 additions & 0 deletions Resources/BrianTheme/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
/**
* Publish Brian theme
* Copyright (c) Brian Dinsen 2020
* MIT license, see LICENSE file for details
* This file is a modified version of
* Foundation theme included in Publish
*/

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
background: #fff;
color: #000;
font-family: Helvetica, Arial;
text-align: center;
}

.wrapper {
max-width: 900px;
margin-left: auto;
margin-right: auto;
padding: 40px;
text-align: left;
}

header {
background-color: #f44336;
}

header .wrapper {
padding: 128px 16px;
text-align: center;
}

header a {
text-decoration: none;
}

header .site-name {
font-size: 1.5em;
color: #000;
font-weight: bold;
}

nav {
margin-top: 20px;
}

nav li {
display: inline-block;
padding: 5px;
}

h1 {
margin-bottom: 20px;
font-size: 2em;
}

h2 {
margin: 20px 0;
}

p {
margin-bottom: 10px;
}

a {
color: inherit;
}

.description {
margin-bottom: 40px;
}

.item-list > li {
display: block;
padding: 20px;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 20px;
background-color: #eee;
}

.item-list h1 {
margin-bottom: 15px;
font-size: 1.3em;
}

.item-list p {
margin-bottom: 0;
}

.tag-list {
margin-bottom: 15px;
}

.tag-list li,
.tag {
display: inline-block;
background-color: #000;
color: #ddd;
padding: 4px 6px;
border-radius: 5px;
margin-right: 5px;
}

.tag-list a,
.tag a {
text-decoration: none;
}

.item-page .tag-list {
display: inline-block;
}

.content {
margin-bottom: 40px;
line-height: 1.5em;
}

.browse-all {
display: block;
margin-bottom: 30px;
}

.all-tags li {
font-size: 1.4em;
margin-right: 10px;
padding: 6px 10px;
}

footer {
color: #8a8a8a;
}

@media (prefers-color-scheme: dark) {
body {
background-color: #222;
}

body,
header .site-name {
color: #fff;
}

.item-list > li {
background-color: #333;
}

header {
background-color: #f44336;
}
}

/**
* Example CSS file that can be used to style Splash HTML output
* Copyright (c) John Sundell 2018
* MIT license - see LICENSE.md
*/

pre {
margin-bottom: 1.5em;
background-color: #1a1a1a;
padding: 16px 0;
border-radius: 16px;
}

pre code {
font-family: monospace;
display: block;
padding: 0 20px;
color: #a9bcbc;
line-height: 1.4em;
font-size: 0.95em;
overflow-x: auto;
white-space: pre;
-webkit-overflow-scrolling: touch;
}

pre code .keyword {
color: #e73289;
}

pre code .type {
color: #8281ca;
}

pre code .call {
color: #348fe5;
}

pre code .property {
color: #21ab9d;
}

pre code .number {
color: #db6f57;
}

pre code .string {
color: #fa641e;
}

pre code .comment {
color: #6b8a94;
}

pre code .dotAccess {
color: #92b300;
}

pre code .preprocessing {
color: #b68a00;
}
Loading

0 comments on commit 19e3f4a

Please sign in to comment.