Skip to content

Commit 9f23559

Browse files
authored
Merge pull request #158 from basiljs/feature/example-gallery-item
Feature/example gallery item
2 parents 30e9919 + 2d124c3 commit 9f23559

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1049
-425
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,18 @@ To work on the Javascript and SCSS of the site you need to run
114114
npm run webpack:dev
115115
```
116116

117+
## Gallery Content
117118

119+
To add a new gallery item you can duplicate the folder `_source/gallery/example-gallery-item`
120+
121+
There Need to be two images present.
122+
123+
1. thumbnail.png with a size of 320 × 180 px (this will be used in the gallery overview)
124+
2. splash.png with a size of 1280 × 720 px (this will be used on the start page if featured is true)
125+
126+
You also should replace all the values in the frontmatter of the `index.md` file.
127+
128+
Please set your project first to `publish: false` and also the `featured: false` to get a review by the maintainers.
118129

119130
## Recipes
120131

_source/_includes/aside-left.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
exclude the root path
1919
-->
2020
{% assign pages = site.pages | sort: 'order' %}
21-
{% for item in pages %}{% if item.layout != 'entry' %}{%if item.layout == 'default' or item.layout == 'reference' %}{% if item.url != '/' %}
21+
{% for item in pages %}{% if item.layout != 'entry' %}{%if item.layout == 'default' or item.layout == 'reference' or item.layout == 'gallery' %}{% if item.url != '/' %}
2222
<li class="menu-item {% if item.title == page.title %}active{% endif %}"><a href="{{item.url}}"
2323
class="textgrow menu-link">{{item.title}}</a></li>
2424
{% endif %}{% endif %}{% endif %}{% endfor %}

_source/_layouts/default.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,18 @@
3636

3737
<script src="/assets/js/main.bundle.js" type="text/javascript"></script>
3838
{% if page.layout == 'reference' or page.layout == 'entry' %}
39-
4039
<script src="/assets/js/vendors~reference.bundle.js" type="text/javascript" defer></script>
41-
4240
<script src="/assets/js/reference.bundle.js" type="text/javascript"></script>
4341
{% endif %}
42+
43+
{%- if page.layout == 'gallery' -%}
44+
<script src="/assets/js/vendors~gallery-randomize.bundle.js" defer></script>
45+
<script src="/assets/js/gallery-randomize.bundle.js"></script>
46+
{%- endif -%}
47+
{%- if page.hasFeaturedProjects == true -%}
48+
<script src="/assets/js/vendors~featured-carousel.bundle.js" defer></script>
49+
<script src="/assets/js/featured-carousel.bundle.js"></script>
50+
{%- endif -%}
4451
</body>
4552

4653
</html>

_source/_layouts/gallery.html

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,5 @@
22
layout: default
33
---
44

5-
{% for img in page.images %}
6-
{%if img == "index.png" %}
7-
<img src="./images/{{img}}" alt="" style="max-width:100%">
8-
{% endif %}
9-
{% endfor %}
10-
115
{{content}}
126

13-
{% capture mdcode %}
14-
```js
15-
{% include_relative index.js %}
16-
```
17-
{% endcapture %}
18-
{{ mdcode | markdownify }}
19-
20-
{% for img in page.images %}
21-
{%if img != "index.png" %}
22-
<img src="./images/{{img}}" alt="" style="max-width:100%">
23-
{% endif%}
24-
{% endfor %}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.featured-projects {
2+
height: 25em;
3+
}
4+
5+
ul.featured-projects-list {
6+
}
7+
8+
.featured-project-thumb {
9+
max-width: 100%;
10+
height: auto;
11+
/* width: 1280px; */
12+
/* height: 720px; */
13+
}
14+
15+
li.featured-project {
16+
position: relative;
17+
list-style: none;
18+
display: none;
19+
}
20+
21+
.featured-project-title {
22+
margin: 0;
23+
position: absolute;
24+
float: left;
25+
left: 0px;
26+
top: -25px;
27+
z-index: 0;
28+
background-color: white;
29+
padding-right: 1em;
30+
padding-left: 0.5em;
31+
width: 100%;
32+
}
33+
34+
img.featured-project-thumb {
35+
display: inline;
36+
}

_source/assets/css/styles.css

Lines changed: 32 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_source/assets/css/styles.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ h6 {
317317
color: $headLineColor;
318318
}
319319

320-
h4.entries-title {
320+
h4.entries-title,
321+
h4.entry-heading {
321322
text-decoration: none !important;
322323
}
323324

@@ -395,7 +396,7 @@ ul {
395396

396397
// ------------ code
397398
//
398-
@import "./scss/syntax.scss";
399+
@import "./scss/_syntax.scss";
399400

400401
pre {
401402
background: #eee !important;
@@ -486,8 +487,8 @@ a.textgrow {
486487
}
487488
}
488489

489-
@import "./scss/_guidelines.scss", "./scss/reference.scss",
490-
"./scss/changelog.scss";
490+
@import "./scss/_guidelines.scss", "./scss/_reference.scss",
491+
"./scss/_changelog.scss", "./scss/_featured-projects.scss";
491492

492493
// ------------------------
493494
// old basil css. Overwrite new settings

_source/assets/js/featured-carousel.bundle.js

Lines changed: 128 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)