Skip to content

Commit

Permalink
Extract cards theme from thumbsup core
Browse files Browse the repository at this point in the history
  • Loading branch information
rprieto committed Jun 23, 2018
1 parent 1b78141 commit be03e72
Show file tree
Hide file tree
Showing 51 changed files with 8,043 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp
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) 2017 thumbsup

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.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# theme-cards
# @thumbsup/theme-cards

One of the built-in themes for https://github.com/thumbsup/thumbsup.

---

## Usage

```bash
thumbsup --theme cards
```

## Screenshots

![albums](docs/albums.png)
![media](docs/media.png)

## Developing

Testing the theme

```bash
thumbsup --input /photos --output ./tmp --theme-path ./theme
```

Publishing the theme:

```bash
npm publish
```
Binary file added docs/albums.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@thumbsup/theme-cards",
"version": "0.0.1",
"description": "Thumbsup cards theme",
"author": "Thumbsup",
"license": "MIT",
"homepage": "https://github.com/thumbsup/theme-cards#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/thumbsup/theme-cards.git"
},
"bugs": {
"url": "https://github.com/thumbsup/theme-cards/issues"
},
"thumbsup": {
"themeRoot": "theme"
}
}
47 changes: 47 additions & 0 deletions theme/album.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>{{gallery.title}} - {{album.title}}</title>
<link rel="stylesheet" href="{{relative 'public/lightgallery/css/lightgallery.css'}}" />
<link rel="stylesheet" href="{{relative 'public/videojs/video-js.min.css'}}" />
<link rel="stylesheet" href="{{relative 'public/core.css'}}" />
<link rel="stylesheet" href="{{relative 'public/theme.css'}}" />
</head>

<body>

{{> content}}
{{> video-loader}}

<!-- jQuery -->
<script src="{{relative 'public/jquery.min.js'}}"></script>
<!-- VideoJS -->
<script src="{{relative 'public/videojs/video.min.js'}}"></script>
<!-- LightGallery -->
<script src="{{relative 'public/lightgallery/js/lightgallery.js'}}"></script>
<script src="{{relative 'public/lightgallery/js/lg-autoplay.js'}}"></script>
<script src="{{relative 'public/lightgallery/js/lg-pager.js'}}"></script>
<script src="{{relative 'public/lightgallery/js/lg-thumbnail.js'}}"></script>
<script src="{{relative 'public/lightgallery/js/lg-video.js'}}"></script>

<script>
$(document).ready(function() {
$("#media").lightGallery({
thumbWidth: 80,
controls: true,
loop : false,
download: true,
counter: true,
videojs: true
});
});
</script>

{{> analytics}}

</body>

</html>
Empty file added theme/helpers/.gitkeep
Empty file.
54 changes: 54 additions & 0 deletions theme/partials/content.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

<div id="container">

<!--
Gallery title
-->
<header>
<h1><a href="{{relative gallery.home.url}}">{{gallery.title}}</a></h1>
</header>

<!--
Breadcrumbs of parent albums
-->
<nav class="breadcrumbs">
{{#each breadcrumbs~}}
<a class="breadcrumb-item" href="{{relative url}}">{{title}}</a>&nbsp;/&nbsp;
{{~/each~}}
<a class="breadcrumb-item" href="{{relative album.url}}">{{album.title}}</a>
</nav>

<!--
Nested albums, if any
-->
<div id="albums">
{{#each album.albums~}}
<a href="{{relative url}}" style="background-image: url('{{relative previews.0.urls.large}}')">
<div class="info">
<h3>{{title}}</h3>
<div class="summary">{{summary}}</div>
<div class="date">{{{date stats.fromDate}}} - {{{date stats.toDate}}}</div>
</div>
</a>
{{~/each}}
</div>

<!--
All photos and videos
-->
<ul id="media" class="clearfix">
{{#each album.files~}}
{{> thumbnail}}
{{~/each}}
</ul>

<!--
Optional footer
-->
{{#if gallery.footer}}
<footer>
<p>{{{gallery.footer}}}</p>
</footer>
{{/if}}

</div>
Empty file added theme/public/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions theme/public/jquery.min.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions theme/public/lightgallery/css/lg-fb-comment-box.css

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

1 change: 1 addition & 0 deletions theme/public/lightgallery/css/lg-fb-comment-box.min.css

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

Loading

0 comments on commit be03e72

Please sign in to comment.