Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikorin committed Dec 4, 2024
1 parent 06b438d commit b64235f
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 84 deletions.
27 changes: 14 additions & 13 deletions source/_member_template.html.haml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
.container
- data.members.members.each do |member|
- if member["type"] == type
.mb-3
.row.vertical-align
.col-xs-6.col-md-6
-if member.img == nil || member.img.length == 0
= image_tag "unknown.jpg", class: "img-fluid text-center rounded"
- else
= image_tag "members/#{member.img}", class: "img-fluid text-center rounded"
.col-xs-6.col-md-6
%p
%h3= member.name
%h6= member.function
.mb-3
- next unless member['type'] == type

.mb-3
.row.vertical-align
.col-xs-6.col-md-6
- if member.img.nil? || member.img.empty?
= image_tag 'unknown.jpg', class: 'img-fluid text-center rounded'
- else
= image_tag "members/#{member.img}", class: 'img-fluid text-center rounded'
.col-xs-6.col-md-6
%p
%h3= member.name
%h6= member.function
.mb-3
23 changes: 12 additions & 11 deletions source/_project_template.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
- data.projects.projects.each do |project|
- if project["type"] == type
%div.card.shadow
-if project["img"] != nil && project["img"].length != 0
= image_tag "projects/#{project.img}", class: "card-img-top img-fluid"
- next unless project['type'] == type

%div.card-block
.container
%h4.card-title.padding-top
= project.name
%div.card.shadow
- if !project['img'].nil? && !project['img'].empty?
= image_tag "projects/#{project.img}", class: 'card-img-top img-fluid'

-if project["info"] != nil && project["info"].length != 0
%p.card-text
= partial project.info
%div.card-block
.container
%h4.card-title.padding-top
= project.name

- if !project['info'].nil? && !project['info'].empty?
%p.card-text
= partial project.info
4 changes: 2 additions & 2 deletions source/about.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%p
Poza wymienionymi wyżej imprezami, zajmujemy się również tworzeniem projektów informatycznych. Ich tematyka zależy od inwencji pomysłodawców – każda nowa idea jest mile widziana.
.col-md-4
= image_tag "about1.jpg", class: "img-reponsive text-cente", width: 290
= image_tag 'about1.jpg', class: 'img-reponsive text-cente', width: 290

%p
Wszystkich chętnych do realizacji własnych projektów, wspieramy zarówno merytorycznie, jak i materialnie (sprzęt i finanse). Więcej na temat realizowanych inicjatyw, znajdziesz w zakładce Projekty.
Expand All @@ -22,7 +22,7 @@

.row
.col-md-5
= image_tag "about2.jpg", class: "img-reponsive text-cente"
= image_tag 'about2.jpg', class: 'img-reponsive text-cente'
.col-md-7
%p
Zachęcamy do uczestnictwa w prowadzonych przez nas imprezach, a wszystkich aktywnych studentów Politechniki Wrocławskiej zapraszamy do wstąpienia w szeregi ASI.
Expand Down
4 changes: 2 additions & 2 deletions source/contact.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
ul. Wybrzeże Wyspiańskiego 27 50-370 Wrocław
%p
Możesz również skontaktować się z nami osobiście. Nasza siedziba znajduje się przy ul. Grunwaldzkiej 61, w pok. nr 1 (wejście boczne budynku T3).
%iframe{:src=> "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2504.7163939615493!2d17.062328215609334!3d51.11369257957233!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470fc28025bdb3fb%3A0x4ade31e957e7e0b!2sAkademickie+Stowarzyszenie+Informatyczne!5e0!3m2!1sen!2spl!4v1517058681224",
:width => "600", :height => "450", :frameborder => "0", :style => "border:0", :allowfullscreen => "true"}
%iframe{src: 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2504.7163939615493!2d17.062328215609334!3d51.11369257957233!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470fc28025bdb3fb%3A0x4ade31e957e7e0b!2sAkademickie+Stowarzyszenie+Informatyczne!5e0!3m2!1sen!2spl!4v1517058681224',
width: '600', height: '450', frameborder: '0', style: 'border:0', allowfullscreen: 'true'}
4 changes: 2 additions & 2 deletions source/events.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


