Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
139 lines (131 loc) · 6.83 KB
/
Copy pathindex.html
File metadata and controls
139 lines (131 loc) · 6.83 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
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 pb-5">
<h2 class="jost-heavy text-light section-head">Latest News</h2>
{% assign news_posts = site.posts | where_exp: "post", "post.categories contains 'news'" %}
{% if news_posts.size > 0 %}
{% assign lead = news_posts.first %}
<a class="feature-card" href="{{ lead.url }}">
{% if lead.image %}<div class="feature-media" style="background-image: url('{{ site.baseurl }}{{ lead.image }}');"></div>{% endif %}
<div class="feature-body">
<div class="text-muted small mb-2">{{ lead.date | date: "%b %d, %Y" }}</div>
<h3 class="feature-title">{{ lead.title }}</h3>
{% if lead.description and lead.description != '' %}<p class="feature-text">{{ lead.description }}</p>{% endif %}
{% if lead.tags and lead.tags.size > 0 %}
<div class="tag-list">
{% for tag in lead.tags %}<span class="tag-badge">#{{ tag }}</span>{% endfor %}
</div>
{% endif %}
<span class="btn btn-primary feature-cta">Read More</span>
</div>
</a>
{% endif %}
{% if news_posts.size > 1 %}
<div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 g-4 mt-1">
{% for post in news_posts offset: 1 %}
<div class="col">
<div class="card h-100 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 and 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 align-self-start">Read More</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</section>
<!-- Projects -->
<section id="projects" class="container pb-5">
<h2 class="jost-heavy text-light section-head">Projects</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 g-4">
{% 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 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 and 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 align-self-start">View Project</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<!-- Services -->
<section id="services" class="container pb-5">
<h2 class="jost-heavy text-light section-head">Design Services</h2>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col">
<div class="card h-100 service-card">
<h4 class="jost-medium text-light">Model Design</h4>
<p class="text-muted">Structures, rolling stock and detail parts drawn for production, as well as CAD for injection molding or 3D printing.</p>
<a href="mailto:sales@uncommonmodels.com" class="btn btn-primary mt-auto align-self-start">Book a Call</a>
</div>
</div>
<div class="col">
<div class="card h-100 service-card">
<h4 class="jost-medium text-light">PCB Design</h4>
<p class="text-muted">Layout control and accessory electronics with custom LCC or DCC devices taken from schematic to a production-ready board.</p>
<a href="mailto:sales@uncommonmodels.com" class="btn btn-primary mt-auto align-self-start">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>