-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp the views to new chameleon version
- Loading branch information
Showing
13 changed files
with
105 additions
and
370 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- unless flash.blank? | ||
#flash-messages.container | ||
- %w(success error warn note notice info).each do |flash_type| | ||
- if (flash[flash_type] && !flash[flash_type].empty?) | ||
- flash_header = case flash_type.to_sym | ||
- when :error then 'alert alert-danger' | ||
- when :warn then 'alert alert-warning' | ||
- when :success then 'alert alert-success' | ||
- when :note then 'alert alert-light' | ||
- when :info then 'alert alert-info' | ||
- when :notice then 'alert alert-primary' | ||
|
||
- body = flash[flash_type].gsub(/\n/, '<br/>') | ||
- body = sanitize body, :tags => %w(a b p ul li br u), :attributes => %w(href title) | ||
|
||
%div{ class: flash_header } | ||
%p | ||
= body |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
%footer.footer | ||
.container | ||
.d-flex.justify-content-between | ||
.footer-copyright | ||
© 2011– | ||
= Time.new.year | ||
= _("openSUSE contributors") | ||
.list-inline | ||
= link_to _("Source Code"), "https://github.com/openSUSE/news-o-o", class: "list-inline-item" | ||
= link_to _("License"), "https://github.com/openSUSE/news-o-o/blob/master/LICENSE", class: "list-inline-item" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
%nav.navbar.noprint.navbar-expand-md.sticky-top | ||
- homepage = build_service == true ? "https://build.opensuse.org" : "/" | ||
= link_to homepage, class: "navbar-brand" do | ||
= image_tag "chameleon/logo/favicon.svg", class: "d-inline-block align-top", alt: "openSUSE", title: "openSUSE", width: "30", height: "30" | ||
.navbar-title | ||
- if build_service == true | ||
= _("Build Service") | ||
- else | ||
= _("Software") | ||
|
||
%button.navbar-toggler{ type: "button", data: { toggle: "collapse", target: "#navbar-collapse" } } | ||
= icon "navbar_toggle" | ||
.collapse.navbar-collapse#navbar-collapse | ||
%ul.nav.navbar-nav.mr-auto.flex-md-shrink-0 | ||
- if build_service == true | ||
%li.nav-item | ||
= link_to "Embed instructions", { controller: "download", action: "doc" }, class: "nav-link" | ||
- else | ||
%li.nav-item | ||
= link_to "https://github.com/openSUSE/news-o-o#how-to-submit-a-new-post", class: "nav-link" do | ||
New Post | ||
%li.nav-item.dropdown | ||
= link_to "#", class: "nav-link dropdown-toggle", id: "locale-menu-link", role: "button", "data-toggle": "dropdown", "aria": { "haspopup": "true", "expanded": "false" } do | ||
= icon "navbar_locale" | ||
%span.selected-language= LANGUAGE_NAMES[@lang] | ||
%span.caret | ||
.dropdown-menu.dropdown-menu-right | ||
- LANGUAGES.sort.each do |lang| | ||
= link_to LANGUAGE_NAMES[lang], params.permit.merge(locale: lang), class: "dropdown-item" | ||
|
||
%button.navbar-toggler.megamenu-toggler{ type: "button", data: { toggle: "collapse", target: "#megamenu" } } | ||
= icon "megamenu_toggle" | ||
|
||
#megamenu.megamenu.collapse |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
!!! 5 | ||
%html | ||
%head{ lang: @lang } | ||
%meta{ charset: "utf-8" } | ||
%meta{ "http-equiv": "X-UA-Compatible", content: "IE=edge" } | ||
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" } | ||
%title= @page_title || _('openSUSE Software') | ||
%meta{ "http-equiv": "Content-Type", content: "text/html; charset=utf-8" } | ||
%meta{ "http-equiv": "Content-Script-Type", content: "text/javascript" } | ||
%meta{ "http-equiv": "Content-Style-Type", content: "text/css" } | ||
%link{ rel: "search", type: "application/opensearchdescription+xml", title: "openSUSE Software", href: "/search_software.xml" } | ||
%link{ href: "https://software.opensuse.org/favicon.ico", rel: "shortcut icon" } | ||
= stylesheet_link_tag "application" | ||
= javascript_include_tag "application" | ||
%body | ||
= render partial: "layouts/navbar", locals: { hidesearchbox: @hide_search_box, build_service: @build_service } | ||
- unless flash.blank? | ||
= render(partial: "layouts/flash", object: flash) | ||
%main#content.page-content.flex-fill | ||
- unless @hide_search_box | ||
= render partial: 'search/find_form', locals: { baseproject: @baseproject } | ||
#search_result_container | ||
= yield | ||
= render partial: "layouts/footer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
!!! 5 | ||
%html | ||
%head | ||
= stylesheet_link_tag "application" | ||
= javascript_include_tag "application" | ||
|
||
%body | ||
= yield |
Oops, something went wrong.