%h1 Kalendarz wydarzeń
%iframe{:src => "https://calendar.google.com/calendar/embed?src=hlbiuv7bucei3sggbuafrdg5ok%40group.calendar.google.com&ctz=Europe%2FWarsaw",
:style => "border: 0", :width => "650", :height => "600", :frameborder => "0", :scrolling => "no"}
%iframe{src: 'https://calendar.google.com/calendar/embed?src=hlbiuv7bucei3sggbuafrdg5ok%40group.calendar.google.com&ctz=Europe%2FWarsaw',
style: 'border: 0', width: '650', height: '600', frameborder: '0', scrolling: 'no'}
2 changes: 1 addition & 1 deletion source/footer.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
%footer
%hr
%p.center
="Akademickie Stowarzyszenie Informatyczne © #{Time.now.strftime("%Y")}"
= "Akademickie Stowarzyszenie Informatyczne © #{Time.now.strftime('%Y')}"
44 changes: 22 additions & 22 deletions source/layouts/default.haml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
!!!
%html
%head
%script{:async => true, :crossorigin => "anonymous", :integrity => "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN", :src => "https://code.jquery.com/jquery-3.2.1.slim.min.js"}
%script{:async => true, :crossorigin => "anonymous", :integrity => "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q", :src => "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"}
%link{:async => true, :crossorigin => "anonymous", :href => "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css", :integrity => "sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm", :rel => "stylesheet"}/
%link{:crossorigin => "anonymous", :href => "/css/style.css", :rel => "stylesheet"}/
%link{:crossorigin => "anonymous", :href => "/css/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon"}/
%script{:async => true, :crossorigin => "anonymous", :integrity => "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl", :src => "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"}
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%meta{:charset => "utf-8"}/
%meta{:content => "IE=edge;chrome=1", "http-equiv" => "X-UA-Compatible"}/
%meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
%script{async: true, crossorigin: 'anonymous', integrity: 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN', src: 'https://code.jquery.com/jquery-3.2.1.slim.min.js'}
%script{async: true, crossorigin: 'anonymous', integrity: 'sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q', src: 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'}
%link{async: true, crossorigin: 'anonymous', href: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css', integrity: 'sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm', rel: 'stylesheet'}/
%link{crossorigin: 'anonymous', href: '/css/style.css', rel: 'stylesheet'}/
%link{crossorigin: 'anonymous', href: '/css/favicon.ico', rel: 'shortcut icon', type: 'image/x-icon'}/
%script{async: true, crossorigin: 'anonymous', integrity: 'sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl', src: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js'}
%meta{:content => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type'}/
%meta{charset: 'utf-8'}/
%meta{:content => 'IE=edge;chrome=1', 'http-equiv' => 'X-UA-Compatible'}/
%meta{content: 'width=device-width, initial-scale=1', name: 'viewport'}/
%title
Akademickie Stowarzyszenie Informatyczne#{' - ' + current_article.title unless current_article.nil?}
= feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed"
Akademickie Stowarzyszenie Informatyczne#{" - #{current_article.title}" unless current_article.nil?}
= feed_tag :atom, "#{blog.options.prefix}/feed.xml", title: 'Atom Feed'
%body
= partial "menu.haml"
= partial 'menu.haml'
%main.container
.row
.col-md-8.col-sm-11
%h3 #{current_article.title unless current_article.nil?}
= yield
- if current_article
%a(href="javascript:window.history.back();" )= t("back")
%a(href="javascript:window.history.back();" )= t('back')
.col-md-4.col-sm-12
.mb-3
%h2.aside= t('meetings')
%p Spotykamy się w każdy wtorek o godzinie 18:00 w naszej siedzibie, która mieści się na ulicy Grunwaldzkiej 61, w pok. nr 1 (wejście boczne budynku T3).
%h2.aside= t('social.online')
%a{:href => "https://discord.gg/nwdcrnk", :target => "_blank"} Discord
%a{href: 'https://discord.gg/nwdcrnk', target: '_blank'} Discord
%br
%a{:href => "https://www.facebook.com/asi-wroclaw/", :target => "_blank"} Facebook
%a{href: 'https://www.facebook.com/asi-wroclaw/', target: '_blank'} Facebook
%br
%a{:href => "https://www.linkedin.com/company/akademickie-stowarzyszenie-informatyczne/", :target => "_blank"} LinkedIn
%a{href: 'https://www.linkedin.com/company/akademickie-stowarzyszenie-informatyczne/', target: '_blank'} LinkedIn
%br
%a{:rel => "me", :href => "https://fosstodon.org/@ASI", :target => "_blank"} Mastodon
%a{rel: 'me', href: 'https://fosstodon.org/@ASI', target: '_blank'} Mastodon
%br
%a{:href => "https://bsky.app/profile/asi.wroclaw.pl", :target => "_blank"} Bluesky
%a{href: 'https://bsky.app/profile/asi.wroclaw.pl', target: '_blank'} Bluesky
%br
%a{:href => "https://www.facebook.com/groups/175529160840/", :target => "_blank"}= t('social.group')
%a{href: 'https://www.facebook.com/groups/175529160840/', target: '_blank'}= t('social.group')
%br
%p
%h2.aside= t('by_year')
- blog.articles.group_by {|a| a.date.year }.each do |year, articles|
- blog.articles.group_by { |a| a.date.year }.each do |year, articles|
%p= link_to "#{year} (#{articles.size})", blog_year_path(year)
= partial "footer.haml"
= partial 'footer.haml'
12 changes: 5 additions & 7 deletions source/localizable/index.en.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
pageable: true
per_page: 10
---

- page_articles.each_with_index do |article, i|
- page_articles.each_with_index do |article, _i|
.post
%h3
.row.justify-content-between
.col-md-8.col-sm-12
= link_to article.title, article
.col-md-4.col-sm-12.text-md-right
%small.text-muted= I18n.localize(article.date, format: "%Y-%m-%d")
%small.text-muted= I18n.localize(article.date, format: '%Y-%m-%d')
%p
= article.summary(250)

- if paginate && num_pages > 1
%p= t("pagination", page_number: page_number, num_pages: num_pages)
%p= t('pagination', page_number: page_number, num_pages: num_pages)
- if prev_page
%p.dx= link_to t('previous_page'), prev_page
- if paginate
- if next_page
%p.dx= link_to t('next_page'), next_page
- if paginate && next_page
%p.dx= link_to t('next_page'), next_page
12 changes: 5 additions & 7 deletions source/localizable/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
pageable: true
per_page: 10
---

- page_articles.each_with_index do |article, i|
- page_articles.each_with_index do |article, _i|
.post
%h3
.row.justify-content-between
.col-md-8.col-sm-12
= link_to article.title, article
.col-md-4.col-sm-12.text-md-right
%small.text-muted= I18n.localize(article.date, format: "%Y-%m-%d")
%small.text-muted= I18n.localize(article.date, format: '%Y-%m-%d')
%p
= article.summary(250)

- if paginate && num_pages > 1
%p= t("pagination", page_number: page_number, num_pages: num_pages)
%p= t('pagination', page_number: page_number, num_pages: num_pages)
- if prev_page
%p.dx= link_to t('previous_page'), prev_page
- if paginate
- if next_page
%p.dx= link_to t('next_page'), next_page
- if paginate && next_page
%p.dx= link_to t('next_page'), next_page
5 changes: 3 additions & 2 deletions source/members.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
.container
%ul.alumni
- data.members.members.each do |member|
- if member["type"] == 4
%li= member.name
- next unless member['type'] == 4

%li= member.name
20 changes: 10 additions & 10 deletions source/menu.haml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
.container
%nav.navbar.navbar-expand-md.navbar-light
%a.navbar-brand{:href=> "/"}
%img.logo{src: "/css/asi-logo.svg"}
%button.navbar-toggler{type: "toggle", "data-target":"#navbar-menu", "data-toggle":"collapse", "aria-expanded":"false", "aria-label": "Toggle navigation"}
%a.navbar-brand{href: '/'}
%img.logo{src: '/css/asi-logo.svg'}
%button.navbar-toggler{type: 'toggle', "data-target": '#navbar-menu', "data-toggle": 'collapse', "aria-expanded": 'false', "aria-label": 'Toggle navigation'}
%span.navbar-toggler-icon
.collapse.navbar-collapse#navbar-menu
%ul.navbar-nav.ml-auto.flex-sm-row.justify-content-between
%li.nav-item
%a.nav-link{href: "/about"} O nas
%a.nav-link{href: '/about'} O nas
%li.nav-item
%a.nav-link{href: "/recruitment"} Rekrutacja
%a.nav-link{href: '/recruitment'} Rekrutacja
%li.nav-item
%a.nav-link{href: "/events"} Kalendarz
%a.nav-link{href: '/events'} Kalendarz
%li.nav-item
%a.nav-link{href: "/projects"} Projekty
%a.nav-link{href: '/projects'} Projekty
%li.nav-item
%a.nav-link{href: "/members"} Ludzie
%a.nav-link{href: '/members'} Ludzie
%li.nav-item
%a.nav-link{href: "/regulamin.pdf", target: "_blank"} Regulamin
%a.nav-link{href: '/regulamin.pdf', target: '_blank'} Regulamin
%li.nav-item
%a.nav-link{href: "/contact"} Kontakt
%a.nav-link{href: '/contact'} Kontakt
%hr
.mb-3
2 changes: 1 addition & 1 deletion source/recruitment.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
Jeżeli nie pasują Ci terminy naszych spotkań – nic straconego! W naszej siedzibie w ciągu roku akademickiego (głównie wieczorami) naszych członków można spotkać nie tylko we wtorki, ale również w inne dni tygodnia. Wystarczy zadzwonić na nasz numer (podany na stronie) – jeżeli ktoś z organizacji znajduje się w siedzibie, na pewno odbierze. W takim wypadku wystarczy przyjść, przywitać się i rozpocząć swoją przygodę z ASI!

.col-md-4
= image_tag "poster.jpg", class: "img-reponsive text-cente"
= image_tag 'poster.jpg', class: 'img-reponsive text-cente'
7 changes: 3 additions & 4 deletions source/tag.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ per_page: 12
- if prev_page
%p= link_to t('previous_page'), prev_page
%ul
- page_articles.each_with_index do |article, i|
- page_articles.each_with_index do |article, _i|
%li
= link_to article.title, article
%span= article.date.strftime('%b %e')
- if paginate
- if next_page
%p= link_to t('next_page'), next_page
- if paginate && next_page
%p= link_to t('next_page'), next_page

0 comments on commit b64235f

Please sign in to comment.