-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
113 lines (105 loc) · 5.38 KB
/
index.html
File metadata and controls
113 lines (105 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
title: Home
---
{% include head.html %}
<body>
{% include navbar.html %}
<!-- Compact Hero -->
<section class="hero-compact">
<!-- Auto collage from assets/img -->
<div class="hero-collage" aria-hidden="true">
{% for file in site.static_files %}
{% if file.path contains '/assets/img/' and file.extname contains '.JPG'%}
<div class="hero-tile" style="background-image: url('{{ file.path | relative_url }}');"></div>
{% endif %}
{% endfor %}
</div>
<div class="container">
<h1 class="jost-heavy mb-2 text-light">Model Railroading News, Photos, and Custom Design Services</h1>
<p class="hero-sub text mb-3">Production-ready design and 3D solutions for serious modelers and manufacturers.</p>
<div class="d-flex flex-wrap gap-2">
<a class="btn btn-primary" href="#news">Latest News</a>
<a class="btn btn-outline-light" href="#services">Book a Consultation</a>
</div>
</div>
</section>
<!-- News -->
<section id="news" class="container justify-content-center text-center pb-5">
<h2 class="jost-heavy text-light py-4">Latest News</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 pb-4 justify-content-center">
{% assign news_posts = site.posts | where_exp: "post", "post.categories contains 'news'" %}
{% for post in news_posts %}
<div class="col">
<div class="card h-100 m-3 post-preview">
{% if post.image %}<img src="{{ site.baseurl }}{{ post.image }}" class="card-img-top" alt="{{ post.title }}">{% endif %}
<div class="card-body d-flex flex-column text-start">
<div class="text-muted small mb-2">{{ post.date | date: "%b %d, %Y" }}</div>
<h5 class="card-title">{{ post.title }}</h5>
{% if post.description %}<p class="card-text text-muted">{{ post.description }}</p>{% endif %}
{% if post.tags and post.tags.size > 0 %}
<div class="tag-list mt-2">
{% for tag in post.tags %}<span class="tag-badge">#{{ tag }}</span>{% endfor %}
</div>
{% endif %}
<a href="{{ post.url }}" class="btn btn-primary mt-auto text-center">Read More</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<!-- Projects -->
<section id="projects" class="container justify-content-center text-center pb-5">
<h2 class="jost-heavy text-light py-4">Projects</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 pb-4 justify-content-center">
{% assign project_posts = site.posts | where_exp: "post", "post.categories contains 'project'" %}
{% for post in project_posts %}
<div class="col">
<div class="card h-100 m-3 post-preview">
{% if post.image %}<img src="{{ site.baseurl }}{{ post.image }}" class="card-img-top" alt="{{ post.title }}">{% endif %}
<div class="card-body d-flex flex-column text-start">
<h5 class="card-title">{{ post.title }}</h5>
{% if post.description %}<p class="card-text text-muted">{{ post.description }}</p>{% endif %}
{% if post.tags and post.tags.size > 0 %}
<div class="tag-list mt-2">
{% for tag in post.tags %}<span class="tag-badge">#{{ tag }}</span>{% endfor %}
</div>
{% endif %}
<a href="{{ post.url }}" class="btn btn-primary mt-auto text-center">View Project</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<!-- Services -->
<section id="services" class="container pb-5">
<h2 class="jost-heavy text-light text-center py-4">Design Services</h2>
<div class="row row-cols-1 row-cols-md-3 g-4 justify-content-center">
<div class="col col-md-3">
<div class="card h-100 p-3">
<h4 class="jost-medium text-light ">Production-Oriented Design</h4>
<p class="text-muted">CAD for injection molding, resin, or 3D-print batches with manufacturer-ready files.</p>
<a href="mailto:sales@uncommonmodels.com" class="btn btn-primary mt-auto">Book a Call</a>
</div>
</div>
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function () {
const collage = document.querySelector('.hero-collage');
if (!collage) return;
const tiles = Array.from(collage.children);
if (tiles.length === 0) return;
for (let i = tiles.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[tiles[i], tiles[j]] = [tiles[j], tiles[i]];
}
const maxTiles = 12;
collage.innerHTML = '';
tiles.slice(0, Math.min(maxTiles, tiles.length)).forEach(t => collage.appendChild(t));
});
</script>
{% include footer.html %}
</body>
</html>