refactor: rename class .icon to .gdoc-icon (#379)

BREAKING CHANGE: The class `.icon` was renamed to `.gdoc-icon` to avoid conflicts.
This commit is contained in:
Robert Kaussow 2022-04-18 20:33:23 +02:00 committed by GitHub
parent 97937f3164
commit b104d6ac70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 62 additions and 62 deletions

View file

@ -5,7 +5,7 @@
{{ range .Site.Languages }}
{{ if eq . $.Site.Language }}
<span class="flex align-center">
<svg class="icon gdoc_language"><use xlink:href="#gdoc_language"></use></svg>
<svg class="gdoc-icon gdoc_language"><use xlink:href="#gdoc_language"></use></svg>
<span>{{ .Lang | upper }}</span>
</span>
{{ end }}

View file

@ -44,7 +44,7 @@
>
<span class="flex">
{{ if $icon }}
<svg class="icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>
<svg class="gdoc-icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>
{{ end }}
<a
href="{{ if .external }}
@ -60,10 +60,10 @@
</a>
</span>
{{ if $doCollapse }}
<svg class="icon toggle gdoc_keyboard_arrow_left">
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
</svg>
<svg class="icon toggle gdoc_keyboard_arrow_down hidden">
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_down hidden">
<use xlink:href="#gdoc_keyboard_arrow_down"></use>
</svg>
{{ end }}

View file

@ -34,7 +34,7 @@
{{ end }}"
class="gdoc-header__link"
>
<svg class="icon {{ .icon }}">
<svg class="gdoc-icon {{ .icon }}">
<title>{{ $name }}</title>
<use xlink:href="#{{ .icon }}"></use>
</svg>

View file

@ -79,10 +79,10 @@
<span class="flex">{{ partial "utils/title" . }}</span>
{{ end }}
{{ if $doCollapse }}
<svg class="icon toggle gdoc_keyboard_arrow_left">
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
</svg>
<svg class="icon toggle gdoc_keyboard_arrow_down">
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_down">
<use xlink:href="#gdoc_keyboard_arrow_down"></use>
</svg>
{{ end }}

View file

@ -33,7 +33,7 @@
>
{{ if $showBreadcrumb }}
<div>
<svg class="icon gdoc_path hidden-mobile"><use xlink:href="#gdoc_path"></use></svg>
<svg class="gdoc-icon gdoc_path hidden-mobile"><use xlink:href="#gdoc_path"></use></svg>
<ol class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
{{ $position := sub (len (split .RelPermalink "/")) 1 }}
{{ $name := (partial "utils/title" .) }}
@ -45,7 +45,7 @@
{{ if $showEdit }}
<div>
<span class="editpage">
<svg class="icon gdoc_code"><use xlink:href="#gdoc_code"></use></svg>
<svg class="gdoc-icon gdoc_code"><use xlink:href="#gdoc_code"></use></svg>
<a
href="{{ $geekdocRepo }}/{{ path.Join $geekdocEditPath ($.Scratch.Get "geekdocFilePath") }}"
>

View file

@ -1,5 +1,5 @@
<span class="flex align-center no-wrap">
<svg class="icon gdoc_date"><use xlink:href="#gdoc_date"></use></svg>
<svg class="gdoc-icon gdoc_date"><use xlink:href="#gdoc_date"></use></svg>
<span class="gdoc-post__tag">
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if .Lastmod.After (.Date.AddDate 0 0 1) }}
@ -11,7 +11,7 @@
</span>
<span class="flex align-center no-wrap">
<svg class="icon gdoc_timer"><use xlink:href="#gdoc_timer"></use></svg>
<svg class="gdoc-icon gdoc_timer"><use xlink:href="#gdoc_timer"></use></svg>
<span class="gdoc-post__tag">{{ i18n "posts_read_time" .ReadingTime }}</span>
</span>
@ -22,7 +22,7 @@
{{ with $.Site.GetPage (printf "/tags/%s" $name | urlize) }}
{{ if eq $tc 0 }}
<span class="flex align-center no-wrap">
<svg class="icon gdoc_bookmark"><use xlink:href="#gdoc_bookmark"></use></svg>
<svg class="gdoc-icon gdoc_bookmark"><use xlink:href="#gdoc_bookmark"></use></svg>
{{ template "post-tag" dict "name" $name "page" . }}
</span>
{{ else }}

View file

@ -1,6 +1,6 @@
{{ if default true .Site.Params.GeekdocSearch }}
<div class="gdoc-search">
<svg class="icon gdoc_search"><use xlink:href="#gdoc_search"></use></svg>
<svg class="gdoc-icon gdoc_search"><use xlink:href="#gdoc_search"></use></svg>
<input
type="text"
id="gdoc-search-input"

View file

@ -33,7 +33,7 @@
<div class="flex flex-25 justify-end">
<span class="gdoc-footer__item text-right">
<a class="gdoc-footer__link fake-link" href="#" aria-label="{{ i18n "nav_top" }}">
<svg class="icon gdoc_keyboard_arrow_up">
<svg class="gdoc-icon gdoc_keyboard_arrow_up">
<use xlink:href="#gdoc_keyboard_arrow_up"></use>
</svg>
<span class="hidden-mobile">{{ i18n "nav_top" }}</span>

View file

@ -2,11 +2,11 @@
<div class="container flex align-center justify-between">
{{ if .MenuEnabled }}
<label for="menu-control" class="gdoc-nav__control" tabindex="0">
<svg class="icon gdoc_menu">
<svg class="gdoc-icon gdoc_menu">
<title>{{ i18n "button_nav_open" }}</title>
<use xlink:href="#gdoc_menu"></use>
</svg>
<svg class="icon gdoc_arrow_back">
<svg class="gdoc-icon gdoc_arrow_back">
<title>{{ i18n "button_nav_close" }}</title>
<use xlink:href="#gdoc_arrow_back"></use>
</svg>
@ -32,15 +32,15 @@
<span id="gdoc-dark-mode">
<svg class="icon gdoc_brightness_dark">
<svg class="gdoc-icon gdoc_brightness_dark">
<title>{{ i18n "button_toggle_dark" }}</title>
<use xlink:href="#gdoc_brightness_dark"></use>
</svg>
<svg class="icon gdoc_brightness_light">
<svg class="gdoc-icon gdoc_brightness_light">
<title>{{ i18n "button_toggle_dark" }}</title>
<use xlink:href="#gdoc_brightness_light"></use>
</svg>
<svg class="icon gdoc_brightness_auto">
<svg class="gdoc-icon gdoc_brightness_auto">
<title>{{ i18n "button_toggle_dark" }}</title>
<use xlink:href="#gdoc_brightness_auto"></use>
</svg>
@ -48,7 +48,7 @@
<span class="gdoc-menu-header__home">
<a href="{{ .Root.Site.BaseURL }}" class="gdoc-header__link">
<svg class="icon gdoc_home">
<svg class="gdoc-icon gdoc_home">
<title>{{ i18n "button_homepage" }}</title>
<use xlink:href="#gdoc_home"></use>
</svg>
@ -60,7 +60,7 @@
<span class="gdoc-menu-header__control">
<label for="menu-header-control">
<svg class="icon gdoc_keyboard_arrow_right">
<svg class="gdoc-icon gdoc_keyboard_arrow_right">
<use xlink:href="#gdoc_keyboard_arrow_right"></use>
<title>{{ i18n "button_menu_close" }}</title>
</svg>
@ -68,7 +68,7 @@
</span>
</span>
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyboard_arrow_left">
<svg class="gdoc-icon gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
<title>{{ i18n "button_menu_open" }}</title>
</svg>