Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"url-polyfill": "1.1.12",
"url-search-params-polyfill": "8.2.5",
"use-query-params": "^2.2.1",
"vanilla-framework": "4.50.0",
"vanilla-framework": "4.52.0",
"yup": "1.4.0"
},
"resolutions": {
Expand All @@ -149,10 +149,11 @@
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest"
},
"transformIgnorePatterns": [
"/node_modules/(?!@canonical/react-components).+\\.js$"
"/node_modules/(?!@canonical/react-components|cheerio).+\\.js$"
],
"moduleNameMapper": {
"\\.(scss|sass)$": "identity-obj-proxy"
"\\.(scss|sass)$": "identity-obj-proxy",
"cheerio/lib/(.*)": "<rootDir>/node_modules/cheerio/dist/commonjs/$1"
},
"moduleFileExtensions": [
"ts",
Expand Down
20 changes: 0 additions & 20 deletions secondary-navigation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,26 +187,6 @@ kubernetes:
- title: Resources
path: /kubernetes/resources

blog:
title: Blog
path: /blog

children:
- title: Overview
path: /blog
- title: Internet of Things
path: /blog/internet-of-things
- title: Desktop
path: /blog/desktop
- title: Cloud and Server
path: /blog/cloud-and-server
- title: Web and Design
path: /blog/topics/design
- title: People and culture
path: /blog/people-and-culture
- title: Archives
path: /blog/archives

desktop:
title: Ubuntu Desktop
path: /desktop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { format } from "date-fns";
import CSS from "csstype";
import { CSSProperties } from "react";
import { Formik, Field } from "formik";

import { Button, Select, TableRow } from "@canonical/react-components";
Expand Down Expand Up @@ -57,7 +57,7 @@ const UserEmail = ({

type UserRoleProps = UserVariantProps;

const getVisibilityStyles = (isVisible: boolean): CSS.Properties => ({
const getVisibilityStyles = (isVisible: boolean): CSSProperties => ({
display: "flex",
alignItems: "center",
height: "100%",
Expand Down
42 changes: 0 additions & 42 deletions static/sass/_pattern_blog-featured.scss

This file was deleted.

14 changes: 0 additions & 14 deletions static/sass/_pattern_blog-list.scss

This file was deleted.

16 changes: 0 additions & 16 deletions static/sass/_pattern_blog-post.scss

This file was deleted.

31 changes: 0 additions & 31 deletions static/sass/_pattern_blog-suru.scss

This file was deleted.

23 changes: 23 additions & 0 deletions static/sass/_pattern_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,27 @@
color: $color-mid-dark;
}
}

.p-button--themed {
@extend %vf-button-base;
@extend %vf-button-white-success-icon;

@media screen and (width < $breakpoint-small) {
width: 100%;
}

@include vf-button-pattern(
$button-background-color: $color-brand,
$button-hover-background-color: $color-brand-dark,
$button-active-background-color: $color-brand-dark,
$button-disabled-background-color: $color-brand,
$button-border-color: $color-brand,
$button-hover-border-color: $color-brand-dark,
$button-active-border-color: $color-brand-dark,
$button-disabled-border-color: $color-brand,
$button-text-color: $colors--theme--button-positive-text
);

@include vf-focus($color-focus-positive);
}
}
9 changes: 8 additions & 1 deletion static/sass/_pattern_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}

@mixin vf-icon-launchpad {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 16 16"><defs><style>.cls-1{fill:%23e95420;}.cls-2{fill:%23fff;}</style></defs><rect width="16" class="cls-1" height="16"/><path class="cls-2" d="m1.29 4.57l0.73-1.1c0.07-0.1 0.11-0.1 0.18-0.07 1.62 0.93 3.07 1.07 4.56 0.42 1.49-0.64 2.38-1.78 2.81-3.58 0.05-0.16 0.11-0.16 0.15-0.16l1.28 0.28c0.22 0.05 0.21 0.11 0.2 0.16-0.28 2.1-1.74 3.95-3.81 4.83-2.1 0.9-4.38 0.7-6.1-0.53-0.03-0.03-0.11-0.11-0.02-0.25zm6.4 10.62l1.32 0.07c0.22 0 0.23-0.05 0.23-0.1 0.28-2.1-0.63-4.27-2.39-5.66-1.78-1.43-4.03-1.84-6.02-1.11-0.04 0.02-0.14 0.08-0.09 0.24l0.42 1.25c0.04 0.11 0.08 0.13 0.16 0.11 1.81-0.47 3.24-0.21 4.51 0.81 1.26 1.01 1.82 2.35 1.76 4.2 0 0.16 0.06 0.18 0.1 0.18zm0.84-8.77c-0.06 0-0.12-0.01-0.18-0.01-0.27 0-0.52 0.08-0.72 0.24-0.25 0.19-0.41 0.48-0.46 0.81-0.04 0.32 0.04 0.64 0.23 0.89 0.19 0.26 0.48 0.42 0.81 0.47 0.66 0.09 1.27-0.38 1.36-1.04 0.09-0.67-0.36-1.27-1.04-1.36zm6.57-2.21l-0.61-1.17c-0.09-0.19-0.16-0.17-0.23-0.15-1.95 0.84-3.3 2.69-3.61 4.96-0.31 2.26 0.5 4.41 2.17 5.74 0.04 0.03 0.07 0.04 0.12 0.04s0.1-0.03 0.13-0.07l0.86-1.03c0.08-0.1 0.05-0.15 0-0.19-1.35-1.33-1.85-2.64-1.63-4.27s1.08-2.8 2.71-3.68c0.13-0.08 0.11-0.15 0.1-0.17z"/></svg>');
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 16 16"><defs>\3c style>.cls-1{fill:%23e95420;}.cls-2{fill:%23fff;}\3c /style></defs><rect width="16" class="cls-1" height="16"/><path class="cls-2" d="m1.29 4.57l0.73-1.1c0.07-0.1 0.11-0.1 0.18-0.07 1.62 0.93 3.07 1.07 4.56 0.42 1.49-0.64 2.38-1.78 2.81-3.58 0.05-0.16 0.11-0.16 0.15-0.16l1.28 0.28c0.22 0.05 0.21 0.11 0.2 0.16-0.28 2.1-1.74 3.95-3.81 4.83-2.1 0.9-4.38 0.7-6.1-0.53-0.03-0.03-0.11-0.11-0.02-0.25zm6.4 10.62l1.32 0.07c0.22 0 0.23-0.05 0.23-0.1 0.28-2.1-0.63-4.27-2.39-5.66-1.78-1.43-4.03-1.84-6.02-1.11-0.04 0.02-0.14 0.08-0.09 0.24l0.42 1.25c0.04 0.11 0.08 0.13 0.16 0.11 1.81-0.47 3.24-0.21 4.51 0.81 1.26 1.01 1.82 2.35 1.76 4.2 0 0.16 0.06 0.18 0.1 0.18zm0.84-8.77c-0.06 0-0.12-0.01-0.18-0.01-0.27 0-0.52 0.08-0.72 0.24-0.25 0.19-0.41 0.48-0.46 0.81-0.04 0.32 0.04 0.64 0.23 0.89 0.19 0.26 0.48 0.42 0.81 0.47 0.66 0.09 1.27-0.38 1.36-1.04 0.09-0.67-0.36-1.27-1.04-1.36zm6.57-2.21l-0.61-1.17c-0.09-0.19-0.16-0.17-0.23-0.15-1.95 0.84-3.3 2.69-3.61 4.96-0.31 2.26 0.5 4.41 2.17 5.74 0.04 0.03 0.07 0.04 0.12 0.04s0.1-0.03 0.13-0.07l0.86-1.03c0.08-0.1 0.05-0.15 0-0.19-1.35-1.33-1.85-2.64-1.63-4.27s1.08-2.8 2.71-3.68c0.13-0.08 0.11-0.15 0.1-0.17z"/></svg>');
}

@mixin additional-p-icons {
Expand Down Expand Up @@ -68,3 +68,10 @@
}
}
}

@mixin vf-themed-icons {
.p-icon-themed--external-link {
@extend %icon;
@include vf-icon-external-link(#ffffff);
}
}
10 changes: 10 additions & 0 deletions static/sass/_pattern_strip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1191,3 +1191,13 @@
}
}
}

