Skip to content

Commit 0c319d3

Browse files
committed
refactor(home): remove blog posts from homepage
1 parent 5e9fd15 commit 0c319d3

3 files changed

Lines changed: 1 addition & 102 deletions

File tree

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build-css": "sass --quiet-deps --silence-deprecation=import static/sass/styles.scss:static/css/styles.css static/sass/styles-embedded.scss:static/css/styles-embedded.css --load-path=node_modules --style=compressed && postcss --use autoprefixer --no-map --replace 'static/css/**/*.css'",
1414
"build-js": "yarn run copy-3rd-party-js && yarn run build-js-bundle",
1515
"copy-3rd-party-js": "mkdir -p static/js/modules && cp node_modules/d3/dist/d3.min.js static/js/modules && cp node_modules/clipboard/dist/clipboard.min.js static/js/modules && cp node_modules/raven-js/dist/raven.min.js static/js/modules",
16-
"build-js-bundle": "webpack && yarn build-latest-news",
17-
"build-latest-news": "cp node_modules/@canonical/latest-news/dist/latest-news.js static/js/dist",
16+
"build-js-bundle": "webpack",
1817
"serve": "./entrypoint 0.0.0.0:${PORT}",
1918
"start": "yarn run build && concurrently --raw 'yarn run watch-scss' 'yarn run watch-js' 'yarn run serve'",
2019
"watch": "watch -p 'static/sass/**/*.scss' -p 'static/js/**/*.js' -c 'yarn run build'",
@@ -33,7 +32,6 @@
3332
"@babel/preset-typescript": "7.26.0",
3433
"@canonical/cookie-policy": "3.6.5",
3534
"@canonical/global-nav": "3.6.4",
36-
"@canonical/latest-news": "1.5.0",
3735
"@canonical/react-components": "2.2.1",
3836
"@canonical/store-components": "0.53.0",
3937
"@dnd-kit/core": "6.3.1",

templates/index.html

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -105,100 +105,6 @@ <h2 class="p-muted-heading">Official snaps from major publishers</h2>
105105
</div>
106106
</section>
107107

108-
<section class="p-section" data-js="latest-news">
109-
<div class="u-fixed-width"><hr class="p-rule"></div>
110-
<div class="row">
111-
<div class="col-3 col-medium-2">
112-
<h2 class="p-muted-heading">Latest news from <a href="/blog">our blog&nbsp;&rsaquo;</a></h2>
113-
</div>
114-
<div class="col-9 col-medium-4">
115-
<!-- Hardcoded article content for A/B test -->
116-
<div class="p-section">
117-
<div class="row">
118-
<div class="col-6">
119-
<h3 class="p-heading--2">
120-
<a href="https://snapcraft.io/blog/creating-snaps-on-ubuntu-touch" class="article-link article-title">Creating Snaps on Ubuntu Touch</a>
121-
</h3>
122-
</div>
123-
<div class="col-2 col-start-large-8">
124-
<footer>
125-
<p class="u-no-margin--bottom">
126-
<time pubdate datetime="POST_UPDATED" class="article-time">3 April 2024</time><br>
127-
</p>
128-
<em class="article-author">Aaron Prisk</em>
129-
</footer>
130-
</div>
131-
</div>
132-
</div>
133-
<div class="p-section">
134-
<hr class="p-rule">
135-
<div class="row">
136-
<div class="col-6">
137-
<h3 class="p-heading--2">
138-
<a href="https://snapcraft.io/blog/managing-software-snap-store-proxy" class="article-link article-title">Managing software in complex network environments: the Snap Store Proxy</a>
139-
</h3>
140-
</div>
141-
<div class="col-2 col-start-large-8">
142-
<footer>
143-
<p class="u-no-margin--bottom">
144-
<time pubdate datetime="POST_UPDATED" class="article-time">15 January 2024</time><br>
145-
</p>
146-
<em class="article-author">Holly Hall</em>
147-
</footer>
148-
</div>
149-
</div>
150-
</div>
151-
<div class="p-section">
152-
<hr class="p-rule">
153-
<div class="row">
154-
<div class="col-6">
155-
<h3 class="p-heading--2">
156-
<a href="https://snapcraft.io/blog/we-wish-you-risc-v-holidays" class="article-link article-title">We wish you RISC-V holidays!</a>
157-
</h3>
158-
</div>
159-
<div class="col-2 col-start-large-8">
160-
<footer>
161-
<p class="u-no-margin--bottom">
162-
<time pubdate datetime="POST_UPDATED" class="article-time">21 December 2023</time><br>
163-
</p>
164-
<em class="article-author">Igor Ljubuncic</em>
165-
</footer>
166-
</div>
167-
</div>
168-
</div>
169-
</div>
170-
</div>
171-
</section>
172-
<!-- Temporarily replace js content with static HTML content for A/B testing. -->
173-
<!-- <template style="display: none;" id="horizontal-articles-template">
174-
<div class="p-section">
175-
<hr class="p-rule">
176-
<div class="row">
177-
<div class="col-6">
178-
<h3 class="p-heading--2"><a class="article-link article-title"></a></h3>
179-
</div>
180-
<div class="col-2 col-start-large-8">
181-
<footer>
182-
<p class="u-no-margin--bottom">
183-
<time pubdate datetime="POST_UPDATED" class="article-time"></time><br>
184-
</p>
185-
<em class="article-author"></em>
186-
</footer>
187-
</div>
188-
</div>
189-
</div>
190-
</template> -->
191-
<!-- <script src="/static/js/dist/latest-news.js"></script>
192-
<script>
193-
canonicalLatestNews.fetchLatestNews({
194-
articlesContainerSelector: "#horizontal-latest-articles",
195-
articleTemplateSelector: "#horizontal-articles-template",
196-
tagId: "2996",
197-
limit: 3,
198-
});
199-
</script> -->
200-
</section>
201-
202108
<section class="p-strip--white u-no-padding--top u-no-padding--bottom">
203109
{% include "partials/fsf_language.html" %}
204110
</section>

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,11 +1027,6 @@
10271027
dependencies:
10281028
vanilla-framework "4.9.0"
10291029

1030-
"@canonical/latest-news@1.5.0":
1031-
version "1.5.0"
1032-
resolved "https://registry.yarnpkg.com/@canonical/latest-news/-/latest-news-1.5.0.tgz#22b0c211114ef8d0b9a10d495d035411b21e1a86"
1033-
integrity sha512-pNCNhBn/LFnCe9Fp3Dm4WJwVkGrJMlL6lZft1SnLqufE5k6+ihZVr03revNxyMwnSu5EPpDcEduqYrTuQQGM4A==
1034-
10351030
"@canonical/react-components@1.9.0":
10361031
version "1.9.0"
10371032
resolved "https://registry.yarnpkg.com/@canonical/react-components/-/react-components-1.9.0.tgz#9337b35e632d7419eddf51823a5243156893185e"

0 commit comments

Comments
 (0)