@mixin ubuntu-p-strip-suru-shallow {
.p-strip--suru-shallow {
padding-top: 1.5rem;

@media (max-width: $breakpoint-large - 1) {
padding: 1.5rem 0;
}
}
}
10 changes: 2 additions & 8 deletions static/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ $color-shadow: rgba(0, 0, 0, 0.5) !default;
// import site specific patterns and overrides
@import "pattern_accordion";
@import "pattern_ai";
@import "pattern_blog-featured";
@import "pattern_blog-list";
@import "pattern_blog-post";
@import "pattern_blog-card";
@import "pattern_blog-suru";
@import "pattern_blog-topic";
@import "pattern_buttons";
@import "pattern_calculator";
Expand Down Expand Up @@ -114,10 +110,6 @@ $color-shadow: rgba(0, 0, 0, 0.5) !default;

@include additional-p-icons;
@include blog-p-card;
@include blog-p-featured;
@include blog-p-list;
@include blog-p-post;
@include blog-p-strips-suru;
@include blog-p-topic;
@include blog-u-crop;
@include ubuntu-p-accordion;
Expand Down Expand Up @@ -146,6 +138,7 @@ $color-shadow: rgba(0, 0, 0, 0.5) !default;
@include ubuntu-p-navigation-reduced;
@include ubuntu-p-nojs-navigation;
@include ubuntu-p-strip;
@include ubuntu-p-strip-suru-shallow;
@include ubuntu-p-ua-payment-modal;
@include ubuntu-p-pie-chart;
@include ubuntu-p-ua-shop-cart;
Expand Down Expand Up @@ -178,6 +171,7 @@ $color-shadow: rgba(0, 0, 0, 0.5) !default;
@include vf-p-icon-credit-card;
@include vf-p-icon-vulnerable;
@include vf-p-icon-ignored;
@include vf-themed-icons;
@include openstack-carousel;

// Layouts:
Expand Down
37 changes: 0 additions & 37 deletions templates/blog/blog-card-large.html

This file was deleted.

50 changes: 0 additions & 50 deletions templates/blog/blog-card-upcoming.html

This file was deleted.

21 changes: 21 additions & 0 deletions templates/blog/featured-article.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="grid-row">
{# djlint:off #}
{% set article = featured_articles[0] %}

{% from "_macros/vf_card.jinja" import vf_card %}

{{ vf_card(
columns="8",
link="/blog/" ~ article.slug,
heading=article.title.rendered | safe,
image={
"src": article.image.source_url,
"alt": article.title.rendered | striptags
},
footer={
"content_type": article.group.name if article.group else "Company"
},
description=article.excerpt.raw | replace("[…]", "") | truncate(162)
) }}
{# djlint:on #}
</div>
Loading
Loading